Unichrome DRI:
authorThomas Hellström <thomas@tungstengraphics.com>
Wed, 15 Dec 2004 21:17:51 +0000 (21:17 +0000)
committerThomas Hellström <thomas@tungstengraphics.com>
Wed, 15 Dec 2004 21:17:51 +0000 (21:17 +0000)
Fixed an apparent race condition during locking and drawable info updating,
the result of which was the DRI client leaving traces on the screen rendering
where the drawable previously had been.
If the driver hangs X for a second or so and then restarts, this is probably
the place to look. (Thomas Hellström)

src/mesa/drivers/dri/unichrome/via_context.c

index 562538abbf9f32ee13e7403bfa06d12d1510550e..62f4a5fc3a4a31420a8aa25f90947bcdac9e1709 100644 (file)
@@ -986,15 +986,7 @@ void viaGetLock(viaContextPtr vmesa, GLuint flags)
 #endif
     drmGetLock(vmesa->driFd, vmesa->hHWContext, flags);
 
-    do {
-           DRM_UNLOCK(psp->fd, &psp->pSAREA->lock,
-                  pdp->driContextPriv->hHWContext);
-           DRM_SPINLOCK(&psp->pSAREA->drawable_lock, psp->drawLockID);
-            __driUtilUpdateDrawableInfo(dPriv);
-           DRM_SPINUNLOCK(&psp->pSAREA->drawable_lock, psp->drawLockID);
-           DRM_LIGHT_LOCK(psp->fd, &psp->pSAREA->lock,
-                      pdp->driContextPriv->hHWContext);
-    } while (0);
+    DRI_VALIDATE_DRAWABLE_INFO( sPriv, dPriv );
 
     if (sarea->ctxOwner != me) {
         vmesa->uploadCliprects = GL_TRUE;