Skip to content

Commit 0c1a2e6

Browse files
Kuogee HsiehAbhinav Kumar
authored andcommitted
drm/msm/dp: do not reinitialize phy unless retry during link training
DP PHY re-initialization done using dp_ctrl_reinitialize_mainlink() will cause PLL unlocked initially and then PLL gets locked at the end of initialization. PLL_UNLOCKED interrupt will fire during this time if the interrupt mask is enabled. However currently DP driver link training implementation incorrectly re-initializes PHY unconditionally during link training as the PHY was already configured in dp_ctrl_enable_mainlink_clocks(). Fix this by re-initializing the PHY only if the previous link training failed. [drm:dp_aux_isr] *ERROR* Unexpected DP AUX IRQ 0x01000000 when not busy Fixes: c943b49 ("drm/msm/dp: add displayPort driver support") Closes: https://gitlab.freedesktop.org/drm/msm/-/issues/30 Signed-off-by: Kuogee Hsieh <[email protected]> Tested-by: Abhinav Kumar <[email protected]> # sc7280 Reviewed-by: Abhinav Kumar <[email protected]> Reviewed-by: Stephen Boyd <[email protected]> Reviewed-by: Dmitry Baryshkov <[email protected]> Tested-by: Dmitry Baryshkov <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/551847/ Link: https://lore.kernel.org/r/[email protected] [[email protected]: added line break in commit text] Signed-off-by: Abhinav Kumar <[email protected]>
1 parent ce9ecca commit 0c1a2e6

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

drivers/gpu/drm/msm/dp/dp_ctrl.c

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1774,13 +1774,6 @@ int dp_ctrl_on_link(struct dp_ctrl *dp_ctrl)
17741774
return rc;
17751775

17761776
while (--link_train_max_retries) {
1777-
rc = dp_ctrl_reinitialize_mainlink(ctrl);
1778-
if (rc) {
1779-
DRM_ERROR("Failed to reinitialize mainlink. rc=%d\n",
1780-
rc);
1781-
break;
1782-
}
1783-
17841777
training_step = DP_TRAINING_NONE;
17851778
rc = dp_ctrl_setup_main_link(ctrl, &training_step);
17861779
if (rc == 0) {
@@ -1832,6 +1825,12 @@ int dp_ctrl_on_link(struct dp_ctrl *dp_ctrl)
18321825
/* stop link training before start re training */
18331826
dp_ctrl_clear_training_pattern(ctrl);
18341827
}
1828+
1829+
rc = dp_ctrl_reinitialize_mainlink(ctrl);
1830+
if (rc) {
1831+
DRM_ERROR("Failed to reinitialize mainlink. rc=%d\n", rc);
1832+
break;
1833+
}
18351834
}
18361835

18371836
if (ctrl->link->sink_request & DP_TEST_LINK_PHY_TEST_PATTERN)

0 commit comments

Comments
 (0)