[Intel-gfx] [PATCH] drm/i915: Flush any deferred RCU cleanup before switching off GEM
Chris Wilson
chris at chris-wilson.co.uk
Fri Aug 2 13:37:24 UTC 2019
On module load, if we fail to initialise GEM, we will try to keep the
module alive (so that we can bring KMS up to keep the system usable).
However, if we outright fail to load and choose to abort the module, we
have to flush the GEM deferred cleanup before reporting that failure.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
Cc: Michal Wajdeczko <michal.wajdeczko at intel.com>
---
drivers/gpu/drm/i915/i915_gem.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index e779dba2e5a3..a9f3b682afde 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -1601,6 +1601,10 @@ int i915_gem_init(struct drm_i915_private *dev_priv)
mutex_unlock(&dev_priv->drm.struct_mutex);
}
+ /* Flush any deferred RCU cleanup */
+ rcu_barrier();
+ flush_workqueue(dev_priv->wq);
+
i915_gem_drain_freed_objects(dev_priv);
return ret;
}
--
2.23.0.rc0
More information about the Intel-gfx
mailing list