Debian Codegraph @

src/drivers/intel/gma/acpi/common.asl

raw
1 /* SPDX-License-Identifier: GPL-2.0-only */
2
3 External(LCD0, DeviceObj)
4
5 Name (BRCT, 0)
6
7 Method(BRID, 1, NotSerialized)
8 {
9 Local0 = Match (BRIG, MEQ, Arg0, MTR, 0, 2)
10 If (Local0 == Ones)
11 {
12 Return (SizeOf(BRIG) - 1)
13 }
14 Return (Local0)
15 }
16
17 Method (XBCL, 0, NotSerialized)
18 {
19 BRCT = 1
20 Return (BRIG)
21 }
22
23 /* Display Output Switching */
24 Method (_DOS, 1)
25 {
26 }
27
28 /*
29 * Decrement display brightness.
30 *
31 * Using Notify is the right way. But Windows doesn't handle
32 * it well. So use both method in a way to avoid double action.
33 */
34 Method (DECB, 0, NotSerialized)
35 {
36 If (BRCT)
37 {
38 Notify (LCD0, 0x87)
39 } Else {
40 Local0 = BRID (XBQC ())
41 If (Local0 != 2)
42 {
43 Local0--
44 }
45 XBCM (DerefOf (BRIG[Local0]))
46 }
47 }
48
49 /*
50 * Increment display brightness.
51 */
52 Method (INCB, 0, NotSerialized)
53 {
54 If (BRCT)
55 {
56 Notify (LCD0, 0x86)
57 } Else {
58 Local0 = BRID (XBQC ())
59 If (Local0 != SizeOf(BRIG) - 1)
60 {
61 Local0++
62 }
63 XBCM (DerefOf (BRIG[Local0]))
64 }
65 }