public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH 1/3] drm/i915: Assert the context is not closed on object-close
@ 2017-08-22 11:05 Chris Wilson
  2017-08-22 11:05 ` [PATCH 2/3] drm/i915: Assert that the handle->vma lut is empty on object close Chris Wilson
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Chris Wilson @ 2017-08-22 11:05 UTC (permalink / raw)
  To: intel-gfx

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 include a check upon closing the object that
the context is still open.

v2: Eek, the fpriv check is required for shared objects. Double eek, BAT
passed?

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/i915_gem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index b9e8e0d6e97b..3ed9fb0921e2 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -3253,11 +3253,11 @@ void i915_gem_close_object(struct drm_gem_object *gem, struct drm_file *file)
 		struct i915_gem_context *ctx = lut->ctx;
 		struct i915_vma *vma;
 
+		GEM_BUG_ON(ctx->file_priv == ERR_PTR(-EBADF));
 		if (ctx->file_priv != fpriv)
 			continue;
 
 		vma = radix_tree_delete(&ctx->handles_vma, lut->handle);
-
 		if (!i915_vma_is_ggtt(vma))
 			i915_vma_close(vma);
 
-- 
2.14.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2017-09-18 13:56 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-22 11:05 [PATCH 1/3] drm/i915: Assert the context is not closed on object-close Chris Wilson
2017-08-22 11:05 ` [PATCH 2/3] drm/i915: Assert that the handle->vma lut is empty on object close Chris Wilson
2017-08-22 11:05 ` [PATCH 3/3] drm/i915: Ignore duplicate VMA stored within the per-object handle LUT Chris Wilson
2017-08-23 10:05   ` Joonas Lahtinen
2017-08-23 10:20     ` Chris Wilson
2017-08-30 11:07       ` Joonas Lahtinen
2017-08-30 11:56         ` Chris Wilson
2017-09-18 13:55           ` Joonas Lahtinen
2017-08-22 11:59 ` [PATCH 1/3] drm/i915: Assert the context is not closed on object-close Lofstedt, Marta
2017-08-24 14:25   ` Chris Wilson
2017-08-22 12:06 ` ✓ Fi.CI.BAT: success for series starting with [1/3] " Patchwork
2017-08-24 14:30   ` Chris Wilson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox