forked from RehabMan/HP-ProBook-4x30s-DSDT-Patch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
13_Brightness.txt
66 lines (62 loc) · 2.05 KB
/
13_Brightness.txt
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
#Maintained by: RehabMan for: HP Probook 4x30s/4x40s
# 13_Brightness.txt
#
# This patch is for use with native patched AppleBacklight.kext
#
# See this thread for more information:
# http://www.tonymacx86.com/hp-probook-mavericks/121031-native-brightness-working-without-blinkscreen-using-patched-applebacklight-kext.html
#
into device label IGPU code_regex (OperationRegion\s\(IGD2,\sPCI_Config[^\}]*\}) remove_matched;
into device label IGPU code_regex (OperationRegion\s\(IGDP,\sPCI_Config[^\}]*\}) replace_matched
begin
%1\n
OperationRegion (IGD2, PCI_Config, 0x10, 4)\n
Field (IGD2, AnyAcc, NoLock, Preserve)\n
{\n
BAR1,32,\n
}\n
end;
into device label PNLF remove_entry;
into scope label \_SB insert
begin
Device (PNLF)\n
{\n
// normal PNLF declares (note some of this probably not necessary)\n
Name (_ADR, Zero)\n
Name (_HID, EisaId ("APP0002"))\n
Name (_CID, "backlight")\n
Name (_UID, 10)\n
Name (_STA, 0x0B)\n
//define hardware register access for brightness\n
// you can see BAR1 value in RW-Everything under Bus00,02 Intel VGA controler PCI\n
// Note: Not sure which one is right here... for now, going with BAR1 masked\n
//OperationRegion (BRIT, SystemMemory, Subtract(\_SB.PCI0.IGPU.BAR1, 4), 0xe1184)\n
OperationRegion (BRIT, SystemMemory, And(\_SB.PCI0.IGPU.BAR1, Not(0xF)), 0xe1184)\n
Field (BRIT, AnyAcc, Lock, Preserve)\n
{\n
Offset(0x48250),\n
LEV2, 32,\n
LEVL, 32,\n
Offset(0x70040),\n
P0BL, 32,\n
Offset(0xc8250),\n
LEVW, 32,\n
LEVX, 32,\n
Offset(0xe1180),\n
PCHL, 32,\n
}\n
// _INI deals with differences between native setting and desired\n
Method (_INI, 0, NotSerialized)\n
{\n
Store(ShiftRight(LEVX,16), Local1)\n
if (LNotEqual(0x710, Local1))\n
{\n
Divide(Multiply(LEVL, 0x710), Local1,, Local0)\n
//Store(P0BL, Local1)\n
//While(LEqual (P0BL, Local1)) {}\n
Store(Local0, LEVL)\n
Store(0x7100000, LEVX)\n
}\n
}\n
}\n
end;