diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-08-04 10:18:12 -0400 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2010-08-09 14:24:31 -0400 |
commit | 1741dd4aa7552055659bf74ab829a21579407f10 (patch) | |
tree | 906fe978285f21f221036e60afa6cb552520bf27 | |
parent | ae7d49d879fd196bded306e9465e0aa5a203e971 (diff) |
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.c | 6 |
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, | |||
682 | } | 682 | } |
683 | 683 | ||
684 | virt = (unsigned int *)(ring->virtual_start + ring->tail); | 684 | virt = (unsigned int *)(ring->virtual_start + ring->tail); |
685 | rem /= 4; | 685 | rem /= 8; |
686 | while (rem--) | 686 | while (rem--) { |
687 | *virt++ = MI_NOOP; | 687 | *virt++ = MI_NOOP; |
688 | *virt++ = MI_NOOP; | ||
689 | } | ||
688 | 690 | ||
689 | ring->tail = 0; | 691 | ring->tail = 0; |
690 | ring->space = ring->head - 8; | 692 | ring->space = ring->head - 8; |