Skip to content

fix(esp_lvgl_port): Put RGB vsync callback in IRAM when LCD_RGB_ISR_IRAM_SAFE=y#755

Open
vmsh0 wants to merge 1 commit intoespressif:masterfrom
vmsh0:master
Open

fix(esp_lvgl_port): Put RGB vsync callback in IRAM when LCD_RGB_ISR_IRAM_SAFE=y#755
vmsh0 wants to merge 1 commit intoespressif:masterfrom
vmsh0:master

Conversation

@vmsh0
Copy link
Copy Markdown

@vmsh0 vmsh0 commented Apr 3, 2026

ESP-BSP Pull Request checklist

  • Version of modified component bumped -- NO, do I need to do this for a small fix?
  • CI passing

Change description

When LCD_RGB_ISR_IRAM_SAFE=y, RGB panel callbacks must be placed in IRAM, otherwise lvgl_port_add_disp_rgb fails due to esp_lcd_rgb_panel_register_event_callbacks refusing to accept callbacks outside of IRAM.

This patch places the lvgl_port_flush_rgb_vsync_ready_callback routine in IRAM when LCD_RGB_ISR_IRAM_SAFE=y.

Addresses e.g. #515


Note

Medium Risk
Touches ESP32S3 RGB panel ISR callback placement; incorrect attribute/macro handling could break builds or cause runtime issues depending on CONFIG_LCD_RGB_ISR_IRAM_SAFE and IDF version.

Overview
Ensures the ESP32S3 RGB panel on_vsync/bounce-buffer completion callback (lvgl_port_flush_rgb_vsync_ready_callback) is annotated to run from IRAM when CONFIG_LCD_RGB_ISR_IRAM_SAFE is enabled, satisfying IDF requirements for ISR-safe RGB callbacks.

This introduces a compile-time macro to conditionally apply IRAM_ATTR to the callback so esp_lcd_rgb_panel_register_event_callbacks accepts the function under IRAM-safe configurations.

Written by Cursor Bugbot for commit 70be509. This will update automatically on new commits. Configure here.

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Apr 3, 2026

CLA assistant check
All committers have signed the CLA.

@espzav
Copy link
Copy Markdown
Collaborator

espzav commented Apr 7, 2026

@vmsh0 thank you for this PR. Did you see this #732 ?

@vmsh0
Copy link
Copy Markdown
Author

vmsh0 commented Apr 7, 2026

@vmsh0 thank you for this PR. Did you see this #732 ?

Aaaah, oops, I did not. Point 2 of that PR was also something I wanted to raise, as moving the callback into IRAM is probably not enough if you then need to call something else.

Anyway, I think this can be abandoned as the other one looks much better already. Sorry for the noise!

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.

3 participants