Nico Huber (nico.h@gmx.de) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/11705
-gerrit
commit e1b978caa32ebe617196161a4b508c61e3bf6fe5 Author: Nico Huber nico.huber@secunet.com Date: Thu Aug 27 13:31:46 2015 +0200
gma ACPI: Make brightness levels a per board setting
Those are actually board specific. Keep the old value as defaults, though. The defaults are included by all affected boards that specify an integrated display in the devicetree through `gfx.did`.
Change-Id: Ib865c7b4274f2ea3181a89fc52701b740f9bab7d Signed-off-by: Nico Huber nico.huber@secunet.com --- src/drivers/intel/gma/acpi/brightness_levels.asl | 46 ---------------------- .../intel/gma/acpi/configure_brightness_levels.asl | 24 +++++++++++ .../intel/gma/acpi/default_brightness_levels.asl | 24 +++++++++++ src/drivers/intel/gma/acpi/non-pch.asl | 2 +- src/drivers/intel/gma/acpi/pch.asl | 2 +- src/mainboard/gigabyte/ga-b75m-d3h/dsdt.asl | 2 + src/mainboard/gigabyte/ga-b75m-d3v/dsdt.asl | 2 + src/mainboard/google/bolt/dsdt.asl | 2 + src/mainboard/google/butterfly/dsdt.asl | 2 + src/mainboard/google/falco/dsdt.asl | 2 + src/mainboard/google/panther/dsdt.asl | 2 + src/mainboard/google/parrot/dsdt.asl | 2 + src/mainboard/google/peppy/dsdt.asl | 2 + src/mainboard/google/slippy/dsdt.asl | 2 + src/mainboard/google/stout/dsdt.asl | 2 + src/mainboard/intel/baskingridge/dsdt.asl | 2 + src/mainboard/intel/cougar_canyon2/dsdt.asl | 2 + src/mainboard/intel/emeraldlake2/dsdt.asl | 2 + src/mainboard/kontron/ktqm77/dsdt.asl | 2 + src/mainboard/lenovo/t400/dsdt.asl | 2 + src/mainboard/lenovo/t420s/dsdt.asl | 2 + src/mainboard/lenovo/t430s/dsdt.asl | 2 + src/mainboard/lenovo/t520/dsdt.asl | 2 + src/mainboard/lenovo/t530/dsdt.asl | 2 + src/mainboard/lenovo/x200/dsdt.asl | 2 + src/mainboard/lenovo/x201/dsdt.asl | 2 + src/mainboard/lenovo/x220/dsdt.asl | 2 + src/mainboard/lenovo/x230/dsdt.asl | 2 + src/mainboard/packardbell/ms2290/dsdt.asl | 2 + src/mainboard/roda/rk9/dsdt.asl | 2 + src/mainboard/samsung/lumpy/dsdt.asl | 2 + src/mainboard/samsung/stumpy/dsdt.asl | 2 + 32 files changed, 104 insertions(+), 48 deletions(-)
diff --git a/src/drivers/intel/gma/acpi/brightness_levels.asl b/src/drivers/intel/gma/acpi/brightness_levels.asl deleted file mode 100644 index d0e70a9..0000000 --- a/src/drivers/intel/gma/acpi/brightness_levels.asl +++ /dev/null @@ -1,46 +0,0 @@ - Name (BRIG, Package (0x12) - { - 100, /* default AC */ - 100, /* default Battery */ - 2, - 4, - 5, - 7, - 9, - 11, - 13, - 18, - 20, - 24, - 29, - 33, - 40, - 50, - 67, - 100, - }) - - Method (XBCM, 1, NotSerialized) - { - Store (Divide (Multiply (Arg0, BCLM), 100), BCLV) - } - - Method (XBQC, 0, NotSerialized) - { - /* Find value close to BCLV in BRIG (which must be ordered) */ - Store (BCLV, Local0) // Current value - Store (BCLM, Local1) // For calculations - Store (2, Local2) // Loop index - While (LLess (Local2, Subtract (SizeOf (BRIG), 1))) { - Store (DeRefOf (Index (BRIG, Local2)), Local3) - /* Use same calculation as XBCM, to get exact matches */ - Store (Divide (Multiply (Local3, Local1), 100), Local3) - - If (LLessEqual (Local0, Local3)) { - Return (DeRefOf (Index (BRIG, Local2))) - } - Add (Local2, 1, Local2) - } - /* Didn't find greater/equal value: use the last */ - Return (DeRefOf (Index (BRIG, Local2))) - } diff --git a/src/drivers/intel/gma/acpi/configure_brightness_levels.asl b/src/drivers/intel/gma/acpi/configure_brightness_levels.asl new file mode 100644 index 0000000..38eb116 --- /dev/null +++ b/src/drivers/intel/gma/acpi/configure_brightness_levels.asl @@ -0,0 +1,24 @@ + Method (XBCM, 1, NotSerialized) + { + Store (Divide (Multiply (Arg0, BCLM), 100), BCLV) + } + + Method (XBQC, 0, NotSerialized) + { + /* Find value close to BCLV in BRIG (which must be ordered) */ + Store (BCLV, Local0) // Current value + Store (BCLM, Local1) // For calculations + Store (2, Local2) // Loop index + While (LLess (Local2, Subtract (SizeOf (BRIG), 1))) { + Store (DeRefOf (Index (BRIG, Local2)), Local3) + /* Use same calculation as XBCM, to get exact matches */ + Store (Divide (Multiply (Local3, Local1), 100), Local3) + + If (LLessEqual (Local0, Local3)) { + Return (DeRefOf (Index (BRIG, Local2))) + } + Add (Local2, 1, Local2) + } + /* Didn't find greater/equal value: use the last */ + Return (DeRefOf (Index (BRIG, Local2))) + } diff --git a/src/drivers/intel/gma/acpi/default_brightness_levels.asl b/src/drivers/intel/gma/acpi/default_brightness_levels.asl new file mode 100644 index 0000000..6c6f35e --- /dev/null +++ b/src/drivers/intel/gma/acpi/default_brightness_levels.asl @@ -0,0 +1,24 @@ +Scope (GFX0) +{ + Name (BRIG, Package (0x12) + { + 100, /* default AC */ + 100, /* default Battery */ + 2, + 4, + 5, + 7, + 9, + 11, + 13, + 18, + 20, + 24, + 29, + 33, + 40, + 50, + 67, + 100, + }) +} diff --git a/src/drivers/intel/gma/acpi/non-pch.asl b/src/drivers/intel/gma/acpi/non-pch.asl index 0e15627..983dc01 100644 --- a/src/drivers/intel/gma/acpi/non-pch.asl +++ b/src/drivers/intel/gma/acpi/non-pch.asl @@ -37,6 +37,6 @@ Device (GFX0) BCLM, 16, }
-#include "brightness_levels.asl" +#include "configure_brightness_levels.asl" #include "common.asl" } diff --git a/src/drivers/intel/gma/acpi/pch.asl b/src/drivers/intel/gma/acpi/pch.asl index 98746e8..bd59a43 100644 --- a/src/drivers/intel/gma/acpi/pch.asl +++ b/src/drivers/intel/gma/acpi/pch.asl @@ -38,6 +38,6 @@ Device (GFX0) BCLM, 16 }
-#include "brightness_levels.asl" +#include "configure_brightness_levels.asl" #include "common.asl" } diff --git a/src/mainboard/gigabyte/ga-b75m-d3h/dsdt.asl b/src/mainboard/gigabyte/ga-b75m-d3h/dsdt.asl index 9350dea..10faccd 100644 --- a/src/mainboard/gigabyte/ga-b75m-d3h/dsdt.asl +++ b/src/mainboard/gigabyte/ga-b75m-d3h/dsdt.asl @@ -22,6 +22,8 @@ DefinitionBlock( #include <northbridge/intel/sandybridge/acpi/sandybridge.asl> #include <southbridge/intel/bd82x6x/acpi/pch.asl> #include <southbridge/intel/bd82x6x/acpi/default_irq_route.asl> + + #include <drivers/intel/gma/acpi/default_brightness_levels.asl> } } } diff --git a/src/mainboard/gigabyte/ga-b75m-d3v/dsdt.asl b/src/mainboard/gigabyte/ga-b75m-d3v/dsdt.asl index 9350dea..10faccd 100644 --- a/src/mainboard/gigabyte/ga-b75m-d3v/dsdt.asl +++ b/src/mainboard/gigabyte/ga-b75m-d3v/dsdt.asl @@ -22,6 +22,8 @@ DefinitionBlock( #include <northbridge/intel/sandybridge/acpi/sandybridge.asl> #include <southbridge/intel/bd82x6x/acpi/pch.asl> #include <southbridge/intel/bd82x6x/acpi/default_irq_route.asl> + + #include <drivers/intel/gma/acpi/default_brightness_levels.asl> } } } diff --git a/src/mainboard/google/bolt/dsdt.asl b/src/mainboard/google/bolt/dsdt.asl index 76998ba..597f1a3 100644 --- a/src/mainboard/google/bolt/dsdt.asl +++ b/src/mainboard/google/bolt/dsdt.asl @@ -47,6 +47,8 @@ DefinitionBlock( { #include <northbridge/intel/haswell/acpi/haswell.asl> #include <southbridge/intel/lynxpoint/acpi/pch.asl> + + #include <drivers/intel/gma/acpi/default_brightness_levels.asl> } }
diff --git a/src/mainboard/google/butterfly/dsdt.asl b/src/mainboard/google/butterfly/dsdt.asl index 0a2f37d..e538cd6 100644 --- a/src/mainboard/google/butterfly/dsdt.asl +++ b/src/mainboard/google/butterfly/dsdt.asl @@ -49,6 +49,8 @@ DefinitionBlock( #include <northbridge/intel/sandybridge/acpi/sandybridge.asl> #include <southbridge/intel/bd82x6x/acpi/pch.asl> #include <southbridge/intel/bd82x6x/acpi/default_irq_route.asl> + + #include <drivers/intel/gma/acpi/default_brightness_levels.asl> } }
diff --git a/src/mainboard/google/falco/dsdt.asl b/src/mainboard/google/falco/dsdt.asl index c9e9bb0..fcb7a3f 100644 --- a/src/mainboard/google/falco/dsdt.asl +++ b/src/mainboard/google/falco/dsdt.asl @@ -46,6 +46,8 @@ DefinitionBlock( { #include <northbridge/intel/haswell/acpi/haswell.asl> #include <southbridge/intel/lynxpoint/acpi/pch.asl> + + #include <drivers/intel/gma/acpi/default_brightness_levels.asl> } }
diff --git a/src/mainboard/google/panther/dsdt.asl b/src/mainboard/google/panther/dsdt.asl index e108717..b77a401 100644 --- a/src/mainboard/google/panther/dsdt.asl +++ b/src/mainboard/google/panther/dsdt.asl @@ -46,6 +46,8 @@ DefinitionBlock( { #include <northbridge/intel/haswell/acpi/haswell.asl> #include <southbridge/intel/lynxpoint/acpi/pch.asl> + + #include <drivers/intel/gma/acpi/default_brightness_levels.asl> } }
diff --git a/src/mainboard/google/parrot/dsdt.asl b/src/mainboard/google/parrot/dsdt.asl index 0a2f37d..e538cd6 100644 --- a/src/mainboard/google/parrot/dsdt.asl +++ b/src/mainboard/google/parrot/dsdt.asl @@ -49,6 +49,8 @@ DefinitionBlock( #include <northbridge/intel/sandybridge/acpi/sandybridge.asl> #include <southbridge/intel/bd82x6x/acpi/pch.asl> #include <southbridge/intel/bd82x6x/acpi/default_irq_route.asl> + + #include <drivers/intel/gma/acpi/default_brightness_levels.asl> } }
diff --git a/src/mainboard/google/peppy/dsdt.asl b/src/mainboard/google/peppy/dsdt.asl index 76998ba..597f1a3 100644 --- a/src/mainboard/google/peppy/dsdt.asl +++ b/src/mainboard/google/peppy/dsdt.asl @@ -47,6 +47,8 @@ DefinitionBlock( { #include <northbridge/intel/haswell/acpi/haswell.asl> #include <southbridge/intel/lynxpoint/acpi/pch.asl> + + #include <drivers/intel/gma/acpi/default_brightness_levels.asl> } }
diff --git a/src/mainboard/google/slippy/dsdt.asl b/src/mainboard/google/slippy/dsdt.asl index 76998ba..597f1a3 100644 --- a/src/mainboard/google/slippy/dsdt.asl +++ b/src/mainboard/google/slippy/dsdt.asl @@ -47,6 +47,8 @@ DefinitionBlock( { #include <northbridge/intel/haswell/acpi/haswell.asl> #include <southbridge/intel/lynxpoint/acpi/pch.asl> + + #include <drivers/intel/gma/acpi/default_brightness_levels.asl> } }
diff --git a/src/mainboard/google/stout/dsdt.asl b/src/mainboard/google/stout/dsdt.asl index 01e4001..ca8640b 100644 --- a/src/mainboard/google/stout/dsdt.asl +++ b/src/mainboard/google/stout/dsdt.asl @@ -49,6 +49,8 @@ DefinitionBlock( #include <northbridge/intel/sandybridge/acpi/sandybridge.asl> #include <southbridge/intel/bd82x6x/acpi/pch.asl> #include <southbridge/intel/bd82x6x/acpi/default_irq_route.asl> + + #include <drivers/intel/gma/acpi/default_brightness_levels.asl> } }
diff --git a/src/mainboard/intel/baskingridge/dsdt.asl b/src/mainboard/intel/baskingridge/dsdt.asl index b586e34..7e37428 100644 --- a/src/mainboard/intel/baskingridge/dsdt.asl +++ b/src/mainboard/intel/baskingridge/dsdt.asl @@ -47,6 +47,8 @@ DefinitionBlock( { #include <northbridge/intel/haswell/acpi/haswell.asl> #include <southbridge/intel/lynxpoint/acpi/pch.asl> + + #include <drivers/intel/gma/acpi/default_brightness_levels.asl> } }
diff --git a/src/mainboard/intel/cougar_canyon2/dsdt.asl b/src/mainboard/intel/cougar_canyon2/dsdt.asl index 82d6ee5..494e72f 100644 --- a/src/mainboard/intel/cougar_canyon2/dsdt.asl +++ b/src/mainboard/intel/cougar_canyon2/dsdt.asl @@ -45,6 +45,8 @@ DefinitionBlock( { #include <northbridge/intel/fsp_sandybridge/acpi/sandybridge.asl> #include <southbridge/intel/fsp_bd82x6x/acpi/pch.asl> + + #include <drivers/intel/gma/acpi/default_brightness_levels.asl> } }
diff --git a/src/mainboard/intel/emeraldlake2/dsdt.asl b/src/mainboard/intel/emeraldlake2/dsdt.asl index b545838..b4afa3d 100644 --- a/src/mainboard/intel/emeraldlake2/dsdt.asl +++ b/src/mainboard/intel/emeraldlake2/dsdt.asl @@ -48,6 +48,8 @@ DefinitionBlock( #include <northbridge/intel/sandybridge/acpi/sandybridge.asl> #include <southbridge/intel/bd82x6x/acpi/pch.asl> #include <southbridge/intel/bd82x6x/acpi/default_irq_route.asl> + + #include <drivers/intel/gma/acpi/default_brightness_levels.asl> } }
diff --git a/src/mainboard/kontron/ktqm77/dsdt.asl b/src/mainboard/kontron/ktqm77/dsdt.asl index 9dbe7e5..7a4b9b1 100644 --- a/src/mainboard/kontron/ktqm77/dsdt.asl +++ b/src/mainboard/kontron/ktqm77/dsdt.asl @@ -49,6 +49,8 @@ DefinitionBlock( #include <northbridge/intel/sandybridge/acpi/sandybridge.asl> #include <southbridge/intel/bd82x6x/acpi/pch.asl> #include <southbridge/intel/bd82x6x/acpi/default_irq_route.asl> + + #include <drivers/intel/gma/acpi/default_brightness_levels.asl> } }
diff --git a/src/mainboard/lenovo/t400/dsdt.asl b/src/mainboard/lenovo/t400/dsdt.asl index 6274755..1d62057 100644 --- a/src/mainboard/lenovo/t400/dsdt.asl +++ b/src/mainboard/lenovo/t400/dsdt.asl @@ -47,6 +47,8 @@ DefinitionBlock( { #include <northbridge/intel/gm45/acpi/gm45.asl> #include <southbridge/intel/i82801ix/acpi/ich9.asl> + + #include <drivers/intel/gma/acpi/default_brightness_levels.asl> } }
diff --git a/src/mainboard/lenovo/t420s/dsdt.asl b/src/mainboard/lenovo/t420s/dsdt.asl index 64e4e9f..fb653ea 100644 --- a/src/mainboard/lenovo/t420s/dsdt.asl +++ b/src/mainboard/lenovo/t420s/dsdt.asl @@ -51,6 +51,8 @@ DefinitionBlock( #include <northbridge/intel/sandybridge/acpi/sandybridge.asl> #include <southbridge/intel/bd82x6x/acpi/pch.asl> #include <southbridge/intel/bd82x6x/acpi/default_irq_route.asl> + + #include <drivers/intel/gma/acpi/default_brightness_levels.asl> } }
diff --git a/src/mainboard/lenovo/t430s/dsdt.asl b/src/mainboard/lenovo/t430s/dsdt.asl index 64e4e9f..fb653ea 100644 --- a/src/mainboard/lenovo/t430s/dsdt.asl +++ b/src/mainboard/lenovo/t430s/dsdt.asl @@ -51,6 +51,8 @@ DefinitionBlock( #include <northbridge/intel/sandybridge/acpi/sandybridge.asl> #include <southbridge/intel/bd82x6x/acpi/pch.asl> #include <southbridge/intel/bd82x6x/acpi/default_irq_route.asl> + + #include <drivers/intel/gma/acpi/default_brightness_levels.asl> } }
diff --git a/src/mainboard/lenovo/t520/dsdt.asl b/src/mainboard/lenovo/t520/dsdt.asl index f5f3ace..9a75807 100644 --- a/src/mainboard/lenovo/t520/dsdt.asl +++ b/src/mainboard/lenovo/t520/dsdt.asl @@ -50,6 +50,8 @@ DefinitionBlock( #include <northbridge/intel/sandybridge/acpi/sandybridge.asl> #include <southbridge/intel/bd82x6x/acpi/pch.asl> #include <southbridge/intel/bd82x6x/acpi/default_irq_route.asl> + + #include <drivers/intel/gma/acpi/default_brightness_levels.asl> } }
diff --git a/src/mainboard/lenovo/t530/dsdt.asl b/src/mainboard/lenovo/t530/dsdt.asl index f5f3ace..9a75807 100644 --- a/src/mainboard/lenovo/t530/dsdt.asl +++ b/src/mainboard/lenovo/t530/dsdt.asl @@ -50,6 +50,8 @@ DefinitionBlock( #include <northbridge/intel/sandybridge/acpi/sandybridge.asl> #include <southbridge/intel/bd82x6x/acpi/pch.asl> #include <southbridge/intel/bd82x6x/acpi/default_irq_route.asl> + + #include <drivers/intel/gma/acpi/default_brightness_levels.asl> } }
diff --git a/src/mainboard/lenovo/x200/dsdt.asl b/src/mainboard/lenovo/x200/dsdt.asl index 5545c94..110cada 100644 --- a/src/mainboard/lenovo/x200/dsdt.asl +++ b/src/mainboard/lenovo/x200/dsdt.asl @@ -47,6 +47,8 @@ DefinitionBlock( { #include <northbridge/intel/gm45/acpi/gm45.asl> #include <southbridge/intel/i82801ix/acpi/ich9.asl> + + #include <drivers/intel/gma/acpi/default_brightness_levels.asl> } }
diff --git a/src/mainboard/lenovo/x201/dsdt.asl b/src/mainboard/lenovo/x201/dsdt.asl index f2f0a89..15e85b2 100644 --- a/src/mainboard/lenovo/x201/dsdt.asl +++ b/src/mainboard/lenovo/x201/dsdt.asl @@ -50,6 +50,8 @@ DefinitionBlock( #include <northbridge/intel/nehalem/acpi/nehalem.asl> #include <southbridge/intel/bd82x6x/acpi/pch.asl> #include <southbridge/intel/bd82x6x/acpi/default_irq_route.asl> + + #include <drivers/intel/gma/acpi/default_brightness_levels.asl> } Device (UNCR) { diff --git a/src/mainboard/lenovo/x220/dsdt.asl b/src/mainboard/lenovo/x220/dsdt.asl index f5f3ace..9a75807 100644 --- a/src/mainboard/lenovo/x220/dsdt.asl +++ b/src/mainboard/lenovo/x220/dsdt.asl @@ -50,6 +50,8 @@ DefinitionBlock( #include <northbridge/intel/sandybridge/acpi/sandybridge.asl> #include <southbridge/intel/bd82x6x/acpi/pch.asl> #include <southbridge/intel/bd82x6x/acpi/default_irq_route.asl> + + #include <drivers/intel/gma/acpi/default_brightness_levels.asl> } }
diff --git a/src/mainboard/lenovo/x230/dsdt.asl b/src/mainboard/lenovo/x230/dsdt.asl index 1c71c3c..1ef9f11 100644 --- a/src/mainboard/lenovo/x230/dsdt.asl +++ b/src/mainboard/lenovo/x230/dsdt.asl @@ -50,6 +50,8 @@ DefinitionBlock( #include <northbridge/intel/sandybridge/acpi/sandybridge.asl> #include <southbridge/intel/bd82x6x/acpi/pch.asl> #include <southbridge/intel/bd82x6x/acpi/default_irq_route.asl> + + #include <drivers/intel/gma/acpi/default_brightness_levels.asl> } } /* diff --git a/src/mainboard/packardbell/ms2290/dsdt.asl b/src/mainboard/packardbell/ms2290/dsdt.asl index c2d96f3..b36f909 100644 --- a/src/mainboard/packardbell/ms2290/dsdt.asl +++ b/src/mainboard/packardbell/ms2290/dsdt.asl @@ -44,6 +44,8 @@ DefinitionBlock( #include <northbridge/intel/nehalem/acpi/nehalem.asl> #include <southbridge/intel/bd82x6x/acpi/pch.asl> #include <southbridge/intel/bd82x6x/acpi/default_irq_route.asl> + + #include <drivers/intel/gma/acpi/default_brightness_levels.asl> } Device (UNCR) { diff --git a/src/mainboard/roda/rk9/dsdt.asl b/src/mainboard/roda/rk9/dsdt.asl index c955c86..1a86440 100644 --- a/src/mainboard/roda/rk9/dsdt.asl +++ b/src/mainboard/roda/rk9/dsdt.asl @@ -49,6 +49,8 @@ DefinitionBlock( { #include <northbridge/intel/gm45/acpi/gm45.asl> #include <southbridge/intel/i82801ix/acpi/ich9.asl> + + #include <drivers/intel/gma/acpi/default_brightness_levels.asl> } }
diff --git a/src/mainboard/samsung/lumpy/dsdt.asl b/src/mainboard/samsung/lumpy/dsdt.asl index 1ab6322..13d8593 100644 --- a/src/mainboard/samsung/lumpy/dsdt.asl +++ b/src/mainboard/samsung/lumpy/dsdt.asl @@ -51,6 +51,8 @@ DefinitionBlock( #include <northbridge/intel/sandybridge/acpi/sandybridge.asl> #include <southbridge/intel/bd82x6x/acpi/pch.asl> #include <southbridge/intel/bd82x6x/acpi/default_irq_route.asl> + + #include <drivers/intel/gma/acpi/default_brightness_levels.asl> } }
diff --git a/src/mainboard/samsung/stumpy/dsdt.asl b/src/mainboard/samsung/stumpy/dsdt.asl index 0a2f37d..e538cd6 100644 --- a/src/mainboard/samsung/stumpy/dsdt.asl +++ b/src/mainboard/samsung/stumpy/dsdt.asl @@ -49,6 +49,8 @@ DefinitionBlock( #include <northbridge/intel/sandybridge/acpi/sandybridge.asl> #include <southbridge/intel/bd82x6x/acpi/pch.asl> #include <southbridge/intel/bd82x6x/acpi/default_irq_route.asl> + + #include <drivers/intel/gma/acpi/default_brightness_levels.asl> } }