Commit 1741dd4a authored by Chris Wilson's avatar Chris Wilson Committed by Eric Anholt

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: default avatarChris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: default avatarEric Anholt <eric@anholt.net>
parent ae7d49d8
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment