[PATCH 07/53] drm/i915: Flush the freed object queue on device release

Chris Wilson chris at chris-wilson.co.uk
Fri Feb 10 09:39:39 UTC 2017

As dmabufs may live beyond the PCI device removal, we need to flush the
freed object worker on device release, and include a warning in case
there is a leak.

Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
 drivers/gpu/drm/i915/i915_gem.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index a42f1405aeeb..d5393841ff95 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -4666,7 +4666,9 @@ i915_gem_load_init(struct drm_i915_private *dev_priv)
 void i915_gem_load_cleanup(struct drm_i915_private *dev_priv)
+	i915_gem_drain_freed_objects(dev_priv);
+	WARN_ON(dev_priv->mm.object_count);

More information about the Intel-gfx-trybot mailing list