]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
drm/amd/display: update topology_update_input_v3 struct
authorQingqing Zhuo <qingqing.zhuo@amd.com>
Fri, 3 Jun 2022 18:44:58 +0000 (14:44 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 15 Jun 2022 01:38:40 +0000 (21:38 -0400)
[Why]
DIO parameters were missing in topology_update_intput_v3 struct.

[How]
Add DIO parameters in v3 struct and update in functions perspectively.

Reviewed-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Acked-by: Hamza Mahfooz <hamza.mahfooz@amd.com>
Signed-off-by: Qingqing Zhuo <qingqing.zhuo@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c
drivers/gpu/drm/amd/display/modules/hdcp/hdcp_psp.c
drivers/gpu/drm/amd/display/modules/hdcp/hdcp_psp.h

index 15c0e3f2a9c36d04a8c6b6ff277dda81bb8c0518..fcafe07ed9087f2616367da6f43e42f375b9e9d2 100644 (file)
@@ -476,6 +476,7 @@ static void update_config(void *handle, struct cp_psp_stream_config *config)
        link->ddc_line = aconnector->dc_link->ddc_hw_inst + 1;
        display->stream_enc_idx = config->stream_enc_idx;
        link->link_enc_idx = config->link_enc_idx;
+       link->dio_output_id = config->dio_output_idx;
        link->phy_idx = config->phy_idx;
        if (sink)
                link_is_hdcp14 = dc_link_is_hdcp14(aconnector->dc_link, sink->sink_signal);
@@ -483,6 +484,7 @@ static void update_config(void *handle, struct cp_psp_stream_config *config)
        link->dp.rev = aconnector->dc_link->dpcd_caps.dpcd_rev.raw;
        link->dp.assr_enabled = config->assr_enabled;
        link->dp.mst_enabled = config->mst_enabled;
+       link->dp.usb4_enabled = config->usb4_enabled;
        display->adjust.disable = MOD_HDCP_DISPLAY_DISABLE_AUTHENTICATION;
        link->adjust.auth_delay = 3;
        link->adjust.hdcp1.disable = 0;
index be61975f1470307c221c135b6638fb84501a8725..ee67a35c2a8eddab3d27f4403054032aa93c187b 100644 (file)
@@ -202,6 +202,10 @@ static enum mod_hdcp_status add_display_to_topology_v3(
        dtm_cmd->dtm_status = TA_DTM_STATUS__GENERIC_FAILURE;
        dtm_cmd->dtm_in_message.topology_update_v3.phy_id = link->phy_idx;
        dtm_cmd->dtm_in_message.topology_update_v3.link_hdcp_cap = link->hdcp_supported_informational;
+       dtm_cmd->dtm_in_message.topology_update_v3.dio_output_type = link->dp.usb4_enabled ?
+                       TA_DTM_DIO_OUTPUT_TYPE__DPIA :
+                       TA_DTM_DIO_OUTPUT_TYPE__DIRECT;
+       dtm_cmd->dtm_in_message.topology_update_v3.dio_output_id = link->dio_output_id;
 
        psp_dtm_invoke(psp, dtm_cmd->cmd_id);
        mutex_unlock(&psp->dtm_context.mutex);
index 2937b4b614614cd4ec17203b9ee32bd209d58c40..5b71bc96b98c50a5dfc80a932e2823570c930802 100644 (file)
@@ -94,6 +94,15 @@ enum ta_dtm_encoder_type {
        TA_DTM_ENCODER_TYPE__DIG        = 0x10
 };
 
+/* @enum ta_dtm_dio_output_type
+ * This enum defines software value for dio_output_type
+ */
+typedef enum {
+    TA_DTM_DIO_OUTPUT_TYPE__INVALID,
+    TA_DTM_DIO_OUTPUT_TYPE__DIRECT,
+    TA_DTM_DIO_OUTPUT_TYPE__DPIA
+} ta_dtm_dio_output_type;
+
 struct ta_dtm_topology_update_input_v3 {
        /* display handle is unique across the driver and is used to identify a display */
        /* for all security interfaces which reference displays such as HDCP */
@@ -111,6 +120,8 @@ struct ta_dtm_topology_update_input_v3 {
        enum ta_dtm_encoder_type encoder_type;
        uint32_t phy_id;
        uint32_t link_hdcp_cap;
+       ta_dtm_dio_output_type dio_output_type;
+       uint32_t dio_output_id;
 };
 
 struct ta_dtm_topology_assr_enable {