From 2d78478345ef95625a798824a2310f8932696669 Mon Sep 17 00:00:00 2001 From: Sean Rhodes Date: Thu, 13 Nov 2025 20:06:08 +0000 Subject: [PATCH] drivers/intel/gma: Reapply cached brightness once BCLM is valid The OS replays _BCM requests while the graphics driver is still reinitializing, so hardware brightness can diverge from what we cached in BRLV. Reapply the cached level once the OpRegion is ready to keep firmware and OS state aligned. Change-Id: I2e6ed0936b2e74f55a2c760e7f4fcf56a2e02c53 Signed-off-by: Sean Rhodes Reviewed-on: https://review.coreboot.org/c/coreboot/+/90029 Tested-by: build bot (Jenkins) Reviewed-by: Angel Pons --- .../gma/acpi/configure_brightness_levels.asl | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/drivers/intel/gma/acpi/configure_brightness_levels.asl b/src/drivers/intel/gma/acpi/configure_brightness_levels.asl index 92ffbcbe55..9fb30f0039 100644 --- a/src/drivers/intel/gma/acpi/configure_brightness_levels.asl +++ b/src/drivers/intel/gma/acpi/configure_brightness_levels.asl @@ -175,6 +175,23 @@ } Local0 = ^LEGA.XBQC () + If (Local0 != BRLV) + { + /* + * The OS replays _BCM requests while the graphics driver is + * still reinitializing, so hardware brightness can diverge + * from what we cached in BRLV. Reapply the cached level once + * the OpRegion is ready to keep firmware and OS state aligned. + * Use BRCT flag to prevent recursion. + */ + If (BRCT == 0) + { + BRCT = 1 + XBCM (BRLV) + Local0 = ^LEGA.XBQC () + BRCT = 0 + } + } BRLV = Local0 Return (Local0) }