diff --git a/core/embed/io/display/ltdc_dsi/display_gfxmmu.c b/core/embed/io/display/ltdc_dsi/display_gfxmmu.c index 78ce5a7ef8..a17781e7c4 100644 --- a/core/embed/io/display/ltdc_dsi/display_gfxmmu.c +++ b/core/embed/io/display/ltdc_dsi/display_gfxmmu.c @@ -8,8 +8,6 @@ extern uint8_t physical_frame_buffer_0[PHYSICAL_FRAME_BUFFER_SIZE]; extern uint8_t physical_frame_buffer_1[PHYSICAL_FRAME_BUFFER_SIZE]; -extern const uint32_t gfxmmu_lut_config[2 * GFXMMU_LUT_SIZE]; - bool display_gfxmmu_init(display_driver_t *drv) { __HAL_RCC_GFXMMU_FORCE_RESET(); __HAL_RCC_GFXMMU_RELEASE_RESET(); @@ -52,7 +50,7 @@ bool display_gfxmmu_init(display_driver_t *drv) { /* Initialize LUT */ if (HAL_GFXMMU_ConfigLut(&drv->hlcd_gfxmmu, 0, LCD_HEIGHT, - (uint32_t)&gfxmmu_lut_config) != HAL_OK) { + (uint32_t)panel_lut_get()) != HAL_OK) { return false; } diff --git a/core/embed/io/display/ltdc_dsi/display_internal.h b/core/embed/io/display/ltdc_dsi/display_internal.h index 2b071ea8cd..67f7f07a65 100644 --- a/core/embed/io/display/ltdc_dsi/display_internal.h +++ b/core/embed/io/display/ltdc_dsi/display_internal.h @@ -81,6 +81,8 @@ void display_ensure_refreshed(void); bool panel_init(display_driver_t *drv); #ifdef DISPLAY_GFXMMU +const uint32_t *panel_lut_get(void); + bool display_gfxmmu_init(display_driver_t *drv); #endif diff --git a/core/embed/io/display/ltdc_dsi/panels/stm32u5a9j-dk/stm32u5a9j-dk.c b/core/embed/io/display/ltdc_dsi/panels/stm32u5a9j-dk/stm32u5a9j-dk.c index e9664fd89d..3dccef95b6 100644 --- a/core/embed/io/display/ltdc_dsi/panels/stm32u5a9j-dk/stm32u5a9j-dk.c +++ b/core/embed/io/display/ltdc_dsi/panels/stm32u5a9j-dk/stm32u5a9j-dk.c @@ -966,6 +966,8 @@ const uint32_t gfxmmu_lut_config[2 * GFXMMU_LUT_SIZE] = { 0x000B2ED0 // GFXMMU_LUT479H }; +const uint32_t* panel_lut_get(void) { return gfxmmu_lut_config; } + bool panel_init(display_driver_t* drv) { HAL_StatusTypeDef ret; /* CMD Mode */