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,24 +450,27 @@ 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 {
chosen_driver = videoPtrToDriverName(info); if (info != NULL)
#if 0 /* Save for later */ chosen_driver = videoPtrToDriverName(info);
#if defined __i386__ || defined __amd64__ || defined __hurd__ if (chosen_driver == NULL) {
chosen_driver = "vesa"; #if defined __i386__ || defined __amd64__ || defined __hurd__
#elif defined __alpha__ chosen_driver = "vesa";
chosen_driver = "vga"; #elif defined __alpha__
#elif defined __sparc__ chosen_driver = "vga";
chosen_driver = "sunffb"; #elif defined __sparc__
#else chosen_driver = "sunffb";
chosen_driver = "fbdev"; #else
#endif chosen_driver = "fbdev";
#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);