Subscribe to our RSS news feed
AAPL 275.62 (0.56)

ATI Framebuffer development, Based on joblo's XRadeonFB project.
Group Icon
  • Group: X Lab Developers
  • Posts: 1,409
  • Joined: 4-June 07
  • From: Moscow
  • Member No.: 112,217
Joblo stop development but the driver is really needed. Callisto works but not perfect and we have no sources to correct it.

Now I have working sources of Apple's IONDRVFramebuffer and Joblo's XRadeonFB that is based on very old Framebuffer v1.2 and it doesn't work.

I have Radeon9000 and work under Tiger. Is there any programmer want to join us (with OLE2) to make this project works in Leo with other Radeons?
Useful link to linux drivers

Any suggestions and advices welcomed.

TODO:
1. Make zero project be working. - Done!
2. Add Radeon functionality step by step keeping the driver works.
3. Study what IORegistry's keys used by the driver and write it into injector (or gfx).
4. Trace GA connection to make AGP working.

This is compilable version - start point. Without radeon functions yet.

EDITED 17.04.2008
There are all needed sources
IOGraphics by Apple. My version contains all codes from latest and old version with my comments who from where. Some codes needed only for PowerPC. Later I'll exlude its.
RadeonFB by Joblo. My old corrections for RadeonIGP. But the project is wrong at all. It is useful as template "How to correct IOGraphics to work with Radeon".
RadeonXF. Linux driver for R200-R400 based on RadeonFB tongue.gif . Many useful corrections to the project.
RadeonHD. Linux driver for R500-R600. It is very different driver so I don't know yet what is better: write one driver for all (if(R600){}) or make two different projects.
I also know that Linux driver for RS300 chipset is wrong cause I make my own AGPGart and compare settings. I have AMD documents about RS630 but have no informations about RS300, RS400, RS480 that is requested.

EDITED 26.05.2008
Joined project without kernel panic. Needed more corrections.
http://forum.insanelymac.com/index.php?sho...96664&st=45

For testing purpose Dong (very thanks!) create a nice driver RadeonPCI and utility RadeonDump
To use type in terminal
sudo kextload -v RadeonPCI.kext
./RadeonDump -r 0,1000 -- may be I ask you for other range
./RadeonDump -i



EDITED 21.07.2008
The new project based on OpenAti project http://openati.sf.net.
Now the driver is constructed as ATIDNRV and work together with any IONDRVSupport version.
So if it doesn't work then reboot in safe mode and delete the kext. I need your dmesg or system.log.
The significant part of codes rewritten according to RadeonXF sources and intended for any Radeon from R200 to R700(?). Needs testing.
The driver will work with ATILead.kext that inject a name "ATI,ATIPC".
To test install ATILead.kext, correct it's info.plist to your DevID
Install Ati.kext.
Try to boot and report. Try to understand why it doesn't work for you.
Sources of Ati.kext
What to change in ATILead.info.plist at posts #352 and #357.
Hoe to test at post #344

Here is Dong's test version RadeonHD
Also try and report.

At the current state its don't change resolution. It will be next step.
Attached File(s)
Attached File  IOGraphics_1442.zip ( 302.77K ) Number of downloads: 554
Attached File  RadeonXF.zip ( 890.99K ) Number of downloads: 508
Attached File  radeonFB_updated.zip ( 377.96K ) Number of downloads: 446
Attached File  RadeonHD.zip ( 230.63K ) Number of downloads: 661
 
PM Profile Card
Go to the top of the page
+ Quote Post
24 Pages V   1 2 3 > »   
Start new topic
Replies (1 - 19)
*******
  • Group: Members
  • Posts: 720
  • Joined: 14-December 07
  • Member No.: 162,537
its said that 10.5.3 has ATI Radeon 3650 and 34×0 support.
PM Profile Card
Go to the top of the page
+ Quote Post
Group Icon
  • Group: Retired
  • Posts: 795
  • Joined: 21-July 05
  • Member No.: 643
Thank you for this Slice.
I can't help much reguarding coding since I don't have the knowledge but I'll try to do my possible on other sides as I already did.
I'll talk to the staff members about creating you your own subforum in Xlabs.

Also you can find here the official ATI docs about GPU programming, that ATI finally recently released, if you don't already have it.
http://ati.amd.com/developer/open_gpu_documentation.html
PM Profile Card
Go to the top of the page
+ Quote Post
Group Icon
  • Group: X Lab Developers
  • Posts: 1,409
  • Joined: 4-June 07
  • From: Moscow
  • Member No.: 112,217
QUOTE (krazubu @ Mar 31 2008, 08:55 PM) *
Thank you for this Slice.
I can't help much reguarding coding since I don't have the knowledge but I'll try to do my possible on other sides as I already did.
I'll talk to the staff members about creating you your own subforum in Xlabs.

Also you can find here the official ATI docs about GPU programming, that ATI finally recently released, if you don't already have it.
http://ati.amd.com/developer/open_gpu_documentation.html

Yes, I got the documents. Without its I can't bring myself to revive the project.
PM Profile Card
Go to the top of the page
+ Quote Post
Group Icon
  • Group: X Lab Developers
  • Posts: 1,409
  • Joined: 4-June 07
  • From: Moscow
  • Member No.: 112,217
Next step:
I got more sources about Radeon. Now I have correct procedure to read LegacyBIOS while XRadeonFB project deals only with ATOMBIOS.
CODE
Bool RADEONGetConnectorInfoFromBIOS (ScrnInfoPtr pScrn)
{
    RADEONInfoPtr info = RADEONPTR (pScrn);

    if(!info->VBIOS) return FALSE;

    if (info->IsAtomBios)
    return RADEONGetATOMConnectorInfoFromBIOS(pScrn);
    else
    return RADEONGetLegacyConnectorInfoFromBIOS(pScrn);
}
PM Profile Card
Go to the top of the page
+ Quote Post
Group Icon
  • Group: X Lab Developers
  • Posts: 1,409
  • Joined: 4-June 07
  • From: Moscow
  • Member No.: 112,217
Two bad rezults:
1. IONDRVSupport compiled from the sources above gives blue screen with ATIRadeonX1600AGP while previous version works!
2. Linux driver is still wrong
CODE
    offset = RADEON_BIOS16(info->ROMHeaderStart + 0x50);
    if (offset) {
    for (i = 0; i < 4; i++) {
        entry = offset + 2 + i*2;

        if (!RADEON_BIOS16(entry)) {

Word access to odd address!

This codes is wrong too
CODE
    /* check TV table */
    if (info->InternalTVOut) {
    offset = RADEON_BIOS16(info->ROMHeaderStart + 0x32);
    if (offset) {
        if (RADEON_BIOS8(offset + 6) == 'T') {


Is there anybody point me to good documentation about Legacy Radeon VideoBIOS?

EDIT:
Possible workaround
RADEON_BIOS16(entry) -> RADEON_BIOS8(entry) and other byte access

RADEON_BIOS8(offset + 6) -> RADEON_BIOS8(offset + 1)
I check its with 3 BIOS. Seems to be good
PM Profile Card
Go to the top of the page
+ Quote Post
Group Icon
  • Group: X Lab Developers
  • Posts: 1,409
  • Joined: 4-June 07
  • From: Moscow
  • Member No.: 112,217
Find differencies in INDRVSupport v1.4.3 and 1.4.4
v1.4.3
CODE
     for (i = 0, len = 0; i < intSpec->getCount(); i++)
        {
            data = (OSData *) intSpec->getObject(i);
            assert( data );
            len += data->getLength();
        }
        if (len)
            data = OSData::withCapacity( len );
        if (data)
        {
            for (i = 0; i < intSpec->getCount(); i++)
                data->appendBytes( (OSData *) intSpec->getObject(i));
       provider->setProperty( gIODTAAPLInterruptsKey, data );

v1.4.4
CODE
    data = (OSData *) intSpec->getObject(kIONDRVPCIInterruptSource);
        if (data)
            provider->setProperty( gIODTAAPLInterruptsKey, data );
Where kIONDRVPCIInterruptSource = 0
v1.4.3
CODE
if (device->getFunctionNumber())
v1.4.4
CODE
    OSNumber * num = OSDynamicCast(OSNumber, device->getProperty(kIOFBDependentIndexKey));
    if (num && (0 != num->unsigned32BitValue()))
        matched = false;
    else if ((pciDevice = OSDynamicCast(IOPCIDevice, device))
            && pciDevice->getFunctionNumber())

Only in 1.4.3
CODE
static FunctionEntry ATIUtilsFuncs[] =
    {
    // Gossamer onboard ATI
    MAKEFUNC( "ATISetMBRES", EXP(ATISetMBRES)),
    MAKEFUNC( "ATISetMonitorTermination", EXP(ATISetMonitorTermination)),
    MAKEFUNC( "ATIIsAllInOne", EXP(ATIIsAllInOne))
    };

Reseach continue
PM Profile Card
Go to the top of the page
+ Quote Post
Group Icon
  • Group: X Lab Developers
  • Posts: 1,409
  • Joined: 4-June 07
  • From: Moscow
  • Member No.: 112,217
I think I don't need to rewrite IONDRVFramebuffer as joblo did. The better way is to rewrite IONDRVDevice as separate kext.

EDITED:
as ATINDRV
PM Profile Card
Go to the top of the page
+ Quote Post
Group Icon
  • Group: X Lab Developers
  • Posts: 1,409
  • Joined: 4-June 07
  • From: Moscow
  • Member No.: 112,217
No any interest?
PM Profile Card
Go to the top of the page
+ Quote Post
**
  • Group: Members
  • Posts: 59
  • Joined: 20-April 06
  • Member No.: 35,317
Hi,
I'm really interested, because the only reason I'm still working on Tiger is that my X800XT isn't working with QE/CI at the moment and I don't have resolution change options

Thanks for trying to make a working kext !!!

AntarcticPL
PM Profile Card
Go to the top of the page
+ Quote Post
*
  • Group: Members
  • Posts: 8
  • Joined: 27-March 08
  • Member No.: 206,054
Hi,

I'm really interested too, this thread is the first thing I go look at when I start Safari.
(But we're not supposed to ask things in the X Labs, so I jus wait around)

QE/CI is the only thing I'm missing right now.

Thanks for making the effort for us!

Justin
PM Profile Card
Go to the top of the page
+ Quote Post
Group Icon
  • Group: X Lab Developers
  • Posts: 1,409
  • Joined: 4-June 07
  • From: Moscow
  • Member No.: 112,217
Good, my work will be not hollow. I want to speak with programmers.
PM Profile Card
Go to the top of the page
+ Quote Post
Group Icon
  • Group: X Lab Developers
  • Posts: 1,409
  • Joined: 4-June 07
  • From: Moscow
  • Member No.: 112,217
I made changes into zero project to combine best features from IONDRV v1.4.3, 1.4.4 and 1.4.5
My version have a number 1.4.42 to differ from Apple's.
For me it works.
One output from syslog
QUOTE
IONDRV: ATIM baseAddr=d0000000 rowBytes=00001000 Width=00000400 height=00000300 depth=00000020

may be useful if black or blue screen is achieved.
Thinking about more outputs to understand mechanics.
PM Profile Card
Go to the top of the page
+ Quote Post
*****
  • Group: Members
  • Posts: 322
  • Joined: 13-January 07
  • Member No.: 75,935
Good job you done!
Actually I'm looking at these apple and linux source codes too because personally I need a working framebuffer driver with resolution change ability for my x1400 mobility. I'll take a look at your code immediately.
But what you are doing now seems not related to 3D acceleration, which means no support for QE/CI. AFAIK, ATINDRV.kext is only a framebuffer driver. Therefore, many ppl may will be disappointed by this.
PM Profile Card
Go to the top of the page
+ Quote Post
Group Icon
  • Group: Retired
  • Posts: 795
  • Joined: 21-July 05
  • Member No.: 643
3D acceleration is supported on almost all models from and later to ATI 9550 so it's not the main problem.
On its side, the framebuffer is not working on all models prior to X1000, partially working on almost all models between X1000 and X2000.
So this is the priority for the moment, also, dealing with 3D acceleration without having a working framebuffer wouldn't be the best way to go.

@Slice
Maybe you should update files download in the main thread too ?

little off-topic : I'm still searching on my side about X1600 efi and IOreg strings, I was thinking it would be nice to start a kind of "dictionnary thread" where we'd write each string and what we know about it. Users could test and update their findings, hopefully this could allow to dig the knowledge about it.
off-topic 2 : extended desktop on X1600 seems to be impossible simply because the wormy framebuffer (used for X1600 and other R500 powered cards) can only output a LVDS signal on the main head. This seems logical since the only mac having X1600 is the 1st macbook pro, with output 1 used for LVDS flatpanel, and output 2 for external screen, and Xserve with X1300 only has external output.. That would explain why only some rare laptop users (having a LVDS display) managed to get it. Enabling the desktop by itself is not impossible but it always ends on a black screen, confirming the fact it's probably an output "format" problem. The second head seems to be "switchable" LVDS, CRT, DVI, TV...

All this leads me to think about the fact that other framebuffers like the one for X1900 cards (which is an external card) may support all kinds of outputs on both channels. X1600 and X1900 can't be so different, I doubt ATI restarted from scratch the way its cards work on every model. There are big chances that this lowlevel stuff is common to all R500 series if not all X1000. So what could really differ between those 2 framebuffers beside some "details" ? My idea is to binary patch the sphyrna framebuffer to make it compatible with X1600. However I'm aware this is only naive theory, but if you have the documents, maybe you know those differencies and maybe it's only some memory adresses to patch here and there.
PM Profile Card
Go to the top of the page
+ Quote Post
Group Icon
  • Group: X Lab Developers
  • Posts: 1,409
  • Joined: 4-June 07
  • From: Moscow
  • Member No.: 112,217
OK! I updated the topic.
About 3D acceleration. It is performed by ATIRadeonXXXX.kext that is not available in sources. Is it good enogh? I found no!
CODE
    if (info->IsIGP)
        info->mc_fb_location = INREG(RADEON_NB_TOM);
    else
#ifdef XF86DRI  -- OpenFirmware
    /* Old DRI has restrictions on the memory map */
    if ( info->directRenderingEnabled &&
         info->pKernelDRMVersion->version_minor < 10 )
        info->mc_fb_location = (mem_size - 1) & 0xffff0000U;  -- as in ATIRadeonXXXX.kext
    else
#endif

Calculation of mc_fb_location (physical address of Framebuffer) different for IGP, for OpenFirmware and for all other Radeons. But ATIRadeonXXXX.kext uses only OF variant sad.gif . Can I patch it? Yes.
Do I know exactly what to do? No! I made a test version of ATIRadeon8500 for IGP that works more or less, while original one - never.
This calculation performed twice. In ATIRadeon.kext and in IONDRVFramebuffer.kext so during debugging we can find best settings.
ATIRadeonXXXX doesn't perform screen output. It works through Framebuffer. For good 3D we need good Framebuffer. For example CallistoFB doesn't work in AGP mode.
Yes, I shall return to QE problem having good framebuffer.

Registry keys.
IONDRV uses such keys (getProperty):
CODE
getConnection()->getFramebuffer()->getProperty(kIOBacklightUserBrightnessKey))))
provider->getProperty("AAPL,boot-display")
getProperty("has-safe-sleep")
getProperty( kIODisplayEDIDKey )
getProperty(kDisplayVendorID)
getProperty(kDisplayProductID)
framebuffer->getProperty(kIOFBTransformKey) -- "IOFBTransform"
framebuffer->getProperty(gIODisplayParametersKey)
getPMRootDomain()->getProperty(kIOHibernatePreviewBufferKey)
getPMRootDomain()->getProperty(kAppleClamshellStateKey)
root->getProperty("graphic-options")
getProperty(kIOFBGammaWidthKey)
getProperty(kIOFBGammaCountKey)
getProperty(kIOFBGammaHeaderSizeKey) -- "IOFBGammaHeaderSize" and so on.
getProperty(kIOFBDependentIDKey)
device->getProperty("AAPL,phandle")
props->getProperty(kIOGraphicsPrefsParametersKey)
getProperty(kIOI2CInterfaceIDKey)
getProperty(kIOI2CBusTypeKey)
getProperty(kIOI2CTransactionTypesKey)
getProperty(kIOI2CSupportedCommFlagsKey)
framebuffer->getProperty(kIOFBI2CInterfaceInfoKey)
regEntry->getProperty("driver,AAPL,MacOS,PowerPC") -- what about Intel???
provider->getProperty(kIONDRVIgnoreKey)
getProperty(gIONameMatchedKey)
provider->getProperty("AAPL,ndrv-dev")
provider->getProperty("@0,name")
next->getProperty("device_type")
provider->getProperty("AAPL,boot-display")
nub->getProperty(kIOFBDependentIndexKey)
provider->getProperty(kIOFBHostAccessFlagsKey) -- AGP Host???
device->getProperty("IONVRAMProperty")
device->getProperty(kIOAGPCommandValueKey) -- yes, AGP supported!
getProvider()->getProperty("Ignore VBL")
nub->getProperty("AAPL,maps")
nub->getProperty("AAPL,vram-memory")
nub->getProperty("VRAM,memsize") -- as alternative to previous one
getPlatform()->getProperty("AppleExtSwitchBootState")
provider->getProperty(kAAPLDisableMSIKey)
provider->getProperty(kPropertyAAPLAddress)
provider->getProperty(gIOInterruptSpecifiersKey)
provider->getProperty(gIODTAAPLInterruptsKey)

That's all. Other settings found in ioreg are needed for other drivers.
PM Profile Card
Go to the top of the page
+ Quote Post
Group Icon
  • Group: X Lab Developers
  • Posts: 1,409
  • Joined: 4-June 07
  • From: Moscow
  • Member No.: 112,217
About RadeonHD project. http://wiki.x.org/wiki/radeonhd
QUOTE
7. Known Bugs & Limitations

The following subsystems have not been implemented yet or show some limitations:

No 3D acceleration so far. 2D acceleration is implemented for R5xx only upto now. No XVideo (needs 3D engine for scaling). Still, fullscreen video is working fluently for many users.
No TV and Component connector support so far.
Dual Link DVI support is untested so far.
Panels only show native resolution.
No RandR rotation support so far.
Suspend & Resume is only tested on some hardware. Very often it just works, but your mileage may vary.
No powermanagement yet. Depending on your hardware, the fan might run at full speed.
The following known bugs have not been resolved yet (ordered by severity):

Bug 13405: Hardware cursor corruption. Haven't been able to reproduce reliably yet.
Bug 13605: MR HD 2600: Panel remains black
Some cards seem to provide broken connector tables. We're constantly fixing those. Please report if you have one.
Whiteouts on console switching under some circumstances. (Should be fixed)
Panel brightness cannot be changed because ACPI events aren't handled properly. Workaround: Switch to a different virtual terminal for that. Affects backlight on a number of laptops, e.g. from the IBM/Lenovo ThinkPad series. (Seems to be fixed in git since some time in 2008-03, needs to be verified)
With two monitors of different resolution connected both show up with the same (lower) resolution when RandR is active at startup. This seems to be a general RandR issue. Can be changed with --output <output> --auto during runtime, or with Option "PreferredMode" "<mode>" with newer Xservers (known to be buggy up to Xserver 1.4.0).

It is Linux!
PM Profile Card
Go to the top of the page
+ Quote Post
*****
  • Group: Members
  • Posts: 322
  • Joined: 13-January 07
  • Member No.: 75,935
Yeah, I'm studying how to put radeonHD stuff in IONDRVSupport. Even in radeonHD, Rv5XX and Rv6XX are treated slightly different because of one offset in register address for them and/or something else I don't know yet.
PM Profile Card
Go to the top of the page
+ Quote Post
Group Icon
  • Group: X Lab Developers
  • Posts: 1,409
  • Joined: 4-June 07
  • From: Moscow
  • Member No.: 112,217
QUOTE (dong @ Apr 17 2008, 06:05 PM) *
Yeah, I'm studying how to put radeonHD stuff in IONDRVSupport. Even in radeonHD, Rv5XX and Rv6XX are treated slightly different because of one offset in register address for them and/or something else I don't know yet.


Glad to see a developer!

I'll be absent up to 21.04.2008. Speak with you later.
PM Profile Card
Go to the top of the page
+ Quote Post
**
  • Group: Members
  • Posts: 55
  • Joined: 31-March 08
  • From: Melbourne
  • Member No.: 208,125
Hiya smile.gif

Just wanted to mention that I am also very interested in this project! smile.gif I also still have: Quartz Extreme: Not Supported

Do I understand correctly that the aim of this project is to create a frame buffer that would allow for QI?

I am using Leopard 10.5.1 with a ATI Radeon X800PRO (AGP), and Callisto 008 has given me resolution and refresh rate changes. Further I've loaded ATIRadeon9700 drivers, AGPGArt & IONDRVSupport.

I am not a developer, but I can do testing, let me know if this would be useful with the above for this project.

Cheers,

N.M.
PM Profile Card
Go to the top of the page
+ Quote Post
24 Pages V   1 2 3 > » 
Reply to this topic Start new topic

1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

RSS Lo-Fi Version Time is now: 31st July 2010 - 02:14 PM