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.
This commit is contained in:
Eric Anholt 2007-10-19 15:16:19 -07:00
parent 89c6108531
commit 7e1cada6c6

View File

@ -329,6 +329,7 @@ autoConfigDevice(GDevPtr preconf_device)
return ptr; return ptr;
} }
#ifdef __linux__
static void static void
matchDriverFromFiles (char** matches, uint16_t match_vendor, uint16_t match_chip) 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); xfree(line);
closedir(idsdir); closedir(idsdir);
} }
#endif /* __linux__ */
char* char*
chooseVideoDriver(void) chooseVideoDriver(void)
@ -448,14 +450,17 @@ chooseVideoDriver(void)
ErrorF("Primary device is not PCI\n"); ErrorF("Primary device is not PCI\n");
} }
#ifdef __linux__
matchDriverFromFiles(matches, info->vendor_id, info->device_id); matchDriverFromFiles(matches, info->vendor_id, info->device_id);
#endif /* __linux__ */
/* TODO Handle multiple drivers claiming to support the same PCI ID */ /* TODO Handle multiple drivers claiming to support the same PCI ID */
if (matches[0]) { if (matches[0]) {
chosen_driver = matches[0]; chosen_driver = matches[0];
} else { } else {
if (info != NULL)
chosen_driver = videoPtrToDriverName(info); chosen_driver = videoPtrToDriverName(info);
#if 0 /* Save for later */ if (chosen_driver == NULL) {
#if defined __i386__ || defined __amd64__ || defined __hurd__ #if defined __i386__ || defined __amd64__ || defined __hurd__
chosen_driver = "vesa"; chosen_driver = "vesa";
#elif defined __alpha__ #elif defined __alpha__
@ -465,7 +470,7 @@ chooseVideoDriver(void)
#else #else
chosen_driver = "fbdev"; chosen_driver = "fbdev";
#endif #endif
#endif }
} }
xf86Msg(X_DEFAULT, "Matched %s for the autoconfigured driver\n", chosen_driver); xf86Msg(X_DEFAULT, "Matched %s for the autoconfigured driver\n", chosen_driver);