[RFC 3/3] xfree86: Support driver loading via OutputClass
Thierry Reding
thierry.reding at gmail.com
Thu Feb 13 14:13:43 PST 2014
On Thu, Feb 13, 2014 at 01:36:17PM -0800, Aaron Plattner wrote:
> On 02/13/2014 05:22 AM, Thierry Reding wrote:
[...]
> >diff --git a/hw/xfree86/common/xf86platformBus.c b/hw/xfree86/common/xf86platformBus.c
[...]
> >+static Bool
> >+MatchToken(const char *value, struct xorg_list *patterns,
> >+ int (*compare)(const char *, const char *))
> >+{
[...]
> >+}
>
> It's a little unfortunate to have to copy this from xf86input.c, but I don't
> have a good suggestion for where would be a better place to move it.
I could move it somewhere into hw/xfree86/parser perhaps into a new file
xf86tokens.c or similar.
> >@@ -208,6 +284,8 @@ xf86PlatformMatchDriver(char *matches[], int nmatches)
> > if ((info != NULL) && (j < nmatches)) {
> > j += xf86VideoPtrToDriverList(info, &(matches[j]), nmatches - j);
> > }
> >+
> >+ j += xf86OutputClassDriverList(i, &matches[j], nmatches - j);
>
> This works, but it sorts the server built-in drivers ahead of the Output
> class ones. Do you think it would be reasonable to move this line earlier
> so drivers configured this way take precedence over the ones from
> xf86VideoPtrToDriverList?
I'm slightly reluctant to do that for fear of breaking things. Last time
I tried to implement this (though the solution was rather different from
this one) it broke in some subtle ways.
That said, these matches will only be added if configuration snippets do
exist. One could argue that configuration files should override built-in
defaults. So I guess it would be reasonable, yes.
Given the above, would you say that these should also take precedence
over the ones added by xf86MatchDriverFromFiles()? That would probably
require another patch because that function assumes that it fills the
beginning of the list.
Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20140213/f41932ad/attachment.pgp>
More information about the xorg-devel
mailing list