]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
drm/amd/display: correct some hdcp variable naming
authorWenjing Liu <wenjing.liu@amd.com>
Thu, 10 Dec 2020 19:21:25 +0000 (14:21 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 2 Feb 2021 17:09:09 +0000 (12:09 -0500)
[why]
In HDCP update stream config interface, some variables are named as
xxx_supported, but in fact the variable indicates whether or not xxx_enabled.
Correct the naming so it is less confusing to read the code.

Signed-off-by: Wenjing Liu <wenjing.liu@amd.com>
Reviewed-by: George Shen <George.Shen@amd.com>
Acked-by: Anson Jacob <Anson.Jacob@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/dc/core/dc_link.c
drivers/gpu/drm/amd/display/dc/dm_cp_psp.h
drivers/gpu/drm/amd/display/modules/hdcp/hdcp.h
drivers/gpu/drm/amd/display/modules/hdcp/hdcp_psp.c
drivers/gpu/drm/amd/display/modules/inc/mod_hdcp.h

index c2cd184f0bbd4b9f3baacda407a64e0bd22a87e7..b297ddc24d3ac2597f8dd57f1d3d262f65ec7617 100644 (file)
@@ -449,11 +449,12 @@ static void update_config(void *handle, struct cp_psp_stream_config *config)
                link->mode = mod_hdcp_signal_type_to_operation_mode(aconnector->dc_sink->sink_signal);
 
        display->controller = CONTROLLER_ID_D0 + config->otg_inst;
-       display->dig_fe = config->stream_enc_inst;
-       link->dig_be = config->link_enc_inst;
+       display->dig_fe = config->dig_fe;
+       link->dig_be = config->dig_be;
        link->ddc_line = aconnector->dc_link->ddc_hw_inst + 1;
        link->dp.rev = aconnector->dc_link->dpcd_caps.dpcd_rev.raw;
-       link->dp.mst_supported = config->mst_supported;
+       link->dp.assr_enabled = config->assr_enabled;
+       link->dp.mst_enabled = config->mst_enabled;
        display->adjust.disable = 1;
        link->adjust.auth_delay = 3;
        link->adjust.hdcp1.disable = 0;
index 55f20d731b25f9115adf485bddbd8bd26541251c..8506739a22f7a701fe0c96f994be46902d81612b 100644 (file)
@@ -3169,17 +3169,17 @@ static void update_psp_stream_config(struct pipe_ctx *pipe_ctx, bool dpms_off)
 {
        struct cp_psp *cp_psp = &pipe_ctx->stream->ctx->cp_psp;
        if (cp_psp && cp_psp->funcs.update_stream_config) {
-               struct cp_psp_stream_config config;
-
-               memset(&config, 0, sizeof(config));
+               struct cp_psp_stream_config config = {0};
+               enum dp_panel_mode panel_mode =
+                               dp_get_panel_mode(pipe_ctx->stream->link);
 
                config.otg_inst = (uint8_t) pipe_ctx->stream_res.tg->inst;
-               /*stream_enc_inst*/
-               config.stream_enc_inst = (uint8_t) pipe_ctx->stream_res.stream_enc->stream_enc_inst;
-               config.link_enc_inst = pipe_ctx->stream->link->link_enc_hw_inst;
+               config.dig_fe = (uint8_t) pipe_ctx->stream_res.stream_enc->stream_enc_inst;
+               config.dig_be = pipe_ctx->stream->link->link_enc_hw_inst;
                config.dpms_off = dpms_off;
                config.dm_stream_ctx = pipe_ctx->stream->dm_stream_context;
-               config.mst_supported = (pipe_ctx->stream->signal ==
+               config.assr_enabled = (panel_mode == DP_PANEL_MODE_EDP);
+               config.mst_enabled = (pipe_ctx->stream->signal ==
                                SIGNAL_TYPE_DISPLAY_PORT_MST);
                cp_psp->funcs.update_stream_config(cp_psp->handle, &config);
        }
index 5da7677627a171638524191cbb4bcea3d229054a..cac0b2c0d31b23a5935ec69de039b08ff563da23 100644 (file)
@@ -30,9 +30,10 @@ struct dc_link;
 
 struct cp_psp_stream_config {
        uint8_t otg_inst;
-       uint8_t link_enc_inst;
-       uint8_t stream_enc_inst;
-       uint8_t mst_supported;
+       uint8_t dig_be;
+       uint8_t dig_fe;
+       uint8_t assr_enabled;
+       uint8_t mst_enabled;
        void *dm_stream_ctx;
        bool dpms_off;
 };
index 6c678cfb82e39898f7e5134b9dc96d9d739e107e..5c22cf7e6118fb41960e762bf2e41bcdd83f327c 100644 (file)
@@ -397,7 +397,7 @@ static inline uint8_t is_dp_hdcp(struct mod_hdcp *hdcp)
 static inline uint8_t is_dp_mst_hdcp(struct mod_hdcp *hdcp)
 {
        return (hdcp->connection.link.mode == MOD_HDCP_MODE_DP &&
-                       hdcp->connection.link.dp.mst_supported);
+                       hdcp->connection.link.dp.mst_enabled);
 }
 
 static inline uint8_t is_hdmi_dvi_sl_hdcp(struct mod_hdcp *hdcp)
index 3a367a5968ae19c5e297a7337dacf0c04e5ec397..b26ed64eaf9868be00c3f43d80e7830e23b23a74 100644 (file)
@@ -106,7 +106,7 @@ enum mod_hdcp_status mod_hdcp_add_display_to_topology(struct mod_hdcp *hdcp,
        dtm_cmd->dtm_in_message.topology_update_v2.dig_be = link->dig_be;
        dtm_cmd->dtm_in_message.topology_update_v2.dig_fe = display->dig_fe;
        if (is_dp_hdcp(hdcp))
-               dtm_cmd->dtm_in_message.topology_update_v2.is_assr = link->dp.assr_supported;
+               dtm_cmd->dtm_in_message.topology_update_v2.is_assr = link->dp.assr_enabled;
 
        dtm_cmd->dtm_in_message.topology_update_v2.dp_mst_vcid = display->vc_id;
        dtm_cmd->dtm_in_message.topology_update_v2.max_hdcp_supported_version =
index eed560eecbab498dce293105ca1add9add9a5dc9..d223ed3be5d3deca64218cc5752c75472c80d9aa 100644 (file)
@@ -101,8 +101,8 @@ enum mod_hdcp_status {
 
 struct mod_hdcp_displayport {
        uint8_t rev;
-       uint8_t assr_supported;
-       uint8_t mst_supported;
+       uint8_t assr_enabled;
+       uint8_t mst_enabled;
 };
 
 struct mod_hdcp_hdmi {