pci: add support for pci is boot vga call.
This allows us to ask the kernel for the boot VGA device instead of nasty guessing.
This commit is contained in:
parent
b3751454cb
commit
0a168401c4
|
@ -1387,6 +1387,7 @@ if test "x$XORG" = xyes; then
|
||||||
LIBS=$PCIACCESS_LIBS
|
LIBS=$PCIACCESS_LIBS
|
||||||
AC_CHECK_FUNCS([pci_system_init_dev_mem])
|
AC_CHECK_FUNCS([pci_system_init_dev_mem])
|
||||||
AC_CHECK_FUNCS([pci_device_enable])
|
AC_CHECK_FUNCS([pci_device_enable])
|
||||||
|
AC_CHECK_FUNCS([pci_device_is_boot_vga])
|
||||||
LIBS=$SAVE_LIBS
|
LIBS=$SAVE_LIBS
|
||||||
CFLAGS=$SAVE_CFLAGS
|
CFLAGS=$SAVE_CFLAGS
|
||||||
XORG_SYS_LIBS="$XORG_SYS_LIBS $PCIACCESS_LIBS $DLOPEN_LIBS $GLX_SYS_LIBS"
|
XORG_SYS_LIBS="$XORG_SYS_LIBS $PCIACCESS_LIBS $DLOPEN_LIBS $GLX_SYS_LIBS"
|
||||||
|
|
|
@ -371,6 +371,12 @@ xf86PciProbe(void)
|
||||||
xf86PciVideoInfo[num - 1] = info;
|
xf86PciVideoInfo[num - 1] = info;
|
||||||
|
|
||||||
pci_device_probe(info);
|
pci_device_probe(info);
|
||||||
|
#ifdef HAVE_PCI_DEVICE_IS_BOOT_VGA
|
||||||
|
if (pci_device_is_boot_vga(info)) {
|
||||||
|
primaryBus.type = BUS_PCI;
|
||||||
|
primaryBus.id.pci = info;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
info->user_data = 0;
|
info->user_data = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -118,6 +118,9 @@
|
||||||
/* Have pci_system_init_dev_mem() */
|
/* Have pci_system_init_dev_mem() */
|
||||||
#undef HAVE_PCI_SYSTEM_INIT_DEV_MEM
|
#undef HAVE_PCI_SYSTEM_INIT_DEV_MEM
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `pci_device_is_boot_vga' function. */
|
||||||
|
#undef HAVE_PCI_DEVICE_IS_BOOT_VGA
|
||||||
|
|
||||||
/* Have pci_enable_device */
|
/* Have pci_enable_device */
|
||||||
#undef HAVE_PCI_DEVICE_ENABLE
|
#undef HAVE_PCI_DEVICE_ENABLE
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue