1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-03-10 13:16:06 +00:00

feat(core): lazy initialize display driver in boardloader

[no changelog]
This commit is contained in:
tychovrahe 2025-01-31 12:25:49 +01:00 committed by TychoVrahe
parent 6102e10e91
commit 0b9d2e3ac9
2 changed files with 11 additions and 0 deletions

View File

@ -85,7 +85,12 @@ static void drivers_init(void) {
#ifdef USE_HASH_PROCESSOR
hash_processor_init();
#endif
#ifndef FIXED_HW_DEINIT
// only skip this if deinit was fixed,
// as some old bootloaders rely on display being initialized
// (skipping alows faster boot time so generally a good idea)
display_init(DISPLAY_RESET_CONTENT);
#endif
}
static void drivers_deinit(void) {

View File

@ -160,7 +160,13 @@ void sd_update_check_and_update(const uint8_t *const *keys, uint8_t key_m,
}
if (check_sdcard(keys, key_m, key_n) != 0) {
#ifdef FIXED_HW_DEINIT
display_init(DISPLAY_RESET_CONTENT);
#endif
copy_sdcard(keys, key_m, key_n);
#ifdef FIXED_HW_DEINIT
display_deinit(DISPLAY_RETAIN_CONTENT);
#endif
reboot_or_halt_after_rsod();
}
}