video driver matching via xorg.conf.d
alan.coopersmith at oracle.com
Wed Jun 9 23:15:33 PDT 2010
Dan Nicholson wrote:
> On Wed, Jun 9, 2010 at 7:27 AM, Alan Coopersmith
> <alan.coopersmith at oracle.com> wrote:
>> Tiago Vignatti wrote:
>>> Vendor and board naming were never used to create the configure file a device.
>>> This patch remove their references.
>> I have been wanting for a while to move the autoconfiguration matching for
>> video cards from a hardcoded list in the code to xorg.conf.d-style files like
>> we use for input devices, and wonder if we'd want to use these in Match rules
>> like the input devices have - though obviously we can do MatchPCIVendor "0x8086"
>> just as well as MatchPCIVendor "Intel", and probably more reliably since pci.ids
>> names can change without warning.
> Of course, getting the strings from pci.ids during autoconfig puts you
> right back to a slow initialization. I think it would be easy enough
> to use the IDs. I did something similar for USB IDs and InputClass:
Yeah, that's probably much like what we'll want.
>> Of course, wanting to do it, and having a couple weeks free to actually do it
>> are two very different things.
> If you want some help on this, let me know. I'm pretty familiar with
> how the configuration/matching part works, but less familiar with the
> Device initialization code.
I don't think the device initialization code is involved. What I was thinking
of was replacing the code currently in xf86AutoConfig() in
common/xf86AutoConfig.c and videoPtrToDriverList() in xf86pciBus.c (and I guess
matchDriverFromFiles() in there, though I don't know much about it)
with a something like:
And nvidia's driver could install xorg.conf.d/80-nvidia.conf:
And nouveau could install xorg.conf.d/80-nouveau.conf:
and we'd never argue about or have to have distros patch the
hardcoded defaults table in the code again.
(I'm sure I've mangled the syntax above, since I've not yet learned
how the input device matching clauses work, but you should get the
-Alan Coopersmith- alan.coopersmith at oracle.com
Oracle Solaris Platform Engineering: X Window System
More information about the xorg-devel