[coreboot-gerrit] Change in coreboot[master]: drivers/intel/gma: Fix OpRegion Mailbox3 backlight change

Nico Huber (Code Review) gerrit at coreboot.org
Thu Aug 23 23:58:02 CEST 2018


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 at 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 at secunet.com>
+ * Copyright (C) 2018 Nico Huber <nico.h at 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 */

-- 
To view, visit https://review.coreboot.org/28300
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I4b091d744f95da39abe542966f0a8589a187573b
Gerrit-Change-Number: 28300
Gerrit-PatchSet: 1
Gerrit-Owner: Nico Huber <nico.h at gmx.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180823/212e0ab6/attachment.html>


More information about the coreboot-gerrit mailing list