[Intel-gfx] [PATCH 3/5] drm/i915: Remove node only when allocated
Ben Widawsky
benjamin.widawsky at intel.com
Sat Aug 10 07:12:14 CEST 2013
In upcoming code, it will be possible for a vma to have been created,
but no space reserved for it in the address space. The drm_mm semantics
are such that trying to remove an unallocated node is not allowed.
Signed-off-by: Ben Widawsky <ben at bwidawsk.net>
---
drivers/gpu/drm/i915/i915_gem.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index a60c773..c287072 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -2629,7 +2629,8 @@ int i915_vma_unbind(struct i915_vma *vma)
if (i915_is_ggtt(vma->vm))
obj->map_and_fenceable = true;
- drm_mm_remove_node(&vma->node);
+ if (drm_mm_node_allocated(&vma->node))
+ drm_mm_remove_node(&vma->node);
i915_gem_vma_destroy(vma);
/* Since the unbound list is global, only move to that list if
--
1.8.3.4
More information about the Intel-gfx
mailing list