Nico Huber has uploaded this change for review. ( https://review.coreboot.org/28300
Change subject: drivers/intel/gma: Fix OpRegion Mailbox3 backlight change ......................................................................
drivers/intel/gma: Fix OpRegion Mailbox3 backlight change
The ACPI interface always uses a percentage for the brightness value, BCLP, OTOH, is defined to take a value from 0 to 255. We also always update BCLP, no matter if the driver is ready yet to process the re- quest. This way it will hold the current value when the driver ini- tializes.
Change-Id: I4b091d744f95da39abe542966f0a8589a187573b Signed-off-by: Nico Huber nico.h@gmx.de --- M src/drivers/intel/gma/acpi/configure_brightness_levels.asl 1 file changed, 6 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/00/28300/1
diff --git a/src/drivers/intel/gma/acpi/configure_brightness_levels.asl b/src/drivers/intel/gma/acpi/configure_brightness_levels.asl index 8625f04..72e5466 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 nico.huber@secunet.com + * Copyright (C) 2018 Nico Huber nico.h@gmx.de * Copyright (C) 2018 Patrick Rudolph * * This program is free software; you can redistribute it and/or modify @@ -64,12 +65,16 @@ { Return (Ones) } + + /* Always keep BCLP up to date, even if driver is not ready */ + Store (Divide (Multiply (Arg0, 255), 100), Local0) + Store (Or (Local0, 0x80000000), BCLP) + If (LEqual(ARDY, Zero)) { Return (Ones) }
- Store (Or (Arg0, 0x80000000), BCLP) /* Request back-light change */ Store (0x2, ASLC) /* Trigger IRQ */