[PATCH] Implement Symbol-Based Video Driver Autoloading
Stephane Marchesin
marchesin at icps.u-strasbg.fr
Thu Nov 15 17:53:07 PST 2007
On 11/16/07, David Nusinow <dnusinow at speakeasy.net> wrote:
>
> Hi Stephane,
>
> On Thu, Nov 15, 2007 at 06:23:23PM +0100, Stephane Marchesin wrote:
> > On 11/15/07, David Nusinow <[1]dnusinow at speakeasy.net> wrote:
> >
> > Hi all,
> > The attached patch uses the symbols in the pci-reworked drivers
> to
> > determine the correct video driver to load when none is specified
> by the
> > config file. Before committing it though, I'd like some advice
> about
> > certain aspects I'm not happy about:
> >
> > Hi,
> >
> > Actually, I don't think it's so much a good idea. It makes sense for
> the
> > drivers to move away from long, hard to maintain, pci id lists, and
> use
> > smarter card detection. So that won't work in this case. FWIW we're
> doing
> > that already.
>
> How do you envision doing this? I haven't seen any code in the server to
> allow this yet. I could see it working if the drivers provided hooks for
> the server to allow them to scan for themselves (perhaps the probe
> function
> would be sufficient) but the issue that I see is that most distros install
> every driver available by default. If the server has to allow each driver
> to scan for appropriate cards at startup, I'd imagine this would slow
> things up quite a bit. Do you have a very different solution in mind?
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 :
http://cgit.freedesktop.org/nouveau/xf86-video-nouveau/tree/src/nv_driver.c
Stephane
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.x.org/archives/xorg/attachments/20071116/70e0c6d7/attachment.html>
More information about the xorg
mailing list