diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2016-12-22 11:36:31 +0300 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2016-12-28 13:50:28 +0300 |
commit | 2c4b389518fbe552188928aadcd3815d5116a05c (patch) | |
tree | 741bd09ab8f830f5a9cb984ce623f0a4595507fd /drivers/gpu/drm/i915/i915_gem_evict.c | |
parent | 4a6c156f56beaaf83102c8b29baeef070c697093 (diff) | |
download | linux-2c4b389518fbe552188928aadcd3815d5116a05c.tar.xz |
drm: Unconditionally do the range check in drm_mm_scan_add_block()
Doing the check is trivial (low cost in comparison to overall eviction)
and helps simplify the code.
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-29-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 | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem_evict.c b/drivers/gpu/drm/i915/i915_gem_evict.c index ac2f4eea1846..a6d5bab6f237 100644 --- a/drivers/gpu/drm/i915/i915_gem_evict.c +++ b/drivers/gpu/drm/i915/i915_gem_evict.c @@ -126,13 +126,9 @@ i915_gem_evict_something(struct i915_address_space *vm, * On each list, the oldest objects lie at the HEAD with the freshest * object on the TAIL. */ - if (start != 0 || end != vm->total) { - drm_mm_scan_init_with_range(&scan, &vm->mm, min_size, - alignment, cache_level, - start, end); - } else - drm_mm_scan_init(&scan, &vm->mm, min_size, - alignment, cache_level); + drm_mm_scan_init_with_range(&scan, &vm->mm, + min_size, alignment, cache_level, + start, end); if (flags & PIN_NONBLOCK) phases[1] = NULL; |