drm/i915: Remove completed fences after a wait
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 17 Feb 2017 15:13:04 +0000 (15:13 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 17 Feb 2017 15:31:15 +0000 (15:31 +0000)
commite54ca97747770a6b08413ae9afa776c0d8c4f6c3
tree50c422466f9f26aed8aa51c18cb514f0a8fcb3a2
parent6ef98ea0dacd8bee62d6823b1dea80269137c240
drm/i915: Remove completed fences after a wait

If we wait upon the full (i.e. all shared fences, or upon an exclusive
fence) reservation object successfully, we know that all fences beneath
it have been signaled, so long as no new fences were added whilst we
slept. If the reservation_object remains the same, as detected by its
seqcount, we can then reap all the fences upon completion.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170217151304.16665-6-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_gem.c