rzeldent / esp32-smartdisplay

PlatformIO library LVGL Drivers for Sunton Smart display boards (CYD Cheap Yellow Display). This library supports these boards without any effort. ESP32-2432S024N/R/C, ESP32-2432S028R/C, ESP32-3248S035R/C, ESP32_8048S070N/C
https://github.com/rzeldent/platformio-espressif32-sunton
GNU General Public License v3.0
399 stars 70 forks source link

configurable display draw buffer support #122

Closed PingguSoft closed 8 months ago

PingguSoft commented 8 months ago

display update is so slow for boards with big resolution. it is caused by LVGL_PIXEL_BUFFER_LINES is limited to 16. I think it is better to give options such as SPIRAM and lines for drawBuffer.

With esp32-4848S040CIY1 board, below changes show fast display update.

void smartdisplay_init()
{
<snip>
//   uint drawBufferPixels = LCD_WIDTH * LVGL_PIXEL_BUFFER_LINES;
//   void *drawBuffer = heap_caps_malloc(sizeof(lv_color16_t) * drawBufferPixels, MALLOC_CAP_INTERNAL | MALLOC_CAP_8BIT);

  uint drawBufferPixels = LCD_WIDTH * LCD_HEIGHT;
  void *drawBuffer = heap_caps_malloc(sizeof(lv_color16_t) * drawBufferPixels, MALLOC_CAP_SPIRAM | MALLOC_CAP_8BIT);

thanks.

rzeldent commented 8 months ago

Excellent suggestion. Focus was on stability and get the displays working but this indeed should make it much more usable! Did a quick test and difference is remarkable!

rzeldent commented 8 months ago

Is now in develop

Also did this for other boards, let's hope it works as well as the esp32-8048S070 (that was really slow) Thanks again,