drm/i915: Clear vma->bound on unbinding

Unbinding doesn't always lead to unconditional destruction
of vma. This destruction avoidance happens if vma is part of
execbuffer relocation list or if vma is being considered for
eviction in i915_gem_evict_something().

For those other users, mark the vma unbound so that
the correct state of this vma is preserved.

Reported-by: Chris Wilson <chris@chris-wilson.co.ok>
Cc: Chris Wilson <chris@chris-wilson.co.ok>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
Mika Kuoppala 2015-04-30 11:02:31 +03:00 committed by Daniel Vetter
parent 65b38e0d87
commit 5e562f1ddd
1 changed files with 1 additions and 0 deletions

View File

@ -3069,6 +3069,7 @@ int i915_vma_unbind(struct i915_vma *vma)
trace_i915_vma_unbind(vma); trace_i915_vma_unbind(vma);
vma->vm->unbind_vma(vma); vma->vm->unbind_vma(vma);
vma->bound = 0;
list_del_init(&vma->mm_list); list_del_init(&vma->mm_list);
if (i915_is_ggtt(vma->vm)) { if (i915_is_ggtt(vma->vm)) {