bdk: display: use spare reg to store dcs bl duty

And also remove backlight pwm restoring from coreboot hw deinit path.
This commit is contained in:
CTCaer
2025-12-18 09:54:26 +02:00
parent ba95bb7494
commit 8faa1a6690
3 changed files with 19 additions and 29 deletions

View File

@@ -520,11 +520,9 @@ void hw_deinit(bool coreboot, u32 bl_magic)
switch (bl_magic)
{
case BL_MAGIC_CRBOOT_SLD:;
// Set pwm to 0%, switch to gpio mode and restore pwm duty.
u32 brightness = display_get_backlight_brightness();
// Set pwm to 0% and switch to gpio mode.
display_backlight_brightness(0, 1000);
gpio_config(GPIO_PORT_V, GPIO_PIN_0, GPIO_MODE_GPIO);
display_backlight_brightness(brightness, 0);
break;
case BL_MAGIC_L4TLDR_SLD:
// Do not disable display or backlight at all.