diff options
author | Dave Airlie <airlied@redhat.com> | 2008-05-20 13:59:09 +1000 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2008-05-22 08:58:42 +1000 |
commit | ea4ec9e9983e25d94a3edf8a77ed2ad1db193284 (patch) | |
tree | 772bd32d370a079740ef098abb6f8fb1a11be192 | |
parent | 4230b92744d54528f48ddc3b096a265b488053c9 (diff) |
int10: add pci_device_enable support on Linux
-rw-r--r-- | configure.ac | 1 | ||||
-rw-r--r-- | hw/xfree86/os-support/linux/int10/linux.c | 4 | ||||
-rw-r--r-- | include/xorg-config.h.in | 3 |
3 files changed, 8 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 8a1b73f20..9c969fefb 100644 --- a/configure.ac +++ b/configure.ac @@ -1329,6 +1329,7 @@ if test "x$XORG" = xyes -o "x$XGL" = xyes; then CFLAGS=$PCIACCESS_CFLAGS LIBS=$PCIACCESS_LIBS AC_CHECK_FUNCS([pci_system_init_dev_mem]) + AC_CHECK_FUNCS([pci_device_enable]) LIBS=$SAVE_LIBS CFLAGS=$SAVE_CFLAGS XORG_SYS_LIBS="$XORG_SYS_LIBS $PCIACCESS_LIBS $DLOPEN_LIBS $GLX_SYS_LIBS" diff --git a/hw/xfree86/os-support/linux/int10/linux.c b/hw/xfree86/os-support/linux/int10/linux.c index 574843473..9e2c6199c 100644 --- a/hw/xfree86/os-support/linux/int10/linux.c +++ b/hw/xfree86/os-support/linux/int10/linux.c @@ -278,6 +278,10 @@ xf86ExtendedInitInt10(int entityIndex, int Flags) struct pci_device *rom_device = xf86GetPciInfoForEntity(pInt->entityIndex); +#if HAVE_PCI_DEVICE_ENABLE + pci_device_enable(rom_device); +#endif + err = pci_device_read_rom(rom_device, (unsigned char *)(V_BIOS)); if (err) { xf86DrvMsg(screen,X_ERROR,"Cannot read V_BIOS (%s)\n", diff --git a/include/xorg-config.h.in b/include/xorg-config.h.in index 5587c0a8d..e05d3bfd3 100644 --- a/include/xorg-config.h.in +++ b/include/xorg-config.h.in @@ -118,6 +118,9 @@ /* Have pci_system_init_dev_mem() */ #undef HAVE_PCI_SYSTEM_INIT_DEV_MEM +/* Have pci_enable_device */ +#undef HAVE_PCI_DEVICE_ENABLE + /* Path to text files containing PCI IDs */ #undef PCI_TXT_IDS_PATH |