Hi everyone,
I’m working on a display project with LVGL 9.4 on an ESP32-S3, and I’d like to get some feedback from the community on the correct way to handle double buffering and asynchronous drawing.
Hardware:
– ESP32-S3 (Adafruit Qualia board with PSRAM)
– 720×720 display
– Parallel RGB565 interface
Software:
– ESP-IDF
– LVGL 9.4
– Graphics created with SquareLine Studio (working fine)
The display is configured using the ESP-IDF RGB LCD driver with double buffering, similar to the setup described here:
https://docs.espressif.com/projects/esp-idf/en/stable/esp32s3/api-reference/peripherals/lcd/rgb_lcd.html
One frame buffer is currently being displayed by the RGB peripheral, while the other buffer is used for rendering.
Now my question is about LVGL’s drawing model:
– I want LVGL to render asynchronously into the buffer that is NOT currently being displayed
– LVGL itself also supports double buffering
– However, LVGL still calls the flush_cb, where pixel data is copied again into the display buffer
This makes me unsure about the correct architecture:
– Should LVGL’s draw buffer be directly mapped to the RGB back buffer?
– Is it possible (or recommended) to fully avoid copying in flush_cb and just swap buffers?
– How do you properly synchronize LVGL rendering with the RGB panel’s VSYNC / buffer swap?
At the moment everything works visually (colors, sizes, performance are fine), but I want to make sure I’m using LVGL and the ESP-IDF RGB driver in the intended and most efficient way.
I can share code snippets if needed.
What am I missing?
Thanks in advance for any insights or best practices!
Cheers
HaenZ