Commit 432295d7 authored by Chris Wilson's avatar Chris Wilson

drm/i915: Assert the context is not closed on object-close

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: default avatarChris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20170822110517.22277-1-chris@chris-wilson.co.ukReviewed-by: default avatarMichał Winiarski <michal.winiarski@intel.com>
parent acfb5554
...@@ -3253,11 +3253,11 @@ void i915_gem_close_object(struct drm_gem_object *gem, struct drm_file *file) ...@@ -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_gem_context *ctx = lut->ctx;
struct i915_vma *vma; struct i915_vma *vma;
GEM_BUG_ON(ctx->file_priv == ERR_PTR(-EBADF));
if (ctx->file_priv != fpriv) if (ctx->file_priv != fpriv)
continue; continue;
vma = radix_tree_delete(&ctx->handles_vma, lut->handle); vma = radix_tree_delete(&ctx->handles_vma, lut->handle);
if (!i915_vma_is_ggtt(vma)) if (!i915_vma_is_ggtt(vma))
i915_vma_close(vma); i915_vma_close(vma);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment