drm/i915: Retire before attempting to evict from the active lists
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 9 Dec 2016 15:05:55 +0000 (15:05 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Mon, 12 Dec 2016 12:25:32 +0000 (12:25 +0000)
commit7155b057c61e55eed27bf478ac9b8034c4c97582
tree26f3ffc904bd4154ee600f9bd9ee89de1f85c5d9
parentdbb4351bab0a8440f6b02895c142bce6c30b7097
drm/i915: Retire before attempting to evict from the active lists

Some object retain an extra pin whilst they are active (e.g. contexts).
This excludes them from being considered for eviction unless we idle the
GPU. If before we look at the active list, we retire beforehand we can
hopefully remove a few excess pins and reduce the amount of searching
required.

v2: Similar principle applies to evict_for_vma

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: http://patchwork.freedesktop.org/patch/msgid/20161209150555.602-1-chris@chris-wilson.co.uk
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
drivers/gpu/drm/i915/i915_gem_evict.c