summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac2
-rw-r--r--src/atividmem.c14
2 files changed, 13 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index e4ab861..087ef11 100644
--- a/configure.ac
+++ b/configure.ac
@@ -206,7 +206,7 @@ CPPFLAGS="$SAVE_CPPFLAGS"
AM_CONDITIONAL(USE_EXA, test "x$USE_EXA" = xyes)
if test "x$XSERVER_LIBPCIACCESS" = xyes; then
- PKG_CHECK_MODULES([PCIACCESS], [pciaccess >= 0.8.0])
+ PKG_CHECK_MODULES([PCIACCESS], [pciaccess >= 0.12.901])
XORG_CFLAGS="$XORG_CFLAGS $PCIACCESS_CFLAGS"
fi
AM_CONDITIONAL(XSERVER_LIBPCIACCESS, test "x$XSERVER_LIBPCIACCESS" = xyes)
diff --git a/src/atividmem.c b/src/atividmem.c
index 8950f84..0104a0a 100644
--- a/src/atividmem.c
+++ b/src/atividmem.c
@@ -84,7 +84,11 @@ ATIUnmapVGA
if (!pATI->pBank)
return;
+#ifndef XSERVER_LIBPCIACCESS
xf86UnMapVidMem(iScreen, pATI->pBank, 0x00010000U);
+#else
+ (void) pci_device_unmap_legacy(pATI->PCIInfo, pATI->pBank, 0x00010000U);
+#endif
pATI->pBank = NULL;
}
@@ -219,8 +223,14 @@ ATIMapApertures
* No relocation, resizing, caching or write-combining of this
* aperture is supported. Hence, the hard-coded values here...
*/
- pATI->pBank = xf86MapDomainMemory(iScreen, VIDMEM_MMIO_32BIT,
- Tag, 0x000A0000U, 0x00010000U);
+#ifndef XSERVER_LIBPCIACCESS
+ pATI->pBank = xf86MapDomainMemory(iScreen, VIDMEM_MMIO_32BIT,
+ Tag, 0x000A0000U, 0x00010000U);
+#else
+ (void) pci_device_map_legacy(Tag, 0x000A0000U, 0x00010000U,
+ PCI_DEV_MAP_FLAG_WRITABLE,
+ &pATI->pBank);
+#endif
if (!pATI->pBank)
return FALSE;