diff mbox

[5/8] drm/i915: Don't call intel_dp_set_signal_levels() on link train reset

Message ID 1441715280-11623-6-git-send-email-ander.conselvan.de.oliveira@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Ander Conselvan de Oliveira Sept. 8, 2015, 12:27 p.m. UTC
Instead of calling intel_dp_set_signal_levels(), which writes the
desired signal levels mask to a variable, just call the new function
intel_dp_update_signal_levels(). The effect should be the same, except
for an extra register write, but this creates a better split between the
generic link training logic and the i915 specific part.
---
 drivers/gpu/drm/i915/intel_dp.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index a51ae48..d5c1b0a 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -3638,16 +3638,6 @@  intel_dp_set_link_train(struct intel_dp *intel_dp,
 	return ret == len;
 }
 
-static bool
-intel_dp_reset_link_train(struct intel_dp *intel_dp,
-			uint8_t dp_train_pat)
-{
-	if (!intel_dp->train_set_valid)
-		memset(intel_dp->train_set, 0, sizeof(intel_dp->train_set));
-	intel_dp_set_signal_levels(intel_dp, &intel_dp->DP);
-	return intel_dp_set_link_train(intel_dp, dp_train_pat);
-}
-
 static void
 intel_dp_update_signal_levels(struct intel_dp *intel_dp)
 {
@@ -3662,6 +3652,16 @@  intel_dp_update_signal_levels(struct intel_dp *intel_dp)
 }
 
 static bool
+intel_dp_reset_link_train(struct intel_dp *intel_dp,
+			uint8_t dp_train_pat)
+{
+	if (!intel_dp->train_set_valid)
+		memset(intel_dp->train_set, 0, sizeof(intel_dp->train_set));
+	intel_dp_update_signal_levels(intel_dp);
+	return intel_dp_set_link_train(intel_dp, dp_train_pat);
+}
+
+static bool
 intel_dp_update_link_train(struct intel_dp *intel_dp)
 {
 	int ret;