dri.c | 13 ++++++------- dristruct.h | 1 + 2 files changed, 7 insertions(+), 7 deletions(-) Index: dri.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/GL/dri/dri.c,v retrieving revision 1.14 diff -u -d -r1.14 dri.c --- dri.c 15 Jul 2005 23:08:30 -0000 1.14 +++ dri.c 28 Aug 2005 21:09:31 -0000 @@ -79,7 +79,6 @@ static int DRIWindowPrivIndex = -1; static unsigned long DRIGeneration = 0; static unsigned int DRIDrawableValidationStamp = 0; -static int lockRefCount=0; /* Support cleanup for fullscreen mode, independent of the DRICreateDrawable @@ -565,7 +564,7 @@ /* Make sure signals get unblocked etc. */ drmUnlock(pDRIPriv->drmFD, pDRIPriv->myContext); - lockRefCount=0; + pDRIPriv->lockRefCount = 0; DRIDrvMsg(pScreen->myNum, X_INFO, "[drm] unmapping %d bytes of SAREA %p at %p\n", pDRIInfo->SAREASize, @@ -1910,9 +1909,9 @@ DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); if(!pDRIPriv) return; - if (!lockRefCount) + if (!pDRIPriv->lockRefCount) DRM_LOCK(pDRIPriv->drmFD, pDRIPriv->pSAREA, pDRIPriv->myContext, flags); - lockRefCount++; + pDRIPriv->lockRefCount++; } void @@ -1921,14 +1920,14 @@ DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); if(!pDRIPriv) return; - if (lockRefCount > 0) { - lockRefCount--; + if (pDRIPriv->lockRefCount > 0) { + pDRIPriv->lockRefCount--; } else { ErrorF("DRIUnlock called when not locked\n"); return; } - if (!lockRefCount) + if (!pDRIPriv->lockRefCount) DRM_UNLOCK(pDRIPriv->drmFD, pDRIPriv->pSAREA, pDRIPriv->myContext); } Index: dristruct.h =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/GL/dri/dristruct.h,v retrieving revision 1.5 diff -u -d -r1.5 dristruct.h --- dristruct.h 24 Aug 2005 11:18:33 -0000 1.5 +++ dristruct.h 28 Aug 2005 21:09:31 -0000 @@ -99,6 +99,7 @@ Bool grabbedDRILock; Bool drmSIGIOHandlerInstalled; Bool wrapped; + int lockRefCount; } DRIScreenPrivRec, *DRIScreenPrivPtr; #endif /* DRI_STRUCT_H */