aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_irq.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/i915/i915_irq.c')
-rw-r--r--drivers/gpu/drm/i915/i915_irq.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index 267f069765ad..c05c84f3f091 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -2845,7 +2845,7 @@ static int semaphore_passed(struct intel_engine_cs *ring)
2845{ 2845{
2846 struct drm_i915_private *dev_priv = ring->dev->dev_private; 2846 struct drm_i915_private *dev_priv = ring->dev->dev_private;
2847 struct intel_engine_cs *signaller; 2847 struct intel_engine_cs *signaller;
2848 u32 seqno, ctl; 2848 u32 seqno;
2849 2849
2850 ring->hangcheck.deadlock++; 2850 ring->hangcheck.deadlock++;
2851 2851
@@ -2857,15 +2857,12 @@ static int semaphore_passed(struct intel_engine_cs *ring)
2857 if (signaller->hangcheck.deadlock >= I915_NUM_RINGS) 2857 if (signaller->hangcheck.deadlock >= I915_NUM_RINGS)
2858 return -1; 2858 return -1;
2859 2859
2860 /* cursory check for an unkickable deadlock */
2861 ctl = I915_READ_CTL(signaller);
2862 if (ctl & RING_WAIT_SEMAPHORE && semaphore_passed(signaller) < 0)
2863 return -1;
2864
2865 if (i915_seqno_passed(signaller->get_seqno(signaller, false), seqno)) 2860 if (i915_seqno_passed(signaller->get_seqno(signaller, false), seqno))
2866 return 1; 2861 return 1;
2867 2862
2868 if (signaller->hangcheck.deadlock) 2863 /* cursory check for an unkickable deadlock */
2864 if (I915_READ_CTL(signaller) & RING_WAIT_SEMAPHORE &&
2865 semaphore_passed(signaller) < 0)
2869 return -1; 2866 return -1;
2870 2867
2871 return 0; 2868 return 0;