From 258f15ade2f97b7b81a3a12eb9c7ddec21f37459 Mon Sep 17 00:00:00 2001 From: John Fredriksson Date: Wed, 18 May 2011 14:16:58 +0000 Subject: Correct drm device handling Correct a problem with the open / close handling of the drm device. --- src/mali_fbdev.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/mali_fbdev.c b/src/mali_fbdev.c index be717e7..9abf2e2 100644 --- a/src/mali_fbdev.c +++ b/src/mali_fbdev.c @@ -946,14 +946,6 @@ static Bool MaliPreInit(ScrnInfoPtr pScrn, int flags) memcpy(fPtr->Options, MaliOptions, sizeof(MaliOptions)); xf86ProcessOptions(pScrn->scrnIndex, fPtr->pEnt->device->options, fPtr->Options); - mali_check_dri_options( pScrn ); - - if ( fPtr->dri_render == DRI_NONE && FALSE == mali_drm_open_master( pScrn ) ) - { - xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Failed to be master of DRM!\n"); - return FALSE; - } - mali_check_dri_options( pScrn ); mali_check_exa_options( pScrn ); mali_check_misc_options( pScrn ); @@ -1028,6 +1020,12 @@ static Bool MaliScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **ar pScrn->offset.red,pScrn->offset.green,pScrn->offset.blue); #endif + if ( fPtr->dri_render == DRI_NONE && FALSE == mali_drm_open_master( pScrn ) ) + { + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Failed to be master of DRM!\n"); + return FALSE; + } + if ( fPtr->dri_render == DRI_NONE ) { if ( TRUE == MaliDRI2ScreenInit( pScreen ) ) -- cgit v1.2.3