[Intel-gfx] [PATCH] drm/i915: Don't call suspend_late() on GEM error load
Chris Wilson
chris at chris-wilson.co.uk
Sat Jul 28 12:36:04 UTC 2018
The primary purpose of i915_gem_suspend_late is to ensure all writes
into memory from the GPU are flushed before we relinquish control of the
device. However, if we abort GEM initialisation, we ideally want to leave
the GPU marked as wedged, but still allow KMS in order to avoid the
black screen of doom. In this case, a path through suspend_late causes a
redundant and quite noisy reset as we have to then repeat it on wedging.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
---
drivers/gpu/drm/i915/i915_gem.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 460f256114f7..e937977a4f7b 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -5571,8 +5571,6 @@ int i915_gem_init(struct drm_i915_private *dev_priv)
mutex_unlock(&dev_priv->drm.struct_mutex);
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);
@@ -5619,6 +5617,8 @@ int i915_gem_init(struct drm_i915_private *dev_priv)
intel_init_clock_gating(dev_priv);
mutex_unlock(&dev_priv->drm.struct_mutex);
+ } else {
+ i915_gem_sanitize(dev_priv);
}
i915_gem_drain_freed_objects(dev_priv);
--
2.18.0
More information about the Intel-gfx
mailing list