diff options
author | Jeremy Huddleston <jeremyhu@apple.com> | 2011-10-29 18:53:48 -0700 |
---|---|---|
committer | Jeremy Huddleston <jeremyhu@apple.com> | 2011-10-29 18:59:02 -0700 |
commit | 0de234329fa1c3365954498819da93d64a978911 (patch) | |
tree | 2be1fdb0a30fe4b1d7ea171917ca6c0cd11de421 | |
parent | 75166a0fc92220b496eb67451ec1b11cb8b72091 (diff) |
Use pci_device_map_legacy rather than xf86MapDomainMemory
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | src/atividmem.c | 14 |
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; |