summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--linux/r128_drv.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/linux/r128_drv.h b/linux/r128_drv.h
index ba11f5b4..dfefb4e0 100644
--- a/linux/r128_drv.h
+++ b/linux/r128_drv.h
@@ -454,7 +454,8 @@ do { \
#define R128_VERBOSE 0
-#define RING_LOCALS int write; unsigned int tail_mask; volatile u32 *ring;
+#define RING_LOCALS \
+ int write; unsigned int tail_mask; volatile u32 *ring;
#define BEGIN_RING( n ) do { \
if ( R128_VERBOSE ) { \
@@ -475,6 +476,11 @@ do { \
DRM_INFO( "ADVANCE_RING() tail=0x%06x wr=0x%06x\n", \
write, dev_priv->ring.tail ); \
} \
+ if ( write < 32 ) { \
+ memcpy( dev_priv->ring.end, \
+ dev_priv->ring.start, \
+ write * sizeof(u32) ); \
+ } \
r128_flush_write_combine(); \
dev_priv->ring.tail = write; \
R128_WRITE( R128_PM4_BUFFER_DL_WPTR, write ); \