blob: ea3d68a9b31e077678d9301797417bc5c6e4de73 [file] [log] [blame]
From 1f84310ddf49778f776a39810aa98211c812e8ab Mon Sep 17 00:00:00 2001
From: Jeremy Huddleston <jeremyhu@apple.com>
Date: Wed, 19 Oct 2011 08:33:07 +0000
Subject: Build fix for ABI Version 12
ABI Version 12 removes support for multiple PCI domains. If you need to
use this driver on a system with more than one PCI domain, you should
either port this driver to using libpciaccess directly or stick with an
older server.
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
---
diff --git a/src/vesa.c b/src/vesa.c
index 1136ac3..5a0120c 100644
--- a/src/vesa.c
+++ b/src/vesa.c
@@ -1268,14 +1268,16 @@ VESAMapVidMem(ScrnInfoPtr pScrn)
& pVesa->base);
}
else
- pVesa->base = xf86MapDomainMemory(pScrn->scrnIndex, 0, pVesa->pciInfo,
- pScrn->memPhysBase, pVesa->mapSize);
+ (void) pci_device_map_legacy(pVesa->pciInfo, pScrn->memPhysBase,
+ pVesa->mapSize,
+ PCI_DEV_MAP_FLAG_WRITABLE,
+ & pVesa->base);
if (pVesa->base) {
if (pVesa->mapPhys != 0xa0000)
- pVesa->VGAbase = xf86MapDomainMemory(pScrn->scrnIndex, 0,
- pVesa->pciInfo,
- 0xa0000, 0x10000);
+ (void) pci_device_map_legacy(pVesa->pciInfo, 0xa0000, 0x10000,
+ PCI_DEV_MAP_FLAG_WRITABLE,
+ & pVesa->VGAbase);
else
pVesa->VGAbase = pVesa->base;
@@ -1325,10 +1327,12 @@ VESAUnmapVidMem(ScrnInfoPtr pScrn)
if (pVesa->mapPhys != 0xa0000) {
(void) pci_device_unmap_range(pVesa->pciInfo, pVesa->base,
pVesa->mapSize);
- xf86UnMapVidMem(pScrn->scrnIndex, pVesa->VGAbase, 0x10000);
+ (void) pci_device_unmap_legacy(pVesa->pciInfo, pVesa->VGAbase,
+ 0x10000);
}
else {
- xf86UnMapVidMem(pScrn->scrnIndex, pVesa->base, pVesa->mapSize);
+ (void) pci_device_unmap_legacy(pVesa->pciInfo, pVesa->base,
+ pVesa->mapSize);
}
#else
xf86UnMapVidMem(pScrn->scrnIndex, pVesa->base, pVesa->mapSize);
--
cgit v0.9.0.2-2-gbebe