summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-08-04 15:18:12 +0100
committerEric Anholt <eric@anholt.net>2010-08-09 11:24:31 -0700
commit1741dd4aa7552055659bf74ab829a21579407f10 (patch)
tree906fe978285f21f221036e60afa6cb552520bf27
parentae7d49d879fd196bded306e9465e0aa5a203e971 (diff)
downloadblackbird-op-linux-1741dd4aa7552055659bf74ab829a21579407f10.tar.gz
blackbird-op-linux-1741dd4aa7552055659bf74ab829a21579407f10.zip
drm/i915: Unroll wrapping of the ringbuffer.
The tail is quadword aligned, so we can add two MI_NOOP as a time. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Eric Anholt <eric@anholt.net>
-rw-r--r--drivers/gpu/drm/i915/intel_ringbuffer.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
index 26362f8495a8..df8302a11eb5 100644
--- a/drivers/gpu/drm/i915/intel_ringbuffer.c
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
@@ -682,9 +682,11 @@ int intel_wrap_ring_buffer(struct drm_device *dev,
}
virt = (unsigned int *)(ring->virtual_start + ring->tail);
- rem /= 4;
- while (rem--)
+ rem /= 8;
+ while (rem--) {
*virt++ = MI_NOOP;
+ *virt++ = MI_NOOP;
+ }
ring->tail = 0;
ring->space = ring->head - 8;
OpenPOWER on IntegriCloud