From: Takashi Iwai <tiwai@suse.de>
Date: Mon, 11 Mar 2013 17:52:10 +0100
Subject: [PATCH 1/2] Revert "drm/i915: try to train DP even harder"
Git-commit: 3b4f819d5eac94ba8fe5e8c061f6dabfe8d7b22c
Patch-mainline: 3.9-rc4
References: bnc#807362

This reverts commit 0d71068835e2610576d369d6d4cbf90e0f802a71.

Not only that the commit introduces a bogus check (voltage_tries == 5
will never meet at the inserted code path), it may bring the driver into
an endless DP-link-train loop (and actually it does on HP Z1 with eDP).

We can add a better check for the intended purpose of that commit, but
let's revert the wrong "fix" at first.

Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>

---
 drivers/gpu/drm/i915/intel_dp.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -1898,7 +1898,7 @@ intel_dp_start_link_train(struct intel_d
 		for (i = 0; i < intel_dp->lane_count; i++)
 			if ((intel_dp->train_set[i] & DP_TRAIN_MAX_SWING_REACHED) == 0)
 				break;
-		if (i == intel_dp->lane_count && voltage_tries == 5) {
+		if (i == intel_dp->lane_count) {
 			++loop_tries;
 			if (loop_tries == 5) {
 				DRM_DEBUG_KMS("too many full retries, give up\n");
