Skip to contentSkip to conversation

0/3 Add I2C/DDC support to radeonfb (resend)

PATCH In review Kronos 4 participants 6 messages Aug 22, 2003 – Aug 25, 2003 Framebuffer layer

lore
Share & tools
lore

Kronos

author
#0 lore raw

PATCH 1/1 0/3 Add I2C/DDC support to radeonfb (resend)

[This is a resend, it seems that original mail got lost] In reply to this mail I'll send 3 patches that add i2c to radeonfb.

The first patch adds a new driver-id to the i2c-id.h, a config option and all the i2c stuff to radeonfb.c. It doesn't change te behaviour of the driver.

The second patch registers the i2c bus, updates default var according to EDID data and creates a modeb ouf of EDID.

i2c bus is registered in radeonfb_pci_register and unregistered in radeonfb_pci_unregister. I'm a bit concerned about XFree that uses the same bus...

I'm having problems with this patch, but I think that the bug is elsewhere. If I don't set any mode on lilo command line the driver try to use the default mode taken from EDID. In my case the default mode is 1280x1024@60Hz.

This is 2.6.0-test3 + my patches:

radeonfb_pci_register END
hStart = 1328, hEnd = 1440, hTotal = 1688
vStart = 1025, vEnd = 1028, vTotal = 1066
h_total_disp = 0x9f00d2 hsync_strt_wid = 0xe0613
v_total_disp = 0x3ff0429 vsync_strt_wid = 0x30400
post div = 0x2
fb_div = 0x60
ppll_div_3 = 0x10060
ron = 11776, roff = 0
vclk_freq = 10800, per = 0
radeonfb: error ron out of range

...and the screen stays black.
DDA stuff has been disabled in 2.4 but it's still there in 2.6. However even plain 2.6 is unable to set 1280x1024@60Hz:

hStart = 1296, hEnd = 1512, hTotal = 1568 vStart = 1025, vEnd = 1037, vTotal = 1165 h_total_disp = 0x9f00c3 hsync_strt_wid = 0x9b051a v_total_disp = 0x3ff048c vsync_strt_wid = 0x8c0400 post div = 0x4
fb_div = 0x8e
ppll_div_3 = 0x2008e
ron = 1232, roff = 24220
vclk_freq = 7988, per = 865
Console: switching to colour frame buffer device 160x64

but the screen stays black. XFree works with no problem at this resolution.

Also, modes from EDID are a bit different from modes of the default modedb. This is 2.6.0 vanilla at 1024x768@60Hz:

hStart = 1032, hEnd = 1176, hTotal = 1344 vStart = 771, vEnd = 777, vTotal = 806 h_total_disp = 0x7f00a7 hsync_strt_wid = 0x920412 v_total_disp = 0x2ff0325 vsync_strt_wid = 0x860302 post div = 0x4
fb_div = 0x74
ppll_div_3 = 0x20074
ron = 712, roff = 14840
vclk_freq = 6525, per = 530

This is 2.6 + my patches, at 1024x768@60Hz, timings from EDID:

hStart = 1048, hEnd = 1184, hTotal = 1344 vStart = 771, vEnd = 777, vTotal = 806 h_total_disp = 0x7f00a7 hsync_strt_wid = 0x910422 v_total_disp = 0x2ff0325 vsync_strt_wid = 0x860302 post div = 0x4
fb_div = 0x74
ppll_div_3 = 0x20074
ron = 712, roff = 14840
vclk_freq = 6525, per = 530

The third patch attach a sysfb binary attribute to PCI device. EDID data will show up in /sys/bus/pci/drivers/radeonfb/0000:01:00.0/edid.

This is a kind of RFC, if patches look good I'll rediff against Ben's tree.

Luca

Signature · 11 lines
Reply-To: [email protected]
Home: http://kronoz.cjb.net
"It is more complicated than you think"
                -- The Eighth Networking Truth from RFC 1925


-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines
at the same time. Free trial click here:http://www.vmware.com/wl/offer/358/0
#1 lore raw
Quoted 4 lines · Kronos

i2c bus is registered in radeonfb_pci_register and unregistered in radeonfb_pci_unregister. I'm a bit concerned about XFree that uses the same bus...

If there was an interface to userspace, the X driver could use that?

BTW, regarding the EDID discussion, I'm not sure that a list of modes will cut it - e.g., the EDID of the panel in this TiBook only contains the native mode, but the chip can scale up pretty much any lower resolution.

Signature · 10 lines
Earthling Michel Dänzer   \  Debian (powerpc), XFree86 and DRI developer
Software libre enthusiast  \     http://svcs.affero.net/rm.php?r=daenzer



-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines
at the same time. Free trial click here:http://www.vmware.com/wl/offer/358/0
#5 lore raw
In reply to Kronos
Quoted 1 line · Kronos

[This is a resend, it seems that original mail got lost]

I did receive your original mails, though.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine. WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the same time. Free trial click here:http://www.vmware.com/wl/offer/358/0

author
#2 lore raw
In reply to Michel Dänzer

Il Sat, Aug 23, 2003 at 01:43:53AM +0200, Michel D?nzer ha scritto:

Quoted 7 lines · Kronos
Quoted 4 lines

i2c bus is registered in radeonfb_pci_register and unregistered in radeonfb_pci_unregister. I'm a bit concerned about XFree that uses the same bus...

If there was an interface to userspace, the X driver could use that?

EDID block will be exported to userspace via sysfs (see patch 3/3) and, yes, X can use that.

Luca

Signature · 12 lines
Reply-To: [email protected]
Home: http://kronoz.cjb.net
The trouble with computers is that they do what you tell them,
not what you want.
D. Cohen


-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines
at the same time. Free trial click here:http://www.vmware.com/wl/offer/358/0
#3 lore raw
In reply to Michel Dänzer
Quoted 6 lines · Michel Dänzer
Quoted 4 lines · Kronos

i2c bus is registered in radeonfb_pci_register and unregistered in radeonfb_pci_unregister. I'm a bit concerned about XFree that uses the same bus...

Quoted 7 lines

If there was an interface to userspace, the X driver could use that?

BTW, regarding the EDID discussion, I'm not sure that a list of modes will cut it - e.g., the EDID of the panel in this TiBook only contains the native mode, but the chip can scale up pretty much any lower resolution.

Which is a good thing, compared to my sony SDM-X52, which in digital mode only supports the native resolution, but the EDID erroneously reports the mode supported by the digital connection in both case.

The EDID should report only the supported (native) mode, and the chip, knowing what it can scale or not, should handle the other cases, no ?

Friendly,

Sven Luther

-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine. WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the same time. Free trial click here:http://www.vmware.com/wl/offer/358/0

#4 lore raw
Quoted 10 lines · Sven Luther
Quoted 5 lines · Michel Dänzer

BTW, regarding the EDID discussion, I'm not sure that a list of modes will cut it - e.g., the EDID of the panel in this TiBook only contains the native mode, but the chip can scale up pretty much any lower resolution.

Which is a good thing, compared to my sony SDM-X52, which in digital mode only supports the native resolution, but the EDID erroneously reports the mode supported by the digital connection in both case.

I'd think the driver was supposed to handle this.

Signature · 10 lines
Earthling Michel Dänzer   \  Debian (powerpc), XFree86 and DRI developer
Software libre enthusiast  \     http://svcs.affero.net/rm.php?r=daenzer



-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines
at the same time. Free trial click here:http://www.vmware.com/wl/offer/358/0