This is relevant on SLI setups, where each chip has their own MMIO
range.

Signed-off-by: Guillem Jover <[email protected]>
---
 src/tdfx_driver.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/tdfx_driver.c b/src/tdfx_driver.c
index 130c066..bcd674f 100644
--- a/src/tdfx_driver.c
+++ b/src/tdfx_driver.c
@@ -1310,9 +1310,12 @@ TDFXUnmapMem(ScrnInfoPtr pScrn)
     pci_device_unmap_range(pTDFX->PciInfo[0],
                            pTDFX->FbBase,
                            pTDFX->FbMapSize);
-    pci_device_unmap_range(pTDFX->PciInfo[0],
-                           pTDFX->MMIOBase[0],
-                           TDFXIOMAPSIZE);
+
+    for (i = 0; i < pTDFX->numChips; i++) {
+        pci_device_unmap_range(pTDFX->PciInfo[i],
+                               pTDFX->MMIOBase[i],
+                               TDFXIOMAPSIZE);
+    }
 
     (void) memset(pTDFX->MMIOBase, 0, sizeof(pTDFX->MMIOBase));
     pTDFX->FbBase = NULL;
-- 
1.8.4

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to