xiaoxiang781216 commented on a change in pull request #2208: URL: https://github.com/apache/incubator-nuttx/pull/2208#discussion_r516825901
########## File path: drivers/lcd/lcd_dev.c ########## @@ -123,20 +123,56 @@ static int lcddev_ioctl(FAR struct file *filep, int cmd, unsigned long arg) { case LCDDEVIO_GETRUN: { - FAR struct lcddev_run_s *lcd_putrun = + FAR struct lcddev_run_s *lcd_run = (FAR struct lcddev_run_s *)arg; - ret = priv->planeinfo.getrun(lcd_putrun->row, lcd_putrun->col, - lcd_putrun->data, lcd_putrun->npixels); + ret = priv->planeinfo.getrun(lcd_run->row, lcd_run->col, + lcd_run->data, lcd_run->npixels); } break; case LCDDEVIO_PUTRUN: { - const FAR struct lcddev_run_s *lcd_putrun = + const FAR struct lcddev_run_s *lcd_run = (const FAR struct lcddev_run_s *)arg; - ret = priv->planeinfo.putrun(lcd_putrun->row, lcd_putrun->col, - lcd_putrun->data, lcd_putrun->npixels); + ret = priv->planeinfo.putrun(lcd_run->row, lcd_run->col, + lcd_run->data, lcd_run->npixels); + } + break; + case LCDDEVIO_PUTAREA: + { + const FAR struct lcddev_area_s *lcd_area = + (const FAR struct lcddev_area_s *)arg; + + if (priv->planeinfo.putarea) + { + ret = priv->planeinfo.putarea(lcd_area->row_start, Review comment: Here is why the speed may fast than putarea: 1. Some GUI simply draw widgets from bottom to top which mean the same area will draw multiple times. Internal RAM is much fast than SPI LCD: Write twice RAM plus one SPI transfer normally fast than two SPI transfer 2. Advance UI(e.g. alpha blending) normally need read back the image data. LCD either don't support getarea or the speed is much slower than RAM. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org