summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJeremy Huddleston <jeremyhu@apple.com>2011-10-29 18:53:48 -0700
committerJeremy Huddleston <jeremyhu@apple.com>2011-10-29 18:59:02 -0700
commit0de234329fa1c3365954498819da93d64a978911 (patch)
tree2be1fdb0a30fe4b1d7ea171917ca6c0cd11de421 /src
parent75166a0fc92220b496eb67451ec1b11cb8b72091 (diff)
Use pci_device_map_legacy rather than xf86MapDomainMemory
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Diffstat (limited to 'src')
-rw-r--r--src/atividmem.c14
1 files changed, 12 insertions, 2 deletions
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;