drm/amd/display: fix usb-c connector_type
authorAllen Pan <allen.pan@amd.com>
Thu, 7 Dec 2023 22:26:10 +0000 (17:26 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 19 Dec 2023 19:59:02 +0000 (14:59 -0500)
[why]
BIOS switches to use USB-C connector type 0x18, but VBIOS's
objectInfo table not supported yet. driver needs to patch it
based on enc_cap from system integration info table.

Reviewed-by: Charlene Liu <charlene.liu@amd.com>
Acked-by: Wayne Lin <wayne.lin@amd.com>
Signed-off-by: Allen Pan <allen.pan@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dcn35/dcn35_dio_link_encoder.c

index f91e0889527555b7afe4f4b4c60d285a23cdf3e8..da94e5309fbaf0f8e06a4a1aad4ce431a8d9f2cc 100644 (file)
@@ -256,6 +256,10 @@ void dcn35_link_encoder_construct(
                enc10->base.features.flags.bits.IS_UHBR10_CAPABLE = bp_cap_info.DP_UHBR10_EN;
                enc10->base.features.flags.bits.IS_UHBR13_5_CAPABLE = bp_cap_info.DP_UHBR13_5_EN;
                enc10->base.features.flags.bits.IS_UHBR20_CAPABLE = bp_cap_info.DP_UHBR20_EN;
+               if (bp_cap_info.DP_IS_USB_C) {
+                       /*BIOS not switch to use CONNECTOR_ID_USBC = 24 yet*/
+                       enc10->base.features.flags.bits.DP_IS_USB_C = 1;
+               }
 
        } else {
                DC_LOG_WARNING("%s: Failed to get encoder_cap_info from VBIOS with error code %d!\n",
@@ -264,4 +268,5 @@ void dcn35_link_encoder_construct(
        }
        if (enc10->base.ctx->dc->debug.hdmi20_disable)
                enc10->base.features.flags.bits.HDMI_6GB_EN = 0;
+
 }