Commit 43ed340a authored by Chris Wilson's avatar Chris Wilson Committed by Eric Anholt

drm/i915: Account for space on the ring buffer consumed whilst wrapping.

If we fill the tail of the physical ring buffer with NOOP when wrapping,
we need to account for the reduction in available space.
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: default avatarEric Anholt <eric@anholt.net>
parent 1afe3e9d
...@@ -687,6 +687,7 @@ int intel_wrap_ring_buffer(struct drm_device *dev, ...@@ -687,6 +687,7 @@ int intel_wrap_ring_buffer(struct drm_device *dev,
*virt++ = MI_NOOP; *virt++ = MI_NOOP;
ring->tail = 0; ring->tail = 0;
ring->space = ring->head - 8;
return 0; return 0;
} }
......
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