Skip to content

LVGL port feature updates#778

Open
espzav wants to merge 4 commits into
masterfrom
feat/lvgl_port_p4_rgb
Open

LVGL port feature updates#778
espzav wants to merge 4 commits into
masterfrom
feat/lvgl_port_p4_rgb

Conversation

@espzav
Copy link
Copy Markdown
Collaborator

@espzav espzav commented May 7, 2026

ESP-BSP Pull Request checklist

  • Version of modified component bumped
  • CI passing

Description


Note

Medium Risk
Updates low-level display flush callback registration and ISR behavior (including IRAM-safety and internal-RAM allocations), which can impact rendering stability across targets/IDF versions. Changes are hardware-specific but touch core LVGL display integration for both LVGL8 and LVGL9.

Overview
Bumps esp_lvgl_port to 2.8.0 and broadens RGB/MIPI-DSI enablement from target-specific checks to SOC_* capability checks, improving portability across chips/IDF versions.

Makes RGB panel vsync/bounce callbacks compatible with CONFIG_LCD_RGB_ISR_IRAM_SAFE by moving the callback to IRAM, passing disp_ctx directly as user_ctx, and allocating the display context from internal RAM when required; also threads disp_type through private config so avoid-tearing can select the correct frame-buffer API for RGB vs DSI.

Extends LVGL9 display setup to accept LV_COLOR_FORMAT_RGB565_SWAPPED (and relaxes swap-bytes/DMA validation accordingly), and refreshes the examples/rgb_lcd app to support ESP32P4 (24-bit RGB888 pinout + defaults) while gating CI build/test rules to esp32s3/esp32p4.

Reviewed by Cursor Bugbot for commit 7d01150. Bugbot is set up for automated code reviews on this repo. Configure here.

Comment thread components/esp_lvgl_port/src/lvgl9/esp_lvgl_port_disp.c
Comment thread components/esp_lvgl_port/src/lvgl9/esp_lvgl_port_disp.c Outdated
Comment thread components/esp_lvgl_port/examples/rgb_lcd/sdkconfig.defaults.esp32p4 Outdated
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 7, 2026

Test Results

37 tests   37 ✅  1m 40s ⏱️
 6 suites   0 💤
 6 files     0 ❌

Results for commit 7d01150.

♻️ This comment has been updated with latest results.

@espzav espzav force-pushed the feat/lvgl_port_p4_rgb branch 4 times, most recently from ea8c8d6 to d88adb3 Compare May 13, 2026 07:08
Comment thread components/esp_lvgl_port/src/lvgl9/esp_lvgl_port_disp.c Outdated
@espzav espzav force-pushed the feat/lvgl_port_p4_rgb branch from d88adb3 to 8e393ff Compare May 13, 2026 07:19
@espzav espzav requested review from PetrESP May 13, 2026 11:34
@espzav
Copy link
Copy Markdown
Collaborator Author

espzav commented May 13, 2026

@PetrESP I decided to release this withou cmake v2 changes, because we are waiting for some fixes in cmake v2.

@espzav espzav modified the milestone: esp_lvgl_port 2.8.0 May 13, 2026
@espzav espzav force-pushed the feat/lvgl_port_p4_rgb branch from 8e393ff to 7d01150 Compare May 14, 2026 05:57
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 7d01150. Configure here.

"Swap bytes can be used only in display color format RGB565!");
ESP_RETURN_ON_FALSE(display_color_format == LV_COLOR_FORMAT_RGB565
|| display_color_format == LV_COLOR_FORMAT_RGB565_SWAPPED,
NULL, TAG, "Swap bytes can be used only in display color format RGB565!");
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Validation allows double byte-swapping with RGB565_SWAPPED

Medium Severity

The swap_bytes validation now accepts LV_COLOR_FORMAT_RGB565_SWAPPED in addition to LV_COLOR_FORMAT_RGB565. However, the flush callback at line 732 unconditionally calls lv_draw_sw_rgb565_swap() when swap_bytes is true. Since RGB565_SWAPPED already renders with swapped bytes at the LVGL level, enabling swap_bytes on top of it would double-swap the bytes, resulting in incorrect (un-swapped) output and wrong colors on the display. The old validation correctly rejected this combination by only allowing plain RGB565 with swap_bytes.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 7d01150. Configure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ESP_LVGL_PORT lvgl_port_flush_rgb_vsync_ready_callback in IRAM (BSP-639)

2 participants