radeonfb: Add ATOM BIOS parsing (rebased patch)
This is my old radeon-atom-5 patch rediffed against 2.6.17.x
Changes vs 2.6.17.x:
* ATOM BIOS support for newer Radeon cards
* Clean method of detecting and handling disparate BIOS types
* Radeon RV410/M26/M26GL (aka Mobility X700/FireGL5000) card IDs
* Default PLL clocks for R420 and variants
* Handle bogus PLL divider with sane default.
* All new connector/head detection code that uses bios/firmware defaults whenever possible.
...
A while back I posted a patch that added full ATOM BIOS parsing for newer radeon boards. It also re-jiggered multi head detection to be considerably more sane (== actually work), and generally modularized most of the "get data X from BIOS/firmware/etc" code.
I was working under BenH's direction, but he apparently got swamped a while back and this fell through the cracks. I'm re-posting this in an attempt to get the ball rolling again, as several people have contacted me directly to ask about this code getting merged.
I don't have the means (hardware &| bug reports/feedback) to develop it further. IIRC the memmap fixes for r300/r400 haven't been integrated into the mainline either, so you may get some random lockups -- but that is beyond the scope of this patch.
Aanyone who has a radeon card and is feeling brave, please give this a whirl. If you are specifying a monitor layout, try it without the layout string and things should JustWork(tm).
This patch also adds PCI IDs for the X700/M26 series. It tests fine on the M26 (ATOM) in my laptop and the 7500AGP (Legacy) card in my workstation.
See also kernel bugzilla # 6215:
http://bugzilla.kernel.org/show_bug.cgi?id=6215
I'll rebase it against 2.6.18-rcX (if necessary) after I migrate to 2.6.18-rcX on my development boxen.
- Solomon
Signature · 3 lines
Solomon Peachy pizza at shaftnet dot org Melbourne, FL ^^ (mail/jabber/gtalk) ^^ Quidquid latine dictum sit, altum viditur. ICQ: 1318344
ati_ids.h +4 -0
@@ -185,6 +185,10 @@#define PCI_CHIP_R423_UQ 0x5551#define PCI_CHIP_R423_UR 0x5552#define PCI_CHIP_R423_UT 0x5554 +#define PCI_CHIP_RV410_564B 0x564A +#define PCI_CHIP_RV410_564A 0x564B +#define PCI_CHIP_RV410_5652 0x5652 +#define PCI_CHIP_RV410_VS 0x5653#define PCI_CHIP_MACH64VT 0x5654#define PCI_CHIP_MACH64VU 0x5655#define PCI_CHIP_MACH64VV 0x5656
radeon_base.c +272 -117
581 lines not on this page · raw message
radeon_i2c.c +36 -20
86 lines not on this page · raw message
radeon_monitor.c +873 -315
1,463 lines not on this page · raw message
radeonfb.h +117 -26
206 lines not on this page · raw message
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Linux-fbdev-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-fbdev-devel
radeonfb: Add ATOM BIOS parsing v5b/v6 (rebased patch)
Below is v5b of the ATOM BIOS patch. Changes from v5:
* LVDS/DFP with attached DDC port can be queried
* LVDS/DFP won't be misdetected as CRT if a DDC port is connected.
http://www.shaftnet.org/users/pizza/radeonfb-atom-2.6.17-v5b.diff
http://www.shaftnet.org/users/pizza/radeonfb-atom-2.6.18-v5b.diff
Meanwhile, I've rolled in some other work to create v6 of the patch, this time against 2.6.18-rc6 only:
http://www.shaftnet.org/users/pizza/radeonfb-atom-2.6.18-v6.diff
Changes from v5b:
(Note -- many of these changes were taken in part from an older patch by
Claudio Ciccan; I kept what was relevant and tossed the rest)
* Added many new radeon PCI IDs (X300/X600/X700/X800/X850)
* R4x0 series gets R300 tweaks (from Xorg)
* Cap VRAM to 128M (Not really sure why.. related to mmap bugs?)
* Add default_dynclk to builtin argument parsing.
* Expanded the register mmio size to max (64k vs former 16k) (was there a reason why it wasn't already maxed?)
* Initialization tweaks for R300 and RS300 (from Xorg)
I'd really like to see the v6 patch (or its successors) go in to 2.6.19, as the existing radeonfb driver simply won't work with newer radeon cards -- to say nothing about its multihead detection quirks.
So, I encourage everyone with a radeon card to give this new driver a whirl, especially if you have an X-series radeon board or if you were having head detection problems with the existing driver.
Please run this with CONFIG_FB_RADEON_DEBUG on, so if something goes wrong I can get it fixed up.
There at least one known corner case where things could go wrong (LVDS/DFP port has an associated DDC port, but no EDID information is available) but I'm already working on that.
See also:
http://bugzilla.kernel.org/show_bug.cgi?id=6215
Ciao,
- Solomon
Signature · 3 lines
Solomon Peachy pizza at shaftnet dot org Melbourne, FL ^^ (mail/jabber/gtalk) ^^ Quidquid latine dictum sit, altum viditur. ICQ: 1318344
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Linux-fbdev-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-fbdev-devel
Re: radeonfb: Add ATOM BIOS parsing v5b/v6 (rebased patch)
Quoted 2 lines · Stuffed Crust
* Cap VRAM to 128M (Not really sure why.. related to mmap bugs?)
Traditionally, the CPU couldn't access more than 128M on Radeons. See the current xf86-video-ati code for how to detect how much can really be mapped.
Signature · 13 lines
Earthling Michel Dänzer | http://tungstengraphics.com Libre software enthusiast | Debian, X and DRI developer ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Linux-fbdev-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/linux-fbdev-devel
radeonfb: Add ATOM BIOS parsing v6a (rebased)
In reply to Stuffed CrustFor those of you who are still tracking this, I've rebased my ATOM BIOS patch against 2.6.19-rc5:
http://www.shaftnet.org/users/pizza/radeonfb-atom-2.6.18-v6a.diff
http://www.shaftnet.org/users/pizza/radeonfb-atom-2.6.19-v6a.diff
There are no (intentional) functional changes between the two, although 2.6.19 re-did the edid probing to use generic calls, so it may behave differently.
Feedback welcome, especially if you were having problems with radeonfb mis-detecting your monitor(s).
See also:
http://bugzilla.kernel.org/show_bug.cgi?id=6215
Ciao,
- Solomon
Signature · 3 lines
Solomon Peachy pizza at shaftnet dot org Melbourne, FL ^^ (mail/jabber/gtalk) ^^ Quidquid latine dictum sit, altum viditur. ICQ: 1318344
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Linux-fbdev-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-fbdev-devel
Re: radeonfb: Add ATOM BIOS parsing v6a (rebased)
Il Thu, Nov 09, 2006 at 12:25:24AM -0500, Stuffed Crust ha scritto:
Quoted 9 lines
For those of you who are still tracking this, I've rebased my ATOM BIOS patch against 2.6.19-rc5:
http://www.shaftnet.org/users/pizza/radeonfb-atom-2.6.18-v6a.diff http://www.shaftnet.org/users/pizza/radeonfb-atom-2.6.19-v6a.diffThere are no (intentional) functional changes between the two, although 2.6.19 re-did the edid probing to use generic calls, so it may behave differently.
Hello,
I was testing your patch radeonfb-atom-2.6.19-v6a.diff on my new radeon X850. I get a NULL pointer dereference in fb_ddc_read (during connector probe):
radeonfb_pci_register BEGIN
ACPI: PCI Interrupt 0000:01:00.0[A] -> GSI 16 (level, low) -> IRQ 16 radeonfb (0000:01:00.0): Found 131072k of DDR 256 bits wide videoram radeonfb (0000:01:00.0): mapped 16384k videoram
radeonfb: Found Intel x86 BIOS ROM Image
Retrieved PLL infos from ATOM BIOS
radeonfb: Reference=27.00 MHz (RefDiv=12) Memory=540.00 Mhz, System=520.00 MHz PLL min 20000 max 50000
TMDS PLL from BIOS: 16500 b011c
index 3 port 2 conn 2 dac -1 ddc 0 tmds 0
index 4 port 2 conn 2 dac 1 ddc 0 tmds -1
index 7 port 1 conn 2 dac -1 ddc 1 tmds 1
Starting monitor auto detection...
radeonfb: I2C (port 0) ... found CRT display
radeonfb: I2C (port 0) ... found CRT displayi2c_adapter i2c-2: unable to read EDID block.i2c_adapter i2c-2: unable to read EDID block.i2c_adapter i2c-2: unable to read EDID block.
radeonfb: I2C (port 1) ... not found
BUG: unable to handle kernel NULL pointer dereference at virtual address 00000000 printing eip: f0d44013 *pde = 00000000 Oops: 0000 [#1] PREEMPT SMP Modules linked in: radeonfb(F) fb_ddc cfbcopyarea cfbimgblt cfbfillrect binfmt_misc nfs button ac battery cls_u32 cls_route sch_sfq sch_cbq nfsd exportfs lockd sunrpc vfat fat ntfs nls_base hwmon_vid hwmon i2c_isa ipv6 snd_hda_intel snd_hda_codec snd_pcm_oss snd_mixer_oss snd_pcm snd_timer ohci1394 snd parport_pc parport ieee1394 e100 mii uhci_hcd ehci_hcd intel_agp agpgart usbcore i2c_i801 rtc soundcore snd_page_alloc thermal processor fan pata_ali reiserfs xfs CPU: 1 EIP: 0060:[<f0d44013>] Tainted: GF VLI EFLAGS: 00010282 (2.6.19-rc6-g1abbfb41 #2)
EIP is at fb_ddc_read+0x13/0x1d8 [fb_ddc]
eax: e9ba6938 ebx: 00000000 ecx: 00000001 edx: 00000001
esi: e9ba6240 edi: 00000000 ebp: e9ba6938 esp: e2ab6e40
ds: 007b es: 007b ss: 0068
Process modprobe (pid: 15297, ti=e2ab6000 task=ef2a8070 task.ti=e2ab6000)
Stack: f0d4420d b0326128 e9ba7370 00000003 00000050 00000001 e2ab6e6b e9ba6610
e9ba6240 00000000 00000002 e9ba6634 e9ba6240 0000006c 00000003 f0db693d
f0db7f92 00000001 e9ba6240 e9ba6634 0000006c f0db4f90 f0db7c5e 00000008
Call Trace:
[<f0db693d>] radeon_probe_i2c_connector+0x63/0x152 [radeonfb]
[<f0db4f90>] radeon_probe_screens+0x2ca/0x7b4 [radeonfb]
[<f0da859a>] radeonfb_pci_register+0x886/0xe09 [radeonfb]
[<b01d1d51>] pci_device_probe+0x36/0x57
[<b02350d3>] really_probe+0x39/0xda
[<b02352fb>] __driver_attach+0x69/0xa1
[<b02347ec>] bus_for_each_dev+0x36/0x58
[<b0234ff3>] driver_attach+0x16/0x18
[<b0234ac0>] bus_add_driver+0x61/0x165
[<b01d1eb6>] __pci_register_driver+0x6e/0x88
[<b013e0a9>] sys_init_module+0x98/0x1db
[<b0102f73>] syscall_call+0x7/0xb
DWARF2 unwinder stuck at syscall_call+0x7/0xbLeftover inexact backtrace:
=======================
Code: <8b> 03 ff 53 08 31 d2 8b 03 ff 53 08 c7 44 24 0c 00 00 00 00 31 d2 8b 03 31 f6 ff 53 04 b8 0d 00 EIP: [<f0d44013>] fb_ddc_read+0x13/0x1d8 [fb_ddc] SS:ESP 0068:e2ab6e40
I've added some debug printk and it it turned out that algo_data is NULL:
radeonfb_pci_register BEGIN
ACPI: PCI Interrupt 0000:01:00.0[A] -> GSI 16 (level, low) -> IRQ 16 radeonfb (0000:01:00.0): Found 131072k of DDR 256 bits wide videoram radeonfb (0000:01:00.0): mapped 16384k videoram
radeonfb: Found Intel x86 BIOS ROM Image
Retrieved PLL infos from ATOM BIOS
radeonfb: Reference=27.00 MHz (RefDiv=12) Memory=540.00 Mhz, System=520.00 MHz PLL min 20000 max 50000
TMDS PLL from BIOS: 16500 b011c
index 3 port 2 conn 2 dac -1 ddc 0 tmds 0
index 4 port 2 conn 2 dac 1 ddc 0 tmds -1
index 7 port 1 conn 2 dac -1 ddc 1 tmds 1
Starting monitor auto detection...
radeonfb: I2C (port 0) ... found CRT display
radeonfb: I2C (port 0) ... found CRT displayi2c_adapter i2c-2: unable to read EDID block.i2c_adapter i2c-2: unable to read EDID block.i2c_adapter i2c-2: unable to read EDID block.
radeonfb: I2C (port 1) ... not foundalgo_data is NULL
radeonfb: I2C (port -1) ... not found
* Connector 1 is DVI-I. Head 0, Monitor: CRT (EDID probed)
ddc port: 0, dac: 1, tmds: -1
* Connector 2 is DVI-I. Head 1, Monitor: CRT (EDID probed)
ddc port: 0, dac: -1, tmds: 0
* Connector 3 is DVI-I. Head -1, Monitor: None
ddc port: 1, dac: -1, tmds: 1
hStart = 1048, hEnd = 1184, hTotal = 1344
vStart = 771, vEnd = 777, vTotal = 806h_total_disp = 0x7f00a7 hsync_strt_wid = 0x910422v_total_disp = 0x2ff0325 vsync_strt_wid = 0x860302
pixclock = 15384
freq = 6500
freq = 6500, PLL min = 20000, PLL max = 50000ref_div = 12, ref_clk = 2700, output_freq = 26000ref_div = 12, ref_clk = 2700, output_freq = 26000
post div = 0x2fb_div = 0x74ppll_div_3 = 0x20074
Console: switching to colour frame buffer device 128x48
radeonfb (0000:01:00.0): ATI Radeon ]Rradeonfb_pci_register END
For reference, I've added this code to fb_ddc_read:
if (!algo_data) {
printk(KERN_WARNING "algo_data is NULL\n");
return NULL;
}radeonfb then works fine. The only strange thing is that it thinks that I have two CRTs. I also have two edid files (with identical content of course). The card has 2 DVI connectors and I'm using a VGA LCD (using DVI->VGA adapter). The card is CrossFire capable but there's only one card in the system.
Xorg says:
(II) RADEON(0): I2C bus "DDC" initialized.
(II) RADEON(0): ATOM BIOS detected
(II) RADEON(0): Port0: DDCType-1, DACType-1, TMDSType-0, ConnectorType-2 (II) RADEON(0): Port1: DDCType-2, DACType--1, TMDSType-1, ConnectorType-2 (II) RADEON(0): I2C device "DDC:ddc2" registered at address 0xA0. (II) RADEON(0): I2C device "DDC:ddc2" removed.
(II) RADEON(0): DDC Type: 1, Detected Type: 1
(II) RADEON(0): I2C device "DDC:ddc2" registered at address 0xA0. (II) RADEON(0): I2C device "DDC:ddc2" removed.
(II) RADEON(0): I2C device "DDC:ddc2" registered at address 0xA0. (II) RADEON(0): I2C device "DDC:ddc2" removed.
(II) RADEON(0): I2C device "DDC:ddc2" registered at address 0xA0. (II) RADEON(0): I2C device "DDC:ddc2" removed.
(II) RADEON(0): DDC Type: 2, Detected Type: 0
[skip]
(II) RADEON(0): Primary:
Monitor -- CRT
Connector -- DVI-I
DAC Type -- TVDAC/ExtDAC
TMDS Type -- Internal
DDC Type -- MONID
(II) RADEON(0): Secondary:
Monitor -- NONE
Connector -- DVI-I
DAC Type -- Unknown
TMDS Type -- External
DDC Type -- DVI_DDC
Luca
Signature · 8 lines
Io mi ricordo sempre il compleanno della mia ragazza: cade il giorno dopo di quando lei me lo ricorda ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
Quoted 4 lines · On Tue, 5 Sep 2006 11:37:13 -0400 Stuffed Crust <[email protected]> wrote:
From: Stuffed Crust <[email protected]>
...Signed-off-by Solomon Peachy <[email protected]>
Problem. We've decided to not take contributions from anonymous/pseudonymous contributors, as it weakens the intent of the Developer's Certificate of Origin. I don't think either of those are your real name ;) Sorry.
If you can sort that out then please ensure that future patches are prepared in `patch -p1' form, as per
http://www.zip.com.au/~akpm/linux/patches/stuff/tpp.txt. That means the diff headers should look like:
--- a/drivers/video/aty/ati_ids.h
+++ a/drivers/video/aty/ati_ids.h
etc. Thanks.
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
Quoted 8 lines · Andrew Morton
Quoted 3 lines
From: Stuffed Crust <[email protected]>
...Signed-off-by Solomon Peachy <[email protected]>Problem. We've decided to not take contributions from anonymous/pseudonymous contributors, as it weakens the intent of the Developer's Certificate of Origin. I don't think either of those are your real name ;) Sorry.
The former is what I've used as a handle for um, eight years or so now, but the latter is what it says on my passport. Really.
The first hundred links (of over 30K) that googling my name link back to me; I stopped counting after that. These links go back as far as '98 and include contributions I've made to half a dozen FOSS projects, my Advodato user page (with its trust metrics), DaveM telling me off a couple of times on lkml, my employer (AbsoluteValue Systems of linux-wlan[-ng] "fame"), and my alma matter (Georgia Tech).
If you finger me I even have full contact information published, complete with the phone number of my employer (although Google will provide that too).
I realize that none of this technically establishes *my* identity, but I think the only mutual aquaintance I've met in person is Jean Torrilhes, and he didn't check my ID either. :)
So. Probably the most expedient manner of establishing I am who google and I say I am is by calling my employer at +1(321)259-0737, ask my boss (Mark Mathews) about my credentials, then you can then put me on the line to establish I know about this conversation. Or I/we can call you.
I could fax you a copy of my ID or something, but that would only tell you that I may have l33t photoshop skillz... :) I'm also not in the local phone book (I ditched the land line two years ago) so you can't go that route.
(Gee, remote identity verification is a difficult problem, isn't it? :)
Quoted 2 lines
If you can sort that out then please ensure that future patches are prepared in `patch -p1' form, as per
I did it the way I did to avoid diffing two complete kernel trees (the editor was running on a much slower machine than the test boxes.. the extensive reboot-required nature of fbdev development is not condusive to editor state)
The current version of the patch (v6a) is linked to kernel bugzilla #6215, but it doesn't have the "correct" format either, but that's a trivial thing to fix.
Is there anything else you'd like me to do to this patch before you take it into -mm? I can break it down a little bit, but unfortunately the bulk of it is fairly atomic (no pun intended) and nearly all of the changes would need to be applied at once, broken down or not.
I also don't know if this patch will apply to (or work on) 2.6.19-rc, but that should be a straightforward merge. I'm assuming you'd like me to sort that out too.
Cheers,
- Solomon (really)
Signature · 3 lines
Solomon Peachy pizza at shaftnet dot org Melbourne, FL ^^ (mail/jabber/gtalk) ^^ Quidquid latine dictum sit, altum viditur. ICQ: 1318344
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Linux-fbdev-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-fbdev-devel
Quoted 5 lines · On Mon, 6 Nov 2006 09:17:19 -0500 Stuffed Crust <[email protected]> wrote:
Quoted 4 lines · Andrew Morton
Quoted 3 lines
From: Stuffed Crust <[email protected]>
...Signed-off-by Solomon Peachy <[email protected]>
Quoted 7 lines
Quoted 4 lines
Problem. We've decided to not take contributions from anonymous/pseudonymous contributors, as it weakens the intent of the Developer's Certificate of Origin. I don't think either of those are your real name ;) Sorry.
The former is what I've used as a handle for um, eight years or so now, but the latter is what it says on my passport. Really.
Oh, OK. Sorry, I thought it was a pseudonym ;)
Quoted 4 lines
The current version of the patch (v6a) is linked to kernel bugzilla #6215, but it doesn't have the "correct" format either, but that's a trivial thing to fix.
yup, please prepare a new patch, send it over.
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642