As a precaution against the driver fouling up and missing a hang leaving the caller in an indefinite wait, manually inspect for a GPU hang if we timeout whilst waiting for a seqno. Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk> --- drivers/gpu/drm/i915/i915_gem.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 0d878c1..54bb921 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -1129,6 +1129,9 @@ static int __wait_seqno(struct intel_ring_buffer *ring, u32 seqno, else end = wait_event_timeout(ring->irq_queue, EXIT_COND, timeout_jiffies); + /* Be paranoid and check that we haven't missed a GPU hang */ + if (end == 0) + i915_hangcheck_elapsed((unsigned long)dev_priv->dev); /* We need to check whether any gpu reset happened in between * the caller grabbing the seqno and now ... */ -- 1.7.10.4