I want to check the capability of LVGL on my new platform. Initially, I am testing all three render modes:
(1) LV_DISPLAY_RENDER_MODE_FULL
(2) LV_DISPLAY_RENDER_MODE_PARTIAL
(3) LV_DISPLAY_RENDER_MODE_DIRECT
The problem is that only LV_DISPLAY_RENDER_MODE_FULL is working fine. By “working fine,” I mean that no garbage is displayed and the image is crystal clear. However, for the other two modes, only the first call works correctly. From the second call onward, garbage is displayed.
So my question is:
**
Do I need different flush callbacks for different modes? Currently, I am using a single flush callback.
// Perform a dummy read to get valid data
// Read the first pixel and discard it.
volatile uint32_t dummy_read = *Color;
// The pointer is now pointing to the second pixel's data.
for(uint16_t Row = area->y1; Row <= area->y2; Row++)
{
for(uint16_t Col = area->x1; Col <= area->x2; Col++)
{
PixelSet(Col, Row, *Color);
Color++;
}
}
lv_disp_flush_ready(disp);
Sorry boy, your old design work ??? Seems you knowledge about LVGL and displays is zero.
// Perform a dummy read to get valid data
// Read the first pixel and discard it.
volatile uint32_t dummy_read = *Color;
// The pointer is now pointing to the second pixel's data.
absurd code…
And all your issue is use PixelSet without info how it do.
I’d appreciate it if we keep the discussion focused on the technical issue rather than personal remarks.
Regarding the dummy read: it was added intentionally to handle a suspected hardware/interface behavior where the first read returns invalid data (a pattern sometimes seen with certain display buses or memory-mapped peripherals). If this assumption is incorrect for this controller, I’m open to correction—please share details of the expected read/write behavior so we can align.
As for using PixelSet, I agree that understanding its internal implementation is important. My current goal is to validate LVGL’s render modes (FULL, PARTIAL, DIRECT) on this platform and identify why PARTIAL/DIRECT produce corrupted output, while FULL works as expected.
I can only explain why FULL work. For normal driver code after init displays is full screen memory set to “write update area”. Then any repeat write full screen will produce OK result. Specialy if PixelSet only write data for pixel without setup position. Hope you now understand why only this work.