drm/i915: Simplify object is-pinned checking for shrinker
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 7 Apr 2015 16:28:17 +0000 (17:28 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 10 Apr 2015 08:58:34 +0000 (10:58 +0200)
commitf6234c1deedd7d35a09366dba8d92c523ff9cf09
treefbaaedb895127c6dd85c60d843dcf7b23d65a203
parent149c86e74fe44dcbac5e9f8d145c5fbc5dc21261
drm/i915: Simplify object is-pinned checking for shrinker

When looking for viable candidates to shrink, we only want objects that
are not pinned. However to do so we performed a double iteration over
the vma in the objects, first looking for the pin-count, then looking
for allocations. We can do both at once and be slightly more explicit in
our validity test.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_gem_shrinker.c