Commit 5abef8e5 authored by Jingwen Zhu's avatar Jingwen Zhu Committed by Alex Deucher

drm/amd/display: Set fec register init value

[Why]
We don't include this eDP FEC init on fastboot.

[How]
Set the fec to init value when stopping driver &get the fec register value to check should enable FEC.
Co-authored-by: default avatarJingwen Zhu <Jingwen.Zhu@amd.com>
Reviewed-by: default avatarWenjing Liu <Wenjing.Liu@amd.com>
Acked-by: default avatarAlex Hung <alex.hung@amd.com>
Signed-off-by: default avatarJingwen Zhu <Jingwen.Zhu@amd.com>
Tested-by: default avatarDaniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 71d7a553
...@@ -4683,22 +4683,20 @@ bool dc_link_is_fec_supported(const struct dc_link *link) ...@@ -4683,22 +4683,20 @@ bool dc_link_is_fec_supported(const struct dc_link *link)
bool dc_link_should_enable_fec(const struct dc_link *link) bool dc_link_should_enable_fec(const struct dc_link *link)
{ {
bool is_fec_disable = false; bool force_disable = false;
bool ret = false;
if ((link->connector_signal != SIGNAL_TYPE_DISPLAY_PORT_MST && if (link->fec_state == dc_link_fec_enabled)
force_disable = false;
else if (link->connector_signal != SIGNAL_TYPE_DISPLAY_PORT_MST &&
link->local_sink && link->local_sink &&
link->local_sink->edid_caps.panel_patch.disable_fec) || link->local_sink->edid_caps.panel_patch.disable_fec)
(link->connector_signal == SIGNAL_TYPE_EDP force_disable = true;
// enable FEC for EDP if DSC is supported else if (link->connector_signal == SIGNAL_TYPE_EDP
&& link->dpcd_caps.dsc_caps.dsc_basic_caps.fields.dsc_support.DSC_SUPPORT == false && link->dpcd_caps.dsc_caps.dsc_basic_caps.fields.
)) dsc_support.DSC_SUPPORT == false)
is_fec_disable = true; force_disable = true;
if (dc_link_is_fec_supported(link) && !link->dc->debug.disable_fec && !is_fec_disable) return !force_disable && dc_link_is_fec_supported(link);
ret = true;
return ret;
} }
uint32_t dc_bandwidth_in_kbps_from_timing( uint32_t dc_bandwidth_in_kbps_from_timing(
......
...@@ -1493,8 +1493,12 @@ void dcn10_init_hw(struct dc *dc) ...@@ -1493,8 +1493,12 @@ void dcn10_init_hw(struct dc *dc)
/* Check for enabled DIG to identify enabled display */ /* Check for enabled DIG to identify enabled display */
if (link->link_enc->funcs->is_dig_enabled && if (link->link_enc->funcs->is_dig_enabled &&
link->link_enc->funcs->is_dig_enabled(link->link_enc)) link->link_enc->funcs->is_dig_enabled(link->link_enc)) {
link->link_status.link_active = true; link->link_status.link_active = true;
if (link->link_enc->funcs->fec_is_active &&
link->link_enc->funcs->fec_is_active(link->link_enc))
link->fec_state = dc_link_fec_enabled;
}
} }
/* Power gate DSCs */ /* Power gate DSCs */
......
...@@ -188,8 +188,12 @@ void dcn31_init_hw(struct dc *dc) ...@@ -188,8 +188,12 @@ void dcn31_init_hw(struct dc *dc)
/* Check for enabled DIG to identify enabled display */ /* Check for enabled DIG to identify enabled display */
if (link->link_enc->funcs->is_dig_enabled && if (link->link_enc->funcs->is_dig_enabled &&
link->link_enc->funcs->is_dig_enabled(link->link_enc)) link->link_enc->funcs->is_dig_enabled(link->link_enc)) {
link->link_status.link_active = true; link->link_status.link_active = true;
if (link->link_enc->funcs->fec_is_active &&
link->link_enc->funcs->fec_is_active(link->link_enc))
link->fec_state = dc_link_fec_enabled;
}
} }
/* Enables outbox notifications for usb4 dpia */ /* Enables outbox notifications for usb4 dpia */
......
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