From ba36833fb4003407d2e895aa58536f0841a9a464 Mon Sep 17 00:00:00 2001 From: Russell King Date: Thu, 20 Mar 2014 17:13:46 +0000 Subject: Ensure DRI2 is closed down at the right point DRI2 is initialised before we hook the accelerator functions into the screen, so closing down DRI2 should happen after these functions have been unhooked from the screen for proper symmetry. Signed-off-by: Russell King --- src/vivante.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/vivante.c b/src/vivante.c index 04901a8..8127d3b 100644 --- a/src/vivante.c +++ b/src/vivante.c @@ -379,10 +379,6 @@ static Bool vivante_CloseScreen(CLOSE_SCREEN_ARGS_DECL) PictureScreenPtr ps = GetPictureScreenIfSet(pScreen); #endif -#ifdef HAVE_DRI2 - vivante_dri2_CloseScreen(CLOSE_SCREEN_ARGS); -#endif - #ifdef RENDER /* Restore the Pointers */ ps->Composite = vivante->Composite; @@ -405,6 +401,10 @@ static Bool vivante_CloseScreen(CLOSE_SCREEN_ARGS_DECL) pScreen->BitmapToRegion = vivante->BitmapToRegion; pScreen->BlockHandler = vivante->BlockHandler; +#ifdef HAVE_DRI2 + vivante_dri2_CloseScreen(CLOSE_SCREEN_ARGS); +#endif + vivante_unmap_from_gpu(vivante, vivante->batch_info, vivante->batch_handle); -- cgit