LVGL 9 tuning: CPU 86% -> 53% at full GIF speed (display_gif_embedded)

- render in RGB565_SWAPPED (ST77916 byte order), no swap pass in flush;
  flush swaps only if the display format is plain RGB565 (runtime check,
  the previous #if compared enum values and was always true)
- QSPI clock 50 -> 80 MHz
- LV_ATTRIBUTE_FAST_MEM / FLUSH_READY in IRAM (lv_attr_jc3636w518.h)
- display_gif_embedded: GIF decoded in the display's color format (no alpha)
- tested without gain: LV_GIF_CACHE_DECODE_DATA (unused in 9.6), 120-row buffers

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
patriandClaude Opus 5.5 committed 2026-10-23 01:29:25 +02:00
1 parent d6982ab7e7
commit 6e7206b821
4 files changed
+26 -8

No files matched your search

+5 -5
View File
@@ -246,7 +246,7 @@ const esp_lcd_panel_vendor_init_cmd_t lcd_init_cmd[] = {
};
#endif
#define TFT_SPI_FREQ_HZ (50 * 1000 * 1000)
#define TFT_SPI_FREQ_HZ (80 * 1000 * 1000)
// LVGL tick source
static uint32_t lv_tick_millis(void)
@@ -259,10 +259,10 @@ static void my_disp_flush(lv_display_t *disp, const lv_area_t *area, uint8_t *px
ESP_PanelLcd *lcd = (ESP_PanelLcd *)lv_display_get_user_data(disp);
const int w = lv_area_get_width(area);
const int h = lv_area_get_height(area);
#if LV_COLOR_FORMAT_DEFAULT == LV_COLOR_FORMAT_RGB565
// LVGL renders little-endian RGB565, the ST77916 expects big-endian
lv_draw_rgb565_swap(px_map, w * h);
#endif
// the ST77916 expects big-endian RGB565; plain RGB565 (little-endian) needs a byte swap,
// RGB565_SWAPPED (LV_COLOR_FORMAT_DEFAULT in lv_conf.h) is rendered in the right order already
if (lv_display_get_color_format(disp) == LV_COLOR_FORMAT_RGB565)
lv_draw_rgb565_swap(px_map, w * h);
lcd->drawBitmap(area->x1, area->y1, w, h, (const uint8_t *)px_map);
}