diff options
author | Jouk <joukj@tarantella.(none)> | 2007-06-08 13:38:24 +0200 |
---|---|---|
committer | Jouk <joukj@tarantella.(none)> | 2007-06-08 13:38:24 +0200 |
commit | 55f8b7053065ce88296608071feed6f9540f6c0d (patch) | |
tree | 86ac301ed5805c895985040caf56f857de017233 /src/mesa/drivers/dri/r300/radeon_lock.h | |
parent | 518f9168862b2096278ae14a65c8c854c208e004 (diff) | |
parent | 7b559a91028d297b34df9ec939bd4d00fad6027c (diff) |
Merge branch 'master' of git+ssh://[email protected]/git/mesa/mesa
Diffstat (limited to 'src/mesa/drivers/dri/r300/radeon_lock.h')
-rw-r--r-- | src/mesa/drivers/dri/r300/radeon_lock.h | 56 |
1 files changed, 24 insertions, 32 deletions
diff --git a/src/mesa/drivers/dri/r300/radeon_lock.h b/src/mesa/drivers/dri/r300/radeon_lock.h index b11ddf0895e..c47adc9575b 100644 --- a/src/mesa/drivers/dri/r300/radeon_lock.h +++ b/src/mesa/drivers/dri/r300/radeon_lock.h @@ -1,10 +1,15 @@ -/* +/************************************************************************** + +Copyright 2000, 2001 ATI Technologies Inc., Ontario, Canada, and + VA Linux Systems Inc., Fremont, California. Copyright (C) The Weather Channel, Inc. 2002. All Rights Reserved. The Weather Channel (TM) funded Tungsten Graphics to develop the initial release of the Radeon 8500 driver under the XFree86 license. This notice must be preserved. +All Rights Reserved. + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including @@ -29,7 +34,9 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. /* * Authors: + * Gareth Hughes <[email protected]> * Keith Whitwell <[email protected]> + * Kevin E. Martin <[email protected]> */ #ifndef __RADEON_LOCK_H__ @@ -40,8 +47,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #endif #include "radeon_context.h" -extern void radeonGetLock(radeonContextPtr radeon, GLuint flags); -extern void radeonUpdatePageFlipping(radeonContextPtr radeon); +extern void radeonGetLock(radeonContextPtr rmesa, GLuint flags); +extern void radeonUpdatePageFlipping(radeonContextPtr rmesa); /* Turn DEBUG_LOCKING on to find locking conflicts. */ @@ -65,11 +72,11 @@ extern int prevLockLine; #define DEBUG_CHECK_LOCK() \ do { \ - if ( prevLockFile ) { \ - fprintf( stderr, \ + if (prevLockFile) { \ + fprintf(stderr, \ "LOCK SET!\n\tPrevious %s:%d\n\tCurrent: %s:%d\n", \ - prevLockFile, prevLockLine, __FILE__, __LINE__ ); \ - exit( 1 ); \ + prevLockFile, prevLockLine, __FILE__, __LINE__); \ + exit(1); \ } \ } while (0) @@ -89,38 +96,23 @@ extern int prevLockLine; /* Lock the hardware and validate our state. */ -#define LOCK_HARDWARE( radeon ) \ +#define LOCK_HARDWARE( rmesa ) \ do { \ char __ret = 0; \ DEBUG_CHECK_LOCK(); \ - DRM_CAS( (radeon)->dri.hwLock, (radeon)->dri.hwContext, \ - (DRM_LOCK_HELD | (radeon)->dri.hwContext), __ret ); \ - if ( __ret ) \ - radeonGetLock( (radeon), 0 ); \ + DRM_CAS((rmesa)->dri.hwLock, (rmesa)->dri.hwContext, \ + (DRM_LOCK_HELD | (rmesa)->dri.hwContext), __ret); \ + if (__ret) \ + radeonGetLock((rmesa), 0); \ DEBUG_LOCK(); \ } while (0) -#if R200_MERGED -#define UNLOCK_HARDWARE( radeon ) \ +#define UNLOCK_HARDWARE( rmesa ) \ do { \ - DRM_UNLOCK( (radeon)->dri.fd, \ - (radeon)->dri.hwLock, \ - (radeon)->dri.hwContext ); \ + DRM_UNLOCK((rmesa)->dri.fd, \ + (rmesa)->dri.hwLock, \ + (rmesa)->dri.hwContext); \ DEBUG_RESET(); \ - if (IS_R200_CLASS(radeon->radeonScreen)) { \ - r200ContextPtr __r200 = (r200ContextPtr)(radeon); \ - if (__r200->save_on_next_unlock) \ - r200SaveHwState( __r200 ); \ - __r200->save_on_next_unlock = GL_FALSE; \ - } \ } while (0) -#else -#define UNLOCK_HARDWARE( radeon ) \ - do { \ - DRM_UNLOCK( (radeon)->dri.fd, \ - (radeon)->dri.hwLock, \ - (radeon)->dri.hwContext ); \ - DEBUG_RESET(); \ - } while (0) -#endif + #endif /* __RADEON_LOCK_H__ */ |