mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-01 03:44:27 -04:00
drm/amd/display: Separate fec debug flag and monitor patch
[Why] Driver apply the monitor patch into global debug flag. When apply monitor patch, fec feature will always disable. [How] Separate fec debug flag and monitor patch Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Lewis Huang <Lewis.Huang@amd.com> Reviewed-by: Wenjing Liu <Wenjing.Liu@amd.com> Acked-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Alex Deucher
parent
f03e80d2e8
commit
89c7dfa927
@@ -1065,9 +1065,6 @@ static bool dc_link_detect_helper(struct dc_link *link,
|
||||
break;
|
||||
}
|
||||
|
||||
if (link->local_sink->edid_caps.panel_patch.disable_fec)
|
||||
link->ctx->dc->debug.disable_fec = true;
|
||||
|
||||
// Check if edid is the same
|
||||
if ((prev_sink) &&
|
||||
(edid_status == EDID_THE_SAME || edid_status == EDID_OK))
|
||||
@@ -3635,7 +3632,7 @@ uint32_t dc_link_bandwidth_kbps(
|
||||
link_bw_kbps *= 8; /* 8 bits per byte*/
|
||||
link_bw_kbps *= link_setting->lane_count;
|
||||
|
||||
if (dc_link_is_fec_supported(link) && !link->dc->debug.disable_fec) {
|
||||
if (dc_link_should_enable_fec(link)) {
|
||||
/* Account for FEC overhead.
|
||||
* We have to do it based on caps,
|
||||
* and not based on FEC being set ready,
|
||||
@@ -3687,3 +3684,18 @@ bool dc_link_is_fec_supported(const struct dc_link *link)
|
||||
!IS_FPGA_MAXIMUS_DC(link->ctx->dce_environment));
|
||||
}
|
||||
|
||||
bool dc_link_should_enable_fec(const struct dc_link *link)
|
||||
{
|
||||
bool is_fec_disable = false;
|
||||
bool ret = false;
|
||||
|
||||
if (link->connector_signal != SIGNAL_TYPE_DISPLAY_PORT_MST &&
|
||||
link->local_sink &&
|
||||
link->local_sink->edid_caps.panel_patch.disable_fec)
|
||||
is_fec_disable = true;
|
||||
|
||||
if (dc_link_is_fec_supported(link) && !link->dc->debug.disable_fec && !is_fec_disable)
|
||||
ret = true;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -4345,7 +4345,7 @@ void dp_set_fec_ready(struct dc_link *link, bool ready)
|
||||
struct link_encoder *link_enc = link->link_enc;
|
||||
uint8_t fec_config = 0;
|
||||
|
||||
if (!dc_link_is_fec_supported(link) || link->dc->debug.disable_fec)
|
||||
if (!dc_link_should_enable_fec(link))
|
||||
return;
|
||||
|
||||
if (link_enc->funcs->fec_set_ready &&
|
||||
@@ -4380,7 +4380,7 @@ void dp_set_fec_enable(struct dc_link *link, bool enable)
|
||||
{
|
||||
struct link_encoder *link_enc = link->link_enc;
|
||||
|
||||
if (!dc_link_is_fec_supported(link) || link->dc->debug.disable_fec)
|
||||
if (!dc_link_should_enable_fec(link))
|
||||
return;
|
||||
|
||||
if (link_enc->funcs->fec_set_enable &&
|
||||
|
||||
@@ -369,5 +369,6 @@ uint32_t dc_bandwidth_in_kbps_from_timing(
|
||||
const struct dc_crtc_timing *timing);
|
||||
|
||||
bool dc_link_is_fec_supported(const struct dc_link *link);
|
||||
bool dc_link_should_enable_fec(const struct dc_link *link);
|
||||
|
||||
#endif /* DC_LINK_H_ */
|
||||
|
||||
Reference in New Issue
Block a user