aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/linux-yocto-4.14.71/4931-drm-amd-display-add-DalEnableHDMI20-key-support.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.14.71/4931-drm-amd-display-add-DalEnableHDMI20-key-support.patch')
-rw-r--r--common/recipes-kernel/linux/linux-yocto-4.14.71/4931-drm-amd-display-add-DalEnableHDMI20-key-support.patch82
1 files changed, 82 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.14.71/4931-drm-amd-display-add-DalEnableHDMI20-key-support.patch b/common/recipes-kernel/linux/linux-yocto-4.14.71/4931-drm-amd-display-add-DalEnableHDMI20-key-support.patch
new file mode 100644
index 00000000..bd76d537
--- /dev/null
+++ b/common/recipes-kernel/linux/linux-yocto-4.14.71/4931-drm-amd-display-add-DalEnableHDMI20-key-support.patch
@@ -0,0 +1,82 @@
+From 1bdb1450b953467166e6914ede6e94b52c13ada2 Mon Sep 17 00:00:00 2001
+From: Charlene Liu <charlene.liu@amd.com>
+Date: Tue, 26 Jun 2018 18:49:32 -0400
+Subject: [PATCH 4931/5725] 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: Charlene Liu <charlene.liu@amd.com>
+Reviewed-by: Jun Lei <Jun.Lei@amd.com>
+Acked-by: Harry Wentland <harry.wentland@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ drivers/gpu/drm/amd/display/dc/dc.h | 1 +
+ drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c | 6 ++++++
+ drivers/gpu/drm/amd/display/dc/dcn10/dcn10_link_encoder.c | 6 ++++++
+ 3 files changed, 13 insertions(+)
+
+diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/drm/amd/display/dc/dc.h
+index d3c15de..a7c880b 100644
+--- a/drivers/gpu/drm/amd/display/dc/dc.h
++++ b/drivers/gpu/drm/amd/display/dc/dc.h
+@@ -252,6 +252,7 @@ struct dc_debug {
+ bool recovery_enabled;
+ bool avoid_vbios_exec_table;
+ bool scl_reset_length10;
++ bool hdmi20_disable;
+
+ };
+ struct dc_state;
+diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c b/drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c
+index dbe3b26..60e3c6a 100644
+--- a/drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c
++++ b/drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c
+@@ -646,6 +646,9 @@ static bool dce110_link_encoder_validate_hdmi_output(
+ if (!enc110->base.features.flags.bits.HDMI_6GB_EN &&
+ adjusted_pix_clk_khz >= 300000)
+ return false;
++ if (enc110->base.ctx->dc->debug.hdmi20_disable &&
++ crtc_timing->pixel_encoding == PIXEL_ENCODING_YCBCR420)
++ return false;
+ return true;
+ }
+
+@@ -773,6 +776,9 @@ void dce110_link_encoder_construct(
+ __func__,
+ 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(
+diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_link_encoder.c b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_link_encoder.c
+index be78ccb..6f67520 100644
+--- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_link_encoder.c
++++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_link_encoder.c
+@@ -596,6 +596,9 @@ static bool dcn10_link_encoder_validate_hdmi_output(
+ if (!enc10->base.features.flags.bits.HDMI_6GB_EN &&
+ adjusted_pix_clk_khz >= 300000)
+ return false;
++ if (enc10->base.ctx->dc->debug.hdmi20_disable &&
++ crtc_timing->pixel_encoding == PIXEL_ENCODING_YCBCR420)
++ return false;
+ return true;
+ }
+
+@@ -728,6 +731,9 @@ void dcn10_link_encoder_construct(
+ __func__,
+ 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(
+--
+2.7.4
+