drm/i915/dp: Check for AUXCH error before checking for success
authorAdam Jackson <ajax@redhat.com>
Tue, 26 Jul 2011 19:39:46 +0000 (15:39 -0400)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 17 Jan 2012 15:47:00 +0000 (16:47 +0100)
This is paranoid, but I am entirely willing to believe the hardware
could come up with a condition where I get a status with both the 'done'
and 'receive error' bits set.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_dp.c

index 2f4766385797787f57b909acff84b66941893f7f..8f1148c0410837e2993063adc63b2652ad2c471b 100644 (file)
@@ -426,6 +426,10 @@ intel_dp_aux_ch(struct intel_dp *intel_dp,
                           DP_AUX_CH_CTL_DONE |
                           DP_AUX_CH_CTL_TIME_OUT_ERROR |
                           DP_AUX_CH_CTL_RECEIVE_ERROR);
+
+               if (status & (DP_AUX_CH_CTL_TIME_OUT_ERROR |
+                             DP_AUX_CH_CTL_RECEIVE_ERROR))
+                       continue;
                if (status & DP_AUX_CH_CTL_DONE)
                        break;
        }