Commit 8fc0a0d4 authored by Charlene Liu's avatar Charlene Liu Committed by Alex Deucher

drm/amd/display: add DalEnableHDMI20 key support

[why]
"DalEnableHDMI20" set to 0, disallow HDMI YCbCr420 and  pixel clock > 340Mhz
Default is enabled.
Signed-off-by: default avatarCharlene Liu <charlene.liu@amd.com>
Reviewed-by: default avatarJun Lei <Jun.Lei@amd.com>
Acked-by: default avatarHarry Wentland <harry.wentland@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent e0d85b20
...@@ -251,6 +251,7 @@ struct dc_debug { ...@@ -251,6 +251,7 @@ struct dc_debug {
bool recovery_enabled; bool recovery_enabled;
bool avoid_vbios_exec_table; bool avoid_vbios_exec_table;
bool scl_reset_length10; bool scl_reset_length10;
bool hdmi20_disable;
}; };
struct dc_state; struct dc_state;
......
...@@ -646,6 +646,9 @@ static bool dce110_link_encoder_validate_hdmi_output( ...@@ -646,6 +646,9 @@ static bool dce110_link_encoder_validate_hdmi_output(
if (!enc110->base.features.flags.bits.HDMI_6GB_EN && if (!enc110->base.features.flags.bits.HDMI_6GB_EN &&
adjusted_pix_clk_khz >= 300000) adjusted_pix_clk_khz >= 300000)
return false; return false;
if (enc110->base.ctx->dc->debug.hdmi20_disable &&
crtc_timing->pixel_encoding == PIXEL_ENCODING_YCBCR420)
return false;
return true; return true;
} }
...@@ -773,6 +776,9 @@ void dce110_link_encoder_construct( ...@@ -773,6 +776,9 @@ void dce110_link_encoder_construct(
__func__, __func__,
result); result);
} }
if (enc110->base.ctx->dc->debug.hdmi20_disable) {
enc110->base.features.flags.bits.HDMI_6GB_EN = 0;
}
} }
bool dce110_link_encoder_validate_output_with_stream( bool dce110_link_encoder_validate_output_with_stream(
......
...@@ -596,6 +596,9 @@ static bool dcn10_link_encoder_validate_hdmi_output( ...@@ -596,6 +596,9 @@ static bool dcn10_link_encoder_validate_hdmi_output(
if (!enc10->base.features.flags.bits.HDMI_6GB_EN && if (!enc10->base.features.flags.bits.HDMI_6GB_EN &&
adjusted_pix_clk_khz >= 300000) adjusted_pix_clk_khz >= 300000)
return false; return false;
if (enc10->base.ctx->dc->debug.hdmi20_disable &&
crtc_timing->pixel_encoding == PIXEL_ENCODING_YCBCR420)
return false;
return true; return true;
} }
...@@ -728,6 +731,9 @@ void dcn10_link_encoder_construct( ...@@ -728,6 +731,9 @@ void dcn10_link_encoder_construct(
__func__, __func__,
result); result);
} }
if (enc10->base.ctx->dc->debug.hdmi20_disable) {
enc10->base.features.flags.bits.HDMI_6GB_EN = 0;
}
} }
bool dcn10_link_encoder_validate_output_with_stream( bool dcn10_link_encoder_validate_output_with_stream(
......
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