aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2014-01-28 13:08:38 -0500
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-01-29 15:29:40 -0500
commit3036537dbfeaa9940bad7cbdab6671576e1dff69 (patch)
tree781ab4e94a2ec0821fe942148489020ba16483dd
parentdada1a9ffccc832b0130658d26454d37bf41f610 (diff)
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 <chris@chris-wilson.co.uk> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Ben Widawsky <benjamin.widawsky@intel.com> Reviewed-by: Ben Widawsky <ben@bwidawsk.net> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r--drivers/gpu/drm/i915/i915_gem_evict.c3
1 files changed, 1 insertions, 2 deletions
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 @@
36static bool 36static bool
37mark_free(struct i915_vma *vma, struct list_head *unwind) 37mark_free(struct i915_vma *vma, struct list_head *unwind)
38{ 38{
39 /* Freeing up memory requires no VMAs are pinned */ 39 if (vma->pin_count)
40 if (i915_gem_obj_is_pinned(vma->obj))
41 return false; 40 return false;
42 41
43 if (WARN_ON(!list_empty(&vma->exec_list))) 42 if (WARN_ON(!list_empty(&vma->exec_list)))