summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAjay Singh Parmar <aparmar@codeaurora.org>2017-01-07 18:29:04 -0800
committerAjay Singh Parmar <aparmar@codeaurora.org>2017-01-17 17:38:07 -0800
commit4eaf19c57aed7e7a5bc0188cfe6a1169891bc828 (patch)
treeb49ef02561d372b4c78812a44f7e316cb149640b
parent19b7c1036c992e19e6bc350f6b4cb6a795c9e2e9 (diff)
msm: mdss: dp: fix link training sequence
Transmit the link pattern first, update the drive settings and then update the sink about the pattern and drive settings using aux channel to avoid possible link training failures with some sinks. Change-Id: Ia8eccee99f58da94d3f1013f075c07400bde15f9 Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
-rw-r--r--drivers/video/fbdev/msm/mdss_dp_aux.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/video/fbdev/msm/mdss_dp_aux.c b/drivers/video/fbdev/msm/mdss_dp_aux.c
index fa1af0d392e7..83ce2384b044 100644
--- a/drivers/video/fbdev/msm/mdss_dp_aux.c
+++ b/drivers/video/fbdev/msm/mdss_dp_aux.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013, 2014, 2016 The Linux Foundation. All rights reserved.
+/* Copyright (c) 2013-2014, 2016-2017 The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -1653,10 +1653,10 @@ static int dp_start_link_train_1(struct mdss_dp_drv_pdata *ep)
pr_debug("Entered++");
+ dp_host_train_set(ep, 0x01); /* train_1 */
dp_cap_lane_rate_set(ep);
dp_train_pattern_set_write(ep, 0x21); /* train_1 */
dp_aux_set_voltage_and_pre_emphasis_lvl(ep);
- dp_host_train_set(ep, 0x01); /* train_1 */
tries = 0;
old_v_level = ep->v_level;
@@ -1708,11 +1708,11 @@ static int dp_start_link_train_2(struct mdss_dp_drv_pdata *ep)
else
pattern = 0x02;
+ dp_host_train_set(ep, pattern);
+ dp_aux_set_voltage_and_pre_emphasis_lvl(ep);
dp_train_pattern_set_write(ep, pattern | 0x20);/* train_2 */
do {
- dp_host_train_set(ep, pattern);
-
usleep_time = ep->dpcd.training_read_interval;
usleep_range(usleep_time, usleep_time);
@@ -1723,11 +1723,11 @@ static int dp_start_link_train_2(struct mdss_dp_drv_pdata *ep)
break;
}
- tries++;
if (tries > maximum_retries) {
ret = -1;
break;
}
+ tries++;
dp_sink_train_set_adjust(ep);
dp_aux_set_voltage_and_pre_emphasis_lvl(ep);