diff options
author | Dave Airlie <[email protected]> | 2009-03-19 14:46:52 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2009-03-19 14:46:52 +1000 |
commit | c0c06803fee4d5cd04da03f1984ae99e411e1588 (patch) | |
tree | f8c9e8b81fda98f9fe9704c5ba6c8743a5e3d98e /src/mesa | |
parent | aa85973f95b8ccce1964c9bbbfb1e411c4b31cbd (diff) |
radeon: fix up locking like the intel driver for pageflip/swaps
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_common.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_common.c b/src/mesa/drivers/dri/radeon/radeon_common.c index 1a5d0467d4c..5c34ca89fab 100644 --- a/src/mesa/drivers/dri/radeon/radeon_common.c +++ b/src/mesa/drivers/dri/radeon/radeon_common.c @@ -414,6 +414,8 @@ void radeonCopyBuffer( __DRIdrawablePrivate *dPriv, rmesa = (radeonContextPtr) dPriv->driContextPriv->driverPrivate; + LOCK_HARDWARE(rmesa); + rfb = dPriv->driverPrivate; if ( RADEON_DEBUG & DEBUG_IOCTL ) { @@ -486,8 +488,7 @@ static int radeonScheduleSwap(__DRIdrawablePrivate *dPriv, GLboolean *missed_tar UNLOCK_HARDWARE(rmesa); driWaitForVBlank(dPriv, missed_target); - LOCK_HARDWARE(rmesa); - + return 0; } @@ -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); @@ -520,7 +523,7 @@ static GLboolean radeonPageFlip( __DRIdrawablePrivate *dPriv ) ret = drmCommandNone( radeon->dri.fd, DRM_RADEON_FLIP ); - UNLOCK_HARDWARE( radeon ); + UNLOCK_HARDWARE(radeon); if ( ret ) { fprintf( stderr, "DRM_RADEON_FLIP: return = %d\n", ret ); @@ -602,8 +605,6 @@ void radeonCopySubBuffer(__DRIdrawablePrivate * dPriv, rect.x2 = rect.x1 + w; rect.y2 = rect.y1 + h; _mesa_notifySwapBuffers(ctx); /* flush pending rendering comands */ - LOCK_HARDWARE( (radeonContextPtr) - dPriv->driContextPriv->driverPrivate ); radeonCopyBuffer(dPriv, &rect); } } else { |