From dfc650bd80da28b430b65cd26a1bf418074e2086 Mon Sep 17 00:00:00 2001
From: Ian Romanick <idr@us.ibm.com>
Date: Thu, 9 Jun 2005 21:18:56 +0000
Subject: Completely re-initialize DMA settings There were two problems. First,
 the 'warp' and 'primary' pointers weren't     cleared, so mga_do_cleanup_dma,
 which gets called multiple times, would     try to ioremapfree them multiple
 times. This resulted in the new error     messages to syslog. The second
 problem was the, since the dev_private     structure isn't reallocated and
 cleaned out in mga_do_init_dma, when     the server is reloaded idle-waits
 would wait for impossible values. I have given this patch some more riggorous
 testing. This includes: - Load module, start server, run GL app, stop server,
 unload module. - Load module, start server, run GL app, stop server, unload
 module, reload     module, restart server, run GL app. - Load module, start
 server, run GL app, stop server, restart server, run     GL app, stop server,
 unload module. In all three cases, everything worked as expected. Please let
 me know if     there are any further regressions with this patch. Xorg bug:
 3408 Reported by: Chris Rankin

---
 linux-core/mga_drv.c | 1 +
 1 file changed, 1 insertion(+)

(limited to 'linux-core')

diff --git a/linux-core/mga_drv.c b/linux-core/mga_drv.c
index c8bb042d..43877597 100644
--- a/linux-core/mga_drv.c
+++ b/linux-core/mga_drv.c
@@ -83,6 +83,7 @@ static struct drm_driver driver = {
 	    DRIVER_IRQ_VBL,
 	.preinit = mga_driver_preinit,
 	.postcleanup = mga_driver_postcleanup,
+	.pretakedown = mga_driver_pretakedown,
 	.dma_quiescent = mga_driver_dma_quiescent,
 	.device_is_agp = mga_driver_device_is_agp,
 	.vblank_wait = mga_driver_vblank_wait,
-- 
cgit v1.2.3