configure: change PCI function checking by a meaningful version of the library
People that don't want VGA arbiter active can go to the library and enable the stubs there. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Tested-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Jamey Sharp <jamey@minilop.net>
This commit is contained in:
parent
b3ca84430d
commit
a319e9e697
10
configure.ac
10
configure.ac
|
@ -1572,16 +1572,6 @@ if test "x$XORG" = xyes; then
|
||||||
dnl ===================================================================
|
dnl ===================================================================
|
||||||
|
|
||||||
PKG_CHECK_MODULES([PCIACCESS], $LIBPCIACCESS)
|
PKG_CHECK_MODULES([PCIACCESS], $LIBPCIACCESS)
|
||||||
SAVE_LIBS=$LIBS
|
|
||||||
SAVE_CFLAGS=$CFLAGS
|
|
||||||
CFLAGS=$PCIACCESS_CFLAGS
|
|
||||||
LIBS=$PCIACCESS_LIBS
|
|
||||||
AC_CHECK_FUNCS([pci_system_init_dev_mem])
|
|
||||||
AC_CHECK_FUNCS([pci_device_enable])
|
|
||||||
AC_CHECK_FUNCS([pci_device_is_boot_vga])
|
|
||||||
AC_CHECK_FUNCS([pci_device_vgaarb_init])
|
|
||||||
LIBS=$SAVE_LIBS
|
|
||||||
CFLAGS=$SAVE_CFLAGS
|
|
||||||
XORG_SYS_LIBS="$XORG_SYS_LIBS $PCIACCESS_LIBS $GLX_SYS_LIBS"
|
XORG_SYS_LIBS="$XORG_SYS_LIBS $PCIACCESS_LIBS $GLX_SYS_LIBS"
|
||||||
XORG_CFLAGS="$XORG_CFLAGS $PCIACCESS_CFLAGS"
|
XORG_CFLAGS="$XORG_CFLAGS $PCIACCESS_CFLAGS"
|
||||||
|
|
||||||
|
|
|
@ -31,8 +31,6 @@
|
||||||
#include "xorg-config.h"
|
#include "xorg-config.h"
|
||||||
|
|
||||||
#include "xf86VGAarbiter.h"
|
#include "xf86VGAarbiter.h"
|
||||||
|
|
||||||
#ifdef HAVE_PCI_DEVICE_VGAARB_INIT
|
|
||||||
#include "xf86VGAarbiterPriv.h"
|
#include "xf86VGAarbiterPriv.h"
|
||||||
#include "xf86Bus.h"
|
#include "xf86Bus.h"
|
||||||
#include "xf86Priv.h"
|
#include "xf86Priv.h"
|
||||||
|
@ -1112,16 +1110,3 @@ VGAarbiterCompositeRects(CARD8 op, PicturePtr pDst, xRenderColor *color, int nRe
|
||||||
VGAPut();
|
VGAPut();
|
||||||
PICTURE_EPILOGUE (CompositeRects, VGAarbiterCompositeRects);
|
PICTURE_EPILOGUE (CompositeRects, VGAarbiterCompositeRects);
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
/* dummy functions */
|
|
||||||
void xf86VGAarbiterInit(void) {}
|
|
||||||
void xf86VGAarbiterFini(void) {}
|
|
||||||
|
|
||||||
void xf86VGAarbiterLock(ScrnInfoPtr pScrn) {}
|
|
||||||
void xf86VGAarbiterUnlock(ScrnInfoPtr pScrn) {}
|
|
||||||
Bool xf86VGAarbiterAllowDRI(ScreenPtr pScreen) { return TRUE; }
|
|
||||||
void xf86VGAarbiterScrnInit(ScrnInfoPtr pScrn) {}
|
|
||||||
void xf86VGAarbiterDeviceDecodes(ScrnInfoPtr pScrn, int rsrc) {}
|
|
||||||
Bool xf86VGAarbiterWrapFunctions(void) { return FALSE; }
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -121,12 +121,10 @@ 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)) {
|
if (pci_device_is_boot_vga(info)) {
|
||||||
primaryBus.type = BUS_PCI;
|
primaryBus.type = BUS_PCI;
|
||||||
primaryBus.id.pci = info;
|
primaryBus.id.pci = info;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
info->user_data = 0;
|
info->user_data = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -202,10 +202,8 @@ xf86OSInitVidMem(VidMemInfoPtr pVidMem)
|
||||||
pVidMem->mapMem = mapVidMem;
|
pVidMem->mapMem = mapVidMem;
|
||||||
pVidMem->unmapMem = unmapVidMem;
|
pVidMem->unmapMem = unmapVidMem;
|
||||||
|
|
||||||
#if HAVE_PCI_SYSTEM_INIT_DEV_MEM
|
|
||||||
if (useDevMem)
|
if (useDevMem)
|
||||||
pci_system_init_dev_mem(devMemFd);
|
pci_system_init_dev_mem(devMemFd);
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAS_MTRR_SUPPORT
|
#ifdef HAS_MTRR_SUPPORT
|
||||||
if (useDevMem) {
|
if (useDevMem) {
|
||||||
|
|
|
@ -261,10 +261,7 @@ xf86ExtendedInitInt10(int entityIndex, int Flags)
|
||||||
struct pci_device *rom_device =
|
struct pci_device *rom_device =
|
||||||
xf86GetPciInfoForEntity(pInt->entityIndex);
|
xf86GetPciInfoForEntity(pInt->entityIndex);
|
||||||
|
|
||||||
#if HAVE_PCI_DEVICE_ENABLE
|
|
||||||
pci_device_enable(rom_device);
|
pci_device_enable(rom_device);
|
||||||
#endif
|
|
||||||
|
|
||||||
err = pci_device_read_rom(rom_device, (unsigned char *)(V_BIOS));
|
err = pci_device_read_rom(rom_device, (unsigned char *)(V_BIOS));
|
||||||
if (err) {
|
if (err) {
|
||||||
xf86DrvMsg(screen,X_ERROR,"Cannot read V_BIOS (%s)\n",
|
xf86DrvMsg(screen,X_ERROR,"Cannot read V_BIOS (%s)\n",
|
||||||
|
|
|
@ -118,18 +118,6 @@
|
||||||
/* Have execinfo.h */
|
/* Have execinfo.h */
|
||||||
#undef HAVE_EXECINFO_H
|
#undef HAVE_EXECINFO_H
|
||||||
|
|
||||||
/* 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 */
|
|
||||||
#undef HAVE_PCI_DEVICE_ENABLE
|
|
||||||
|
|
||||||
/* Define to 1 if you have the `pci_device_vgaarb_init' function. */
|
|
||||||
#undef HAVE_PCI_DEVICE_VGAARB_INIT
|
|
||||||
|
|
||||||
/* Path to text files containing PCI IDs */
|
/* Path to text files containing PCI IDs */
|
||||||
#undef PCI_TXT_IDS_PATH
|
#undef PCI_TXT_IDS_PATH
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue