diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2016-12-22 08:36:33 +0000 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2016-12-28 11:50:55 +0100 |
commit | 0b04d474a611e2831d142e246422a03a10998ae1 (patch) | |
tree | 7a5f68b8621326acf4ecc5809dea5d3300326e80 /drivers/gpu/drm/i915/i915_gem_evict.c | |
parent | 268c6498fba2f6555d215408ae4de3ca1a08fb77 (diff) | |
download | linux-0b04d474a611e2831d142e246422a03a10998ae1.tar.gz linux-0b04d474a611e2831d142e246422a03a10998ae1.tar.bz2 linux-0b04d474a611e2831d142e246422a03a10998ae1.zip |
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
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem_evict.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem_evict.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem_evict.c b/drivers/gpu/drm/i915/i915_gem_evict.c index a6d5bab6f237..fa90a0c47976 100644 --- a/drivers/gpu/drm/i915/i915_gem_evict.c +++ b/drivers/gpu/drm/i915/i915_gem_evict.c @@ -128,7 +128,8 @@ i915_gem_evict_something(struct i915_address_space *vm, */ drm_mm_scan_init_with_range(&scan, &vm->mm, min_size, alignment, cache_level, - start, end); + start, end, + flags & PIN_HIGH ? DRM_MM_CREATE_TOP : 0); if (flags & PIN_NONBLOCK) phases[1] = NULL; |