mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-02-24 05:12:02 +00:00
fix(core): fix gfx_bitblt initialization
[no changelog]
This commit is contained in:
parent
e78f6d2d6d
commit
a920b92ad3
@ -412,6 +412,8 @@ bool display_init(display_content_mode_t mode) {
|
||||
|
||||
__HAL_LTDC_ENABLE_IT(&drv->hlcd_ltdc, LTDC_IT_LI | LTDC_IT_FU | LTDC_IT_TE);
|
||||
|
||||
gfx_bitblt_init();
|
||||
|
||||
drv->initialized = true;
|
||||
return true;
|
||||
|
||||
@ -436,6 +438,8 @@ void display_deinit(display_content_mode_t mode) {
|
||||
|
||||
GPIO_InitTypeDef GPIO_InitStructure = {0};
|
||||
|
||||
gfx_bitblt_deinit();
|
||||
|
||||
NVIC_DisableIRQ(LTDC_IRQn);
|
||||
NVIC_DisableIRQ(LTDC_ER_IRQn);
|
||||
|
||||
|
@ -89,6 +89,8 @@ bool display_init(display_content_mode_t mode) {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
gfx_bitblt_init();
|
||||
|
||||
drv->initialized = true;
|
||||
return true;
|
||||
}
|
||||
@ -110,6 +112,8 @@ void display_deinit(display_content_mode_t mode) {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
gfx_bitblt_deinit();
|
||||
|
||||
mpu_set_active_fb(NULL, 0);
|
||||
|
||||
backlight_pwm_deinit(mode == DISPLAY_RESET_CONTENT ? BACKLIGHT_RESET
|
||||
|
@ -67,6 +67,8 @@ bool display_init(display_content_mode_t mode) {
|
||||
ili9341_init();
|
||||
}
|
||||
|
||||
gfx_bitblt_init();
|
||||
|
||||
drv->initialized = true;
|
||||
return true;
|
||||
}
|
||||
@ -74,6 +76,8 @@ bool display_init(display_content_mode_t mode) {
|
||||
void display_deinit(display_content_mode_t mode) {
|
||||
display_driver_t *drv = &g_display_driver;
|
||||
|
||||
gfx_bitblt_deinit();
|
||||
|
||||
mpu_set_active_fb(NULL, 0);
|
||||
|
||||
drv->initialized = false;
|
||||
|
@ -178,6 +178,9 @@ bool display_init(display_content_mode_t mode) {
|
||||
#else
|
||||
drv->orientation_angle = 0;
|
||||
#endif
|
||||
|
||||
gfx_bitblt_init();
|
||||
|
||||
drv->initialized = true;
|
||||
return true;
|
||||
}
|
||||
@ -189,6 +192,8 @@ void display_deinit(display_content_mode_t mode) {
|
||||
return;
|
||||
}
|
||||
|
||||
gfx_bitblt_deinit();
|
||||
|
||||
SDL_FreeSurface(drv->prev_saved);
|
||||
SDL_FreeSurface(drv->buffer);
|
||||
if (drv->background != NULL) {
|
||||
|
@ -318,6 +318,8 @@ bool display_init(display_content_mode_t mode) {
|
||||
display_init_spi(drv);
|
||||
}
|
||||
|
||||
gfx_bitblt_init();
|
||||
|
||||
drv->initialized = true;
|
||||
return true;
|
||||
}
|
||||
@ -327,6 +329,8 @@ void display_deinit(display_content_mode_t mode) {
|
||||
|
||||
mpu_set_active_fb(NULL, 0);
|
||||
|
||||
gfx_bitblt_deinit();
|
||||
|
||||
drv->initialized = false;
|
||||
}
|
||||
|
||||
|
@ -92,7 +92,6 @@ static void drivers_init(void) {
|
||||
#ifdef USE_HASH_PROCESSOR
|
||||
hash_processor_init();
|
||||
#endif
|
||||
gfx_bitblt_init();
|
||||
display_init(DISPLAY_RESET_CONTENT);
|
||||
#ifdef USE_SD_CARD
|
||||
sdcard_init();
|
||||
@ -103,7 +102,6 @@ static void drivers_deinit(void) {
|
||||
#ifdef FIXED_HW_DEINIT
|
||||
// TODO
|
||||
#endif
|
||||
gfx_bitblt_deinit();
|
||||
display_deinit(DISPLAY_JUMP_BEHAVIOR);
|
||||
#ifdef USE_POWERCTL
|
||||
powerctl_deinit();
|
||||
|
@ -98,7 +98,6 @@ static void drivers_init(secbool *touch_initialized) {
|
||||
#ifdef USE_HASH_PROCESSOR
|
||||
hash_processor_init();
|
||||
#endif
|
||||
gfx_bitblt_init();
|
||||
display_init(DISPLAY_JUMP_BEHAVIOR);
|
||||
unit_properties_init();
|
||||
|
||||
@ -138,7 +137,6 @@ static void drivers_deinit(void) {
|
||||
button_deinit();
|
||||
#endif
|
||||
#endif
|
||||
gfx_bitblt_deinit();
|
||||
display_deinit(DISPLAY_JUMP_BEHAVIOR);
|
||||
ensure_compatible_settings();
|
||||
}
|
||||
|
@ -116,8 +116,6 @@ void drivers_init() {
|
||||
hash_processor_init();
|
||||
#endif
|
||||
|
||||
gfx_bitblt_init();
|
||||
|
||||
display_init(DISPLAY_JUMP_BEHAVIOR);
|
||||
|
||||
#ifdef USE_OEM_KEYS_CHECK
|
||||
|
Loading…
Reference in New Issue
Block a user