From 109672a9a9ef55c511025fb26da2d884e034e16f Mon Sep 17 00:00:00 2001 From: Sean Rhodes Date: Mon, 10 Nov 2025 21:32:38 +0000 Subject: [PATCH] drivers/intel/gma: Guard legacy brightness fallback When BOX3.XBCM fails we currently fall back to LEGA.XBCM, which writes directly to the IGD PWM registers. During S3 resume those registers are still reset by the graphics driver, so AML stores a zero duty cycle and the panel stays dark. This leads to having some other event needed to wake the panel (i.e. key press). Only invoke the legacy path after BCLM is initialized, matching when the driver has reprogrammed the PWM registers and preventing firmware from touching them while the driver is still restoring them. Test=Enter and exit S3 on starbook_mtl, verify that the display turns on and stays on, instead of on -> off -> on. Change-Id: I664d296372feef9de5c4f57428422328c4e33110 Signed-off-by: Sean Rhodes Reviewed-on: https://review.coreboot.org/c/coreboot/+/89985 Reviewed-by: Angel Pons Tested-by: build bot (Jenkins) Reviewed-by: Matt DeVillier --- .../intel/gma/acpi/configure_brightness_levels.asl | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/drivers/intel/gma/acpi/configure_brightness_levels.asl b/src/drivers/intel/gma/acpi/configure_brightness_levels.asl index a35ffe3863..b6c27fbe92 100644 --- a/src/drivers/intel/gma/acpi/configure_brightness_levels.asl +++ b/src/drivers/intel/gma/acpi/configure_brightness_levels.asl @@ -149,7 +149,14 @@ { If (^BOX3.XBCM (Arg0) == Ones) { - ^LEGA.XBCM (Arg0) + /* + * Only touch the legacy PWM registers after the graphics driver + * reprograms them during boot/resume (BCLM stays zero until then). + */ + If (BCLM != 0) + { + ^LEGA.XBCM (Arg0) + } } }