Skip to content

Commit caf0a90

Browse files
Harry Wentlandalexdeucher
authored andcommitted
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 <[email protected]> Reviewed-by: Roman Li <[email protected]> Reviewed-by: Tony Cheng <[email protected]> Acked-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
1 parent 5449e07 commit caf0a90

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -683,6 +683,7 @@ void dce110_link_encoder_construct(
683683
{
684684
struct bp_encoder_cap_info bp_cap_info = {0};
685685
const struct dc_vbios_funcs *bp_funcs = init_data->ctx->dc_bios->funcs;
686+
enum bp_result result = BP_RESULT_OK;
686687

687688
enc110->base.funcs = &dce110_lnk_enc_funcs;
688689
enc110->base.ctx = init_data->ctx;
@@ -757,15 +758,24 @@ void dce110_link_encoder_construct(
757758
enc110->base.preferred_engine = ENGINE_ID_UNKNOWN;
758759
}
759760

761+
/* default to one to mirror Windows behavior */
762+
enc110->base.features.flags.bits.HDMI_6GB_EN = 1;
763+
764+
result = bp_funcs->get_encoder_cap_info(enc110->base.ctx->dc_bios,
765+
enc110->base.id, &bp_cap_info);
766+
760767
/* Override features with DCE-specific values */
761-
if (BP_RESULT_OK == bp_funcs->get_encoder_cap_info(
762-
enc110->base.ctx->dc_bios, enc110->base.id,
763-
&bp_cap_info)) {
768+
if (BP_RESULT_OK == result) {
764769
enc110->base.features.flags.bits.IS_HBR2_CAPABLE =
765770
bp_cap_info.DP_HBR2_EN;
766771
enc110->base.features.flags.bits.IS_HBR3_CAPABLE =
767772
bp_cap_info.DP_HBR3_EN;
768773
enc110->base.features.flags.bits.HDMI_6GB_EN = bp_cap_info.HDMI_6GB_EN;
774+
} else {
775+
dm_logger_write(enc110->base.ctx->logger, LOG_WARNING,
776+
"%s: Failed to get encoder_cap_info from VBIOS with error code %d!\n",
777+
__func__,
778+
result);
769779
}
770780
}
771781

0 commit comments

Comments
 (0)