Help - Search - Members - Calendar
Full Version: [10/28/2009 update]ATI HD framebuffer driver with src for test
InsanelyMac Forum > InsanelyMac Lounge > The X Labs > ATI Framebuffer
Pages: 1, 2, 3, 4, 5, 6
dong
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.
[notes:]
  • Linux Radeon code updated to 1.2.5.
  • 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.
  • If you get a blank or dark screen after boot, try set "enableBacklight" to false in Info.plist. I will stop the driver to set a low backlight value in next release.

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. The only difference in source codes for 10.5 and 10.6 is located in xf86.h. Well, of course the IOKit header files are different too.
10.5 source now moved to:
http://code.google.com/p/osx86-driver-radeonhd/
and you can report bugs to:
http://code.google.com/p/osx86-driver-radeonhd/issues/list

[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.
lebidou
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.
dong
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.
lebidou
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.

dong
Yes, any injectors interfere with the driver and prevent it from working properly. I uploaded with new versions for 10.5 and 10.6.

lebidou
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… unsure.gif
dong
Sorry that it did not work for you. The new updated one support user provided EDID.
Boombeng
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
lebidou
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
dong
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.
lebidou
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.



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

I hope this is more helpful!
Boombeng
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

Click to view attachment

Keep on the good work wink.gif

cheers
dong
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.
lebidou
QUOTE (dong @ Oct 6 2009, 08:45 PM) *
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 !
netkas
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 .
super_engine
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 ?????
dong
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?

QUOTE (netkas @ Oct 7 2009, 04:23 AM) *
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 .

lebidou
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.

dong
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.
QUOTE (lebidou @ Oct 13 2009, 01:56 PM) *
The log (attached) tells the same as before : Unknown card, failed retreiving connector information.
Boombeng
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)
Click to view attachment

cheers and thx for the efforts
super_engine
DONG
You are my new hero

PERFECTLY working for my ATI Radeon Mobility X1350 (Dev ID 7196)
Tested version with AtomBIOS code and with my Laptop EDID.

Now i have perfect 1440x900 full resolution

Also QE/CI works very fine (editing ATIRadeonX1000.kext - plist and HEX file)

Many Many Many......Thanks
dong
lebido and Boombeng,
I tried my x1400 with quirk table removed from source. The RHDConnectorsInit function worked well here without any problem with ATOMBIOS code.
It looks like both of your cards' BIOS ROM do not contain enough information in it to get connector init done.
Did you guys tried RadeonHD driver (not the fglrx driver which is close sourced) in linux?
If it works there, then there is no reason for the failing of RHDConnectorsInit function here.
If it does not work there as well, you guys may need to run the utils tool come with RadeonHD linux source code and post the results. Then we can check to see if we can make the quirk table by ourselves out from the result.

QUOTE (Boombeng @ Oct 13 2009, 03:53 PM) *
Quiet the same results here too
lebidou
I'll check that tomorow.

In the mean time, I attached a BIOS dump I had hanging around for some time, if it can be of any use.
yazz2020
Dong
You are the Man!!!

Your kext worked, changed display resolution from standard Vesa 1024x768 to 1366x768 which is default res i get in vista. Although no option to switch resolution in display settings. Kext used for 10.6 32bit with atom bios no backlight.

Then installed ATIRadeonX2000 kext just to see what would happen, and got blank white screen which is a change as usually got black and white squares.

Looks like you are close to framebuffer kext.

have attached kernal logs without and with ATIRadeonX2000.

Let me know if you require any other info.
Boombeng
QUOTE (dong @ Oct 14 2009, 12:09 AM) *
Did you guys tried RadeonHD driver (not the fglrx driver which is close sourced) in linux?
If it works there, then there is no reason for the failing of RHDConnectorsInit function here.
If it does not work there as well, you guys may need to run the utils tool come with RadeonHD linux source code and post the results. Then we can check to see if we can make the quirk table by ourselves out from the result.



I just come to try latest RadeonHD (1.3) with ubuntu and guess what ? it doesn't work... sad.gif there is a crappy bug at boot
as soon as I run util tool I'll post the result here

cheers
dong
wow, now it become 1.3.0 just after I took one week to porting 1.2.5. wacko.gif
Boombeng
I didn't manage to run rhd_conntest cause of a lack of package or anything I dunno, but, searching around a way to run this util tool I found the rhd_conntest report from someone with exactly the same laptop and the same grapgic card
here it is :

http://article.gmane.org/gmane.comp.freede...s.radeonhd/4152

One week, you work fast dong wink.gif
I would spend at least one year to learn how to do that tongue.gif

dong
QUOTE (Boombeng @ Oct 14 2009, 05:51 PM) *
I found the rhd_conntest report from someone with exactly the same laptop and the same grapgic card
here it is :http://article.gmane.org/gmane.comp.freede...s.radeonhd/4152

I saw there is already a connector table listed in the xorg log. I simply added it to the quirk table and recompiled. You may test to see what will happen.
Here it is: Click to view attachment
brjones
Well, I cant believe it, but it works. I am not sure if the hardware acceleration stuff works because I dont remember how to check it, but I can now change my resolution. Just friggin AWESOME!!

I am running it without ATIRadeonX2000.kext installed because it used to really mess things up.

Thank you, thank you, thank you!!

Dell Studio 1737
ATI Mobility Radeon HD 3640
JoocKer
finaly some progress in this direction smile.gif
i`m wondering if the ati mobility hd3450 it`s working right , if someone has tested it please confirm smile.gif
dany88
hi to everyone, what i should install to try it with my hd4770?
Boombeng
QUOTE (dong @ Oct 15 2009, 12:54 AM) *
I saw there is already a connector table listed in the xorg log. I simply added it to the quirk table and recompiled. You may test to see what will happen.
Here it is: Click to view attachment


Things are better now but not perfect... i have access to the board now but still stuck to 1024x768, there is not more choice in pref syst /display but the screen is not streched anymore, there is a big black stripe ont the right side of the screen
I tried to add Edid in plist and vhange Graphic Mode in boot plist without luck

Here is the log
Click to view attachment


Thx very much Dong
nomaj
Hm... if i'm right is this a whole package needed ... or i need a special driver first for my ati 3650HD on Toshiba P300 in order to test it?

Aniway keep on god work!
Ztardust
Wow!

Dong, I am impressed!

After years of running my machine on 1024x768(and trying absolutely everything, and I mean *EVERYTHING*, to get it working at native resolution), I can finally use it in native resolution, 1280x800.

I just installed your 10.5 kext, and without any modification or edid or anything it worked "out of the box" on first try.

Thank you so much for your work and effort. star_smile.gif

Ztardust
dong
QUOTE (Boombeng @ Oct 15 2009, 03:55 AM) *
Things are better now but not perfect... i have access to the board now but still stuck to 1024x768, there is not more choice in pref syst /display but the screen is not streched anymore, there is a big black stripe ont the right side of the screen
I tried to add Edid in plist and vhange Graphic Mode in boot plist without luck

Here is the log
Click to view attachment


Thx very much Dong

The log shows all problem are caused by "rhdMonitorValid failed". You can test below versions, one ignores this step, another debug one does not ignore but add log to see what causes the failure.
ignore one: Click to view attachment
debug one: Click to view attachment
Boombeng
QUOTE (dong @ Oct 15 2009, 03:44 PM) *
The log shows all problem are caused by "rhdMonitorValid failed". You can test below versions, one ignores this step, another debug one does not ignore but add log to see what causes the failure.
ignore one: Click to view attachment
debug one: Click to view attachment


IT WORKS biggrin.gif

Thank you so much Dong!!!!
thumbsup_anim.gif


Click to view attachment
fizzban
it works dong! I have try the 2 kext (with and without atombios) on my x1600 mobility 71c5 and they works, there is a bit mouse tearing but.... u cares, now I try with slow leopard.
great job thank you, sorry for my bad english
lebidou
Hello,
I've also failed to make linux radeonhd to run… and to get a xorg log.

However I've looked into my bios and other xorg.log from other cards (since I couldn't find one for mine) and I think the connector table should look like that :

CODE
(II) RADEONHD(0): Connector[0] {RHD_CONNECTOR_DVI, "DVI_I CRT1", RHD_DDC_0, RHD_HPD_NONE, { RHD_OUTPUT_DACA, RHD_OUTPUT_NONE } }
(II) RADEONHD(0): Connector[1] {RHD_CONNECTOR_PANEL, "LVDS LCD1", RHD_DDC_2, RHD_HPD_NONE, { RHD_OUTPUT_KLDSKP_LVTMA, RHD_OUTPUT_NONE } }
(II) RADEONHD(0): Connector[2] {RHD_CONNECTOR_TV, "SVIDEO DFP1", RHD_DDC_NONE, RHD_HPD_NONE, { RHD_OUTPUT_DACB, RHD_OUTPUT_NONE } }
(II) RADEONHD(0): Connecter[3] {RHD_CONNECTOR_DVI, "DVI_I DFP1", RHD_DDC_1, RHD_HPD_0, { RHD_OUPUT_TMDSA, RHD_OUTPUT_NONE } }


The only thing I'm not sure is the RHD_DDC_x values, I took these from an M54 log, they are the same on an M66 (I have M68).
On some other logs, LCD has RHD_DDC_0, that's why I'm not convinced.

I hope you'll be able to do something out of that !
dong
QUOTE (lebidou @ Oct 15 2009, 12:50 PM) *
Hello,
CODE
(II) RADEONHD(0): Connector[0] {RHD_CONNECTOR_DVI, "DVI_I CRT1", RHD_DDC_0, RHD_HPD_NONE, { RHD_OUTPUT_DACA, RHD_OUTPUT_NONE } }
(II) RADEONHD(0): Connector[1] {RHD_CONNECTOR_PANEL, "LVDS LCD1", RHD_DDC_2, RHD_HPD_NONE, { RHD_OUTPUT_KLDSKP_LVTMA, RHD_OUTPUT_NONE } }
(II) RADEONHD(0): Connector[2] {RHD_CONNECTOR_TV, "SVIDEO DFP1", RHD_DDC_NONE, RHD_HPD_NONE, { RHD_OUTPUT_DACB, RHD_OUTPUT_NONE } }
(II) RADEONHD(0): Connecter[3] {RHD_CONNECTOR_DVI, "DVI_I DFP1", RHD_DDC_1, RHD_HPD_0, { RHD_OUPUT_TMDSA, RHD_OUTPUT_NONE } }


I added it to source and please test this one: Click to view attachment
lebidou
Sorry, it didn't work.

First I tried without debug mode and got a black screen and system hang. Then I turned debugMode on and got a scrambled display.

Here is the log : Click to view attachment
Unfortunately, it seems incomplete

Maybe connector[0] (DVI) has DDC_2 and connector[1] (LCD) has DDC_0… I guess the only way to know is to test…
dong
Yeah, the only way is to test. This one with DDC switched: Click to view attachment
lebidou
QUOTE (dong @ Oct 15 2009, 09:35 PM) *
Yeah, the only way is to test. This one with DDC switched: Click to view attachment


It wasn't it! Exactly the same result :


I attached the log but it is the same except it uses i2c line 0 instead of i2c line 2 as expected.
Click to view attachment
verma
Thank you dong,it's works for mobility hd2600,i've got 1280x800!!!!!!!! biggrin.gif Is there any way for QE/CI working?
Boombeng
QUOTE (verma @ Oct 15 2009, 11:32 PM) *
Thank you dong,it's works for mobility hd2600,i've got 1280x800!!!!!!!! biggrin.gif Is there any way for QE/CI working?


Nice...

For QE/CI try to add your card ID in ATIRadeonX2000.kext's plist
Nick14
Stupied idea to try it on my X1250 ? tongue.gif
verma
QUOTE (Boombeng @ Oct 15 2009, 10:48 PM) *
Nice...

For QE/CI try to add your card ID in ATIRadeonX2000.kext's plist

 

 Tried ATIRadeonX2000.kext from desktop HD2600 package and after changing devid I get garbage screen sad.gif ,laptop itself is working.

Got the same with original ATIRadeonX2000.kext where my device ID was in the list already


dong
QUOTE (lebidou @ Oct 15 2009, 04:04 PM) *
It wasn't it! Exactly the same result :
I attached the log but it is the same except it uses i2c line 0 instead of i2c line 2 as expected.
Click to view attachment

I can't figure out the reason for messed VESA mode yet. For mode setting, the i2c may not be so important since the native mode is already detected. There could be some problem happened during mode setting. Your signature says ATILead is working for this card. What does that mean? Maybe we can get some info there.
lebidou
QUOTE (dong @ Oct 16 2009, 01:20 AM) *
I can't figure out the reason for messed VESA mode yet. For mode setting, the i2c may not be so important since the native mode is already detected. There could be some problem happened during mode setting. Your signature says ATILead is working for this card. What does that mean? Maybe we can get some info there.


I use ATILead because my chip compatible with Tiger's old ATINDRV.kext (10.4.7, any newer version wouldn't detect the LCD panel). But I don't use it when testing your driver.

This is the Info.plist I use: Click to view attachment

I had to get that weird card no-one else has ever tested elsewhere…
homer007
thanks m8 works just fine got my true resolution 1280x800 finally for the first time on osx86!!! just for this i installed osx86 on my acer aspire 5670 after one year!!! and it works just fine without any modifications!!!

Click to view attachment
yazz2020
Hi Dong

Tried the new kext for 14/10/09. get Different Resolution options in system pref but when switching resolution, screen goes blank. Looks like i loose backlight as system is still running. Have attached kernal log. Maybe you can make the kext with backlight option.

Also, with ATIRadeonX2000.kext installed, I noticed this:

Oct 14 15:18:09 y-Mac kernel[0]: set_display_mode_and_vram failed.

Maybe this is reason why I get a white screen. Any Ideas?

Thanks



Also, EVOenabler can be used with RadeonHD if you edit info.plist and remove all entries with @0, @1 and entries injecting the vanilla buffer i.e ATY,Megalodon etc. Have managed to inject my ATI bin image, this shows up in ioregistry under VGA.

Maybe this is helpful
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.