diff options
author | Michel Dänzer <michel@tungstengraphics.com> | 2007-03-20 09:13:24 +0100 |
---|---|---|
committer | Michel Dänzer <michel@tungstengraphics.com> | 2007-03-20 09:13:24 +0100 |
commit | 3cfa3a5c8daf03aaad6fc30d275709f6eb717d29 (patch) | |
tree | 54100f109258942afaad81d1e4cfcf7642a80202 /src/radeon.h | |
parent | e174d8df8c801fad95e5f79cff69187c200bee6e (diff) |
radeon: Unify code to release the CP.
Diffstat (limited to 'src/radeon.h')
-rw-r--r-- | src/radeon.h | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/radeon.h b/src/radeon.h index 5bb005b9..8d0115e9 100644 --- a/src/radeon.h +++ b/src/radeon.h @@ -964,6 +964,16 @@ do { \ info->CPStarted = TRUE; \ } while (0) +#define RADEONCP_RELEASE(pScrn, info) \ +do { \ + if (info->CPInUse) { \ + RADEON_PURGE_CACHE(); \ + RADEON_WAIT_UNTIL_IDLE(); \ + RADEONCPReleaseIndirect(pScrn); \ + info->CPInUse = FALSE; \ + } \ +} while (0) + #define RADEONCP_STOP(pScrn, info) \ do { \ int _ret; \ @@ -1128,14 +1138,6 @@ do { \ ADVANCE_RING(); \ } while (0) -#define RADEON_FLUSH_CACHE() \ -do { \ - BEGIN_RING(2); \ - OUT_RING(CP_PACKET0(RADEON_RB3D_DSTCACHE_CTLSTAT, 0)); \ - OUT_RING(RADEON_RB3D_DC_FLUSH); \ - ADVANCE_RING(); \ -} while (0) - #define RADEON_PURGE_CACHE() \ do { \ BEGIN_RING(2); \ |