Finding the available hardware

Jon Smirl jonsmirl at gmail.com
Sat Apr 30 09:02:32 PDT 2005


On 4/30/05, Adam Jackson <ajax at nwnk.net> wrote:
> On Friday 29 April 2005 18:19, Jon Smirl wrote:
> > This works for everything except the radeon/r200 case. Are we anywhere
> > close to merging radeon support into the r200 driver so that a single
> > DLL supports radeon?
> 
> 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.

Another solution is to fix the kernel to build two drivers:
radeonfb/r200fb, radeon/r200. These drivers would be identical except
for the file that determines which PCI IDs they bind to. This solution
is unpopular with the kernel people.

This info could also be built into libEGL.so. When you request the
default display libEGL would walk the list of /dev/drm devices. Open
each one and get it's name and PCI ID of its card. libEGL would have
the table of which PCI IDs need radeon vs r200 and could load the
appropriate driver.

Another way would be to build the list of PCI IDs supported into the
xxx_dri.so. libEGL would load all of these and extract the PCI ID
lists. Then walk the /dev/drm devices and match things up. Now the
library names don't matter at all.

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.

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.

We don't see this problem currently since the driver is loaded by a
config file containing the appropriate driver name. The app that
generates the config file knows how to tell what driver to load based
on PCI IDs.

-- 
Jon Smirl
jonsmirl at gmail.com


More information about the dri-egl mailing list