From 9a4033a02ac74e384596190adfcc0e938c19865b Mon Sep 17 00:00:00 2001 From: Gareth Hughes Date: Wed, 28 Feb 2001 14:11:05 +0000 Subject: Make the hardware bug workaround configurable. That way, people with newer revs of the chipset can avoid the copy when it's not needed. --- linux/r128_drv.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'linux') diff --git a/linux/r128_drv.h b/linux/r128_drv.h index dfefb4e0..9f53746f 100644 --- a/linux/r128_drv.h +++ b/linux/r128_drv.h @@ -471,12 +471,19 @@ do { \ tail_mask = dev_priv->ring.tail_mask; \ } while (0) +/* You can set this to zero if you want. If the card locks up, you'll + * need to keep this set. It works around a bug in early revs of the + * Rage 128 chipset, where the CCE would read 32 dwords past the end of + * the ring buffer before wrapping around. + */ +#define R128_BROKEN_CCE 1 + #define ADVANCE_RING() do { \ if ( R128_VERBOSE ) { \ DRM_INFO( "ADVANCE_RING() tail=0x%06x wr=0x%06x\n", \ write, dev_priv->ring.tail ); \ } \ - if ( write < 32 ) { \ + if ( R128_BROKEN_CCE && write < 32 ) { \ memcpy( dev_priv->ring.end, \ dev_priv->ring.start, \ write * sizeof(u32) ); \ -- cgit v1.2.3