[Intel-gfx] [PATCH] drm/i915: Bump the object-close after context-close check to an assert
Chris Wilson
chris at chris-wilson.co.uk
Sat Aug 19 13:18:58 UTC 2017
During the context-close, we should be decoupling all the vma from the
object so that upon object-closing we shouldn't see any vma from the
already closed contexts. So replace the check and skip with an assert.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
---
drivers/gpu/drm/i915/i915_gem.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index b9e8e0d6e97b..78978fd13975 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -3250,14 +3250,11 @@ void i915_gem_close_object(struct drm_gem_object *gem, struct drm_file *file)
mutex_lock(&i915->drm.struct_mutex);
list_for_each_entry_safe(lut, ln, &obj->lut_list, obj_link) {
- struct i915_gem_context *ctx = lut->ctx;
struct i915_vma *vma;
- if (ctx->file_priv != fpriv)
- continue;
-
- vma = radix_tree_delete(&ctx->handles_vma, lut->handle);
+ GEM_BUG_ON(lut->ctx->file_priv != fpriv);
+ vma = radix_tree_delete(&lut->ctx->handles_vma, lut->handle);
if (!i915_vma_is_ggtt(vma))
i915_vma_close(vma);
--
2.14.1
More information about the Intel-gfx
mailing list