drm: Compute tight evictions for drm_mm_scan
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 22 Dec 2016 08:36:33 +0000 (08:36 +0000)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 28 Dec 2016 10:50:55 +0000 (11:50 +0100)
commit0b04d474a611e2831d142e246422a03a10998ae1
tree7a5f68b8621326acf4ecc5809dea5d3300326e80
parent268c6498fba2f6555d215408ae4de3ca1a08fb77
drm: Compute tight evictions for drm_mm_scan

Compute the minimal required hole during scan and only evict those nodes
that overlap. This enables us to reduce the number of nodes we need to
evict to the bare minimum.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20161222083641.2691-31-chris@chris-wilson.co.uk
drivers/gpu/drm/drm_mm.c
drivers/gpu/drm/etnaviv/etnaviv_mmu.c
drivers/gpu/drm/i915/i915_gem_evict.c
drivers/gpu/drm/selftests/test-drm_mm.c
include/drm/drm_mm.h