summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNico Huber <nico.h@gmx.de>2018-08-23 22:36:09 +0200
committerNico Huber <nico.h@gmx.de>2018-09-16 10:49:03 +0000
commitc48d883d8bf488c1a5dc22583094e77ff53d3589 (patch)
treeafee900cdd105e3263b2b6510864ff2acdb0d504
parentb4be50c9ca3651e4124cde57f227203b47399eab (diff)
downloadcoreboot-c48d883d8bf488c1a5dc22583094e77ff53d3589.tar.xz
drivers/intel/gma: Fix OpRegion Mailbox3 synchronization
Make XBCM `Serialized` (obvious), and check for the callee clearing the request bit (we checked only the status for 0 which we potentially wrote ourselves). Change-Id: Ic92d525eda8d0a159fa5ddaacf230658d71c1578 Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/28302 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
-rw-r--r--src/drivers/intel/gma/acpi/configure_brightness_levels.asl13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/drivers/intel/gma/acpi/configure_brightness_levels.asl b/src/drivers/intel/gma/acpi/configure_brightness_levels.asl
index dfd878cb26..23637b0612 100644
--- a/src/drivers/intel/gma/acpi/configure_brightness_levels.asl
+++ b/src/drivers/intel/gma/acpi/configure_brightness_levels.asl
@@ -55,7 +55,7 @@
* * Driver not loaded or not ready
* * Driver reported an error during ASLE IRQ
*/
- Method (XBCM, 1, NotSerialized)
+ Method (XBCM, 1, Serialized)
{
If (LEqual(ASLS, Zero))
{
@@ -89,9 +89,14 @@
While (LGreater(Local0, Zero))
{
Sleep (1)
- If (LEqual(And(ShiftRight(ASLC, 12), 0x3), Zero))
- {
- Return (Zero)
+ If (LEqual (And (ASLC, 0x2), 0)) {
+ /* Request has been processed, check status: */
+ And (ShiftRight (ASLC, 12), 0x3, Local1)
+ If (LEqual (Local1, 0)) {
+ Return (Zero)
+ } Else {
+ Return (Ones)
+ }
}
Decrement (Local0)
}