into definitionblock code_regex External\s+\(\\_SB_\.PCI0\.PEGP\.DGFX\.SVID\) remove_matched;
into method label _OFF parent_adr 0x00010000 remove_entry;
into device name_adr 0x00010000 insert
begin
OperationRegion (RPCX, SystemMemory, \XBAS,0x9000)\n
Field (RPCX, DWordAcc, NoLock, Preserve)\n
{\n
Offset (0x8214), \n
Offset (0x8216), \n
LNKS, 4, \n
Offset (0x8C20), \n
, 4, \n
AFE4, 1, \n
AFE5, 1\n
}\n
end;
into method label _OFF parent_label PEGP.DGFX remove_entry;
into method label SGPO parent_label PEGP.DGFX remove_entry;
into device label PEGP.DGFX insert
begin
Name (ELCT, Zero)\n
Name (HVID, Zero)\n
Name (HDID, Zero)\n
OperationRegion (PCIS, PCI_Config, Zero, 0xF0)\n
Field (PCIS, DWordAcc, Lock, Preserve)\n
{\n
DVID, 16, \n
Offset (0x2C), \n
SVID, 16, \n
SDID, 16, \n
Offset (0x4C), \n
WVID, 16, \n
WDID, 16\n
}\n
OperationRegion (PCAP, PCI_Config, \EECP,0x14)\n
Field (PCAP, DWordAcc, NoLock, Preserve)\n
{\n
Offset (0x10), \n
LCTL, 16\n
}\n
OperationRegion (GPIO, SystemIO, \GBAS,0x60)\n
Field (GPIO, ByteAcc, Lock, Preserve)\n
{\n
Offset (0x0C), \n
LVL0, 32, \n
Offset (0x38), \n
LVL1, 32, \n
Offset (0x48), \n
LVL2, 32\n
}\n
Method (_OFF, 0, Serialized)\n
{\n
Store (LCTL, ELCT)\n
Store (SVID, HVID)\n
Store (SDID, HDID)\n
Store (One, LNKD)\n
Store (Zero, AFE4)\n
Store (One, AFE5)\n
SGPO (HLRS, Zero)\n
SGPO (PWEN, Zero)\n
Notify (\_SB.PCI0.PEGP, Zero)\n
Return (Zero)\n
}\n
Method (SGPO, 2, Serialized)\n
{\n
And (Arg0, 0x7F, Arg0)\n
If (LEqual (Arg1, Zero))\n
{\n
Store (Zero, Local3)\n
}\n
Else\n
{\n
Store (One, Local3)\n
}\n
If (LLess (Arg0, 0x20))\n
{\n
ShiftLeft (Local3, Arg0, Local0)\n
ShiftLeft (One, Arg0, Local1)\n
And (\_SB.PCI0.PEGP.DGFX.LVL0, Not (Local1), Local2)\n
Or (Local2, Local0, \_SB.PCI0.PEGP.DGFX.LVL0)\n
}\n
Else\n
{\n
If (LLess (Arg0, 0x40))\n
{\n
ShiftLeft (Local3, Subtract (Arg0, 0x20), Local0)\n
ShiftLeft (One, Subtract (Arg0, 0x20), Local1)\n
And (\_SB.PCI0.PEGP.DGFX.LVL1, Not (Local1), Local2)\n
Or (Local2, Local0, \_SB.PCI0.PEGP.DGFX.LVL1)\n
}\n
Else\n
{\n
ShiftLeft (Local3, Subtract (Arg0, 0x40), Local0)\n
ShiftLeft (One, Subtract (Arg0, 0x40), Local1)\n
And (\_SB.PCI0.PEGP.DGFX.LVL2, Not (Local1), Local2)\n
Or (Local2, Local0, \_SB.PCI0.PEGP.DGFX.LVL2)\n
}\n
}\n
Return (One)\n
}\n
end;
into method label _INI parent_label _SB code_regex . insert
begin
\_SB_.PCI0.PEGP.DGFX._OFF()\n
end;