xserver: Branch 'master'
Eric Anholt
anholt at kemper.freedesktop.org
Fri Oct 19 15:16:27 PDT 2007
hw/xfree86/common/xf86AutoConfig.c | 29 +++++++++++++++++------------
1 file changed, 17 insertions(+), 12 deletions(-)
New commits:
commit 7e1cada6c6b9fa41ef3ead00bf7725d626dda193
Author: Eric Anholt <eric at anholt.net>
Date: Fri Oct 19 15:16:19 2007 -0700
Disable debian pci-id-list autoconfig code on non-linux.
It contains static paths, fails to build on non-glibc, and apparently just
exists to support distributions managing binary drivers and open-source drivers
together. Also restores previous code for fallback to vesa if nothing is
detected.
diff --git a/hw/xfree86/common/xf86AutoConfig.c b/hw/xfree86/common/xf86AutoConfig.c
index a6bfc01..8117ace 100644
--- a/hw/xfree86/common/xf86AutoConfig.c
+++ b/hw/xfree86/common/xf86AutoConfig.c
@@ -329,6 +329,7 @@ autoConfigDevice(GDevPtr preconf_device)
return ptr;
}
+#ifdef __linux__
static void
matchDriverFromFiles (char** matches, uint16_t match_vendor, uint16_t match_chip)
{
@@ -421,6 +422,7 @@ matchDriverFromFiles (char** matches, uint16_t match_vendor, uint16_t match_chip
xfree(line);
closedir(idsdir);
}
+#endif /* __linux__ */
char*
chooseVideoDriver(void)
@@ -448,24 +450,27 @@ chooseVideoDriver(void)
ErrorF("Primary device is not PCI\n");
}
+#ifdef __linux__
matchDriverFromFiles(matches, info->vendor_id, info->device_id);
+#endif /* __linux__ */
/* TODO Handle multiple drivers claiming to support the same PCI ID */
if (matches[0]) {
chosen_driver = matches[0];
} else {
- chosen_driver = videoPtrToDriverName(info);
- #if 0 /* Save for later */
- #if defined __i386__ || defined __amd64__ || defined __hurd__
- chosen_driver = "vesa";
- #elif defined __alpha__
- chosen_driver = "vga";
- #elif defined __sparc__
- chosen_driver = "sunffb";
- #else
- chosen_driver = "fbdev";
- #endif
- #endif
+ if (info != NULL)
+ chosen_driver = videoPtrToDriverName(info);
+ if (chosen_driver == NULL) {
+#if defined __i386__ || defined __amd64__ || defined __hurd__
+ chosen_driver = "vesa";
+#elif defined __alpha__
+ chosen_driver = "vga";
+#elif defined __sparc__
+ chosen_driver = "sunffb";
+#else
+ chosen_driver = "fbdev";
+#endif
+ }
}
xf86Msg(X_DEFAULT, "Matched %s for the autoconfigured driver\n", chosen_driver);
More information about the xorg-commit
mailing list