From: Chris Wilson Date: Thu, 1 Jul 2010 16:53:00 +0000 (+0100) Subject: drm/i915: Account for space on the ring buffer consumed whilst wrapping. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=43ed340ad93dcefe00a8f116b7e1b9dab2958543;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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: Chris Wilson Signed-off-by: Eric Anholt --- diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c index a3cac5791d76..26362f8495a8 100644 --- a/drivers/gpu/drm/i915/intel_ringbuffer.c +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c @@ -687,6 +687,7 @@ int intel_wrap_ring_buffer(struct drm_device *dev, *virt++ = MI_NOOP; ring->tail = 0; + ring->space = ring->head - 8; return 0; }