[Intel-gfx] [PATCH 03/20] drm/i915: Assert that the handle->vma lut is empty on object close
Michał Winiarski
michal.winiarski at intel.com
Wed Aug 23 16:54:51 UTC 2017
On Wed, Aug 23, 2017 at 10:14:57AM +0100, Chris Wilson wrote:
> 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: Chris Wilson <chris at chris-wilson.co.uk>
Reviewed-by: Michał Winiarski <michal.winiarski at intel.com>
-Michał
> ---
> drivers/gpu/drm/i915/i915_gem.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index 3ed9fb0921e2..5dc396c20c06 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -4416,6 +4416,7 @@ static void __i915_gem_free_objects(struct drm_i915_private *i915,
> llist_for_each_entry_safe(obj, on, freed, freed) {
> GEM_BUG_ON(obj->bind_count);
> GEM_BUG_ON(atomic_read(&obj->frontbuffer_bits));
> + GEM_BUG_ON(!list_empty(&obj->lut_list));
>
> if (obj->ops->release)
> obj->ops->release(obj);
> --
> 2.14.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
More information about the Intel-gfx
mailing list