// Based off of WhateverGreen's sample.dsl
// https://github.com/acidanthera/WhateverGreen/blob/master/Manual/Sample.dsl
DefinitionBlock ("", "SSDT", 2, "Slav", "AMDGPU", 0x00001000)
{
    External (_SB_.PCI0, DeviceObj)
    External (_SB_.PCI0.PEG0.PEGP, DeviceObj)


    Scope (\_SB.PCI0.PEG0.PEGP)
    {
      
        Method (_DSM, 4, NotSerialized)  // _DSM: Device-Specific Method
        {
          If (_OSI ("Darwin"))
          {
            Store (Package ()
            {
                // Where we shove our FakeID
                "device-id",
                Buffer (0x04)
                {
                    0xB0, 0x67, 0x00, 0x00
                },

                // Changing the name of the GPU reported, mainly cosmetic
                "model",
                Buffer ()
                {
                    "AMD Radeon R9 390"
                }
                        
             }, Local0)
             DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
             Return (Local0)
           }
          Else
          {
          }
        }
    }
    Scope (\_SB.PCI0)
    {                   
        Method (DTGP, 5, NotSerialized)
        {
            If (LEqual (Arg0, ToUUID ("a0b5b7c6-1318-441c-b0c9-fe695eaf949b")))
            {
                If (LEqual (Arg1, One))
                {
                    If (LEqual (Arg2, Zero))
                    {
                        Store (Buffer (One)
                            {
                                 0x03
                            }, Arg4)
                        Return (One)
                    }

                    If (LEqual (Arg2, One))
                    {
                        Return (One)
                    }
                }
            }

            Store (Buffer (One)
                {
                     0x00
                }, Arg4)
            Return (Zero)
        }
      
    }

}