drm/i915: Recover all available ringbuffer space following reset
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 3 Sep 2015 12:01:40 +0000 (13:01 +0100)
committerTvrtko Ursulin <tvrtko.ursulin@intel.com>
Wed, 28 Oct 2015 17:10:31 +0000 (17:10 +0000)
commit608c1a526c99d1858b02d035657e28c9837667a5
tree81dced3daf2ac0192ce1138d0c6b1a5600cb61c8
parent01403de3c037932883b181f7f6b9962856064f9a
drm/i915: Recover all available ringbuffer space following reset

Having flushed all requests from all queues, we know that all
ringbuffers must now be empty. However, since we do not reclaim
all space when retiring the request (to prevent HEADs colliding
with rapid ringbuffer wraparound) the amount of available space
on each ringbuffer upon reset is less than when we start. Do one
more pass over all the ringbuffers to reset the available space

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
Cc: Arun Siluvery <arun.siluvery@linux.intel.com>
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Cc: Dave Gordon <david.s.gordon@intel.com>
drivers/gpu/drm/i915/i915_gem.c
drivers/gpu/drm/i915/intel_lrc.c
drivers/gpu/drm/i915/intel_ringbuffer.c
drivers/gpu/drm/i915/intel_ringbuffer.h