Jump to content
InsanelyMac Forum
wmarsh

Proposed Mobility Radeon DSDT Patch

Recommended Posts

Graphics Enabler works for most but some of us are having problems -- such as mine with LVDS on @1

See the Mobility Radeon thread

http://www.insanelymac.com/forum/index.php?showtopic=245308

 

And Graphics Enabler has been reported to not have all ports working, nor is it for newer cards.

 

This is a first (published) attempt at a DSDT patch to no longer need GraphicsEnabler.

It is based mostly on the previously published exotic ATI patch and on comparison between the Nvidia desktop and laptop patches.

 

It is written to use a modified Shrike FB

 

 ATI Mobility Radeon Hack


This hack needs the DTGP method included in the DSDT, search for it in the "DSDT Hacks" on the menu.

Locate the graphic section of your DSDT (laptop/mobile)


Example: (PEGP), it could also be AGP or IGP or something similar. (Use the ACPI search feature to locte the section, or "Registry Info" from the menu).

		Device (AGP)
		{
			Name (_ADR, 0x00010000)
			Device (VID)
			{
				Name (_ADR, Zero)
				Method (_DOS, 1, NotSerialized)
				{
					Store (Arg0, MIS4)
					SMI (0x9E, MIS4)
				}

				Method (_DOD, 0, NotSerialized)
				{
					If (LEqual (MIS2, One))
					{
						Return (Package (0x03)
						{
							0x00010100, 

					 .........  the code continues...............

We place the hack just below of the following:


		Device (AGP) /*might be PEGP or IGP*/
		{
			Name (_ADR, 0x00010000)
			Device (GFX0)  /* You must change all references to VID to GFX0  References to VID2 changed to GFX2 */
			{
				Name (_ADR, Zero)
				Name (_SUN, 0x0B)
				Method (_DSM, 4, NotSerialized)
				{
					Store (Package (0x87)
						{
							"@1,AAPL,boot-display", /*modify to where boot display lives*/
							Buffer (0x04)
							{
								0x01, 0x00, 0x00, 0x00
							}, 

							"@0,compatible", 
							Buffer (0x0E)
							{
								"ATY,Shrike"  /*change to framebuffer desired*/
							}, 

							"@0,connector-type", 
							Buffer (0x04)
							{
								0x00, 0x04, 0x00, 0x00 /*change to match FB patch in my case this line is a dummy*/
							}, 

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

							"@0,VRAM,memsize", 
							Buffer (0x04)
							{
								0x00, 0x00, 0x00, 0x10  /*for 256MB last is 0x10=256 0x20=512 0x40=1024*/
							}, 

							"@0,display-connect-flags", 
							Buffer (0x02)
							{
								0x04, 0x01	/*match FB*/
							}, 

							"@0,display-type", 
							Buffer (0x05)
							{
								"NONE"
							}, 

							"@0,name", 
							Buffer (0x0E)
							{
								"ATY,Shrike"  /*modify*/
							}, 

							"@1,compatible", 
							Buffer (0x0E)
							{
								"ATY,Shrike" /*modify*/
							}, 

							"@1,connector-type", 
							Buffer (0x04)
							{
								0x00, 0x02, 0x00, 0x00	/*change to match ATIFramebuffer patch */
							}, 

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

							"@1,VRAM,memsize", 
							Buffer (0x08)
							{
								0x00, 0x00, 0x00, 0x10  /*modify*/
							}, 

							"@1,display-connect-flags", 
							Buffer (0x02)
							{
								0x40, 0x00  /*match FB patch*/
							}, 

							"@1,display-type", 
							Buffer (0x05)
							{
								"NONE"
							}, 

							"@1,name", 
							Buffer (0x0E)
							{
								"ATY,Shrike" /*modify*/
							}, 

							"@2,compatible", 
							Buffer (0x0E)
							{
								"ATY,Shrike" /*modify*/
							}, 

							"@2,connector-type", 
							Buffer (0x04)
							{
								0x10, 0x00, 0x00, 0x00 /*modify to match FB patch*/
							}, 

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

							"@2,VRAM,memsize", 
							Buffer (0x08)
							{
								0x00, 0x00, 0x00, 0x10 /*modify*/
							}, 

							"@2,display-connect-flags", 
							Buffer (0x02)
							{
								0x10, 0x00   /*match FB patch*/
							}, 

							"@2,display-type", 
							Buffer (0x05)
							{
								"NONE"
							}, 

							"@2,name", 
							Buffer (0x0E)
							{
								"ATY,Shrike" /*modify*/
							}, 


							"AAPL,EMC-Display-List", 
							Buffer (0x40)
							{
								/* 0000 */	0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
								/* 0008 */	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
								/* 0010 */	0x06, 0x10, 0x00, 0x00, 0x1B, 0x92, 0x00, 0x00, 
								/* 0018 */	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
								/* 0020 */	0x06, 0x10, 0x00, 0x00, 0x1C, 0x92, 0x00, 0x00, 
								/* 0028 */	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
								/* 0030 */	0x06, 0x10, 0x00, 0x00, 0x21, 0x92, 0x00, 0x00, 
								/* 0038 */	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
							}, 

							"AAPL,aux-power-connected", 
							Buffer (0x04)
							{
								0x01, 0x00, 0x00, 0x00
							}, 

							"AAPL,slot-name", 
							Buffer (0x07)
							{
								"Slot-1"
							}, 

							"ATY,Card#", 
							Buffer (0x0E)
							{
								"109-B77101-00"
							}, 

							"ATY,Copyright", 
							Buffer (0x33)
							{
								"Copyright AMD Inc. All Rights Reserved. 2005-2008"
							}, 

							"ATY,EFICompileDate", 
							Buffer (0x0C)
							{
								"Okt 09 2009"
							}, 

							"ATY,EFIDriverType", 
							Buffer (One)
							{
								0x02
							}, 

							"ATY,EFIEnabledMode", 
							Buffer (One)
							{
								0x02
							}, 

							"ATY,EFIOrientation", 
							Buffer (0x02)
							{
								0x00, 0x01
							}, 

							"ATY,EFIVersion", 
							Buffer (0x0A)
							{
								"01.00.318"
							}, 

							"ATY,EFIVersionB", 
							Buffer (0x0F)
							{
								"113-B77101-012"
							}, 

							"ATY,EFIVersionE", 
							Buffer (0x0F)
							{
								"113-B7710A-318"
							}, 

							"ATY,MemRevisionID", 
							Buffer (0x02)
							{
								0x09, 0x00
							}, 

							"ATY,MemVendorID", 
							Buffer (0x02)
							{
								0x02, 0x00
							}, 

							"ATY,PlatformInfo", 
							Buffer (0x80)
							{
								/* 0000 */	0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
								/* 0008 */	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
								/* 0010 */	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
								/* 0018 */	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
								/* 0020 */	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
								/* 0028 */	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
								/* 0030 */	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
								/* 0038 */	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
								/* 0040 */	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
								/* 0048 */	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
								/* 0050 */	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
								/* 0058 */	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
								/* 0060 */	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
								/* 0068 */	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
								/* 0070 */	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
								/* 0078 */	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
							}, 

							"ATY,Rom#", 
							Buffer (0x0F)
							{
								"113-B7710C-176"
							}, 

							"ATY,bin_image", 
							Buffer (0xF800)
							{
/*Insert VBIOS image here*/
							}, 

							"device_type", 
							Buffer (0x14)
							{
								"ATY,ShrikeParent"  /*modify*/
							}, 

							"VRAM,totalsize", 
							Buffer (0x04)
							{
								0x00, 0x00, 0x00, 0x10  /*modify*/
							}, 

							"model", 
							Buffer (0x1C)
							{
								"ATI Mobility Radeon HD 4330" /*modify*/
							}, 

							"name", 
							Buffer (0x14)
							{
								"ATY,ShrikeParent" /*modify*/
							}
						}, Local0)
					DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
					Return (Local0)
				}
/*continue with routines from original video section*/
				Method (_DOS, 1, NotSerialized)
				{
					Store (Arg0, MIS4)
					SMI (0x9E, MIS4)
				}

				Method (_DOD, 0, NotSerialized)
				{
					If (LEqual (MIS2, One))
					{
						Return (Package (0x03)
						{
							0x00010100, 
							0x00010110, 
							0x00010210
						})
					}
					Else
					{
						Return (Package (0x06)
						{
							0x0100, 
							0x0110, 
							0x0111, 
							0x0112, 
							0x0113, 
							0x0114
						})
					}
				}
/*Video section ends -- code continues*/

Share this post


Link to post
Share on other sites
Advertisement

Hi wmarsh,

 

I'm trying this method and have some questions. I've found 2 GFX0 device at different locations.

Should I insert new _DSM method into the *1*st location or

replace existing _DSM method at the *2*nd locaton?

 

This is my DSDT in short.

	Scope (\_SB)
{
	Device (PCI0)
	{
		Device (PEGR)
		{
			Name (_ADR, 0x00010000)
			Method (_PRW, 0, NotSerialized) { ... }
			Method (_PRT, 0, NotSerialized) { ... }
			Device (GFX0)						   *1*<--- \_SB.PCI0.PEGR.GFX0
			{
				Name (_ADR, 0x00)
				Method (_PRW, 0, NotSerialized)
				{
					Return (GPRW (0x09, 0x04))
				}
			}
		}
		Device (GFX0)							   *2*<--- \_SB.PCI0.GFX0
		{
			Method (_DOS, 1, NotSerialized) { ... }
			Method (_DOD, 0, NotSerialized) { ... }
			Method (_DSM, 4, NotSerialized)		 ***<--- \_SB.PCI0.GFX0._DSM()
			{
				If (LEqual (Arg0, Buffer (0x10) { ... }))
				{
					...
				}
				If (LEqual (Arg0, Buffer (0x10) { ... }))
				{
					...
				}
				Return (0x00)
			}
			Method (RSTO, 0, NotSerialized) { ... }
			Method ... 
		}
	}
}

dsdt.zip

Share this post


Link to post
Share on other sites

I've got a question: which strings are ultimately required to use this method? My card (ATI Mobility Radeon 5850) works out of box with early 2011 MBP kexts, but has color banding (i.e. low color depth and no dithering) on internal display. I had the same problem with stock Snow Leopard kexts, and fixed it by adding 4 strings in ati.c, and now, since I'm not using GraphicsEnabler any more, I need to inject these strings somehow. I tried this DSDT patch:

                Method (_DSM, 4, NotSerialized)
               {
                   Store (Package ()
                       {
                           "@0,display-link-component-bits", 
                           Buffer ()
                           {
                               0x06, 0x00, 0x00, 0x00
                           },
                           "@0,display-pixel-component-bits", 
                           Buffer ()
                           {
                               0x06, 0x00, 0x00, 0x00
                           },
                           "AAPL00,Dither", 
                           Buffer ()
                           {
                               0x00, 0x00, 0x00, 0x00
                           },
                           "@0,display-dither-support", 
                           Buffer ()
                           {
                               0x00, 0x00, 0x00, 0x00
                           }
                       }, Local0)
                     DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
                   Return (Local0)
               }

but driver does not read them. Are there any strings that I must add for driver to start recognizing them?

Share this post


Link to post
Share on other sites
I've got a question: which strings are ultimately required to use this method? My card (ATI Mobility Radeon 5850) works out of box with early 2011 MBP kexts, but has color banding (i.e. low color depth and no dithering) on internal display. I had the same problem with stock Snow Leopard kexts, and fixed it by adding 4 strings in ati.c, and now, since I'm not using GraphicsEnabler any more, I need to inject these strings somehow. I tried this DSDT patch:

                Method (_DSM, 4, NotSerialized)
               {
                   Store (Package ()
                       {
                           "@0,display-link-component-bits", 
                           Buffer ()
                           {
                               0x06, 0x00, 0x00, 0x00
                           },
                           "@0,display-pixel-component-bits", 
                           Buffer ()
                           {
                               0x06, 0x00, 0x00, 0x00
                           },
                           "AAPL00,Dither", 
                           Buffer ()
                           {
                               0x00, 0x00, 0x00, 0x00
                           },
                           "@0,display-dither-support", 
                           Buffer ()
                           {
                               0x00, 0x00, 0x00, 0x00
                           }
                       }, Local0)
                     DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
                   Return (Local0)
               }

but driver does not read them. Are there any strings that I must add for driver to start recognizing them?

I would go back to modifying ati.c; I haven't been able to get this to work myself. Was hoping someone who new more than I do would contribute. And I don't want to give you misleading answers.

Share this post


Link to post
Share on other sites

Hey cre8r,

Thanks for the tip, I didn't realise I had issues with the internal display until you pointed it out.

This works in my DSDT to correct it (whilst using lion or mbp kexts without GE). Without RadeonFramebuffer I cannot get my VGA port to work (only HDMI works).

Cheers.

 

dsdt.aml.zip

Share this post


Link to post
Share on other sites

Hello wmarsh can you post your dsdt modified yet with your code for ati mobility?? And can you say me if your radeon dsdt mode make to work my ati mobility radeon 4650?? Because i can't inject my devid in ATI4600Controller and when i do this it goes to boot loop as i said in mucha's topic and so i can't try my edited framebuffer for ATI 4650 mobility QE/CI. HELP ME PLEASE!!!

Share this post


Link to post
Share on other sites

Is this a fix for all mobility cards or just ofr a some models? I have an ati 5650.

 

EDIT: Which data must I obtain? How? And what is that of "modify to where boot display live"? I'm not any expert dsdt editor.

Share this post


Link to post
Share on other sites

1.

"@1,AAPL,boot-display", /*modify to where boot display lives*/

 

2.

"ATY,Shrike" /*change to framebuffer desired*/

 

3.

0x00, 0x04, 0x00, 0x00 /*change to match FB patch in my case this line is a dummy*/

 

4.

0x04, 0x01 /*match FB*/

 

5.

"ATY,Shrike" /*modify*/

 

6.

0x00, 0x02, 0x00, 0x00 /*change to match ATIFramebuffer patch */

 

7.

/*Insert VBIOS image here*/

 

I dont know what I should change in this points. Somebody can help me? :(

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×