The code for finding the BIOS forgets to provide both map / unmap
methods.
Signed-off-by: Connor Behan <[email protected]>
---
src/xgi_driver.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/xgi_driver.c b/src/xgi_driver.c
index 5380ab2..ad8fca6 100755
--- a/src/xgi_driver.c
+++ b/src/xgi_driver.c
@@ -6575,7 +6575,11 @@ XGI_GetSetBIOSScratch(ScrnInfoPtr pScrn, USHORT offset,
unsigned char value)
#if (defined(i386) || defined(__i386) || defined(__i386__) ||
defined(__AMD64__))
unsigned char *base;
+#ifdef XSERVER_LIBPCIACCESS
+ pci_device_map_legacy(XGIPTR(pScrn)->PciInfo, 0, 0x2000, 1, (void**)&base);
+#else
base = xf86MapVidMem(pScrn->scrnIndex, VIDMEM_MMIO, 0, 0x2000);
+#endif
if (!base) {
XGIErrorLog(pScrn, "(Could not map BIOS scratch area)\n");
return 0;
@@ -6587,8 +6591,12 @@ XGI_GetSetBIOSScratch(ScrnInfoPtr pScrn, USHORT offset,
unsigned char value)
if (value != 0xff)
*(base + offset) = value;
+#ifdef XSERVER_LIBPCIACCESS
+ pci_device_unmap_legacy(XGIPTR(pScrn)->PciInfo, (void*)base, 0x2000);
+#else
xf86UnMapVidMem(pScrn->scrnIndex, base, 0x2000);
#endif
+#endif
return ret;
}
--
2.4.5
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel