1 /* SPDX-License-Identifier: GPL-2.0-only */
4 * Switchable graphics not yet tested!
7 /* Hybrid graphics enable/disable GPIO bitfields */
8 Name (HYG1, 0x004A0000)
9 Name (HYG2, 0x00020000)
11 /* GPIO control port */
12 Name (GPCP, DEFAULT_GPIOBASE)
14 /* GPIO control map */
15 OperationRegion (GPCM, SystemIO, GPCP, 0x3F)
16 Field (GPCM, ByteAcc, NoLock, Preserve) {
28 /* Switch hybrid graphics */
31 /* Discrete graphics requested */
37 /* Integrated graphics requested */
38 Local0 = HYG1 ^ 0xFFFFFFFF
40 Local0 = HYG2 ^ 0xFFFFFFFF
45 Method (ATPX, 2, Serialized) {
46 /* Create local variables */
47 Name (ATPR, Buffer (0x08) {
51 CreateWordField (ATPR, 0x00, SIZE)
52 CreateWordField (ATPR, 0x02, VERS)
53 CreateDWordField (ATPR, 0x04, FUNC)
58 /* Assemble and return version information */
59 SIZE = 0x08 /* Response length */
60 VERS = 0x01 /* Version number */
61 FUNC = 0x0F /* Supported functions? */
68 CreateByteField (Arg1, 0x02, PWST)
73 /* Enable discrete graphics */
78 /* Enable integrated graphics */