Jump to content

Proposed Mobility Radeon DSDT Patch


  • Please log in to reply
7 replies to this topic

#1
wmarsh

wmarsh

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 900 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.insanelym...howtopic=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*/


#2
k540kkk

k540kkk

    InsanelyMac Protégé

  • Members
  • Pip
  • 27 posts
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 ... 
			}
		}
	}

Attached Files

  • Attached File  dsdt.zip   32.7KB   22 downloads


#3
cre8r

cre8r

    InsanelyMac Protégé

  • Members
  • Pip
  • 14 posts
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:
[codebox] 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)
}[/codebox]
but driver does not read them. Are there any strings that I must add for driver to start recognizing them?

#4
wmarsh

wmarsh

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 900 posts

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:

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.

#5
idoc

idoc

    InsanelyMac Protégé

  • Members
  • PipPip
  • 77 posts
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.

Attached File  dsdt.aml.zip   12.73KB   39 downloads

#6
Leopard1993

Leopard1993

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 277 posts
  • Gender:Male
  • Location:L'Aquila
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!!!

#7
lince5

lince5

    InsanelyMac Protégé

  • Members
  • PipPip
  • 60 posts
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.

#8
zapsu

zapsu

    InsanelyMac Protégé

  • Members
  • Pip
  • 15 posts
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? :(





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

© 2014 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Mac Netbook  |   Web hosting by CatN  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy