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

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


Nico Huber has uploaded this change for review. ( https://review.coreboot.org/28302


Change subject: drivers/intel/gma: Fix OpRegion Mailbox3 synchronization
......................................................................

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 at gmx.de>
---
M src/drivers/intel/gma/acpi/configure_brightness_levels.asl
1 file changed, 9 insertions(+), 4 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/02/28302/1

diff --git a/src/drivers/intel/gma/acpi/configure_brightness_levels.asl b/src/drivers/intel/gma/acpi/configure_brightness_levels.asl
index 024360f..951d33d 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))
 			{
@@ -84,9 +84,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 (0)
+					} Else {
+						Return (Ones)
+					}
 				}
 				Decrement (Local0)
 			}

-- 
To view, visit https://review.coreboot.org/28302
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: Ic92d525eda8d0a159fa5ddaacf230658d71c1578
Gerrit-Change-Number: 28302
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/7f661ebd/attachment-0001.html>


More information about the coreboot-gerrit mailing list