Skip to content

Commit

Permalink
drm/i915: Flush the freed object queue on device release
Browse files Browse the repository at this point in the history
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@chris-wilson.co.uk>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170210163523.17533-3-chris@chris-wilson.co.uk
  • Loading branch information
Chris Wilson committed Feb 10, 2017
1 parent 94d4a2a commit c4d4c1c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/gpu/drm/i915/i915_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -4659,7 +4659,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(!llist_empty(&dev_priv->mm.free_list));
WARN_ON(dev_priv->mm.object_count);

mutex_lock(&dev_priv->drm.struct_mutex);
i915_gem_timeline_fini(&dev_priv->gt.global_timeline);
Expand Down

0 comments on commit c4d4c1c

Please sign in to comment.