Jump to content

ATI Framebuffer development


Slice
 Share

466 posts in this topic

Recommended Posts

1. My RadeonIGP have shared video memory located at physical address=0x38000000. But IONDRVFramebuffer works with address=0xd0000000. Internal Radeon readdressing? How it works?

I did a google and found this:

(II) RADEONHD(0): Mapped IO at 0x2b01de1c6000 (size 0x00010000)

(==) RADEONHD(0): Write-combining range (0xf0000000,0x8000000)

(II) RADEONHD(0): PCI FB Address (BAR) is at 0xF0000000 while card Internal

Address is 0x38000000

(II) RADEONHD(0): Mapped FB at 0x2b01de861000 (size 0x08000000)

Looks like PCI Address VS. GPU Address, but I have no idea about their detailed roles as both are Physical addresses in the eye of the device driver. Maybe DMA GART readdressing is involved in the PCI Address scheme.

 

2. Radeon Register

MPP_TB_CONFIG = 0x134

used only for save and restore. Its function?

Also by google, I found this:

> 1) If MEM_CNTL and CONFIG_MEMSIZE are not re-initialised to their power-up

> value, a BIOS bug ends up corrupting the chip's memory interface.

>

> 2) If the misnamed MPP_TB_CONFIG register is not set properly, a bug in

> the chip causes it to return zeroes for read-outs of its PCI ROM.

>

> Both issues have been seen using various Radeon cores, including R200,

> RV200, etc.

 

> > > MPP_TB_CONFIG was for an issue on the Radeon 7500

> > > (RV200). Unfortunately, I can't elaborate too much on what exactly it

> > > does, because it's a fix we got from ATI without much detail. The

> > > problem it fixed, though, is that without the MPP_TB_CONFIG change the

> > > BIOS ROM can't be read after the BIOS has been run.

 

ie., MPP_TB_CONFIG must be handled in case the card BIOS is run multiple times. Reboot is an example. Otherwise, only zero is returned when read the BIOS ROM for the second time.

 

3. How many differences between R400, R500 and R600 family?

Can't say much about this. The difference between R500 and R600 should be less when compared with R400 since at least R500 and R600 are dealt by the same linux driver although in many cases parallel functions are used to treat R500 and R600 differently.

Link to comment
Share on other sites

Thank you, Dong!

 

I took your information.

About differencies. I shall make driver as universal. Be ready to correct it to new chips.

 

I begin to write final project. It takes me several days because thousand strings must be rewriten.

I can't divide project to ATIXNDRV and IONDRVFramebuffer. More easy to me make IORadeonSupport and some injector (ATILead) to customize some registry values.

Link to comment
Share on other sites

By looking at codes in radeonHD driver's utility folder and ATILead, I wrote a small utility for Mac to dump Radeon card BIOS ROM and IO register values in user space. I provide it here in case you don't have such a tool.

 

To use it, just open a terminal and type:

sudo kextload -t RadeonPCI.kext //place a kernel side thing matched to "ATY*" or "display" and response to below dump cmd

./RadeonDump -d //dump BIOS ROM to a file named as: devID.subVenID.subSysID.vga.rom

./RadeonDump -r 0x308,0x338 //dump to terminal IO register values within 0x308,0x338 or else you want

 

The execute files are compiled on my leopard 10.5.2. You may want to recompile them from source code.

 

compiled for leopard 10.5.2:RadeonPCI_compiled.zip

compiled for tiger 10.4.8:TigerCompiled.zip

source code:RadeonPCI_source.zip

 

For tiger, you still need edit Info.plist to change OSBundlerequirement to your version number, ie. 8.8.1 --> 8.6.1 if you are running 10.4.6.

Link to comment
Share on other sites

By looking at codes in radeonHD driver's utility folder and ATILead, I wrote a small utility for Mac to dump Radeon card BIOS ROM and IO register values in user space. I provide it here in case you don't have such a tool.

 

To use it, just open a terminal and type:

sudo kextload -t RadeonPCI.kext //place a kernel side thing matched to "ATY*" or "display" and response to below dump cmd

./RadeonDump -d //dump BIOS ROM to a file named as: devID.subVenID.subSysID.vga.rom

./RadeonDump -r 0x308,0x338 //dump to terminal IO register values within 0x308,0x338 or else you want

 

The execute files are compiled on my leopard 10.5.2. You may want to recompile them from source code.

 

Very well!

May be you create new topic about RadeonPCI in the subforum?

 

I try to recompile it to Tiger but unsuccessful because it uses some Leo functions

kextload: extension /Off/RadeonPCI.kext appears to be valid

kextload: loading extension /Off/RadeonPCI.kext

19RadeonPCIUserClient is not compatible with its superclass, 12IOUserClient superclass changed?

kextload: a link/load error occured for kernel extension /Off/RadeonPCI.kext

load failed for extension /Off/RadeonPCI.kext

(run kextload with -t for diagnostic output)

I am also unsuccessful with lspci and don't know why.

Can you give me your IOUserClient class description?

 

One useful link about Radeon200M

http://dri.freedesktop.org/wiki/Radeon200M...goryHardware%29

Link to comment
Share on other sites

No specific leopard functions are used, simply need to change the build rule to use 10.4u.sdk. The post has been updated with a compiled version for tiger, which I've tested with kextload on my tiger 10.4.8 without problem. RadeonDump included is also working. If recompile it, other archs other than i386 need to be removed from cmd parameter list.

One possible problem is that I just choose the IODeviceMemory who has a size of 0x10000 as IO register memory area, but I'm not sure for this.

Link to comment
Share on other sites

No specific leopard functions are used, simply need to change the build rule to use 10.4u.sdk. The post has been updated with a compiled version for tiger, which I've tested with kextload on my tiger 10.4.8 without problem. RadeonDump included is also working. If recompile it, other archs other than i386 need to be removed from cmd parameter list.

One possible problem is that I just choose the IODeviceMemory who has a size of 0x10000 as IO register memory area, but I'm not sure for this.

I check it with my hackintosh N1. OSX 10.4.9. Works fine even with nVidia!!! ;)

0000: 55 AA 78 EB 4B 37 34 30 30 E9 4C 19 77 CC 56 49     U.x.K7400.L.w.VI
0010: 44 45 4F 20 0D 00 00 00 08 01 67 11 00 00 49 42     DEO ......g...IB
0020: 4D 20 56 47 41 20 43 6F 6D 70 61 74 69 62 6C 65     M VGA Compatible
0030: 01 00 00 00 C0 08 4C 99 30 33 2F 31 34 2F 30 36     ......L.03/14/06
0040: 00 00 00 00 00 00 00 00 00 10 00 00 00 00 00 00     ................
0050: E9 66 11 00 58 14 1F 34 FF CF EF 7F 00 10 00 80     .f..X..4.......
0060: FF FF FF 7F 00 00 00 80 22 00 A5 71 E9 13 B8 E9     ......."..q....
0070: 1A B8 50 4D 49 44 6C 00 6F 00 00 00 00 A0 00 B0     ..PMIDl.o.......
0080: 00 B8 00 C0 00 33 7E CA 9B 00 02 00 04 00 6A 21     .....3~.......j!
0090: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF     ................
00A0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF     ................
00B0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF     ................
00C0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF     ................
00D0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF     ................
00E0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF     ................
00F0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF     ................

0100: FF FF FF FF 48 57 45 41 50 43 49 52 DE 10 D1 01     ....HWEAPCIR....
0110: 00 00 18 00 00 00 00 03 78 00 01 00 00 80 00 00     ........x.......
0120: 47 56 2D 4E 58 37 33 4C 31 32 38 44 2D 52 48 20     GV-NX73L128D-RH 
0130: 46 31 20 0D 0A 00 00 00 00 00 00 00 00 00 00 00     F1 .............
0140: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
0150: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
0160: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     ................
0170: 00 56 65 72 73 69 6F 6E 20 20 35 2E 37 32 2E 32     .Version  5.72.2
0180: 32 2E 33 35 2E 30 36 20 0D 0A 00 43 6F 70 79 72     2.35.06 ...Copyr
0190: 69 67 68 74 20 28 43 29 20 31 39 39 36 2D 32 30     ight © 1996-20
01A0: 30 35 20 4E 56 49 44 49 41 20 43 6F 72 70 2E 0D     05 NVIDIA Corp..

But not with Radeon registers on nVidia :D

it matched on name "display"

./RadeonDump.c:238: failed assertion `KERN_SUCCESS == kr'

Abort trap

It still not work in 10.4.6....

Same result as I previously have with lspi

kextload: extension /Off/lspcidrv.kext appears to be valid

kextload: loading extension /Off/lspcidrv.kext

kld(): /Off/lspcidrv.kext/Contents/MacOS/lspcidrv load command 2 unknown cmd field

kextload: kld_load_from_memory() failed for module /Off/lspcidrv.kext/Contents/MacOS/lspcidrv

kextload: a link/load error occured for kernel extension /Off/lspcidrv.kext

load failed for extension /Off/lspcidrv.kext

(run kextload with -t for diagnostic output)

 

I made the joined project IORadeonSupport but with numerous mistakes. The last one

/Developer/Private/jam failed with exit code 1

I understand that it is subroutine description error. But how can I find which of hundreds?

Link to comment
Share on other sites

I check it with my hackintosh N1. OSX 10.4.9. Works fine even with nVidia!!! :D

So the BIOS of video card is loaded to the same physical address 0xc0000 no matter ati or nvidia.

But not with Radeon registers on nVidia :D

Looks like nVidia IO register area is not with a size of 0x10000, but with 0x20000.

It still not work in 10.4.6....Same result as I previously have with lspi

I did a google on this. It may be caused by no support for UUID cmd section in mach-o execute file for 10.4.6. Add an -no_uuid link option may solve it.

I made the joined project IORadeonSupport but with numerous mistakes. I understand that it is subroutine description error. But how can I find which of hundreds?

Can you find any other error information other than this?Well, I found your posts on x86dev.org about lspci.

Here I attach a new kext with the -no_uuid link option and select IO area upon the size is between 0x10000 and 0x20000. RadeonPCI.kext.zip

You may try it with both of your hackingtoshs.

 

Since you had the same problem loading the userclient related kexts. Now I'm thinking why don't you upgrade to 10.4.8 or is 10.4.6 required for your specific hardware?

Link to comment
Share on other sites

Looks like nVidia IO register area is not with a size of 0x10000, but with 0x20000.

We have no purpose to read nVidia registers. We work around ATI.

Here I attach a new kext with the -no_uuid link option and select IO area upon the size is between 0x10000 and 0x20000.

Same problem

kextload: extension /Users/sergey/Desktop/TigerCompiled/RadeonPCI.kext appears to be valid
kextload: loading extension /Users/sergey/Desktop/TigerCompiled/RadeonPCI.kext
kld(): /Users/sergey/Desktop/TigerCompiled/RadeonPCI.kext/Contents/MacOS/RadeonPCI load command 2 unknown cmd field
kextload: kld_load_from_memory() failed for module /Users/sergey/Desktop/TigerCompiled/RadeonPCI.kext/Contents/MacOS/RadeonPCI
kextload: a link/load error occured for kernel extension /Users/sergey/Desktop/TigerCompiled/RadeonPCI.kext
load failed for extension /Users/sergey/Desktop/TigerCompiled/RadeonPCI.kext
(run kextload with -t for diagnostic output)

You may try it with both of your hackingtoshs.

Hack 1 at evening (home). Hack 2 at moning and midday (job).

Since you had the same problem loading the userclient related kexts. Now I'm thinking why don't you upgrade to 10.4.8 or is 10.4.6 required for your specific hardware?

It is really hard question. I tried to install Official ComboUpdate 10.4.8 as with hackintosh 1. All freezes at AppleACPiPlatform.kext no matter what kernel I tried to use. Old kext is not compatible with new kernel. I can't start even with -v -s.

I tried also JaS 10.4.8 PPF1, PPF2, Kalyway 10.4.10, MacDotNub 10.4.10. They are loaded (so kernel+ACPI works?) but stopped at installer. I have no more ideas how to install or upgrade my Hackintosh 2 to new system.

 

Return to our main problem. Here is a sources of joined project. What I did?

1. Insert Joblo's additions to IONDRVFramebuffer 1442. Only three commands support:

cscGetVideoParameters

cscGetModeTiming

cscGetNextResolution

and procedures to support the commands.

2. Correct Joblo's access to Radeon Registers and VideoBIOS (as in ATILead).

3. Large rewrite of GetConnectorsInfoFromBIOS according to Linux Project XF.

4. Add decsriptions to Radeon registers. Not all yet!

I didn't make IONDRVDevice initialization as Joblo do supposing that ATILead may do it.

 

Sorry, the sources contain a mistake that I didn't catch yet. May be you can help?

Mistake.png

Link to comment
Share on other sites

Probably kernel 8.4.1 that I have doesn't support kIOUCStructIStructO used in lspci and RadeonPCI.

But it supports kIOUCScalarIScalarO used in IOGraphicsFamily.

http://lists.apple.com/archives/darwin-dri...c/msg00014.html

 

EDITED:

Sorry, it is used in IOFramebufferUserClient.cpp so it must works.

 

EDITED:

Better rezult

kextload: extension /RadeonPCI.kext appears to be valid
kextload: loading extension /RadeonPCI.kext
kextload: /RadeonPCI.kext loaded successfully
kextload: loading personalities named:
kextload:	 FirstPersonality
kextload: sending 1 personality to the kernel
kextload: matching started for /RadeonPCI.kext

But now RadeonDump do nothing...

It tells me about error but when all is OK no any output ;)

Unable to read range:  0x100,
Usage: ./RadeonDump [-d] [-r start,end] 
	-d			  dump Radeon card BIOS ROM
	-r start,end	dump Radeon card IO register values in the range of [start,end]

Link to comment
Share on other sites

better rezult

But now RadeonDump do nothing...

It tells me about error but when all is OK no any output :(

Unable to read range:  0x100,
Usage: ./RadeonDump [-d] [-r start,end] 
	-d			  dump Radeon card BIOS ROM
	-r start,end	dump Radeon card IO register values in the range of [start,end]

 

Just as the usage said, there is no space between start,end otherwise it will give you this error. :D

Well, if you like dump one register each time, please download this RadeonDump.c.zip to the RadeonPCI folder and compile it by yourself. It add support to usage like: ./RadeonDump 0x100 .

 

I downloaded your IORadeonSupport source code and finally managed compile it under my 10.5.2. Basically, you have some redefinition problems. What I did is just moving codes back and forth between these files to avoid it. Three files in Radeon folder are removed after these as they seemed no longer needed.

 

Source after modifing: IORadeonSupport_100.zip

Compiled for tiger kexts: IORadeonSupport_kext.zip

Link to comment
Share on other sites

First of all, thank you, Dong, very much!

You bring me out of deadend. Now I can successfully compile it.

Strange, but I always need to recompile your kexts to make it loadable for my comp:

"2 unknown cmd field"... :wacko: as RadeonPCI so IORadeonSupport.

Now RadeonPCI loads fine and present in kextstat.

But RadeonDump doesn't produce output. How can I recompile it? XCode project or makefile?

 

IORadeonSupport.

As I see you exclude IONDRVLibraries. Rezult

kextload: extension /Off/Rad/IORadeonSupport.kext appears to be valid
kld(): Undefined symbols:
__IONDRVLibrariesFinalize
__IONDRVLibrariesInitialize
kextload: kld_load_from_memory() failed for module /Off/Rad/IORadeonSupport.kext/IORadeonSupport
kextload: a link/load error occured for kernel extension /Off/Rad/IORadeonSupport.kext

Now I recompile it and begin testing. Wait...

 

Yes, kernel panic :(

Link to comment
Share on other sites

First of all, thank you, Dong, very much!

You bring me out of deadend. Now I can successfully compile it.

Strange, but I always need to recompile your kexts to make it loadable for my comp:

"2 unknown cmd field"... :) as RadeonPCI so IORadeonSupport.

You are always welcome as this is at least something I can do to support you on this project. At present I have no idea what causes this difference, but good that you can recompile and load it.

Now RadeonPCI loads fine and present in kextstat.

But RadeonDump doesn't produce output. How can I recompile it? XCode project or makefile?

RadeonDump.c is a simple c source file, you just need to put it in the RadonPCI folder as it includes a header file there. If you open RadeonDump.c, the first comment tells you how to compile it in a terminal. (a normal c language compile cmd :) )

IORadeonSupport.

As I see you exclude IONDRVLibraries. Rezult

kextload: extension /Off/Rad/IORadeonSupport.kext appears to be valid
kld(): Undefined symbols:
__IONDRVLibrariesFinalize
__IONDRVLibrariesInitialize
kextload: kld_load_from_memory() failed for module /Off/Rad/IORadeonSupport.kext/IORadeonSupport
kextload: a link/load error occured for kernel extension /Off/Rad/IORadeonSupport.kext

Now I recompile it and begin testing. Wait...

 

Yes, kernel panic :(

I did not remember I excluded IONDRVLibraries.h. When you recompiled, did you include it back? Maybe something else caused the kernel panic.

Link to comment
Share on other sites

RadeonDump.c is a simple c source file, you just need to put it in the RadonPCI folder as it includes a header file there. If you open RadeonDump.c, the first comment tells you how to compile it in a terminal. (a normal c language compile cmd ;) )

OK! I really never used command line. I am not from Linux world, I am from MacOS Classic.

With Hackintosh N1 (now) I can't reach nVidia registers. All other is OK

May  1 00:22:51 sergeys-computer kernel[0]: RadeonPCI::start
May  1 00:22:51 sergeys-computer kernel[0]: Range[0] f4000000:01000000
May  1 00:22:51 sergeys-computer kernel[0]: Range[1] e0000000:10000000
May  1 00:22:51 sergeys-computer kernel[0]: Range[2] f5000000:01000000
May  1 00:22:51 sergeys-computer kernel[0]: Range@0x10 f4000000:01000000
May  1 00:22:51 sergeys-computer kernel[0]: Range@0x10 (f4000000) mapped to kernel virtual address 3399f000
May  1 00:22:51 sergeys-computer kernel[0]: ATI ROM start at 000c0000 mapped to kernel virtual address 2b484000
May  1 00:22:51 sergeys-computer kernel[0]: ROM signature is read as: 0000aa55
May  1 00:22:51 sergeys-computer kernel[0]: Config register@0x4 = 00100007
May  1 00:23:10 sergeys-computer kernel[0]: RadeonPCIUserClient::initWithTask(type 23)
May  1 00:23:10 sergeys-computer kernel[0]: RadeonPCIUserClient::start
May  1 00:23:10 sergeys-computer kernel[0]: RadeonPCIUserClient::clientMemoryForType(101)
May  1 00:23:10 sergeys-computer kernel[0]: RadeonPCIUserClient::stop

I did not remember I excluded IONDRVLibraries.h. When you recompiled, did you include it back? Maybe something else caused the kernel panic.

Yes, I include back IONDRVLibraries.cpp and .h and correct global->local #include. The project now compilable and loadable without problems. You'd also may improve IORadeonSupport.info.plist.

1. IOProbeScore must be higher then IONDRVSupport to have these two drivers simultaneously. I set 30000.

2. It is better to set matching

			<key>IOPCIClassMatch</key>
		<string>0x03000000&0xffff0000</string>

to avoid work with 0x03800000 - second stupid head as in X1600Pro

 

Next problem - kernel panic. It is easy to trace. I simply insert IOLog()s at every place and look. My last stop at getting MMIO address of Radeon registers. Why? I'll trace provider->getName() and all IODeviceMemories of the provider .

Other problems follows. May be not good EDID found in BIOS or getting from I2C. May be not good I2C at all. We can compare it with Linux.

And huge future problem - correct using of Radeon Registers for different chips...

Kernel panic is a trifle.

But I have 3 days holiday.

Link to comment
Share on other sites

When I test with IOGraphics source code, I found all ATI acceleration kexts (as listed in Info.plist) require IONDRVSupport to load. But when I check some online vanilla IOReg dumps, IONDRVSupport seems not loaded while native ATI framebuffer driver is used instead.

I can't figure out how this is achieved.

Link to comment
Share on other sites

When I test with IOGraphics source code, I found all ATI acceleration kexts (as listed in Info.plist) require IONDRVSupport to load. But when I check some online vanilla IOReg dumps, IONDRVSupport seems not loaded while native ATI framebuffer driver is used instead.

I can't figure out how this is achieved.

 

It seems system check the presense of IONDRVSupport.kext to load accelerator but really other driver is loaded.

I have an observation that even if ATINDRV.kext is not loaded in my system it influence on whole ATI driver behaviour.

I propose that ATINDRV::probe() methods called, made some tunings and return kIOReturnUnsuccessful so the kext is not loaded but change the system :) .

 

IOGraphicsFamily from our project works fine but I see no difference with Apple's one. We may take into account that we can rewrite IOAccelerator class ;) Have you ideas what to change in it?

Link to comment
Share on other sites

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

 

that was my original point-out during study of IONDRVFramebuffer

it's massively using IONDRV device subclass for any hardware related issues

Link to comment
Share on other sites

With returning, Ole2!

 

2 joanplanas

To have QE we need good Framebuffer but Framebuffer is not enough for QE.

I also want to have QE and I work.

Link to comment
Share on other sites

Current state.

I don't like three thing:

1. Zero project IONDRVFramebuffer 1.4.42 doesn't work with IONDRVDevice while 1.4.3 does.

Result - KP at get MMIO.

2. I rewrite IOBootNDRV class to Radeon procedure.

Result - KP at ret = ndrv->getNextResolution.

It is better to create new class IORadeonNDRV (as ATINDRV). Rewrite all again?

3. I rewrite IONDRVFramebuffer class to include I2C members.

It is better to create new class.

 

I look at connectorsInfo output - no any sense in the digits. Needed investigations.

Link to comment
Share on other sites

I am wrong

IONDRVSupport 1.4.3 doesn't work with IONDRVDevice too. So I see no mistakes in 1.4.42 zero project.

Why RadeonFB project make it?

bool
IONDRVFramebuffer::start( IOService * provider )
{
IOService *		parent = 0;
OSData *		data;

online = false;
IODelay(50000);

/* If we get here, we have matched to an IONDRVDevice */
do
{	
	// Save it for further IOReg writings, 
	//nub = IONDRVDevice, parent = IOPCIDevice
	nub = provider;

 

I need not only testers (I have no alpha version yet). I need advices.

 

EDITED:

I can't understand yet but previously I can boot with IONDRVDevice

http://forum.insanelymac.com/index.php?sho...91042&st=63

	| |   |	 +-o display@0  <class IONDRVDevice, registered, matched, active, busy 0, retain count 7>
| |   |	 | | {
| |   |	 | |   "IODeviceMemory" = (({"address"=0xffffffffd0000000,"length"=0x10000000}),{"offset"=0x9000,"parent"=({"address"=0x0,"length"=0x10000}),"length"=0x100},({"address"=0xffffffffc0100000,"length"=0x10000}))
| |   |	 | |   "AAPL,gray-value" = <c38c6400>
| |   |	 | |   "device_type" = <"display">
| |   |	 | |   "AAPL,gray-page" = <01000000>
| |   |	 | |   "built-in" = <>
| |   |	 | |   "AAPL,ndrv-dev" = Yes
| |   |	 | |   "IOFBDependentID" = 0x2adfb00
| |   |	 | |   "display-connect-flags" = <00000000>
| |   |	 | |   "IOFBDependentIndex" = 0x0
| |   |	 | |   "AAPL,iokit-ndrv" = <20508a27>
| |   |	 | |   "AAPL,RegEntryID" = <00e78d02ff1872fd656d69537a6c7552>
| |   |	 | |   "compatible" = <"display">
| |   |	 | |   "display-link-component-bits" = <06000000>
| |   |	 | |   "display-type" = <"LCD">
| |   |	 | |   "name" = <"display">
| |   |	 | | }
| |   |	 | | 
| |   |	 | +-o .Display_boot  <class IONDRVFramebuffer, registered, matched, active, busy 0, retain count 10>
| |   |	 |   | {

Why not now?

Is there anybody who can successfully boot into gui with ATILead 1.2.0 and without other Radeon drivers?

 

I really need to use IONDRVDevice because it is provider of ATINDRV class.

Link to comment
Share on other sites

  • 3 weeks later...

Continue developement.

 

I was fighting with numerous memory allocation errors. Now no more kernel panics.

The driver loaded and give me... black screen. But now I can make dmesg with useful debugging info.

There are plenty of other mistakes needed to resolve.

1. I can't obtain correct EDID either from DDC or BIOS. I manually inject some EDID by ATILead.

				<key>ATI,EDID</key>
			<data>
			AP///////wBaYxFpAQEBASoNAQOAKR94Kk6VoVdMlCYc
			UFS/74CpQIGAgUBxT2FZRVkxWTEKSD9AMGKwMkBAwBMA
			mDIRAAAeAAAA/wBBMjEwMzQyMDAxOTUKAAAA/QAyVR5c
			EQAKICAgICAgAAAA/ABWUDIwMWIKICAgICAgAJk=
			</data>

2. I got correct connection info from BIOS. I have three output: internal LCD, external CRT and TVOUT. But how to use these info? Probably it is needed to create three nubs of NDRVDevices one for each connections and launch three Framebuffers with own datas.

3. I got not correct resolutions info from EDID. Some simple mistakes.

 

To correct these mistakes it is needed huge work but not impossible.

IORadeonSupport_101src.zip

Link to comment
Share on other sites

Continue developement.

 

I was fighting with numerous memory allocation errors. Now no more kernel panics.

The driver loaded and give me... black screen. But now I can make dmesg with useful debugging info.

There are plenty of other mistakes needed to resolve.

1. I can't obtain correct EDID either from DDC or BIOS. I manually inject some EDID by ATILead.

				<key>ATI,EDID</key>
			<data>
			AP///////wBaYxFpAQEBASoNAQOAKR94Kk6VoVdMlCYc
			UFS/74CpQIGAgUBxT2FZRVkxWTEKSD9AMGKwMkBAwBMA
			mDIRAAAeAAAA/wBBMjEwMzQyMDAxOTUKAAAA/QAyVR5c
			EQAKICAgICAgAAAA/ABWUDIwMWIKICAgICAgAJk=
			</data>

2. I got correct connection info from BIOS. I have three output: internal LCD, external CRT and TVOUT. But how to use these info? Probably it is needed to create three nubs of NDRVDevices one for each connections and launch three Framebuffers with own datas.

3. I got not correct resolutions info from EDID. Some simple mistakes.

 

To correct these mistakes it is needed huge work but not impossible.

 

according to Wikipedia:

 

"Some graphics card drivers have historically coped poorly with the EDID, using only its standard timing descriptors rather than its Detailed Timing Descriptors (DTDs). Even in cases where the DTDs were read, the drivers are/were still often limited by the standard timing descriptor limitation that the horizontal/vertical resolutions must be evenly divisible by 8. This means that many graphics cards cannot express the native resolutions of the most common wide screen flat panel displays and liquid crystal display televisions. The number of vertical pixels is calculated from the horizontal resolution and the selected aspect ratio. To be fully expressible, the size of wide screen display must thus be a multiple of 16×9 pixels. For 1366×768 pixel Wide XGA panels the nearest resolution expressible in the EDID standard timing descriptor syntax is 1360×765 pixels. Specifying 1368 pixels as the screen width would yield an unnatural screen height of 769.5 pixels.

 

Many Wide XGA panels do not advertise their native resolution in the standard timing descriptors, instead offering only a resolution of 1280×768. Some panels advertise a resolution only slightly smaller than the native, such as 1360×765. For these panels to be able to show a pixel perfect image, the EDID data must be ignored by the display driver or the driver must correctly interpret the DTD and be able to resolve resolutions whose size is not divisible by 8."

 

which means, EDID data may not be enough for correct display resolution recovery, but DTD should be parsed instead.

Link to comment
Share on other sites

Thanks for warning. I know

	for (i = 0; i < 4; i++, block+= DETAILED_TIMING_DESCRIPTION_SIZE) {
	int first = 1;
	if (!(block[0] == 0x00 && block[1] == 0x00)) {
		get_detailed_timing(block, &mode[num]);
		if (first) {
			mode[num].flag |= FB_MODE_IS_FIRST;
			first = 0;
		}
		num++;
	}
}

Link to comment
Share on other sites

 Share

×
×
  • Create New...