drm/msm/dp: don't report link training success after a reinit
PATCH 1/1 drm/msm/dp: don't report link training success after a reinit
When every training attempt fails, the retry loop in msm_dp_ctrl_on_link() ends on a successful msm_dp_ctrl_reinitialize_mainlink(), leaving rc at 0. The caller then enables the stream on an untrained link and the display stays dark.
The retry counter only reaches zero in that case, so treat it as a training failure.
--- drivers/gpu/drm/msm/dp/dp_ctrl.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/msm/dp/dp_ctrl.c +3 -0
@@ -2434,6 +2434,9 @@ int msm_dp_ctrl_on_link(struct msm_dp_ctrl *msm_dp_ctrl,if (ctrl->link->sink_request &DP_TEST_LINK_PHY_TEST_PATTERN )return rc; +if (!link_train_max_retries) + rc = -ETIMEDOUT ; +if (rc ==0 ) {/* link train successfully */ /* * do not stop train pattern here
base-commit: 4c253ac4b29b8c6cc6fdef8f92d4facde62e63b9
Signature · 1 line
2.55.0
Quoted 5 lines · Oleg Keri
When every training attempt fails, the retry loop in
msm_dp_ctrl_on_link()ends on a successfulmsm_dp_ctrl_reinitialize_mainlink(), leaving rc at 0. The caller then enables the stream on an untrained link and the display stays dark.
Quoted 9 lines
The retry counter only reaches zero in that case, so treat it as a training failure.
Fixes 8ede2ecc3e5e ("drm/msm/dp: Add DP compliance tests on Snapdragon Chipsets")Signed-off-by Oleg Keri <[email protected]>--- drivers/gpu/drm/msm/dp/dp_ctrl.c | 3 +++ 1 file changed, 3 insertions(+)
Signature · 2 lines
With best wishes Dmitry
Quoted 5 lines · Oleg Keri
When every training attempt fails, the retry loop in
msm_dp_ctrl_on_link()ends on a successfulmsm_dp_ctrl_reinitialize_mainlink(), leaving rc at 0. The caller then enables the stream on an untrained link and the display stays dark.
Quoted 9 lines
The retry counter only reaches zero in that case, so treat it as a training failure.
Fixes 8ede2ecc3e5e ("drm/msm/dp: Add DP compliance tests on Snapdragon Chipsets")Signed-off-by Oleg Keri <[email protected]>--- drivers/gpu/drm/msm/dp/dp_ctrl.c | 3 +++ 1 file changed, 3 insertions(+)
Signature · 2 lines
With best wishes Dmitry
Dmitry Baryshkov
AppliedQuoted 9 lines · Oleg Keri
When every training attempt fails, the retry loop in
msm_dp_ctrl_on_link()ends on a successfulmsm_dp_ctrl_reinitialize_mainlink(), leaving rc at 0. The caller then enables the stream on an untrained link and the display stays dark.The retry counter only reaches zero in that case, so treat it as a training failure.
[...]
Applied to msm-next, thanks!
[1/1] drm/msm/dp: don't report link training success after a reinit
https://gitlab.freedesktop.org/lumag/msm/-/commit/a47987366e7f
Best regards,
Signature · 2 lines
With best wishes Dmitry