From: Chris Wilson Date: Tue, 28 Jan 2014 18:08:38 +0000 (+0000) Subject: drm/i915: VM eviction only targets address space not physical pages X-Git-Tag: Ubuntu-snapdragon-4.4.0-1029.32~8932^2~62^2~32 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=3036537dbfeaa9940bad7cbdab6671576e1dff69;p=mirror_ubuntu-zesty-kernel.git drm/i915: VM eviction only targets address space not physical pages During eviction, we are only considering how to free up space within the current address space and not concerned with freeing up physical memory. As such we need only skip nodes that pinned in the current VM and not globally. Signed-off-by: Chris Wilson Cc: Daniel Vetter Cc: Ben Widawsky Reviewed-by: Ben Widawsky Signed-off-by: Daniel Vetter --- diff --git a/drivers/gpu/drm/i915/i915_gem_evict.c b/drivers/gpu/drm/i915/i915_gem_evict.c index 4e82ca4a7a52..50e7e3a5d1cb 100644 --- a/drivers/gpu/drm/i915/i915_gem_evict.c +++ b/drivers/gpu/drm/i915/i915_gem_evict.c @@ -36,8 +36,7 @@ static bool mark_free(struct i915_vma *vma, struct list_head *unwind) { - /* Freeing up memory requires no VMAs are pinned */ - if (i915_gem_obj_is_pinned(vma->obj)) + if (vma->pin_count) return false; if (WARN_ON(!list_empty(&vma->exec_list)))