summaryrefslogtreecommitdiff
path: root/src/drivers/intel/gma
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers/intel/gma')
-rw-r--r--src/drivers/intel/gma/acpi/configure_brightness_levels.asl9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/drivers/intel/gma/acpi/configure_brightness_levels.asl b/src/drivers/intel/gma/acpi/configure_brightness_levels.asl
index 8625f04a9f..0867c5ae06 100644
--- a/src/drivers/intel/gma/acpi/configure_brightness_levels.asl
+++ b/src/drivers/intel/gma/acpi/configure_brightness_levels.asl
@@ -69,7 +69,14 @@
Return (Ones)
}
- Store (Or (Arg0, 0x80000000), BCLP)
+ /* BCLP requires brightness unsigned 8bit. 255 = 100 % */
+ Store (Divide (Multiply (Arg0, 255), 100), Local1)
+ If (LGreater(Local1, 255)) {
+ Store (255, Local1)
+ }
+ /* set valid bit */
+ Store (Or (Local1, 0x80000000), BCLP)
+
/* Request back-light change */
Store (0x2, ASLC)
/* Trigger IRQ */