aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarry Wentland <harry.wentland@amd.com>2018-02-20 13:36:23 -0500
committerAlex Deucher <alexander.deucher@amd.com>2018-03-05 15:36:37 -0500
commitea74e15fb547483f9f86088443f2d3c9f518de8b (patch)
tree9cdd61d4bccb5d90f73721b3bc13078799291d79
parenta05bcff10426841351010e8648e4d9d95e9b65a1 (diff)
drm/amd/display: Default HDMI6G support to true. Log VBIOS table error.
There have been many reports of Ellesmere and Baffin systems not being able to drive HDMI 4k60 due to the fact that we check the HDMI_6GB_EN bit from VBIOS table. Windows seems to not have this issue. On some systems we fail to the encoder cap info from VBIOS. In that case we should default to enabling HDMI6G support. This was tested by dwagner on https://bugs.freedesktop.org/show_bug.cgi?id=102820 Signed-off-by: Harry Wentland <harry.wentland@amd.com> Reviewed-by: Roman Li <Roman.Li@amd.com> Reviewed-by: Tony Cheng <Tony.Cheng@amd.com> Acked-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
-rw-r--r--drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c16
1 files changed, 13 insertions, 3 deletions
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 f0d63ac7724a..81776e4797ed 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
@@ -678,6 +678,7 @@ void dce110_link_encoder_construct(
678{ 678{
679 struct bp_encoder_cap_info bp_cap_info = {0}; 679 struct bp_encoder_cap_info bp_cap_info = {0};
680 const struct dc_vbios_funcs *bp_funcs = init_data->ctx->dc_bios->funcs; 680 const struct dc_vbios_funcs *bp_funcs = init_data->ctx->dc_bios->funcs;
681 enum bp_result result = BP_RESULT_OK;
681 682
682 enc110->base.funcs = &dce110_lnk_enc_funcs; 683 enc110->base.funcs = &dce110_lnk_enc_funcs;
683 enc110->base.ctx = init_data->ctx; 684 enc110->base.ctx = init_data->ctx;
@@ -752,15 +753,24 @@ void dce110_link_encoder_construct(
752 enc110->base.preferred_engine = ENGINE_ID_UNKNOWN; 753 enc110->base.preferred_engine = ENGINE_ID_UNKNOWN;
753 } 754 }
754 755
756 /* default to one to mirror Windows behavior */
757 enc110->base.features.flags.bits.HDMI_6GB_EN = 1;
758
759 result = bp_funcs->get_encoder_cap_info(enc110->base.ctx->dc_bios,
760 enc110->base.id, &bp_cap_info);
761
755 /* Override features with DCE-specific values */ 762 /* Override features with DCE-specific values */
756 if (BP_RESULT_OK == bp_funcs->get_encoder_cap_info( 763 if (BP_RESULT_OK == result) {
757 enc110->base.ctx->dc_bios, enc110->base.id,
758 &bp_cap_info)) {
759 enc110->base.features.flags.bits.IS_HBR2_CAPABLE = 764 enc110->base.features.flags.bits.IS_HBR2_CAPABLE =
760 bp_cap_info.DP_HBR2_EN; 765 bp_cap_info.DP_HBR2_EN;
761 enc110->base.features.flags.bits.IS_HBR3_CAPABLE = 766 enc110->base.features.flags.bits.IS_HBR3_CAPABLE =
762 bp_cap_info.DP_HBR3_EN; 767 bp_cap_info.DP_HBR3_EN;
763 enc110->base.features.flags.bits.HDMI_6GB_EN = bp_cap_info.HDMI_6GB_EN; 768 enc110->base.features.flags.bits.HDMI_6GB_EN = bp_cap_info.HDMI_6GB_EN;
769 } else {
770 dm_logger_write(enc110->base.ctx->logger, LOG_WARNING,
771 "%s: Failed to get encoder_cap_info from VBIOS with error code %d!\n",
772 __func__,
773 result);
764 } 774 }
765} 775}
766 776