1/* SPDX-License-Identifier: GPL-2.0-or-later */ 2 3#define NBCI_FUNC_SUPPORT 0 4#define NBCI_FUNC_PLATCAPS 1 5#define NBCI_FUNC_GETOBJBYTYPE 16 6#define NBCI_FUNC_GETCALLBACKS 19 7 8/* 'DR' in ASCII, for DRiver Object */ 9#define NBCI_OBJTYPE_DR 0x4452 10 11#define GPS_FUNC_GETCALLBACKS 0x13 12 13Method (NBCI, 2, Serialized) 14{ 15 Switch (ToInteger (Arg0)) 16 { 17 Case (NBCI_FUNC_SUPPORT) 18 { 19 Return (ITOB( 20 (1 << NBCI_FUNC_SUPPORT) | 21 (1 << NBCI_FUNC_PLATCAPS) | 22 (1 << NBCI_FUNC_GETOBJBYTYPE))) 23 } 24 Case (NBCI_FUNC_PLATCAPS) 25 { 26 Return (ITOB( 27 (0 << 10) | /* No 3D Hotkeys */ 28 (0 << 9) | /* Do not enumerate a dock */ 29 (0 << 7) | /* Does not have DISPLAYSTATUS */ 30 (0 << 5) | /* No LID support */ 31 (0 << 4))) /* No Aux power state request */ 32 } 33 Case (NBCI_FUNC_GETCALLBACKS) 34 { 35 /* Re-use the GPS subfunction's GETCALLBACKS Method */ 36 Return (GPS (GPS_FUNC_GETCALLBACKS, Arg1)) 37 } 38 Case (NBCI_FUNC_GETOBJBYTYPE) 39 { 40 CreateWordField (Arg1, 2, BFF0) 41 If (BFF0 == NBCI_OBJTYPE_DR) 42 { 43 Return (Buffer(0xa1) 44 { 45 /* DR ("Driver Object") is a data object which 46 * might vary depending on the eDP panel used. */ 47 0x57, 0x74, 0xdc, 0x86, 0x75, 0x84, 0xec, 0xe7, 48 0x52, 0x44, 0xa1, 0x00, 0x00, 0x00, 0x00, 0x01, 49 0x00, 0x00, 0x00, 0x00, 0xde, 0x10, 0x00, 0x00, 50 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 51 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0x00, 52 0x00, 0x00, 0x01, 0x00, 0x47, 0x00, 0x00, 0x00, 53 0x02, 0x00, 0x45, 0x00, 0x00, 0x00, 0x03, 0x00, 54 0x51, 0x00, 0x00, 0x00, 0x04, 0x00, 0x4f, 0x00, 55 0x00, 0x00, 0x05, 0x00, 0x4d, 0x00, 0x00, 0x00, 56 0x06, 0x00, 0x4b, 0x00, 0x00, 0x00, 0x07, 0x00, 57 0x49, 0x00, 0x00, 0x00, 0x08, 0x00, 0x47, 0x00, 58 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xd9, 0x1c, 59 0x04, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 60 0x41, 0x5d, 0xc9, 0x00, 0x01, 0x24, 0x2e, 0x00, 61 0x02, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x01, 62 0x00, 0x00, 0x00, 0xd9, 0x1c, 0x04, 0x00, 0x00, 63 0x00, 0x01, 0x00, 0x00, 0x00, 0x60, 0x68, 0x9e, 64 0x35, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 65 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 66 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 67 0x00 68 }) 69 } Else { 70 Return (NV_ERROR_UNSPECIFIED) 71 } 72 73 } 74 } 75 76 Return (NV_ERROR_UNSUPPORTED) 77} 78