Trivial libpciaccess related fix
authorVinay <vinay@vinayb-dev4.(none)>
Sat, 19 Jan 2008 16:39:24 +0000 (08:39 -0800)
committerVinay <vinay@vinayb-dev4.(none)>
Sat, 19 Jan 2008 16:39:24 +0000 (08:39 -0800)
Fix VMWAREUnmapMem to correctly unmap memory for the libpciaccess case.

src/vmware.c

index c737f64..d71e48e 100644 (file)
@@ -1046,7 +1046,11 @@ VMWAREUnmapMem(ScrnInfoPtr pScrn)
 
     VmwareLog(("Unmapped: %p/%u\n", pVMWARE->FbBase, pVMWARE->videoRam));
 
+#if XSERVER_LIBPCIACCESS
+    pci_device_unmap_range(pVMWARE->PciInfo, pVMWARE->FbBase, pVMWARE->videoRam);
+#else
     xf86UnMapVidMem(pScrn->scrnIndex, pVMWARE->FbBase, pVMWARE->videoRam);
+#endif
     pVMWARE->FbBase = NULL;
     return TRUE;
 }