[Intel-gfx] [PATCH] Call down to lower CloseScreen before shutting down DRM allocator

Keith Packard keithp at keithp.com
Fri May 1 21:27:34 CEST 2009


Lower level functions will destroy objects that are managed by the DRM
allocator, so make sure those are done before the allocator shuts down.

Signed-off-by: Keith Packard <keithp at keithp.com>
---
 src/i830_driver.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/i830_driver.c b/src/i830_driver.c
index 1ff5866..1887a51 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -3085,6 +3085,9 @@ I830CloseScreen(int scrnIndex, ScreenPtr pScreen)
    free(pI830->offscreenImages);
    pI830->offscreenImages = NULL;
 
+   pScreen->CloseScreen = pI830->CloseScreen;
+   (*pScreen->CloseScreen) (scrnIndex, pScreen);
+
    dri_bufmgr_destroy(pI830->bufmgr);
    pI830->bufmgr = NULL;
 
@@ -3098,8 +3101,7 @@ I830CloseScreen(int scrnIndex, ScreenPtr pScreen)
    pScrn->PointerMoved = pI830->PointerMoved;
    pScrn->vtSema = FALSE;
    pI830->closing = FALSE;
-   pScreen->CloseScreen = pI830->CloseScreen;
-   return (*pScreen->CloseScreen) (scrnIndex, pScreen);
+   return TRUE;
 }
 
 static ModeStatus
-- 
1.6.2.4




More information about the Intel-gfx mailing list