From 0de234329fa1c3365954498819da93d64a978911 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Sat, 29 Oct 2011 18:53:48 -0700 Subject: Use pci_device_map_legacy rather than xf86MapDomainMemory Signed-off-by: Jeremy Huddleston --- src/atividmem.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'src/atividmem.c') 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; -- cgit v1.2.3