aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/drm/i915/intel_dp.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index c63f54e84847..c14d407d41e8 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -1798,8 +1798,7 @@ intel_dp_start_link_train(struct intel_dp *intel_dp)
1798 if ((intel_dp->train_set[i] & DP_TRAIN_MAX_SWING_REACHED) == 0) 1798 if ((intel_dp->train_set[i] & DP_TRAIN_MAX_SWING_REACHED) == 0)
1799 break; 1799 break;
1800 if (i == intel_dp->lane_count && voltage_tries == 5) { 1800 if (i == intel_dp->lane_count && voltage_tries == 5) {
1801 ++loop_tries; 1801 if (++loop_tries == 5) {
1802 if (loop_tries == 5) {
1803 DRM_DEBUG_KMS("too many full retries, give up\n"); 1802 DRM_DEBUG_KMS("too many full retries, give up\n");
1804 break; 1803 break;
1805 } 1804 }
@@ -1809,15 +1808,11 @@ intel_dp_start_link_train(struct intel_dp *intel_dp)
1809 } 1808 }
1810 1809
1811 /* Check to see if we've tried the same voltage 5 times */ 1810 /* Check to see if we've tried the same voltage 5 times */
1812 if ((intel_dp->train_set[0] & DP_TRAIN_VOLTAGE_SWING_MASK) == voltage) { 1811 if ((intel_dp->train_set[0] & DP_TRAIN_VOLTAGE_SWING_MASK) != voltage) {
1813 ++voltage_tries; 1812 voltage = intel_dp->train_set[0] & DP_TRAIN_VOLTAGE_SWING_MASK;
1814 if (voltage_tries == 5) {
1815 DRM_DEBUG_KMS("too many voltage retries, give up\n");
1816 break;
1817 }
1818 } else
1819 voltage_tries = 0; 1813 voltage_tries = 0;
1820 voltage = intel_dp->train_set[0] & DP_TRAIN_VOLTAGE_SWING_MASK; 1814 } else
1815 ++voltage_tries;
1821 1816
1822 /* Compute new intel_dp->train_set as requested by target */ 1817 /* Compute new intel_dp->train_set as requested by target */
1823 intel_get_adjust_train(intel_dp, link_status); 1818 intel_get_adjust_train(intel_dp, link_status);