]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/msm/dp: stop link training after link training 2 failed
authorKuogee Hsieh <quic_khsieh@quicinc.com>
Tue, 18 Jan 2022 18:47:28 +0000 (10:47 -0800)
committerDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Fri, 18 Feb 2022 15:32:58 +0000 (18:32 +0300)
Each DP link training contains link training 1 followed by link
training 2.  There is maximum of 5 retries of DP link training
before declared link training failed. It is required to stop link
training at end of link training 2 if it is failed so that next
link training 1 can start freshly. This patch fixes link compliance
test  case 4.3.1.13 (Source Device Link Training EQ Fallback Test).

Changes in v10:
--  group into one series

Changes in v11:
-- drop drm/msm/dp: dp_link_parse_sink_count() return immediately if aux read

Fixes: bb7f27b18d7c ("drm/msm/dp: do not end dp link training until video is ready")
Signed-off-by: Kuogee Hsieh <quic_khsieh@quicinc.com>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Link: https://lore.kernel.org/r/1642531648-8448-5-git-send-email-quic_khsieh@quicinc.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
drivers/gpu/drm/msm/dp/dp_ctrl.c

index f98df9355b88d347179033030e5ecd41b65c1349..245e1b90a956f14bcef23c56a8738ec75bf781e8 100644 (file)
@@ -1755,6 +1755,9 @@ int dp_ctrl_on_link(struct dp_ctrl *dp_ctrl)
                                /* end with failure */
                                break; /* lane == 1 already */
                        }
+
+                       /* stop link training before start re training  */
+                       dp_ctrl_clear_training_pattern(ctrl);
                }
        }