radeon: Take the hardware lock for swaps and flips.
authorMichel Dänzer <daenzer@vmware.com>
Mon, 16 Mar 2009 10:33:14 +0000 (11:33 +0100)
committerMichel Dänzer <daenzer@vmware.com>
Mon, 16 Mar 2009 10:33:14 +0000 (11:33 +0100)
Otherwise they fail with AIGLX at least.

src/mesa/drivers/dri/radeon/radeon_common.c

index 99270c947f31634d8317241fa18c6082dbd6b9d1..5ee8627bba795c1c6bfa08120f5367c10744f4e8 100644 (file)
@@ -420,6 +420,7 @@ void radeonCopyBuffer( __DRIdrawablePrivate *dPriv,
                fprintf( stderr, "\n%s( %p )\n\n", __FUNCTION__, (void *) rmesa->glCtx );
        }
 
+       LOCK_HARDWARE( rmesa );
        nbox = dPriv->numClipRects; /* must be in locked region */
 
        for ( i = 0 ; i < nbox ; ) {
@@ -509,6 +510,8 @@ static GLboolean radeonPageFlip( __DRIdrawablePrivate *dPriv )
 
        psp = dPriv->driScreenPriv;
 
+       LOCK_HARDWARE( radeon );
+
        if ( RADEON_DEBUG & DEBUG_IOCTL ) {
                fprintf(stderr, "%s: pfCurrentPage: %d %d\n", __FUNCTION__,
                        radeon->sarea->pfCurrentPage, radeon->sarea->pfState);