Jump to content

ATI HD framebuffer driver (10.5/10.6) with source code


  • Please log in to reply
900 replies to this topic

#1
dong

dong

    InsanelyMac Sage

  • Retired Developers
  • 366 posts
  • Gender:Male
Put it into /S/L/E/ and rebuild the cache to test. It will not affect vanilla driver.
Any injector will prevent this driver from loading since it works the same way as IONDRVSupport.

[FAQ:]
1. get a blank or dark screen after boot, or the screen keep flashing
In RadeonHD.kext/Contents/Info.plist, set "BackLightLevel" to 0 or "enableBacklight" to false. Rebuild the kernel cache and reboot.

2. the cursor is a block of colors
In RadeonHD.kext/Contents/Info.plist, set "EnableHardWareCursor" to false. Rebuild the kernel cache and reboot.

3. after close and open lid, the screen is scrumbled.
I suggest the DSDT Clamshell fix in Silencers's post. It changes the behavior to sleep when lid is closed. Now sleep is supported in latest driver, so this should be no problem.

Locate method _LID of the device LID and change it as shown. The idea is to check the Lid register and then if it is closed we notify the Sleep button that it was "pushed".

Name (LIDS, One)			Method (_LID, 0, NotSerialized)			{					Store (^^PCI0.LPC.EC.HPLD, LIDS) 					XOr (LIDS, One, Local0)					If (Local0)											{ 						Notify (SLPB, 0x80)									} 					Return (LIDS)			}

4. not working on 10.6.8/10.7
10.6.8 and 10.7 updated the graphic driver framework, make present RadeonHD.kext not working any more. Before I have time to rebuild a version for latest system, people can try RadeonHD.kext with 10.6.7 IOGraphicsFamily.kext, IONDRVSupport.kext, IOPCIFamily.kext and AppleACPIPlatform.kext on 10.6.8/10.7.
[notes:]
  • Linux Radeon code updated to 1.2.5. No support to radeon hd5XXX and later cards in this code.
  • version without AtomBios may only works for cards with quirk table included in Linux code.
  • Info.plist has some custom options.
    • Set "debugMode" to true will disable switch resolution and boot with VESA mode, which may help gathering debug information if normal mode not works for you.
    • Put your EDID data in "EDID", it will be used if autodetect EDID failed.
    • Set "verboseLevel" to 0 if you don't want the debug information.
  • The driver may sometimes causes KP during boot, the version updated on 10/20 seems no longer hangs for me.
  • Some users are looking for QE/CI here. You should first get to know that framebuffer driver is not dedicated for QE/CI. If your card is not supported by ATIRadeonX1000/2000 kexts, there is no chance this framebuffer driver will help you.
I decided to make the source code available, such that users who have the ability can try to modify it to suit for their needs. There is no reason not to do this since it's based on the open source project. Now the code still contains bugs in it and lacks many framebuffer functions. Also the code is somehow ugly, such as the usage of global variables for easy access.

Source code (including both 10.5/10.6, read "Compile_instruction" before build the target):
http://code.google.c...river-radeonhd/
and you can report bugs to:
http://code.google.c...nhd/issues/list

[05/17/2011 test]:
I decided to test the driver based on old RadeonHD version step by step.
(1)Below version only changes the attach position from card device node to a nub node (2 heads means 2 nubs, now only 1 for test). If it works, we will move to next step.
10.6 32 bit only: Attached File  RadeonHD.nub.zip   198.96KB   1902 downloads
(2)Add another nub, but not active for now. It will show as "not connected" in "About this Mac".
10.6 32 bit only: Attached File  RadeonHD.2nubs.zip   199.6KB   545 downloads
(3)Two nubs active for extension Mode. Mirror mode is not handled gracefully yet.
10.6 32 bit only: Attached File  RadeonHD.extensionMode.zip   201.96KB   797 downloads10.5 (not tested): Attached File  RadeonHD.10.5Extended.zip   200.92KB   511 downloads
(4)Ok, latest test show code for mirror mode and Monitor information cause problems. I need reconsider it for a while. Use above link for extended mode if u want 2 heads.
[04/26/2011 test]:
Added in two head support. This test package includes RadeonController.kext/RadeonHD.kext. If get into desktop without problem, RadeonDump output all the log information.
Has no hotplug function, must plug both displays before boot to enable 2 head function. Assume both displays have native resolutions.
Tests show that the boot display must continue to use the same VRAM area for scanout. I add code to let internal display to tie to first CRTC that use that part of VRAM. Below drivers all work here. If you still have problem with them, try change "forceSwitchCrtc" to "true" in RadeonController.kext's UserOptions.
Since it's hard to debug, lets forget about 2heads for now. I add hardwaremirror in previous RadeonHD version. Let's see if it will work at all.
Attached File  RadeonHD_10.6.zip   195.28KB   2692 downloadsAttached File  RadeonHD_10.5.zip   195.03KB   715 downloads
[05/26/2010 update]:
madchicken fixed the cursor caused KP problem. Great job.
Attached File  RadeonHD.10.6.x.kext.zip   195.1KB   11208 downloads
Attached File  RadeonHD.10.5.x.kext.zip   196.66KB   3564 downloads
[05/13/2010 update]:
Thanks to madchicken and semantics, now sleep (though deep sleep not work yet) is supported.
The cursor disappear in MS Word problem is solved, hopefully it will solve other similar cursor problems.
10.6 32 bit kext
Thanks to semantics, here comes a not expected update.
[12/18/2009 update]:
Fully supported hardware cursor now (hopefully, and still for user with QE/CI already enabled). I adjusted part of code related to memory allocating/freeing, and hope it will reduce the KP rate for some users. Initial resolution is changed back to use the native resolution of the detected display instead of the boot vesa resolution used in 10/28 version. The "BackLightLevel" option is not working as I expected, set it to 0 if you have problem with backlight.
  • http://dl.dropbox.com/u/1727104/RadeonHD/RadeonHD10.5.kext.zip
  • http://dl.dropbox.com/u/1727104/RadeonHD/RadeonHD10.6.kext.zip
[10/28/2009 update]:
Initial support for HardwareCursor. Good: No more mouse tearing for me; Bad: mouse cursor is skewed.
If your card has no QE/CI support yet, enable hardwareCursor will produce a color block for mouse cursor. Try set "enableHWCursor" in Info.plist to false to avoid this.
ole2, I'm sorry that I did not try your suggest to deal with google code and svn stuff. I'm actually busy test the new functions. Since it now works for some people, I put it here and hope you can help me update them to google code.
From now on, I will switch to rewrite all code, making them inherited from IOFramebuffer as omni suggested. That means, no more update on this code.
[10/20/2009 update]:
Finally get the VoodooDumpMsg work, it will help with debug. Run "RadeonDump" in terminal after entering desktop will produce full debug messages without leftout. No other function added. Thanks ole2 for the reminding.
[10/17/2009 update]:
Since some card need the Backlight tuning step, some don't, I add an option "enableBacklight" in Info.plist and default to on. Set it to off if default is not work.
[10/14/2009 update]:
Add some common resolutions if only the native one is detected. Provide a card name to be displayed in system profile. Both are 32 bit AtomBios version.
[10/13/2009 update]:
A x1300 mobility user successfully entered desktop with native resolution but backlight turned off after that. Here is the version removed the backlight tuning steps in case you run into the same condition.
[10/12/2009 update]:
All works for my x1400, but you need test to see if it works for you or not.


#2
lebidou

lebidou

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 153 posts
  • Gender:Male
  • Location:Fr
Hello, I just tested it and didn't work (couldn't enter GUI). The computer didn't seem to hang though (disk activity and poping sound)

Config is Fujitsu-Siemens Amilo Pi 1556 with Mobility X1900 running Leopard 10.5.8

I checked system.log but I haven't seen anything related to the kext. I wondered if it didn't worked because it's a 10.6 version or because EDID is maybe not readable through DDC (from where do linux & windows drivers get it then ?).

Thank you for continuing your work on this, I'm at your disposal to test anything.

#3
dong

dong

    InsanelyMac Sage

  • Retired Developers
  • 366 posts
  • Gender:Male
In this initial kext, the boot resolution is the vesa one if you did not try to change the resolution before. That means, if the vesa one not work for you, you may can not enter GUI and don't have a chance to switch to non-VESA resolution provided by this kext. I will try to release a new kext to give a non-VESA boot resolution.
In 10.6, all the IOLogs go to kernel.log, no longer in system.log.

#4
lebidou

lebidou

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 153 posts
  • Gender:Male
  • Location:Fr
Ok, I have some questions then :
-Can ATILead or other injector interfere with the driver and prevent it from working properly?
-Is the kext supposed to be Leopard & Snow Leopard compatible or Snow only?
-If it is Snow only, is it possible to have a Leopard version too?

VESA resolution (1024x768) usually works when ATILead is removed.
I'm using Leopard not Snow, so I guess IOLogs still go in system.log for me.

#5
dong

dong

    InsanelyMac Sage

  • Retired Developers
  • 366 posts
  • Gender:Male
Yes, any injectors interfere with the driver and prevent it from working properly. I uploaded with new versions for 10.5 and 10.6.

#6
lebidou

lebidou

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 153 posts
  • Gender:Male
  • Location:Fr
This time I removed ATILead, ATINDRV and ATIRadeonX1000 kexts to be sure no kext would interfere.
It hangs when entering the GUI. I mean when the blue screen should appear, no disk activity, no sound.

I tried using my EDID in the plist file with no luck.

I thought my EDID was readable via DDC but I may be mistaken. What is the driver's expected behaviour if no EDID is read from DDC?

I also failed retreiving informations in the system.log.

I feel like this is not very helpful… :)

#7
dong

dong

    InsanelyMac Sage

  • Retired Developers
  • 366 posts
  • Gender:Male
Sorry that it did not work for you. The new updated one support user provided EDID.

#8
Boombeng

Boombeng

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 598 posts
  • Gender:Male
  • Location:France
I tried both kexts (with and without EDID provided) without success on a laptop with a Radeon HD3450.
The result is a classical kernel panic but I can't find any info in system log about RadeonHD.kext
cheers

#9
lebidou

lebidou

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 153 posts
  • Gender:Male
  • Location:Fr
I tried the version with user provided EDID and it didn't work. It does the same as before, hanging after launching loginwindow.app, when the GUI should appear.

There's apparently no IOLogs nor dmesg outputs, maybe we could provide more useful informations with a more verbose version of the kext, to at least estimate what function is causing the crash.

I'm glad to see there's an other tester for this project!

cheers

#10
dong

dong

    InsanelyMac Sage

  • Retired Developers
  • 366 posts
  • Gender:Male
lebidou, since your card can boot with vesa mode. I uploaded new kext using vesa mode only (no switch function), but it can provide some debug information with each line start with "RadeonHD: " and hopefully will be found in system.log. It may also list available resolutions in display Preference if EDID data is handled correctly.

#11
lebidou

lebidou

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 153 posts
  • Gender:Male
  • Location:Fr
Ok I got something this time !
But as you can see on picture it's a bit wierd… maybe the EDID isn't handled correctly. No resolutions are detected other than 1024x768.

Posted Image

I attached the log, there is a problem with Connector initialization.

I hope this is more helpful!

Attached Files



#12
Boombeng

Boombeng

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 598 posts
  • Gender:Male
  • Location:France
No kernel panic here too with the debug kext!

I don't have weird colors like lebidou, it's simply the same with or without the kext (I checked kextstat and RadeonHD is loaded)
Here is my log

Attached File  RadeonHD.txt   3.5KB   506 downloads

Keep on the good work :D

cheers

#13
dong

dong

    InsanelyMac Sage

  • Retired Developers
  • 366 posts
  • Gender:Male
Just a quick response.
Both of your logs says unidentified card. I'm sorry to say that the linux code used in the kext are somehow old. I'll check if your cards are supported in latest linux code and update the kext at a later time.
Thanks for your time.

#14
lebidou

lebidou

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 153 posts
  • Gender:Male
  • Location:Fr

Just a quick response.
Both of your logs says unidentified card. I'm sorry to say that the linux code used in the kext are somehow old. I'll check if your cards are supported in latest linux code and update the kext at a later time.
Thanks for your time.


I use a mandriva '09 live cd for maintenance stuff, and the drivers provided on it supports my card with acceleration, resolution etc.

Anyway it's good to see some progress on this project ! Thank you for work !

#15
netkas

netkas

    InsanelyMac Legend

  • Developers
  • 616 posts
  • Gender:Male
Hey Dong, I have interesting idea - porting radeon modesetting to booter, then passing parametrs of new framebuffer to kernel, so osx can use native resolution without any additional kexts. well, just like efi does it .

#16
super_engine

super_engine

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 191 posts
Hi Dong

I am a very old user of ATI Mobility Radeon (X1350)
I, before reading your last job, not had hope.

Now
I tried your kext for 10.5 with user EDID
Booterd with F8+"Graphics mode"="1440x900x32"
The Laptop boor correctly, in the GUI i can see two resolutions: 1024x768 and 1440x900 but when i try to choice 1440x900 the system crash

But i think that this is a good start point. How i can help you ?????

#17
dong

dong

    InsanelyMac Sage

  • Retired Developers
  • 366 posts
  • Gender:Male
Sorry for late reply, I'm busy debugging my code.
You idea is nice in the way that it seeks to be more closing to a real mac. But I'm not quite clear of how to make booter to include radeon modesetting. So you mean efi do so instead of setting a VESA mode only?

Hey Dong, I have interesting idea - porting radeon modesetting to booter, then passing parametrs of new framebuffer to kernel, so osx can use native resolution without any additional kexts. well, just like efi does it .



#18
lebidou

lebidou

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 153 posts
  • Gender:Male
  • Location:Fr
Hello,
The result is the same as before with the AtomBios&Backlight version, and still the same without AtomBios :
with debugMode I get into GUI, 1024x768 only with bluish coulours;
otherwise, the display get stuck entering the GUI. However the computer is still running : sound control produces beeps, power button shut down the computer.

The log (attached) tells the same as before : Unknown card, failed retreiving connector information.

For info, I checked get-edid under Ubuntu (I didn't remember what the output was), so my display is supposed to be DDC compliant, with EDID on line DDC2.

Attached Files



#19
dong

dong

    InsanelyMac Sage

  • Retired Developers
  • 366 posts
  • Gender:Male
If the initialization step failed, the driver stopped there and the EDID stuff is not handled yet. I need to check the rhdConnectorInit function to see what could be the reason.

The log (attached) tells the same as before : Unknown card, failed retreiving connector information.



#20
Boombeng

Boombeng

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 598 posts
  • Gender:Male
  • Location:France
Hi dong

Quiet the same results here too, I didn't try the one without atombios cause my card (ID 1002 95C4) is not in the list of cards with quirk table.
Here is my log (from a trial with edid added in the plist)
Attached File  RadeonHD_log.txt   4.7KB   185 downloads

cheers and thx for the efforts





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

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