Jump to content
nvflash

How do I add this _DSM to my IGPU?

Recommended Posts

My IGPU reads like this:

 

            Device (IXVE)
           {
               Name (_ADR, 0x00100000)
               Device (IGPU)
               {
                   Name (_ADR, Zero)

                   Scope (^^^PCI0)
                   {
                       OperationRegion (HDCP, SystemMemory, AMEM, 0x0600)
                       Field (HDCP, AnyAcc, NoLock, Preserve)
                       {
                           SIGN,   48, 
                           CHKS,   8, 
                           RESR,   8, 
                           GLOB,   4800
                       }
                   }

                   Name (ERR0, Buffer (0x04)
                   {
                       0x00, 0x00, 0x00, 0x00
                   })
                   Name (ERR1, Buffer (0x04)
                   {
                       0x01, 0x00, 0x00, 0x80
                   })
                   Name (VER1, Buffer (0x04)
                   {
                       0x01, 0x00, 0x00, 0x00
                   })
                   Method (NVIF, 3, NotSerialized)
                   {
                       Store (ERR1, Local0)
                       If (LEqual (Arg0, One))
                       {
                           Concatenate (ERR0, VER1, Local0)
                       }
                       Else
                       {
                           If (LEqual (Arg0, 0x0C))
                           {
                               If (LEqual (Arg1, Zero))
                               {
                                   Store (ERR0, Local0)
                               }
                               Else
                               {
                                   If (LEqual (Arg1, One))
                                   {
                                       Store (GLOB, Local1)
                                       Concatenate (ERR0, Local1, Local0)
                                   }
                               }
                           }
                           Else
                           {
                               If (LEqual (Arg0, 0x0D))
                               {
                                   If (LEqual (Arg1, Zero))
                                   {
                                       Store (ERR0, Local0)
                                   }
                                   Else
                                   {
                                       If (LEqual (Arg1, 0x02))
                                       {
                                           Store (NVF2 (), Local0)
                                       }
                                   }
                               }
                           }
                       }

                       Return (Local0)
                   }

 

And I'm trying to add a _DSM Method that looks like this:

 

Name (_ADR, Zero)
Name (_SUN, One)
Method (_DSM, 4, NotSerialized)
   {
    If (LEqual (Arg2, Zero)) { Return (Buffer() { 0x03 } ) }
    Return (Package()
           {
               "@0,connector-type", Buffer() { 0x00, 0x08, 0x00, 0x00 },
               "@1,connector-type", Buffer() { 0x00, 0x08, 0x00, 0x00 },
               "@2,connector-type", Buffer() { 0x00, 0x08, 0x00, 0x00 },
               "@3,connector-type", Buffer() { 0x00, 0x08, 0x00, 0x00 },
               "hda-gfx", Buffer() { "onboard-1" },
    })
   }

 

Everything I try comes back errors, could someone show me how this can be done, please?

Link to comment
Share on other sites

The patch is for the _DSM with the parent_adr 0x00100000.


As you can see Device (IXVE) has a _ADR of 0x00100000.


It doesn't matter if I rename IGPU to GFX0 and I don't need the HDAU device.


I only need the "connector-type" properties and the "hda-gfx" to show up in the device tree in the IOReg.


 

# 4.  Insert device GFX0 and device HDAU (Nvidia/AMD HDMI audio)
into method label _DSM parent_adr 0x00100000 remove_entry;
into device name_adr 0x00010000 insert
begin
Device (GFX0)\n
{\n
   Name (_ADR, Zero)\n
   Name (_SUN, One)\n
   Method (_DSM, 4, NotSerialized)\n
   {\n
    If (LEqual (Arg2, Zero)) { Return (Buffer() { 0x03 } ) }\n
    Return (Package()\n
           {\n
               "@0,connector-type", Buffer() { 0x00, 0x08, 0x00, 0x00 },\n
               "@1,connector-type", Buffer() { 0x00, 0x08, 0x00, 0x00 },\n
               "@2,connector-type", Buffer() { 0x00, 0x08, 0x00, 0x00 },\n
               "@3,connector-type", Buffer() { 0x00, 0x08, 0x00, 0x00 },\n
               "hda-gfx", Buffer() { "onboard-2" },\n
    })\n
   }\n
}\n
Device (HDAU)\n
{\n
   Name (_ADR, One)\n
   Method (_DSM, 4, NotSerialized)\n
   {\n
    If (LEqual (Arg2, Zero)) { Return (Buffer() { 0x03 } ) }\n
    Return (Package()\n
           {\n
              "hda-gfx", Buffer() { "onboard-2" },\n
    })\n
   }\n
}\n
end;

 

Here's how I'm doing it now:

 

 Device (PEGP)
           {
               Name (_ADR, 0x00100000)
               Name (_PRW, Package (0x02)
               {
                   0x09, 
                   0x05
               })
               Device (GFX0)
               {
                   Name (_ADR, Zero)
                   Name (_SUN, One)
                   Method (_DSM, 4, NotSerialized)
                   {
                       Store (Package (0x22)
                           {
                               "AAPL,slot-name", 
                               "PCI x16", 
                               "@0,compatible", 
                               Buffer (0x0B)
                               {
                                   "NVDA,NVMac"
                               }, 

                               "@0,connector-type", 
                               Buffer (0x04)
                               {
                                   0x00, 0x08, 0x00, 0x00
                               }, 

                               "@0,device_type", 
                               Buffer (0x08)
                               {
                                   "display"
                               }, 

                               "@0,name", 
                               Buffer (0x0F)
                               {
                                   "NVDA,Display-A"
                               }, 

                               "@1,compatible", 
                               Buffer (0x0B)
                               {
                                   "NVDA,NVMac"
                               }, 

                               "@1,audio-codec-index", 
                               Buffer (0x04)
                               {
                                   0x03, 0x00, 0x00, 0x00
                               }, 

                               "@1,av-signal-type", 
                               Buffer (0x04)
                               {
                                   0x08, 0x00, 0x00, 0x00
                               }, 

                               "@1,connector-type", 
                               Buffer (0x04)
                               {
                                   0x00, 0x08, 0x00, 0x00
                               }, 

                               "@1,device_type", 
                               Buffer (0x08)
                               {
                                   "display"
                               }, 

                               "@1,name", 
                               Buffer (0x0F)
                               {
                                   "NVDA,Display-B"
                               }, 

                               "NVCAP", 
                               Buffer (0x18)
                               {
                                   /* 0000 */    0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 
                                   /* 0008 */    0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 
                                   /* 0010 */    0x00, 0x00, 0x00, 0x00
                               }, 

                               "VRAM,totalsize", 
                               Buffer (0x04)
                               {
                                   0x00, 0x00, 0x00, 0x40
                               }, 

                               "device_type", 
                               Buffer (0x0C)
                               {
                                   "NVDA,Parent"
                               }, 

                               "model", 
                               Buffer (0x14)
                               {
                                   "nNidia GeForce 9300"
                               }, 

                               "rom-revision", 
                               Buffer (0x0F)
                               {
                                   "70.08.29.00.30"
                               }, 

                               "hda-gfx", 
                               Buffer (0x0A)
                               {
                                   "onboard-1"
                               }
                           }, Local0)
                       DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
                       Return (Local0)
                   }
               }


           }

 

But this gives me two Devices with the same _ADR (PEGP) and (IXVE) in my DSDT.

Link to comment
Share on other sites

Please attach the files before applying the patch.


I don't know what is original and what you inserted.

-Donations-

PayPal HERE - Stripe HERE - BuyMeaCoffee HERE - Mercado Livre HERE

Skrill [email protected] - BTC 33HeGCuCSh4tUBqdYkQqKpSDa1E7WeAJQ3

PicPay @danielnmaldonado - PiX @[email protected]

Premium Users HERE - Problems with Paypal HERE

xcd5u2Y.png

Link to comment
Share on other sites

For what I understand you should replace original method _DSM in IGPU and add device HDAU, don't add devices PEGP and GFX0.


The correct patch would be

into method label _DSM parent_label IGPU remove_entry;
into device label IGPU parent_adr 0x00100000 insert
begin
   Method (_DSM, 4, NotSerialized)\n
   {\n
      If (LEqual (Arg2, Zero)) { Return (Buffer() { 0x03 } ) }\n
      Return (Package()\n
           {\n
               "@0,connector-type", Buffer() { 0x00, 0x08, 0x00, 0x00 },\n
               "@1,connector-type", Buffer() { 0x00, 0x08, 0x00, 0x00 },\n
               "@2,connector-type", Buffer() { 0x00, 0x08, 0x00, 0x00 },\n
               "@3,connector-type", Buffer() { 0x00, 0x08, 0x00, 0x00 },\n
               "hda-gfx", Buffer() { "onboard-2" },\n
      })\n
   }\n
end;
into device name_adr 0x00100000 insert
begin
Device (HDAU)\n
{\n
   Name (_ADR, One)\n
   Method (_DSM, 4, NotSerialized)\n
   {\n
      If (LEqual (Arg2, Zero)) { Return (Buffer() { 0x03 } ) }\n
      Return (Package()\n
           {\n
              "hda-gfx", Buffer() { "onboard-2" },\n
      })\n
   }\n
}\n
end;

 

DSDT.aml.zip

-Donations-

PayPal HERE - Stripe HERE - BuyMeaCoffee HERE - Mercado Livre HERE

Skrill [email protected] - BTC 33HeGCuCSh4tUBqdYkQqKpSDa1E7WeAJQ3

PicPay @danielnmaldonado - PiX @[email protected]

Premium Users HERE - Problems with Paypal HERE

xcd5u2Y.png

Link to comment
Share on other sites

Thanks. I only needed this part of the patch:

 

into method label _DSM parent_label IGPU remove_entry;
into device label IGPU parent_adr 0x00100000 insert
begin
   Method (_DSM, 4, NotSerialized)\n
   {\n
      If (LEqual (Arg2, Zero)) { Return (Buffer() { 0x03 } ) }\n
      Return (Package()\n
           {\n
               "@0,connector-type", Buffer() { 0x00, 0x08, 0x00, 0x00 },\n
               "@1,connector-type", Buffer() { 0x00, 0x08, 0x00, 0x00 },\n
               "@2,connector-type", Buffer() { 0x00, 0x08, 0x00, 0x00 },\n
               "@3,connector-type", Buffer() { 0x00, 0x08, 0x00, 0x00 },\n
               "hda-gfx", Buffer() { "onboard-2" },\n
      })\n
   }\n
end;

 

It worked, somewhat, but for some reason the Drivers did not load the "Audio-Codec-Info" so I didn't get any codec loaded for my 10de,0007 HDMI Device, but your patch did show me where to insert my code, that I was using before, so now I only have one Device at _ADR 0x00100000, and that was the point.


Thanks so much.

Link to comment
Share on other sites

I fooled with it a little more and came up with this:

 

into method label _DSM parent_label IGPU remove_entry;
into device label IGPU parent_adr 0x00100000 insert
begin
   Method (_DSM, 4, NotSerialized)\n
   {\n
      If (LEqual (Arg2, Zero)) { Return (Buffer() { 0x03 } ) }\n
      Return (Package()\n
           {\n
               "@0,connector-type", Buffer() { 0x00, 0x08, 0x00, 0x00 },\n
               "@1,connector-type", Buffer() { 0x00, 0x08, 0x00, 0x00 },\n
               "@1,audio-codec-index", Buffer() { 0x03, 0x00, 0x00, 0x00 },\n
               "@1,av-signal-type", Buffer() { 0x08, 0x00, 0x00, 0x00 },\n
               "hda-gfx", Buffer() { "onboard-1" },\n
      })\n
   }\n
end;

 

That patch works with GraphicsEnabler=Yes.


Thanks for all the help. :D

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.





×
  • Create New...