Lines Matching refs:vma
54 struct i915_vma *vma, in mark_free() argument
58 if (i915_vma_is_pinned(vma)) in mark_free()
61 list_add(&vma->evict_link, unwind); in mark_free()
62 return drm_mm_scan_add_block(scan, &vma->node); in mark_free()
65 static bool defer_evict(struct i915_vma *vma) in defer_evict() argument
67 if (i915_vma_is_active(vma)) in defer_evict()
70 if (i915_vma_is_scanout(vma)) in defer_evict()
108 struct i915_vma *vma, *next; in i915_gem_evict_something() local
142 list_for_each_entry_safe(vma, next, &vm->bound_list, vm_link) { in i915_gem_evict_something()
143 if (vma == active) { /* now seen this vma twice */ in i915_gem_evict_something()
165 if (active != ERR_PTR(-EAGAIN) && defer_evict(vma)) { in i915_gem_evict_something()
167 active = vma; in i915_gem_evict_something()
169 list_move_tail(&vma->vm_link, &vm->bound_list); in i915_gem_evict_something()
173 if (mark_free(&scan, vma, flags, &eviction_list)) in i915_gem_evict_something()
178 list_for_each_entry_safe(vma, next, &eviction_list, evict_link) { in i915_gem_evict_something()
179 ret = drm_mm_scan_remove_block(&scan, &vma->node); in i915_gem_evict_something()
224 list_for_each_entry_safe(vma, next, &eviction_list, evict_link) { in i915_gem_evict_something()
225 if (drm_mm_scan_remove_block(&scan, &vma->node)) in i915_gem_evict_something()
226 __i915_vma_pin(vma); in i915_gem_evict_something()
228 list_del(&vma->evict_link); in i915_gem_evict_something()
233 list_for_each_entry_safe(vma, next, &eviction_list, evict_link) { in i915_gem_evict_something()
234 __i915_vma_unpin(vma); in i915_gem_evict_something()
236 ret = __i915_vma_unbind(vma); in i915_gem_evict_something()
240 vma = container_of(node, struct i915_vma, node); in i915_gem_evict_something()
243 if (vma->node.color != I915_COLOR_UNEVICTABLE) in i915_gem_evict_something()
244 ret = __i915_vma_unbind(vma); in i915_gem_evict_something()
271 struct i915_vma *vma, *next; in i915_gem_evict_for_node() local
306 vma = container_of(node, typeof(*vma), node); in i915_gem_evict_for_node()
326 if (i915_vma_is_pinned(vma)) { in i915_gem_evict_for_node()
331 if (flags & PIN_NONBLOCK && i915_vma_is_active(vma)) { in i915_gem_evict_for_node()
345 __i915_vma_pin(vma); in i915_gem_evict_for_node()
346 list_add(&vma->evict_link, &eviction_list); in i915_gem_evict_for_node()
349 list_for_each_entry_safe(vma, next, &eviction_list, evict_link) { in i915_gem_evict_for_node()
350 __i915_vma_unpin(vma); in i915_gem_evict_for_node()
352 ret = __i915_vma_unbind(vma); in i915_gem_evict_for_node()
389 struct i915_vma *vma, *vn; in i915_gem_evict_vm() local
392 list_for_each_entry(vma, &vm->bound_list, vm_link) { in i915_gem_evict_vm()
393 if (i915_vma_is_pinned(vma)) in i915_gem_evict_vm()
396 __i915_vma_pin(vma); in i915_gem_evict_vm()
397 list_add(&vma->evict_link, &eviction_list); in i915_gem_evict_vm()
403 list_for_each_entry_safe(vma, vn, &eviction_list, evict_link) { in i915_gem_evict_vm()
404 __i915_vma_unpin(vma); in i915_gem_evict_vm()
406 ret = __i915_vma_unbind(vma); in i915_gem_evict_vm()