Finding the available hardware

Adam Jackson ajax at nwnk.net
Sat Apr 30 10:20:10 PDT 2005


On Saturday 30 April 2005 12:02, Jon Smirl wrote:
> On 4/30/05, Adam Jackson <ajax at nwnk.net> wrote:
> > Why not just move the responsibility for naming the DRI driver from the
> > DDX to the DRM?
>
> We have one radeon DRM driver and two DRI libraries. I would need to
> build tables into the DRM driver to tell it which library to load. I
> would like to avoid building that kind of data into the DRM device
> driver. For everything except radeon there is a 1:1 correspondence
> between the driver and the library.

Except you already have this information in the DRM, because there's already a 
table correlating PCI IDs with features.

if (device->family < CHIP_R200)
    return "radeon";
else if (device->family < CHIP_R300)
    return "r200";
else return "r300";

> Best solution is to merge the radeon and r200 drivers and restore the
> 1:1 correspondence. If that isn't possible then next best is to build
> the table into the DRM driver.

Merging them is possible but apparently hard, whereas if you do it in the DRM 
it's five lines of code and one new ioctl.

> Actually, I don't know where the table telling which PCI IDs are
> handled by radeon_dri.so vs r200_dri.so is located. I'm not sure there
> is one.

There is one, it's in the DDX.  Currently libGL uses the XF86DRI protocol to 
ask the server for the name of the driver.  This is what you want for the 
classic X case because you want to be sure to load the DRI that corresponds 
to the selected X screen.

But for the solo case we can just ask the DRM itself.

- ajax
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/dri-egl/attachments/20050430/05f11bea/attachment-0001.pgp


More information about the dri-egl mailing list