Vladimir Serbinenko (phcoder@gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/6734
-gerrit
commit 7ea42ea701b9364102878b40479480956acae901 Author: Vladimir Serbinenko phcoder@gmail.com Date: Fri Aug 22 03:12:46 2014 +0200
nehalem: Respect ACPI in LCD handling as video device.
Makes windows happy
Change-Id: I82760fd96b053e985f16e257e785fb30b82f92bf Signed-off-by: Vladimir Serbinenko phcoder@gmail.com --- src/mainboard/lenovo/x201/dsdt.asl | 2 +- src/mainboard/packardbell/ms2290/dsdt.asl | 2 +- src/northbridge/intel/nehalem/acpi/igd.asl | 191 +++++++++++++++-------------- 3 files changed, 101 insertions(+), 94 deletions(-)
diff --git a/src/mainboard/lenovo/x201/dsdt.asl b/src/mainboard/lenovo/x201/dsdt.asl index 62616a8..ea27f2c 100644 --- a/src/mainboard/lenovo/x201/dsdt.asl +++ b/src/mainboard/lenovo/x201/dsdt.asl @@ -25,7 +25,7 @@ #define ACPI_VIDEO_DEVICE _SB.PCI0.GFX0 #define RP04_IS_EXPRESSCARD 1 #define EC_LENOVO_H8_ME_WORKAROUND 1 -#define HAVE_LCD_SCREEN 1 +#define DISPLAY_DEVICE_2_IS_LCD_SCREEN 1
DefinitionBlock( "dsdt.aml", diff --git a/src/mainboard/packardbell/ms2290/dsdt.asl b/src/mainboard/packardbell/ms2290/dsdt.asl index f0eb8ec..456af46 100644 --- a/src/mainboard/packardbell/ms2290/dsdt.asl +++ b/src/mainboard/packardbell/ms2290/dsdt.asl @@ -19,7 +19,7 @@ * MA 02110-1301 USA */
-#define HAVE_LCD_SCREEN 1 +#define DISPLAY_DEVICE_2_IS_LCD_SCREEN 1
DefinitionBlock( "dsdt.aml", diff --git a/src/northbridge/intel/nehalem/acpi/igd.asl b/src/northbridge/intel/nehalem/acpi/igd.asl index a892ce2..9819627 100644 --- a/src/northbridge/intel/nehalem/acpi/igd.asl +++ b/src/northbridge/intel/nehalem/acpi/igd.asl @@ -162,6 +162,104 @@ Device (GFX0) } }
+#ifdef DISPLAY_DEVICE_2_IS_LCD_SCREEN + Device (LCD0) + { + /* Device Unique ID */ + Method(_ADR, 0, Serialized) + { + If(LEqual(DID2, 0)) { + Return (2) + } Else { + Return (And(0xffff, DID2)) + } + } + Name (BRCT, 0) + + Name (BRIG, Package (0x12) + { + 0x61, + 0x61, + 0x2, + 0x4, + 0x5, + 0x7, + 0x9, + 0xb, + 0xd, + 0x11, + 0x14, + 0x17, + 0x1c, + 0x20, + 0x27, + 0x31, + 0x41, + 0x61, + }) + + Method (_BCL, 0, NotSerialized) + { + Store (1, BRCT) + Return (BRIG) + } + + Method (_BCM, 1, NotSerialized) + { + Store (ShiftLeft (Arg0, 4), ^^BCLV) + Store (0x80000000, ^^CR1) + Store (0x061a061a, ^^CR2) + } + Method (_BQC, 0, NotSerialized) + { + Store (^^BCLV, Local0) + ShiftRight (Local0, 4, Local0) + Return (Local0) + } + + Method(BRID, 1, NotSerialized) + { + Store (Match (BRIG, MEQ, Arg0, MTR, Zero, 2), Local0) + If (LEqual (Local0, Ones)) + { + Return (0x11) + } + Return (Local0) + } + + /* Using Notify is the right way. But Windows doesn't handle + it well. So use both method in a way to avoid double action. + */ + Method (DECB, 0, NotSerialized) + { + If (BRCT) + { + Notify (LCD0, 0x87) + } Else { + Store (BRID (_BQC ()), Local0) + If (LNotEqual (Local0, 2)) + { + Decrement (Local0) + } + _BCM (DerefOf (Index (BRIG, Local0))) + } + } + Method (INCB, 0, NotSerialized) + { + If (BRCT) + { + Notify (LCD0, 0x86) + } Else { + Store (BRID (_BQC ()), Local0) + If (LNotEqual (Local0, 0x11)) + { + Increment (Local0) + } + _BCM (DerefOf (Index (BRIG, Local0))) + } + } + } +#else Device(DD02) { /* Device Unique ID */ @@ -204,7 +302,7 @@ Device (GFX0) } } } - +#endif
Device(DD03) { @@ -336,95 +434,4 @@ Device (GFX0) } } } - -#ifdef HAVE_LCD_SCREEN - Device (LCD0) - { - Name (_ADR, 0x0400) - Name (BRCT, 0) - - Name (BRIG, Package (0x12) - { - 0x61, - 0x61, - 0x2, - 0x4, - 0x5, - 0x7, - 0x9, - 0xb, - 0xd, - 0x11, - 0x14, - 0x17, - 0x1c, - 0x20, - 0x27, - 0x31, - 0x41, - 0x61, - }) - - Method (_BCL, 0, NotSerialized) - { - Store (1, BRCT) - Return (BRIG) - } - - Method (_BCM, 1, NotSerialized) - { - Store (ShiftLeft (Arg0, 4), ^^BCLV) - Store (0x80000000, ^^CR1) - Store (0x061a061a, ^^CR2) - } - Method (_BQC, 0, NotSerialized) - { - Store (^^BCLV, Local0) - ShiftRight (Local0, 4, Local0) - Return (Local0) - } - - Method(BRID, 1, NotSerialized) - { - Store (Match (BRIG, MEQ, Arg0, MTR, Zero, 2), Local0) - If (LEqual (Local0, Ones)) - { - Return (0x11) - } - Return (Local0) - } - - /* Using Notify is the right way. But Windows doesn't handle - it well. So use both method in a way to avoid double action. - */ - Method (DECB, 0, NotSerialized) - { - If (BRCT) - { - Notify (LCD0, 0x87) - } Else { - Store (BRID (_BQC ()), Local0) - If (LNotEqual (Local0, 2)) - { - Decrement (Local0) - } - _BCM (DerefOf (Index (BRIG, Local0))) - } - } - Method (INCB, 0, NotSerialized) - { - If (BRCT) - { - Notify (LCD0, 0x86) - } Else { - Store (BRID (_BQC ()), Local0) - If (LNotEqual (Local0, 0x11)) - { - Increment (Local0) - } - _BCM (DerefOf (Index (BRIG, Local0))) - } - } - } -#endif }