You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/07/21 12:02:16 UTC

[GitHub] [incubator-nuttx] Cynerd opened a new pull request, #6657: Lcd st7789 putarea

Cynerd opened a new pull request, #6657:
URL: https://github.com/apache/incubator-nuttx/pull/6657

   ## Summary
   This is the follow-up to #6551. The change in that PR broke LCD drivers with `putarea` implemented. This updates the documentation to reflect changes there and also updates driver for ST7789.
   
   The discussion on mailing-list: https://lists.apache.org/thread/4yk5z9qlb9qhslwpbyzgkt07ff578or9
   
   ## Impact
   
   This should give hint to other developers working on LCD` drivers that expected behavior changed and that semantic of passed argument buffer is now different.
   
   ## Testing
   
   Tested on custom SAME70N21 based board.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] xiaoxiang781216 commented on pull request #6657: drivers/lcd/st7789: update putarea() method

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on PR #6657:
URL: https://github.com/apache/incubator-nuttx/pull/6657#issuecomment-1200436286

   Yes, we need some thing like pitch or a new callback to indicate the different usage. @Cynerd @lupyuen could you provide the patch for this?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] xiaoxiang781216 merged pull request #6657: drivers/lcd/st7789: update putarea() method

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 merged PR #6657:
URL: https://github.com/apache/incubator-nuttx/pull/6657


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] lupyuen commented on pull request #6657: drivers/lcd/st7789: update putarea() method

Posted by GitBox <gi...@apache.org>.
lupyuen commented on PR #6657:
URL: https://github.com/apache/incubator-nuttx/pull/6657#issuecomment-1199275251

   Here's the ST7789 display with the random noise. Note that the top row of text looks OK, the rest is garbled:
   
   ![PXL_20220729_131137211_2](https://user-images.githubusercontent.com/9960133/181768159-9aff92f7-dc76-433e-a1e7-fadf67cfa317.jpg)
   
   The correct display should be this:
   
   ![touch-title (1)](https://user-images.githubusercontent.com/9960133/181768555-fcf9d833-6653-4aca-be9f-aa7f87907379.jpg)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] lupyuen commented on pull request #6657: drivers/lcd/st7789: update putarea() method

Posted by GitBox <gi...@apache.org>.
lupyuen commented on PR #6657:
URL: https://github.com/apache/incubator-nuttx/pull/6657#issuecomment-1204657460

   Hi @tmedicci this patch for `lvgldemo/lcddev.c` works OK for my ST7789: 
   
   https://github.com/lupyuen/lvgltest-nuttx/commit/95c76d4c8dd204a111abf87d81fd74f9fdef6dd8
   
   ```c
   static void lcddev_sync_flush(lv_disp_drv_t *disp_drv, const lv_area_t *area,
                                 lv_color_t *color_p)
   {
     // TODO: Change LCDDEVIO_PUTRUN back to LCDDEVIO_PUTAREA so that it performs better with SPI DMA
     // https://github.com/apache/incubator-nuttx/pull/6657#issuecomment-1200094716
   
     lv_color_t *data = color_p;
   
     for (lv_coord_t row = area->y1; row <= area->y2; row++)
       {
         int ret;
         struct lcddev_run_s lcd_run;
   
         lcd_run.row     = row;
         lcd_run.col     = area->x1;
         lcd_run.data    = (uint8_t *)data;
         lcd_run.npixels = area->x2 - area->x1 + 1;
         data += lcd_run.npixels;
   
         ret = ioctl(state.fd, LCDDEVIO_PUTRUN,
                     (unsigned long)((uintptr_t)&lcd_run));
   
         if (ret < 0)
           {
             int errcode = errno;
   
             gerr("ioctl(LCDDEVIO_PUTRUN) failed: %d\n", errcode);
             close(state.fd);
             return;
           }
       }
   
     /* Tell the flushing is ready */
   
     lv_disp_flush_ready(disp_drv);
   }
   ```
   
   This patch renders one row of pixels at a time. So it might not render as quickly as the previous version. (Especially with SPI DMA)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] xiaoxiang781216 commented on pull request #6657: drivers/lcd/st7789: update putarea() method

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on PR #6657:
URL: https://github.com/apache/incubator-nuttx/pull/6657#issuecomment-1210104540

   I agree to pass the start of drawing area to putarea, but we need an additional parameter to pass the frame buffer stride to lcd driver.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] tmedicci commented on pull request #6657: drivers/lcd/st7789: update putarea() method

Posted by GitBox <gi...@apache.org>.
tmedicci commented on PR #6657:
URL: https://github.com/apache/incubator-nuttx/pull/6657#issuecomment-1210705699

   Hi!
   
   Thank you for your ack, @xiaoxiang781216 ! 
   
   I understand `stride` as similar as the `pitch` from Zephyr's. However, it may not be necessary because de LCD driver usually keeps track of its own `bpp` and is able to calculate the `stride`. That is the case for st7789 at least. The current implementation does some kind of "row by row" write that enables partial refresh without using the `stride` from the framebuffer:
   
   https://github.com/apache/incubator-nuttx/blob/b8b541fbf5c75f13387560bb0639a4a5b27ec881/drivers/lcd/st7789.c#L450-L466
   
   `size` and `skip` are defined as follows:
   https://github.com/apache/incubator-nuttx/blob/b8b541fbf5c75f13387560bb0639a4a5b27ec881/drivers/lcd/st7789.c#L567-L576
   
   That is possible because of the `st7789_select(dev->spi, ST7789_BYTESPP * 8);` and the definition of the buffer as a `uint16_t`.
   
   I've tested a partial write for the ST7789 using framebuffer and everything works as expected (tested full row mode and an area that doesn't start at `col_start = 0` and that doesn't end at `col_end = xres - 1`) 
    
   Also, it'd be possible to call `getplaneinfo` to retrieve the `stride` as well if needed by some driver. 
   
   I may be missing something here, so I'd be glad to hear from you if that makes sense ;)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] Cynerd commented on pull request #6657: drivers/lcd/st7789: update putarea() method

Posted by GitBox <gi...@apache.org>.
Cynerd commented on PR #6657:
URL: https://github.com/apache/incubator-nuttx/pull/6657#issuecomment-1200366852

   > The current implementation of putarea might have a performance concern.
   
   The same can be said with the previous implementation and frame buffer usage. There are just two approaches needed and thus one function can't satisfy it.
   
   > add new callback or new argument to put_area
   
   I would not complicate the `putarea` call and instead, add something like `putrect`.
   
   I am also not sure if reverting to the previous `putarea` behaviour is the best idea. My investigation showed that LCD drivers (except  of one) were already updated. The revert of all of those changes would have to be performed. I also like the idea that `putarea` updates a specified area from the whole buffer, while `putrect` would update provided rectangle. On the other hand, revert would ensure consistency with the previous behaviour.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] Cynerd commented on pull request #6657: drivers/lcd/st7789: update putarea() method

Posted by GitBox <gi...@apache.org>.
Cynerd commented on PR #6657:
URL: https://github.com/apache/incubator-nuttx/pull/6657#issuecomment-1200144179

   I see. The lvgldemo's branch that uses LCD device has to be updated. I am using a frame buffer that is why I missed that.
   
   You probably want to switch from `putarea` to `putrun` then. It expects only one line of pixes, and thus multiple calls might be required, but it is the solution.
   
   The second option would be to add a new function that would draw just the specified rectangle (the original putarea behaviour). The revert was declined on the mailing list, and thus expanding API might be the better option here to satisfy both use cases.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] xiaoxiang781216 commented on pull request #6657: drivers/lcd/st7789: update putarea() method

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on PR #6657:
URL: https://github.com/apache/incubator-nuttx/pull/6657#issuecomment-1211087640

   > Hi!
   > 
   > Thank you for your ack, @xiaoxiang781216 and @lupyuen !
   > 
   > I understand `stride` as similar as the `pitch` from Zephyr's.
   
   Yes, you are right.
   
   > However, it may not be necessary because de LCD driver usually keeps track of its own `bpp` and is able to calculate the `stride`.
   
   The stride is very different between frame  buffer and lcd:
   
   1. The stride for frame buffer is normally the full width(may add some padding) regardless the refresh region
   2. The stride for lcd is always same as the refresh region
   
   So, for example, if the screen is 480x640@RGB565 and the refresh region is (0, 0)-(240, 320):
   
   1. The stride for frame buffer is  960 bytes
   2. The stride for lcd buffer is 480 bytes
   
   > That is the case for st7789 at least. The current implementation does some kind of "row by row" write that enables partial refresh without using the `stride` from the framebuffer:
   > 
   > https://github.com/apache/incubator-nuttx/blob/b8b541fbf5c75f13387560bb0639a4a5b27ec881/drivers/lcd/st7789.c#L450-L466
   > 
   > `size` and `skip` are defined as follows:
   > 
   > https://github.com/apache/incubator-nuttx/blob/b8b541fbf5c75f13387560bb0639a4a5b27ec881/drivers/lcd/st7789.c#L567-L576
   > 
   > That is possible because of the `st7789_select(dev->spi, ST7789_BYTESPP * 8);` and the definition of the buffer as a `uint16_t`.
   > 
   > I've tested a partial write for the ST7789 using framebuffer and everything works as expected (tested full row mode and an area that doesn't start at `col_start = 0` and that doesn't end at `col_end = xres - 1`)
   > 
   
   If you use lcd driver interface, you most want the skip is zero. Basically, the lcd driver interface want the buffer only has the content of refresh region.
   
   > Also, it'd be possible to call `getplaneinfo` to retrieve the `stride` as well if needed by some driver.
   > 
   > I may be missing something here, so I'd be glad to hear from you if that makes sense ;)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] lupyuen commented on pull request #6657: drivers/lcd/st7789: update putarea() method

Posted by GitBox <gi...@apache.org>.
lupyuen commented on PR #6657:
URL: https://github.com/apache/incubator-nuttx/pull/6657#issuecomment-1199155394

   Hi @Cynerd this commit seems to cause my ST7789 display to render a screen with random noise. I'm using Pine64's [PineDio Stack BL604](https://lupyuen.github.io/articles/pinedio2) RISC-V Board with integrated ST7789 display.
   
   The previous version of `st7789_wrram` (that doesn't write multiples of size while skipping some values) works OK for me:
   
   https://github.com/lupyuen/incubator-nuttx/blob/f67a25341101b8a07dd957a078b3ca1f7f1e2bcb/drivers/lcd/st7789.c
   
   I tested with this LVGL app: https://github.com/lupyuen/lvgltest-nuttx
   
   Which is a simplified version of the NuttX LVGL Demo: https://github.com/apache/incubator-nuttx-apps/tree/master/examples/lvgldemo
   
   Any idea how I can troubleshoot this? Thanks!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] lupyuen commented on pull request #6657: drivers/lcd/st7789: update putarea() method

Posted by GitBox <gi...@apache.org>.
lupyuen commented on PR #6657:
URL: https://github.com/apache/incubator-nuttx/pull/6657#issuecomment-1199383511

   Sorry I'm using LCD Device for ST7789, not Framebuffer. I'm calling `board_lcd_initialize` and `board_lcd_getdev` similar to this:
   
   https://github.com/apache/incubator-nuttx/blob/master/boards/risc-v/esp32c3/esp32c3-devkit/src/esp32c3_st7789.c
   
   How do I use Framebuffer with ST7789?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] pkarashchenko commented on a diff in pull request #6657: drivers/lcd/st7789: update putarea() method

Posted by GitBox <gi...@apache.org>.
pkarashchenko commented on code in PR #6657:
URL: https://github.com/apache/incubator-nuttx/pull/6657#discussion_r926626523


##########
drivers/lcd/st7789.c:
##########
@@ -554,15 +564,16 @@ static int st7789_putarea(FAR struct lcd_dev_s *dev,
 {
   FAR struct st7789_dev_s *priv = (FAR struct st7789_dev_s *)dev;
   FAR const uint16_t *src = (FAR const uint16_t *)buffer;
+  fb_coord_t bsiz = col_end - col_start + 1;
 
   ginfo("row_start: %d row_end: %d col_start: %d col_end: %d\n",
          row_start, row_end, col_start, col_end);
 
   DEBUGASSERT(buffer && ((uintptr_t)buffer & 1) == 0);
 
   st7789_setarea(priv, col_start, row_start, col_end, row_end);
-  st7789_wrram(priv, src,
-               (row_end - row_start + 1) * (col_end - col_start + 1));
+  st7789_wrram(priv, src + (ST7789_XRES * row_start) + col_start,
+      bsiz, ST7789_XRES - bsiz, row_end - row_start + 1);

Review Comment:
   ```suggestion
     st7789_wrram(priv, src + (ST7789_XRES * row_start) + col_start,
                  bsiz, ST7789_XRES - bsiz, row_end - row_start + 1);
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] Cynerd commented on pull request #6657: drivers/lcd/st7789: update putarea() method

Posted by GitBox <gi...@apache.org>.
Cynerd commented on PR #6657:
URL: https://github.com/apache/incubator-nuttx/pull/6657#issuecomment-1199404132

   @lupyuen I think that you don't have to use framebuffer. You only have to change how you use `putarea()`. The issue I was fixing is that the expected behaviour of that function changed, or rather was changed to better fit frame buffer implementation. This is also why I updated documentation for the putarea function. If you use LCD directly then you are calling these functions and most likely you are calling putarea, not with a full buffer but only the selected part you want to update.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] tmedicci commented on pull request #6657: drivers/lcd/st7789: update putarea() method

Posted by GitBox <gi...@apache.org>.
tmedicci commented on PR #6657:
URL: https://github.com/apache/incubator-nuttx/pull/6657#issuecomment-1210007010

   Hi everyone!
   
   I’ve been thinking about this lcddev x framebuffer behavior since last week. I’ve read all this discussion, ones from the NuttX [mailing list](https://lists.apache.org/thread/4yk5z9qlb9qhslwpbyzgkt07ff578or9), ones related to the implementation of the [lcddev](https://github.com/apache/incubator-nuttx/pull/2166) itself and the discussions about framebuffer driver usage ([#6564 ](https://github.com/apache/incubator-nuttx/pull/6564) [#6551 ](https://github.com/apache/incubator-nuttx/pull/6551)).
   
   By analyzing Zephyr’s ST7789 implementation (thank you @lupyuen), I’ve seen that the data buffer contains only the data that actually would be necessary to draw the display (note that `write_data_start` points to the received buffer during the first iteration). That is not true for the current implementation of framebuffer’s putarea callback as it refers the `fbmem` buffer and forwards this pointer to the display’s drivers, i. e, the buffer that contains the data to draw the entire display: https://github.com/apache/incubator-nuttx/blob/fa2e1897eab8bc6838f0e8bc791a0d7fbaa58972/drivers/lcd/lcd_framebuffer.c#L216-L234. 
   Actually, this is what commit https://github.com/apache/incubator-nuttx/commit/fb0fdea4d4d0d7a27badaaa06643ba15749ba746
   states correctly while fixing putarea’s header description. However, this behavior is not compliant with lcddev (and maybe other implementations that don’t allocate a buffer that contains data from the entire display). 
   
   **The problems:**
   1) Current implementation does not allow using displays’ putarea within lcddev driver. Applications should allocate a buffer to represent the entire display even if it only needs to update an area of the display or 2) either not using putarea, replacing it to putrun, row by row. Efficiency might be affected.
   
   **My suggestions:**
   There’d be no need to keep a reference for the buffer that represents the entire display. Framebuffer’s driver callback could forward to display’s driver the reference to the start of the area that actually would be sent. That would be very similar to Zephyr’s implementation. In fact, that was true before https://github.com/apache/incubator-nuttx/commit/664d45dcbace03a879017aa99566592be31f4308. 
   Note that https://github.com/apache/incubator-nuttx/blob/881902d2cdf84902863cf848fb506be1613c8ac1/drivers/lcd/lcd_framebuffer.c#L219-L220 calculates the init of the buffer that contains data which is being refreshed. By applying that for putarea too (currently, only putrun does that), it’s possible to handle framebuffer and lcddev, optimizing memory and speed (by checking into displays’ drivers if it’s performing a full screen/for row mode, as stated:
   https://github.com/apache/incubator-nuttx/blob/664d45dcbace03a879017aa99566592be31f4308/drivers/lcd/lcd_framebuffer.c#L218-L226
   
   
   What do you think, @xiaoxiang781216, @Cynerd, @lupyuen, and @adamkaliszan?
   
   May I submit a PR for that?
   
   I’ve already checked that this works and minimal changes would be required (only for the drivers that use putearea and were defined recently. Namely, a small fix for ST7789 and APA102). I have a ST7789 and @acassis can test APA102, I think.
   
   I look forward to hearing from you ;) 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] lupyuen commented on pull request #6657: drivers/lcd/st7789: update putarea() method

Posted by GitBox <gi...@apache.org>.
lupyuen commented on PR #6657:
URL: https://github.com/apache/incubator-nuttx/pull/6657#issuecomment-1200378739

   Yep this is a tough decision. In case anybody is curious how ST7789 is implemented in Zephyr: https://github.com/zephyrproject-rtos/zephyr/blob/main/drivers/display/display_st7789v.c


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] lupyuen commented on pull request #6657: drivers/lcd/st7789: update putarea() method

Posted by GitBox <gi...@apache.org>.
lupyuen commented on PR #6657:
URL: https://github.com/apache/incubator-nuttx/pull/6657#issuecomment-1200094716

   (Sorry if I misunderstood this) Does it mean that the `lvgldemo` example might need to be updated to call `putarea` correctly?
   
   https://github.com/apache/incubator-nuttx-apps/blob/master/examples/lvgldemo/lcddev.c#L145-L159
   
   ```c
     struct lcddev_area_s lcd_area;
     lcd_area.row_start = area->y1;
     lcd_area.row_end = area->y2;
     lcd_area.col_start = area->x1;
     lcd_area.col_end = area->x2;
     lcd_area.data = (uint8_t *)color_p;
     ret = ioctl(state.fd, LCDDEVIO_PUTAREA,
                 (unsigned long)((uintptr_t)&lcd_area));
   ```
   
   Lemme trace the call to `putarea` and understand how it renders the screen.
   
   As you have suggested, I'll pass a recognizable pattern to `putarea` and see how it renders the pattern. Thanks!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] lupyuen commented on pull request #6657: drivers/lcd/st7789: update putarea() method

Posted by GitBox <gi...@apache.org>.
lupyuen commented on PR #6657:
URL: https://github.com/apache/incubator-nuttx/pull/6657#issuecomment-1200146986

   Thanks I'll change the `lvgldemo` example from `putarea` to `putrun` and render one row of pixels at a time.
   
   It's a great pity that we can no longer blast out multiple rows of pixels in a single SPI DMA operation to ST7789. Screen redraws will now be slower.
   
   Or maybe I should negative-offset the pointer to `putarea`, so that it pretends to be the entire Display Buffer? It's an awful hack but it will perform better with DMA and render faster. 🤔


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] xiaoxiang781216 commented on pull request #6657: drivers/lcd/st7789: update putarea() method

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on PR #6657:
URL: https://github.com/apache/incubator-nuttx/pull/6657#issuecomment-1200164362

   If we want to update a partial region, the memory layout for framebuffer and lcd is different. To speed up both case, we need extend the lcd_ops(add new callback or new argument to put_area) to indicate which case is requested.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] tmedicci commented on pull request #6657: drivers/lcd/st7789: update putarea() method

Posted by GitBox <gi...@apache.org>.
tmedicci commented on PR #6657:
URL: https://github.com/apache/incubator-nuttx/pull/6657#issuecomment-1204228878

   Hi there!
   
   I've been facing this same problem: the ST7789 + `lvgldemo` based on `lcddev` broke the code. However, the `lcddev` is the fallback for the `lvgldemo`: simply disabling it (CONFIG_LCD_DEV not set) and enabling the framebuffer (CONFIG_LCD_FRAMEBUFFER=y) "fix" the problem of the example code. More work on the `lcd_dev` driver may be needed.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] pkarashchenko commented on pull request #6657: drivers/lcd/st7789: update putarea() method

Posted by GitBox <gi...@apache.org>.
pkarashchenko commented on PR #6657:
URL: https://github.com/apache/incubator-nuttx/pull/6657#issuecomment-1199266132

   @lupyuen could you please attach some picture of a situation that you are describing, just to understand what "random noise" mean.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] Cynerd commented on pull request #6657: drivers/lcd/st7789: update putarea() method

Posted by GitBox <gi...@apache.org>.
Cynerd commented on PR #6657:
URL: https://github.com/apache/incubator-nuttx/pull/6657#issuecomment-1199336995

   Can you please try the `fb` example? It draws recognizable pattern and it is easier to see what might have gone wrong from it than from this.
   
   I tested it and right now developing my application with LVGL with this patch and thus, this might be something platform or setting dependent.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] lupyuen commented on pull request #6657: drivers/lcd/st7789: update putarea() method

Posted by GitBox <gi...@apache.org>.
lupyuen commented on PR #6657:
URL: https://github.com/apache/incubator-nuttx/pull/6657#issuecomment-1200314155

   Thanks Xiao Xiang, yes I prefer the previous implementation of `putarea`
   
   The current implementation of `putarea` might have a performance concern. Right now we execute one SPI Transfer per row of pixels:
   
   https://github.com/apache/incubator-nuttx/blob/3693d387637e70a42b1ddbfda86c78ea73595d93/drivers/lcd/st7789.c#L450-L463
   
   Previously we blasted the entire region of pixels in a single SPI Transfer (which performs really well with DMA):
   
   https://github.com/apache/incubator-nuttx/blob/f3dbc7bc63073f6b2f45296063c9759e279a5b16/drivers/lcd/st7789.c#L448-L454
   
   To refresh a 240x240 display, the current implementation requires 240 SPI Transfers (one per row). 
   
   The previous implementation requires only 12 SPI Transfers. (Assuming LVGL buffers 20 rows, as mentioned earlier)
   
   We could combine the SPI Transfers in `st7789_wrram`, but we'll need additional checks: `skip` must be 0, etc


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org