Commit 41da5fd2 authored by Wenjing Liu's avatar Wenjing Liu Committed by Alex Deucher

drm/amd/display: solve regression in update phy state refactor

[Why]
There is a coding error when moving dp disable link phy to
hw sequencer, where the receiver power control is missed during
this refactor.

[how]
1. Add back missing receiver power control in disable link phy.
2. minor modifications to ensure there is no undesired sequence
changes in dp link enable/disable.
Reviewed-by: default avatarCharlene Liu <Charlene.Liu@amd.com>
Reviewed-by: default avatarMartin Leung <Martin.Leung@amd.com>
Acked-by: default avatarWayne Lin <wayne.lin@amd.com>
Signed-off-by: default avatarWenjing Liu <wenjing.liu@amd.com>
Tested-by: default avatarDaniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 8434f818
...@@ -7073,9 +7073,9 @@ void dp_enable_link_phy( ...@@ -7073,9 +7073,9 @@ void dp_enable_link_phy(
enum clock_source_id clock_source, enum clock_source_id clock_source,
const struct dc_link_settings *link_settings) const struct dc_link_settings *link_settings)
{ {
link->cur_link_settings = *link_settings;
link->dc->hwss.enable_dp_link_output(link, link_res, signal, link->dc->hwss.enable_dp_link_output(link, link_res, signal,
clock_source, link_settings); clock_source, link_settings);
link->cur_link_settings = *link_settings;
dp_receiver_power_ctrl(link, true); dp_receiver_power_ctrl(link, true);
} }
...@@ -7149,6 +7149,9 @@ void dp_disable_link_phy(struct dc_link *link, const struct link_resource *link_ ...@@ -7149,6 +7149,9 @@ void dp_disable_link_phy(struct dc_link *link, const struct link_resource *link_
{ {
struct dc *dc = link->ctx->dc; struct dc *dc = link->ctx->dc;
if (!link->wa_flags.dp_keep_receiver_powered)
dp_receiver_power_ctrl(link, false);
dc->hwss.disable_link_output(link, link_res, signal); dc->hwss.disable_link_output(link, link_res, signal);
/* Clear current link setting.*/ /* Clear current link setting.*/
memset(&link->cur_link_settings, 0, memset(&link->cur_link_settings, 0,
......
...@@ -3098,6 +3098,7 @@ void dce110_enable_dp_link_output( ...@@ -3098,6 +3098,7 @@ void dce110_enable_dp_link_output(
if (dmcu != NULL && dmcu->funcs->unlock_phy) if (dmcu != NULL && dmcu->funcs->unlock_phy)
dmcu->funcs->unlock_phy(dmcu); dmcu->funcs->unlock_phy(dmcu);
dp_source_sequence_trace(link, DPCD_SOURCE_SEQ_AFTER_ENABLE_LINK_PHY);
} }
void dce110_disable_link_output(struct dc_link *link, void dce110_disable_link_output(struct dc_link *link,
...@@ -3111,7 +3112,7 @@ void dce110_disable_link_output(struct dc_link *link, ...@@ -3111,7 +3112,7 @@ void dce110_disable_link_output(struct dc_link *link,
if (signal == SIGNAL_TYPE_EDP && if (signal == SIGNAL_TYPE_EDP &&
link->dc->hwss.edp_backlight_control) link->dc->hwss.edp_backlight_control)
link->dc->hwss.edp_backlight_control(link, false); link->dc->hwss.edp_backlight_control(link, false);
else if (dc_is_dp_signal(signal) && dmcu != NULL && dmcu->funcs->lock_phy) else if (dmcu != NULL && dmcu->funcs->lock_phy)
dmcu->funcs->lock_phy(dmcu); dmcu->funcs->lock_phy(dmcu);
link_hwss->disable_link_output(link, link_res, signal); link_hwss->disable_link_output(link, link_res, signal);
...@@ -3120,8 +3121,9 @@ void dce110_disable_link_output(struct dc_link *link, ...@@ -3120,8 +3121,9 @@ void dce110_disable_link_output(struct dc_link *link,
if (signal == SIGNAL_TYPE_EDP && if (signal == SIGNAL_TYPE_EDP &&
link->dc->hwss.edp_backlight_control) link->dc->hwss.edp_backlight_control)
link->dc->hwss.edp_power_control(link, false); link->dc->hwss.edp_power_control(link, false);
else if (dc_is_dp_signal(signal) && dmcu != NULL && dmcu->funcs->lock_phy) else if (dmcu != NULL && dmcu->funcs->lock_phy)
dmcu->funcs->unlock_phy(dmcu); dmcu->funcs->unlock_phy(dmcu);
dp_source_sequence_trace(link, DPCD_SOURCE_SEQ_AFTER_DISABLE_LINK_PHY);
} }
static const struct hw_sequencer_funcs dce110_funcs = { static const struct hw_sequencer_funcs dce110_funcs = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment