From 58344fc2e7d9256524997b5aecd6130534c6702c Mon Sep 17 00:00:00 2001 From: Nico Huber Date: Thu, 23 Aug 2018 21:52:05 +0200 Subject: drivers/intel/gma: Fix OpRegion Mailbox3 backlight change We should always update BCLP, no matter if the driver is ready yet to process the request. This way it will hold the current value when the driver initializes. Change-Id: I4b091d744f95da39abe542966f0a8589a187573b Signed-off-by: Nico Huber Reviewed-on: https://review.coreboot.org/28300 Tested-by: build bot (Jenkins) Reviewed-by: Felix Held --- .../intel/gma/acpi/configure_brightness_levels.asl | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'src/drivers') diff --git a/src/drivers/intel/gma/acpi/configure_brightness_levels.asl b/src/drivers/intel/gma/acpi/configure_brightness_levels.asl index 0867c5ae06..01642ddc6b 100644 --- a/src/drivers/intel/gma/acpi/configure_brightness_levels.asl +++ b/src/drivers/intel/gma/acpi/configure_brightness_levels.asl @@ -2,6 +2,7 @@ * This file is part of the coreboot project. * * Copyright (C) 2015 Nico Huber + * Copyright (C) 2018 Nico Huber * Copyright (C) 2018 Patrick Rudolph * * This program is free software; you can redistribute it and/or modify @@ -64,19 +65,21 @@ { Return (Ones) } - If (LEqual(ARDY, Zero)) - { - Return (Ones) - } - /* BCLP requires brightness unsigned 8bit. 255 = 100 % */ + /* Always keep BCLP up to date, even if driver is not ready. + It requires a full 8-bit brightness value. 255 = 100% */ Store (Divide (Multiply (Arg0, 255), 100), Local1) If (LGreater(Local1, 255)) { Store (255, Local1) } - /* set valid bit */ + /* also set valid bit */ Store (Or (Local1, 0x80000000), BCLP) + If (LEqual(ARDY, Zero)) + { + Return (Ones) + } + /* Request back-light change */ Store (0x2, ASLC) /* Trigger IRQ */ -- cgit v1.2.3