diff options
author | Jeremy Huddleston <jeremyhu@apple.com> | 2011-10-30 11:09:30 -0700 |
---|---|---|
committer | Jeremy Huddleston <jeremyhu@apple.com> | 2011-10-30 11:09:30 -0700 |
commit | 0ab07a477a4916923a13c073c3fd6e575e79f725 (patch) | |
tree | 748da99ed971cc8b0eeabcdb0a1dab3d33cfdf0f | |
parent | 77046f9be08295dbca69b51987df3308a284d87e (diff) |
Use pci_device_map_legacy rather than xf86MapDomainMemory on newer servers
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | src/sis_vga.c | 9 |
2 files changed, 8 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index f8d09af..036a448 100644 --- a/configure.ac +++ b/configure.ac @@ -114,7 +114,7 @@ AC_CHECK_DECL(XSERVER_LIBPCIACCESS, CPPFLAGS="$SAVE_CPPFLAGS" if test "x$XSERVER_LIBPCIACCESS" = xyes; then - PKG_CHECK_MODULES([PCIACCESS], [pciaccess >= 0.10]) + 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/sis_vga.c b/src/sis_vga.c index 5e6d0b4..4c887b8 100644 --- a/src/sis_vga.c +++ b/src/sis_vga.c @@ -1716,8 +1716,8 @@ SiSVGAMapMem(ScrnInfoPtr pScrn) #if XF86_VERSION_CURRENT >= XF86_VERSION_NUMERIC(4,3,0,0,0) #if XSERVER_LIBPCIACCESS - pSiS->VGAMemBase = xf86MapDomainMemory(pScrn->scrnIndex, VIDMEM_MMIO_32BIT, - pSiS->PciInfo, pSiS->VGAMapPhys, pSiS->VGAMapSize); + (void) pci_device_map_legacy(pSiS->PciInfo, pSiS->VGAMapPhys, pSiS->VGAMapSize, + PCI_DEV_MAP_FLAG_WRITABLE, &pSiS->VGAMemBase); #else pSiS->VGAMemBase = xf86MapDomainMemory(pScrn->scrnIndex, VIDMEM_MMIO_32BIT, pSiS->PciTag, pSiS->VGAMapPhys, pSiS->VGAMapSize); @@ -1737,7 +1737,12 @@ SiSVGAUnmapMem(ScrnInfoPtr pScrn) if(pSiS->VGAMemBase == NULL) return; +#if XSERVER_LIBPCIACCESS + (void) pci_device_unmap_legacy(pSiS->PciInfo, pSiS->VGAMemBase, pSiS->VGAMapSize); +#else xf86UnMapVidMem(pScrn->scrnIndex, pSiS->VGAMemBase, pSiS->VGAMapSize); +#endif + pSiS->VGAMemBase = NULL; } #endif |