drm/i915: Drain the ttm delayed workqueue too
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Wed, 17 Nov 2021 14:20:24 +0000 (14:20 +0000)
committerMatthew Auld <matthew.auld@intel.com>
Fri, 19 Nov 2021 17:38:04 +0000 (17:38 +0000)
Lets be thorough here. Users of the TTM backend would likely expect this
behaviour.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20211117142024.1043017-6-matthew.auld@intel.com
drivers/gpu/drm/i915/i915_drv.h

index 5213cad79bed3ed2a53124b14d6badc672a2587c..c6473aa3b2a42452e944f0d7193146d2d13d81b5 100644 (file)
@@ -1822,6 +1822,7 @@ static inline void i915_gem_drain_freed_objects(struct drm_i915_private *i915)
         */
        while (atomic_read(&i915->mm.free_count)) {
                flush_work(&i915->mm.free_work);
+               flush_delayed_work(&i915->bdev.wq);
                rcu_barrier();
        }
 }