From: Mika Kuoppala Date: Thu, 30 Apr 2015 08:02:31 +0000 (+0300) Subject: drm/i915: Clear vma->bound on unbinding X-Git-Tag: v4.2-rc1~13^2~54^2~80 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=5e562f1dddfa3242cede5ec49888260a856a9da2;p=linux.git 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 Cc: Chris Wilson Cc: Daniel Vetter Signed-off-by: Mika Kuoppala Signed-off-by: Daniel Vetter --- diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index e8f6f4c0a2c6..c378f0421145 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -3069,6 +3069,7 @@ int i915_vma_unbind(struct i915_vma *vma) trace_i915_vma_unbind(vma); vma->vm->unbind_vma(vma); + vma->bound = 0; list_del_init(&vma->mm_list); if (i915_is_ggtt(vma->vm)) {