Skip to content
Permalink
Browse files

add brightness patch for native AppleBacklight.kext

  • Loading branch information...
RehabMan committed Jan 5, 2014
1 parent 5bc4312 commit 2b4cd178d35e95afb9da1eff2fc62497017b081c
Showing with 58 additions and 0 deletions.
  1. +2 −0 .maciasl
  2. +54 −0 13_Brightness.txt
  3. +2 −0 Patches.xcodeproj/project.pbxproj
@@ -21,3 +21,5 @@
[6.1] ACPI backlight control 12_Brightness.txt
[6.2] Brightness data (4x30s) 12a_4x30s_BCL.txt
[6.3] Brightness data (4x40s) 12b_4x40s_BCL.txt
[7.0] == Native backlight control == NullPatch.txt
[7.1] Native backlight fix 13_Brightness.txt
@@ -0,0 +1,54 @@
#Maintained by: RehabMan for: HP Probook 4x30s/4x40s
# 13_Brightness.txt

#
# This patch is for use with native patched AppleBacklight.kext
#

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
OperationRegion (BRIT, SystemMemory, \_SB.PCI0.IGPU.BAR1, 0xc8254)\n
Field (BRIT, AnyAcc, Lock, Preserve)\n
{\n
Offset(0x4824c),\n
LEV2, 32,\n
LEVL, 32,\n
Offset (0x7003C),\n
P0BL, 32,\n
Offset(0xc824c),\n
LEVW, 32,\n
LEVX, 32,\n
}\n
Method (_INI, 0, NotSerialized)\n
{\n
Divide(Multiply(LEVL, 0x710), ShiftRight(LEVX, 16),, Local0)\n
//Store(P0BL, Local1)\n
//While(LEqual (P0BL, Local1)) {}\n
Store(Local0, LEVL)\n
Store(0x7100000, LEVX)\n
}\n
}\n
end;

@@ -16,6 +16,7 @@
846B57131706046600E19787 /* Mini-SSDT.dsl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "Mini-SSDT.dsl"; sourceTree = "<group>"; };
8470FEA0180B7FD700FA322E /* 08b_BCM4322x.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = 08b_BCM4322x.txt; sourceTree = "<group>"; };
848049D0185BA12D00EA42CF /* 12b_4x40s_BCL.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = 12b_4x40s_BCL.txt; sourceTree = "<group>"; };
84817C301878CFE00061AF92 /* 13_Brightness.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = 13_Brightness.txt; sourceTree = "<group>"; };
84878E3B17445FE100F82A03 /* 00_Optimize.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = 00_Optimize.txt; sourceTree = "<group>"; };
8499C9761704B5F70066A5F3 /* NullPatch.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = NullPatch.txt; sourceTree = "<group>"; };
849EBD50170340BF007EFCFF /* xx_KeyBacklight.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = xx_KeyBacklight.txt; sourceTree = "<group>"; };
@@ -73,6 +74,7 @@
842F94371858FA4400BAF14B /* 12_Brightness.txt */,
84F0B0DC185AE420008C82BE /* 12a_4x30s_BCL.txt */,
848049D0185BA12D00EA42CF /* 12b_4x40s_BCL.txt */,
84817C301878CFE00061AF92 /* 13_Brightness.txt */,
846B57131706046600E19787 /* Mini-SSDT.dsl */,
843DA4791706024900E87F04 /* Mini-SSDT-DualLink.dsl */,
84F52D0B1709C9A3001643C8 /* Mini-SSDT-IMEI.dsl */,

0 comments on commit 2b4cd17

Please sign in to comment.
You can’t perform that action at this time.