diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-08-04 15:18:12 +0100 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2010-08-09 11:24:31 -0700 |
commit | 1741dd4aa7552055659bf74ab829a21579407f10 (patch) | |
tree | 906fe978285f21f221036e60afa6cb552520bf27 /drivers/gpu/drm/i915/intel_ringbuffer.c | |
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>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_ringbuffer.c')
-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 26362f8495a..df8302a11eb 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; |