fix(esp_lvgl_port): Put RGB vsync callback in IRAM when LCD_RGB_ISR_IRAM_SAFE=y#755
fix(esp_lvgl_port): Put RGB vsync callback in IRAM when LCD_RGB_ISR_IRAM_SAFE=y#755vmsh0 wants to merge 1 commit into
Conversation
|
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! |
|
Tested this PR on an ESP32-S3-WROOM-1 N16R8 with a 800×480 RGB panel Panel config:
With the patch applied, Crash: Backtrace: Root cause looks architectural, not specific to this patch: So Minor nit on the patch itself: the |
|
@tome9111991 I reworked this in #778 You can test it. It should work. |
ESP-BSP Pull Request checklist
Change description
When
LCD_RGB_ISR_IRAM_SAFE=y, RGB panel callbacks must be placed in IRAM, otherwiselvgl_port_add_disp_rgbfails due toesp_lcd_rgb_panel_register_event_callbacksrefusing to accept callbacks outside of IRAM.This patch places the
lvgl_port_flush_rgb_vsync_ready_callbackroutine in IRAM whenLCD_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_SAFEand 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 whenCONFIG_LCD_RGB_ISR_IRAM_SAFEis enabled, satisfying IDF requirements for ISR-safe RGB callbacks.This introduces a compile-time macro to conditionally apply
IRAM_ATTRto the callback soesp_lcd_rgb_panel_register_event_callbacksaccepts the function under IRAM-safe configurations.Written by Cursor Bugbot for commit 70be509. This will update automatically on new commits. Configure here.