If the gpu reset fails and the machine is terminally wedged, further
hangchecks achieve nothing but noise. Disable them, with a corollary
that we re-enable hangchecking after a successful GPU reset in case the
user is artificially bringing the machine back to life through the debug
interface.

Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/i915_drv.c        | 2 ++
 drivers/gpu/drm/i915/intel_hangcheck.c | 3 +++
 2 files changed, 5 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 445fec9c2841..d3ee72449025 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -1814,6 +1814,8 @@ void i915_reset(struct drm_i915_private *dev_priv)
                goto error;
        }
 
+       i915_queue_hangcheck(dev_priv);
+
 wakeup:
        wake_up_bit(&error->flags, I915_RESET_IN_PROGRESS);
        return;
diff --git a/drivers/gpu/drm/i915/intel_hangcheck.c 
b/drivers/gpu/drm/i915/intel_hangcheck.c
index 53df5b11bff4..c0cfa5b8b87e 100644
--- a/drivers/gpu/drm/i915/intel_hangcheck.c
+++ b/drivers/gpu/drm/i915/intel_hangcheck.c
@@ -319,6 +319,9 @@ static void i915_hangcheck_elapsed(struct work_struct *work)
        if (!READ_ONCE(dev_priv->gt.awake))
                return;
 
+       if (i915_terminally_wedged(&dev_priv->gpu_error))
+               return;
+
        /* As enabling the GPU requires fairly extensive mmio access,
         * periodically arm the mmio checker to see if we are triggering
         * any invalid access.
-- 
2.10.2

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to