2009-04-14 20:16:16

by Matt Turner

[permalink] [raw]
Subject: Radeon kernel-modesetting on Alpha. Problem reading PCI ROM

Hi,

I'm testing Jerome Glisse's drm-next-radeon branch which provides
Radeon Kernel-modesetting support on a Samsung UP1500 with a PCI
Radeon X1550.

See http://cgit.freedesktop.org/~glisse/drm-next/log/?h=drm-next-radeon

While doing so, I've hit a few snags, and placed DRM_INFOs and printks
throughout code in question. On Alpha, it hangs after calling
fb_notifier_call_chain in register_framebuffer.

Jerome and I think that the hang may be caused by being unable to read
the PCI ROM.

The radeon_read_bios function makes use of pci_map_rom, which calls
pci_get_rom_size. In pci_get_rom_size, readb(image) doesn't return
0x55. It falls back to read_disabled functions which appear to
succeed.

Why would the ROM not be able to be read by readb? Is this a general
problem, or Alpha-specific?

Attached are relevant dmesg logs and printk patches (against commit
7582b4332602dcf03bb0c79f17e0cf89eeec6623) to give context.

Thanks,

Matt Turner


Attachments:
radeon-kms.log (2.51 kB)
radeon-kms-debugging.patch (2.56 kB)
Download all attachments

2009-04-14 22:20:40

by Michael Cree

[permalink] [raw]
Subject: Re: Radeon kernel-modesetting on Alpha. Problem reading PCI ROM

Hi Matt

> Jerome and I think that the hang may be caused by being unable to read
> the PCI ROM.

I have been taking a little bit of a look at reading the PCI ROM on a
radeon video card to try to get the radeonhd xserver video driver
going on Alpha. On one of my Alphas the SRM can't post the card so
xserver/radeonhd have to do all the dirty work. I discovered that the
r[567]xx radeon cards need quite a bit of setting up to enable the PCI
ROM. In short, writing to the enable and rom files in the PCI card's
sysfs directory in the prescribed manner isn't sufficient to enable
the ROM.

I wrote a patch to the rhd_dump and rhd_conntest utils of the radeonhd
project, so that they would use libpciaccess to access the registers
and PCI ROM of the radeon r[567]xx cards. Unfortunately my patches
got mangled in posting to the radeonhd list, and I have been
travelling for the last couple of weeks, so they didn't make the
release of radeonhd last week.

The upshot is that I can read the PCI ROM of a Radeon HD2400 card with
my patches applied to rhd_conntest, and I have had Xserver 1.5.3 up
and running with the HD2400 card on a PWS600au.

I can send you the patches to rhd_dump and rhd_conntest if you would
like to try them out.

Cheers
Michael.