[PATCH] Implement Symbol-Based Video Driver Autoloading

David Nusinow dnusinow at speakeasy.net
Thu Nov 15 18:23:23 PST 2007

On Fri, Nov 16, 2007 at 02:53:07AM +0100, Stephane Marchesin wrote:
>    Xorg lets you examine the devices on startup. You just have to figure out
>    what's yours and what you can support (in our case, that requires figuring
>    out if the card is a vga device, and if so mapping a couple of regs
>    temporarily to figure out the card family).
>    The net gain from this approach is that we don't have to maintain a pciid
>    list any more, and we can also support future cards of the same generation
>    out of the box. Asking the card directly for its ID also saves the day in
>    the case of bridged cards, and avoids nasty hacks for those.
>      The issue I'm trying to address is that pretty much any distro  that
>      tries
>      to ship a xorg.conf spends a lot of effort figuring out which driver to
>      load. I'd like to move that logic all upstream, to the server, drivers,
>      hal, or whatever else. The pci-rework stuff, afaik, did have this model
>      in
>      mind, and it's essentially based off the linux kernel. I agree that the
>      pci
>      id's are a pain to manage, so something else might be better, and I'd be
>      happy to work on that, but I don't really understand what you have in
>      mind.
>    It can also be done without PCI-rework, but it's surely cleaner with it.
>    Look for the nvprobe function :
>    [3]http://cgit.freedesktop.org/nouveau/xf86-video-nouveau/tree/src/nv_driver.c

Ok, this method is the other one I had in mind. Basically the server would
load each driver, call its probe function, then unload it. Once it's
collected a list of drivers that say they have something they can
support, load them. Is this more or less what you're thinking?

This seems like it'd be fairly heavyweight to me. I don't want to slow down
server startup too much if I can help it. Do you think that having a dozen
drivers run this kind of probe won't slow down the startup?

 - David Nusinow

More information about the xorg mailing list