summaryrefslogtreecommitdiff
path: root/src/i830_ring.h
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2008-06-05 11:56:42 -0700
committerEric Anholt <eric@anholt.net>2008-06-05 11:56:42 -0700
commit7e51384c973a96366b02ea646392c43574674111 (patch)
tree7ab205b605e35fa88902162431f16266f82dceae /src/i830_ring.h
parent65306cdd71dad71e4ca7229764f81a0880dd70bf (diff)
Replace a couple of wait-for-ring-idles with a single function to do so.
Diffstat (limited to 'src/i830_ring.h')
-rw-r--r--src/i830_ring.h17
1 files changed, 1 insertions, 16 deletions
diff --git a/src/i830_ring.h b/src/i830_ring.h
index cf789eb6..c2078fb4 100644
--- a/src/i830_ring.h
+++ b/src/i830_ring.h
@@ -75,28 +75,13 @@ union intfloat {
pI830->ring_emitting = 0; \
} while (0)
-/*
- * XXX Note: the head/tail masks are different for 810 and i830.
- * If the i810 always sets the higher bits to 0, then this shouldn't be
- * a problem. Check this!
- */
-#define DO_RING_IDLE() do { \
- int _head; \
- int _tail; \
- do { \
- _head = INREG(LP_RING + RING_HEAD) & I830_HEAD_MASK; \
- _tail = INREG(LP_RING + RING_TAIL) & I830_TAIL_MASK; \
- DELAY(10); \
- } while (_head != _tail); \
-} while (0)
-
#define BEGIN_LP_RING(n) \
do { \
if (pI830->ring_emitting != 0) \
FatalError("%s: BEGIN_LP_RING called without closing " \
"ADVANCE_LP_RING\n", __FUNCTION__); \
if ((n) > 2 && (I810_DEBUG&DEBUG_ALWAYS_SYNC)) \
- DO_RING_IDLE(); \
+ i830_wait_ring_idle(pScrn); \
pI830->ring_emitting = (n) * 4; \
if ((n) & 1) \
pI830->ring_emitting += 4; \