From c6e078a2d58872ad6a0fc7923a567c0cbff75e49 Mon Sep 17 00:00:00 2001 From: Mika Kuoppala Date: Wed, 29 Apr 2015 13:16:46 +0300 Subject: [PATCH 2/3] drm/i915: Clear vma->bound on unbinding Unbinding doesn't lead to unconditional destruction of vma. This destruction avoidance happens if vma is part of execbuffer relocation list or if vma is being considered of eviction in i915_gem_evict_something. Signed-off-by: Mika Kuoppala --- drivers/gpu/drm/i915/i915_gem.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index e8f6f4c..c378f04 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)) { -- 1.9.1