summaryrefslogtreecommitdiff
path: root/src/radeon.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/radeon.h')
-rw-r--r--src/radeon.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/radeon.h b/src/radeon.h
index d13beeb..4c3cbcc 100644
--- a/src/radeon.h
+++ b/src/radeon.h
@@ -621,6 +621,7 @@ typedef struct {
int CPMode; /* CP mode that server/clients use */
int CPFifoSize; /* Size of the CP command FIFO */
int CPusecTimeout; /* CP timeout in usecs */
+ Bool needCacheFlush;
/* CP ring buffer data */
unsigned long ringStart; /* Offset into GART space */
@@ -986,6 +987,11 @@ do { \
#define RADEONCP_REFRESH(pScrn, info) \
do { \
if (!info->CPInUse) { \
+ if (info->needCacheFlush) { \
+ RADEON_PURGE_CACHE(); \
+ RADEON_PURGE_ZCACHE(); \
+ info->needCacheFlush = FALSE; \
+ } \
RADEON_WAIT_UNTIL_IDLE(); \
BEGIN_RING(6); \
OUT_RING_REG(RADEON_RE_TOP_LEFT, info->re_top_left); \
@@ -1132,6 +1138,12 @@ do { \
ADVANCE_RING(); \
} while (0)
+#define RADEON_PURGE_ZCACHE() \
+do { \
+ OUT_RING(CP_PACKET0(RADEON_RB3D_ZCACHE_CTLSTAT, 0)); \
+ OUT_RING(RADEON_RB3D_ZC_FLUSH_ALL); \
+} while (0)
+
#endif /* XF86DRI */
static __inline__ void RADEON_MARK_SYNC(RADEONInfoPtr info, ScrnInfoPtr pScrn)