]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/i915: Flush the residual parking on emergency shutdown
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 10 Jul 2018 09:44:20 +0000 (10:44 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 10 Jul 2018 12:59:00 +0000 (13:59 +0100)
On unwinding following a critical failure inside GEM init, we also need
to be sure to flush the workers before unloading the module.

Testcase: igt/drv_module_reload/basic-reload-inject
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180710094421.16223-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_gem.c
drivers/gpu/drm/i915/intel_display.c

index 25728c9d272779ad6b1cee59d0d5c446ceb7899d..07a92ca61dbfcaea154c91c50d5eb0ba27d358f8 100644 (file)
@@ -5550,6 +5550,8 @@ err_init_hw:
        WARN_ON(i915_gem_suspend(dev_priv));
        i915_gem_suspend_late(dev_priv);
 
+       i915_gem_drain_workqueue(dev_priv);
+
        mutex_lock(&dev_priv->drm.struct_mutex);
        intel_uc_fini_hw(dev_priv);
 err_uc_init:
index 19f756d571aea5482da18880fe5f06b473aa2769..694975afe394aba31671e148cbc74d1c0d0f2112 100644 (file)
@@ -15847,6 +15847,8 @@ void intel_modeset_cleanup(struct drm_device *dev)
 {
        struct drm_i915_private *dev_priv = to_i915(dev);
 
+       flush_workqueue(dev_priv->modeset_wq);
+
        flush_work(&dev_priv->atomic_helper.free_work);
        WARN_ON(!llist_empty(&dev_priv->atomic_helper.free_list));