drm/i915: Unroll wrapping of the ringbuffer.
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 4 Aug 2010 14:18:12 +0000 (15:18 +0100)
committerEric Anholt <eric@anholt.net>
Mon, 9 Aug 2010 18:24:31 +0000 (11:24 -0700)
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>
drivers/gpu/drm/i915/intel_ringbuffer.c

index 26362f8495a8791ed8d0d75657faa4b6c1af346e..df8302a11eb5b811bfc5fc7434a63f1ffa65f2ba 100644 (file)
@@ -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;