Commit 67b48040 authored by Chris Wilson's avatar Chris Wilson

drm/i915: Assert that the handle->vma lut is empty on object close

Make sure that we are not leaking an entry in the ctx->handles_lut by
asserting that the object was removed prior to being freed. This should
be enforced by all such handles being removed by i915_gem_close_object.
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20170822110517.22277-2-chris@chris-wilson.co.ukReviewed-by: default avatarMichał Winiarski <michal.winiarski@intel.com>
parent 432295d7
...@@ -4416,6 +4416,7 @@ static void __i915_gem_free_objects(struct drm_i915_private *i915, ...@@ -4416,6 +4416,7 @@ static void __i915_gem_free_objects(struct drm_i915_private *i915,
llist_for_each_entry_safe(obj, on, freed, freed) { llist_for_each_entry_safe(obj, on, freed, freed) {
GEM_BUG_ON(obj->bind_count); GEM_BUG_ON(obj->bind_count);
GEM_BUG_ON(atomic_read(&obj->frontbuffer_bits)); GEM_BUG_ON(atomic_read(&obj->frontbuffer_bits));
GEM_BUG_ON(!list_empty(&obj->lut_list));
if (obj->ops->release) if (obj->ops->release)
obj->ops->release(obj); obj->ops->release(obj);
......
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