diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2017-02-10 17:35:23 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2017-02-10 20:10:05 +0100 |
commit | c4d4c1c66be58e1e91a2eeada02c0cbdeb5fb350 (patch) | |
tree | aae6a67362d0185019db2a0f71c6241a50deedae | |
parent | drm/i915: Unbind any residual objects/vma from the Global GTT on shutdown (diff) | |
download | linux-c4d4c1c66be58e1e91a2eeada02c0cbdeb5fb350.tar.xz linux-c4d4c1c66be58e1e91a2eeada02c0cbdeb5fb350.zip |
drm/i915: Flush the freed object queue on device release
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
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 306a2fb362a2..303c079b75e8 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -4659,7 +4659,9 @@ err_out: 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); |