3 Copyright (c) 1999 - 2014, Intel Corporation. All rights reserved
5 SPDX-License-Identifier: BSD-2-Clause-Patent
15 IGD OpRegion/Software ACPI Reference Code for the Baytrail Family.
19 // Enable/Disable Output Switching. In WIN2K/WINXP, _DOS = 0 will
20 // get called during initialization to prepare for an ACPI Display
21 // Switch Event. During an ACPI Display Switch, the OS will call
22 // _DOS = 2 immediately after a Notify=0x80 to temporarily disable
23 // all Display Switching. After ACPI Display Switching is complete,
24 // the OS will call _DOS = 0 to re-enable ACPI Display Switching.
28 // Store Display Switching and LCD brightness BIOS control bit
29 Store(And(Arg0,7),DSEN)
32 // Enumerate the Display Environment. This method will return
33 // valid addresses for all display device encoders present in the
34 // system. The Miniport Driver will reject the addresses for every
35 // encoder that does not have an attached display device. After
36 // enumeration is complete, the OS will call the _DGS methods
37 // during a display switch only for the addresses accepted by the
38 // Miniport Driver. For hot-insertion and removal of display
39 // devices, a re-enumeration notification will be required so the
40 // address of the newly present display device will be accepted by
41 // the Miniport Driver.
43 Method(_DOD, 0, Serialized)
46 If(LNotEqual(DIDL, Zero))
48 Store(SDDL(DIDL),DID1)
50 If(LNotEqual(DDL2, Zero))
52 Store(SDDL(DDL2),DID2)
54 If(LNotEqual(DDL3, Zero))
56 Store(SDDL(DDL3),DID3)
58 If(LNotEqual(DDL4, Zero))
60 Store(SDDL(DDL4),DID4)
62 If(LNotEqual(DDL5, Zero))
64 Store(SDDL(DDL5),DID5)
67 // TODO - This level of flexibility is not needed for a true
68 // OEM design. Simply determine the greatest number of
69 // encoders the platform will suppport then remove all
70 // return packages beyond that value. Note that for
71 // current silicon, the maximum number of encoders
76 If (LNOTEqual (ISPD, 0))
78 Name(TMP0,Package() {0xFFFFFFFF,0xFFFFFFFF})
79 Store(Or(0x10000,DID1),Index(TMP0,0))
80 //Add ISP device to GFX0
81 Store(0x00020F38, Index(TMP0,1))
85 Name(TMP1,Package() {0xFFFFFFFF})
86 Store(Or(0x10000,DID1),Index(TMP1,0))
93 If (LNOTEqual (ISPD, 0))
95 Name(TMP2,Package() {0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF})
96 Store(Or(0x10000,DID1),Index(TMP2,0))
97 Store(Or(0x10000,DID2),Index(TMP2,1))
98 //Add ISP device to GFX0
99 Store(0x00020F38, Index(TMP2,2))
103 Name(TMP3,Package() {0xFFFFFFFF, 0xFFFFFFFF})
104 Store(Or(0x10000,DID1),Index(TMP3,0))
105 Store(Or(0x10000,DID2),Index(TMP3,1))
112 If (LNOTEqual (ISPD, 0))
114 Name(TMP4,Package() {0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,0xFFFFFFFF})
115 Store(Or(0x10000,DID1),Index(TMP4,0))
116 Store(Or(0x10000,DID2),Index(TMP4,1))
117 Store(Or(0x10000,DID3),Index(TMP4,2))
118 //Add ISP device to GFX0
119 Store(0x00020F38, Index(TMP4,3))
123 Name(TMP5,Package() {0xFFFFFFFF, 0xFFFFFFFF,0xFFFFFFFF})
124 Store(Or(0x10000,DID1),Index(TMP5,0))
125 Store(Or(0x10000,DID2),Index(TMP5,1))
126 Store(Or(0x10000,DID3),Index(TMP5,2))
133 If (LNOTEqual (ISPD, 0))
135 Name(TMP6,Package() {0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF})
136 Store(Or(0x10000,DID1),Index(TMP6,0))
137 Store(Or(0x10000,DID2),Index(TMP6,1))
138 Store(Or(0x10000,DID3),Index(TMP6,2))
139 Store(Or(0x10000,DID4),Index(TMP6,3))
140 //Add ISP device to GFX0
141 Store(0x00020F38, Index(TMP6,4))
145 Name(TMP7,Package() {0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF})
146 Store(Or(0x10000,DID1),Index(TMP7,0))
147 Store(Or(0x10000,DID2),Index(TMP7,1))
148 Store(Or(0x10000,DID3),Index(TMP7,2))
149 Store(Or(0x10000,DID4),Index(TMP7,3))
156 If (LNOTEqual (ISPD, 0))
158 Name(TMP8,Package() {0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF})
159 Store(Or(0x10000,DID1),Index(TMP8,0))
160 Store(Or(0x10000,DID2),Index(TMP8,1))
161 Store(Or(0x10000,DID3),Index(TMP8,2))
162 Store(Or(0x10000,DID4),Index(TMP8,3))
163 Store(Or(0x10000,DID5),Index(TMP8,4))
164 //Add ISP device to GFX0
165 Store(0x00020F38, Index(TMP8,5))
169 Name(TMP9,Package() {0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF})
170 Store(Or(0x10000,DID1),Index(TMP9,0))
171 Store(Or(0x10000,DID2),Index(TMP9,1))
172 Store(Or(0x10000,DID3),Index(TMP9,2))
173 Store(Or(0x10000,DID4),Index(TMP9,3))
174 Store(Or(0x10000,DID5),Index(TMP9,4))
179 // If nothing else, return Unknown LFP.
180 // (Prevents compiler warning.)
182 //Add ISP device to GFX0
183 If (LNOTEqual (ISPD, 0))
185 Return(Package() {0x00000400, 0x00020F38})
188 Return(Package() {0x00000400})
197 Method(_ADR,0,Serialized)
199 If(LEqual(And(0x0F00,DID1),0x400))
211 Return(And(0xFFFF,DID1))
215 // Return the Current Status.
222 // Query Graphics State (active or inactive).
233 // BIT31 BIT30 Execution
234 // 0 0 Don't implement.
235 // 0 1 Cache change. Nothing to Implement.
236 // 1 0 Don't Implement.
237 // 1 1 Display Switch Complete. Implement.
241 If(LEqual(And(Arg0,0xC0000000),0xC0000000))
244 // State change was performed by the
245 // Video Drivers. Simply update the
258 Method(_ADR,0,Serialized)
260 If(LEqual(And(0x0F00,DID2),0x400))
272 Return(And(0xFFFF,DID2))
276 // Return the Current Status.
283 // Query Graphics State (active or inactive).
287 // Return the Next State.
291 // Device Set State. (See table above.)
295 If(LEqual(And(Arg0,0xC0000000),0xC0000000))
298 // State change was performed by the
299 // Video Drivers. Simply update the
312 Method(_ADR,0,Serialized)
314 If(LEqual(And(0x0F00,DID3),0x400))
326 Return(And(0xFFFF,DID3))
330 // Return the Current Status.
344 // Query Graphics State (active or inactive).
351 // Device Set State. (See table above.)
355 If(LEqual(And(Arg0,0xC0000000),0xC0000000))
357 // State change was performed by the
358 // Video Drivers. Simply update the
371 Method(_ADR,0,Serialized)
373 If(LEqual(And(0x0F00,DID4),0x400))
385 Return(And(0xFFFF,DID4))
389 // Return the Current Status.
403 // Query Graphics State (active or inactive).
410 // Device Set State. (See table above.)
414 If(LEqual(And(Arg0,0xC0000000),0xC0000000))
417 // State change was performed by the
418 // Video Drivers. Simply update the
432 Method(_ADR,0,Serialized)
434 If(LEqual(And(0x0F00,DID5),0x400))
446 Return(And(0xFFFF,DID5))
450 // Return the Current Status.
464 // Query Graphics State (active or inactive).
471 // Device Set State. (See table above.)
475 If(LEqual(And(Arg0,0xC0000000),0xC0000000))
477 // State change was performed by the
478 // Video Drivers. Simply update the
492 Method(_ADR,0,Serialized)
494 If(LEqual(And(0x0F00,DID6),0x400))
506 Return(And(0xFFFF,DID6))
510 // Return the Current Status.
524 // Query Graphics State (active or inactive).
531 // Device Set State. (See table above.)
535 If(LEqual(And(Arg0,0xC0000000),0xC0000000))
537 // State change was performed by the
538 // Video Drivers. Simply update the
552 Method(_ADR,0,Serialized)
554 If(LEqual(And(0x0F00,DID7),0x400))
566 Return(And(0xFFFF,DID7))
570 // Return the Current Status.
584 // Query Graphics State (active or inactive).
591 // Device Set State. (See table above.)
595 If(LEqual(And(Arg0,0xC0000000),0xC0000000))
597 // State change was performed by the
598 // Video Drivers. Simply update the
612 Method(_ADR,0,Serialized)
614 If(LEqual(And(0x0F00,DID8),0x400))
626 Return(And(0xFFFF,DID8))
630 // Return the Current Status.
644 // Query Graphics State (active or inactive).
651 // Device Set State. (See table above.)
655 If(LEqual(And(Arg0,0xC0000000),0xC0000000))
657 // State change was performed by the
658 // Video Drivers. Simply update the
671 Method(_ADR,0,Serialized)
673 If(LEqual(EDPV, 0x0))
679 Return(And(0xFFFF,DIDX))
683 // Return the Current Status.
687 If(LEqual(EDPV, 0x0))
697 // Query Graphics State (active or inactive).
704 // Device Set State. (See table above.)
708 If(LEqual(And(Arg0,0xC0000000),0xC0000000))
710 // State change was performed by the
711 // Video Drivers. Simply update the
716 // Query List of Brightness Control Levels Supported.
720 // List of supported brightness levels in the following sequence.
722 // Level when machine has full power.
723 // Level when machine is on batteries.
724 // Other supported levels.
725 Return(Package() {80, 50, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100})
728 // Set the Brightness Level.
732 // Set the requested level if it is between 0 and 100%.
734 If(LAnd(LGreaterEqual(Arg0,0),LLessEqual(Arg0,100)))
736 \_SB.PCI0.GFX0.AINT(1, Arg0)
737 Store(Arg0,BRTL) // Store Brightness Level.
741 // Brightness Query Current level.
752 Store(And(Arg0,0xF0F),Local0)
753 Or(0x80000000,Local0, Local1)
754 If(LEqual(DIDL,Local0))
758 If(LEqual(DDL2,Local0))
762 If(LEqual(DDL3,Local0))
766 If(LEqual(DDL4,Local0))
770 If(LEqual(DDL5,Local0))
774 If(LEqual(DDL6,Local0))
778 If(LEqual(DDL7,Local0))
782 If(LEqual(DDL8,Local0))
791 Store(And(Arg0,0xF0F),Local0)
793 If(LEqual(0, Local0))
797 If(LEqual(CADL, Local0))
801 If(LEqual(CAL2, Local0))
805 If(LEqual(CAL3, Local0))
809 If(LEqual(CAL4, Local0))
813 If(LEqual(CAL5, Local0))
817 If(LEqual(CAL6, Local0))
821 If(LEqual(CAL7, Local0))
825 If(LEqual(CAL8, Local0))
834 Store(And(Arg0,0xF0F),Local0)
836 If(LEqual(0, Local0))
840 If(LEqual(NADL, Local0))
844 If(LEqual(NDL2, Local0))
848 If(LEqual(NDL3, Local0))
852 If(LEqual(NDL4, Local0))
856 If(LEqual(NDL5, Local0))
860 If(LEqual(NDL6, Local0))
864 If(LEqual(NDL7, Local0))
868 If(LEqual(NDL8, Local0))
876 // Include IGD OpRegion/Software SCI interrupt handler which is use by
877 // the graphics drivers to request data from system BIOS.
879 include("IgdOpRn.ASL")