Skip to content

Commit e0cce12

Browse files
Zhu-Jingwenalexdeucher
authored andcommitted
drm/amd/display: Improvement for handling edp link training fails
[Why] The eDP retrain will cause the DPCD 300 to be reset to default. And cause the brightness can't be set correctly. [How] delete the call to edp panel power control in both enable_link_output/disable_link_output entirely and only call edp panel control in enable_link_dp and  disable_link_dp once. Reviewed-by: Charlene Liu <Charlene.Liu@amd.com> Acked-by: Qingqing Zhuo <qingqing.zhuo@amd.com> Signed-off-by: Jingwen Zhu <Jingwen.Zhu@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent 56d8ce9 commit e0cce12

2 files changed

Lines changed: 16 additions & 8 deletions

File tree

drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3031,10 +3031,12 @@ void dce110_enable_dp_link_output(
30313031
const struct link_hwss *link_hwss = get_link_hwss(link, link_res);
30323032
unsigned int i;
30333033

3034-
3034+
/*
3035+
* Add the logic to extract BOTH power up and power down sequences
3036+
* from enable/disable link output and only call edp panel control
3037+
* in enable_link_dp and disable_link_dp once.
3038+
*/
30353039
if (link->connector_signal == SIGNAL_TYPE_EDP) {
3036-
if (!link->dc->config.edp_no_power_sequencing)
3037-
link->dc->hwss.edp_power_control(link, true);
30383040
link->dc->hwss.edp_wait_for_hpd_ready(link, true);
30393041
}
30403042

@@ -3096,11 +3098,12 @@ void dce110_disable_link_output(struct dc_link *link,
30963098

30973099
link_hwss->disable_link_output(link, link_res, signal);
30983100
link->phy_state.symclk_state = SYMCLK_OFF_TX_OFF;
3099-
3100-
if (signal == SIGNAL_TYPE_EDP &&
3101-
link->dc->hwss.edp_backlight_control)
3102-
link->dc->hwss.edp_power_control(link, false);
3103-
else if (dmcu != NULL && dmcu->funcs->lock_phy)
3101+
/*
3102+
* Add the logic to extract BOTH power up and power down sequences
3103+
* from enable/disable link output and only call edp panel control
3104+
* in enable_link_dp and disable_link_dp once.
3105+
*/
3106+
if (dmcu != NULL && dmcu->funcs->lock_phy)
31043107
dmcu->funcs->unlock_phy(dmcu);
31053108
dc->link_srv->dp_trace_source_sequence(link, DPCD_SOURCE_SEQ_AFTER_DISABLE_LINK_PHY);
31063109
}

drivers/gpu/drm/amd/display/dc/link/link_dpms.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1927,6 +1927,11 @@ static void disable_link_dp(struct dc_link *link,
19271927

19281928
dp_disable_link_phy(link, link_res, signal);
19291929

1930+
if (link->connector_signal == SIGNAL_TYPE_EDP) {
1931+
if (!link->dc->config.edp_no_power_sequencing)
1932+
link->dc->hwss.edp_power_control(link, false);
1933+
}
1934+
19301935
if (signal == SIGNAL_TYPE_DISPLAY_PORT_MST)
19311936
/* set the sink to SST mode after disabling the link */
19321937
enable_mst_on_sink(link, false);

0 commit comments

Comments
 (0)