> Martin Bochnig wrote:
> > The current X11-group's patch breks autoconfigure functionality, when no
> xorg.conf file is present. But it is of course ARC-verified ...
>
> ARC doesn't verify anything, it just reviews proposals to make
> sure they don't conflict with other projects and existing policies.
> Nothing says what I did in the autoconfig patch is right, just
> that the idea made sense and it seemed to work in testing with
> the two drivers we had to test with. There's also nothing saying
> there's no better way to do it, or that we won't change it in the
> future if someone does have a better way to do it.
>
> --
> -Alan Coopersmith- alan.coopersmith at sun.com
> Sun Microsystems, Inc. - X Window System Engineering
Alan, this may not be perfect, but what would you think of this:
$ diff driver-autoconfig.patch__ORIG driver-autoconfig.patch
53c53
< @@ -160,70 +165,123 @@ AppendToConfig(const char *s)
---
> @@ -160,70 +165,133 @@ AppendToConfig(const char *s)
170c170
< + char *vendorName = NULL, *driverName = NULL;
---
> + char *vendorName = NULL, *fbKernelDriverName = NULL, *ddxXorgName = NULL;
195c195
< + driverName = xnfstrdup(cp);
---
> + fbKernelDriverName = xnfstrdup(cp);
197,198c197,208
< + detectedDeviceList[ddi++] = vendorName;
< + detectedDeviceList[ddi++] = driverName;
---
> + if (strcmp(fbKernelDriverName, "afb") == 0) { ddxXorgName
> = "sunffb"; }
> + if (strcmp(fbKernelDriverName, "ffb") == 0) { ddxXorgName
> = "sunffb"; }
> + if (strcmp(fbKernelDriverName, "mko") == 0) { ddxXorgName
> = "mga"; }
> + /* if (strcmp(fbKernelDriverName, "gfb") == 0) { ddxXorgName
> = "sunffb"; } */
> + if (strcmp(fbKernelDriverName, "kfb") == 0) { ddxXorgName
> = "kfb"; }
> + if (strcmp(fbKernelDriverName, "gfxp") == 0) { ddxXorgName
> = "glint"; }
> + if (strcmp(fbKernelDriverName, "M64") == 0) { ddxXorgName
> = "ati"; }
> + if (strcmp(fbKernelDriverName, "pfb") == 0) { ddxXorgName
> = "radeon"; }
> + if (strcmp(fbKernelDriverName, "nfb") == 0) { ddxXorgName
> = "radeon"; }
> + if (strcmp(fbKernelDriverName, "cgsix") == 0) { ddxXorgName
> = "suncg6"; }
> + detectedDeviceList[ddi++] = vendorName;
> + detectedDeviceList[ddi++] = ddxXorgName;
266c276
< @@ -287,6 +336,11 @@ xf86AutoConfig(void)
---
> @@ -287,6 +336,12 @@ xf86AutoConfig(void)
271c281
< + xfree(driverName);
---
> + xfree(fbKernelDriverName);
272a283
> + xfree(ddxXorgName);
bash-3.2$ pwd
/export/home/bochnig/devel/projects/fox/fox-gate/mercurial/20080816sat/fox-gate/XW_NV/open-src/xserver/xorg
p.s. I didn't test them yet. I'm running xserver/xorg through a test compile
now.
The patch can be applied, now lets see if the C code is correct (but it
should). Then let's see how it works in practice.
- -
Best regards,
Martin Bochnig
Natamar OpenSolaris