drm/amd/display: Rename set_mst_bandwidth to align with DP spec
authorGeorge Shen <george.shen@amd.com>
Tue, 18 Aug 2020 22:42:55 +0000 (18:42 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 15 Sep 2020 21:52:41 +0000 (17:52 -0400)
[Why]
The function set_mst_bandwidth is poorly name since it isn't clear what
it does, and it also does not reflect any part of the allocation sequence
described in the DP spec.

[How]
Rename the function set_mst_bandwidth to set_throttled_vcp_size.

Signed-off-by: George Shen <george.shen@amd.com>
Acked-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc_link.c
drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.c
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_stream_encoder.c
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_stream_encoder.h
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_stream_encoder.c
drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dio_stream_encoder.c
drivers/gpu/drm/amd/display/dc/inc/hw/stream_encoder.h
drivers/gpu/drm/amd/display/dc/virtual/virtual_stream_encoder.c

index 437d1a7..1871ff6 100644 (file)
@@ -2946,7 +2946,7 @@ enum dc_status dc_link_allocate_mst_payload(struct pipe_ctx *pipe_ctx)
        pbn = get_pbn_from_timing(pipe_ctx);
        avg_time_slots_per_mtp = dc_fixpt_div(pbn, pbn_per_slot);
 
-       stream_encoder->funcs->set_mst_bandwidth(
+       stream_encoder->funcs->set_throttled_vcp_size(
                stream_encoder,
                avg_time_slots_per_mtp);
 
@@ -2974,7 +2974,7 @@ static enum dc_status deallocate_mst_payload(struct pipe_ctx *pipe_ctx)
         */
 
        /* slot X.Y */
-       stream_encoder->funcs->set_mst_bandwidth(
+       stream_encoder->funcs->set_throttled_vcp_size(
                stream_encoder,
                avg_time_slots_per_mtp);
 
index 4cdaaf4..5054bb5 100644 (file)
@@ -710,7 +710,7 @@ static void dce110_stream_encoder_lvds_set_stream_attribute(
        ASSERT(crtc_timing->pixel_encoding == PIXEL_ENCODING_RGB);
 }
 
-static void dce110_stream_encoder_set_mst_bandwidth(
+static void dce110_stream_encoder_set_throttled_vcp_size(
        struct stream_encoder *enc,
        struct fixed31_32 avg_time_slots_per_mtp)
 {
@@ -1621,8 +1621,8 @@ static const struct stream_encoder_funcs dce110_str_enc_funcs = {
                dce110_stream_encoder_dvi_set_stream_attribute,
        .lvds_set_stream_attribute =
                dce110_stream_encoder_lvds_set_stream_attribute,
-       .set_mst_bandwidth =
-               dce110_stream_encoder_set_mst_bandwidth,
+       .set_throttled_vcp_size =
+               dce110_stream_encoder_set_throttled_vcp_size,
        .update_hdmi_info_packets =
                dce110_stream_encoder_update_hdmi_info_packets,
        .stop_hdmi_info_packets =
index 842abb4..9cf139b 100644 (file)
@@ -619,7 +619,7 @@ void enc1_stream_encoder_dvi_set_stream_attribute(
        enc1_stream_encoder_set_stream_attribute_helper(enc1, crtc_timing);
 }
 
-void enc1_stream_encoder_set_mst_bandwidth(
+void enc1_stream_encoder_set_throttled_vcp_size(
        struct stream_encoder *enc,
        struct fixed31_32 avg_time_slots_per_mtp)
 {
@@ -1616,8 +1616,8 @@ static const struct stream_encoder_funcs dcn10_str_enc_funcs = {
                enc1_stream_encoder_hdmi_set_stream_attribute,
        .dvi_set_stream_attribute =
                enc1_stream_encoder_dvi_set_stream_attribute,
-       .set_mst_bandwidth =
-               enc1_stream_encoder_set_mst_bandwidth,
+       .set_throttled_vcp_size =
+               enc1_stream_encoder_set_throttled_vcp_size,
        .update_hdmi_info_packets =
                enc1_stream_encoder_update_hdmi_info_packets,
        .stop_hdmi_info_packets =
index 30eae74..b99d252 100644 (file)
@@ -588,7 +588,7 @@ void enc1_stream_encoder_dvi_set_stream_attribute(
        struct dc_crtc_timing *crtc_timing,
        bool is_dual_link);
 
-void enc1_stream_encoder_set_mst_bandwidth(
+void enc1_stream_encoder_set_throttled_vcp_size(
        struct stream_encoder *enc,
        struct fixed31_32 avg_time_slots_per_mtp);
 
index e3984f0..4075ae1 100644 (file)
@@ -561,8 +561,8 @@ static const struct stream_encoder_funcs dcn20_str_enc_funcs = {
                enc1_stream_encoder_hdmi_set_stream_attribute,
        .dvi_set_stream_attribute =
                enc1_stream_encoder_dvi_set_stream_attribute,
-       .set_mst_bandwidth =
-               enc1_stream_encoder_set_mst_bandwidth,
+       .set_throttled_vcp_size =
+               enc1_stream_encoder_set_throttled_vcp_size,
        .update_hdmi_info_packets =
                enc2_stream_encoder_update_hdmi_info_packets,
        .stop_hdmi_info_packets =
index f5e80a0..6c0f7ef 100644 (file)
@@ -790,8 +790,8 @@ static const struct stream_encoder_funcs dcn30_str_enc_funcs = {
                enc3_stream_encoder_hdmi_set_stream_attribute,
        .dvi_set_stream_attribute =
                enc3_stream_encoder_dvi_set_stream_attribute,
-       .set_mst_bandwidth =
-               enc1_stream_encoder_set_mst_bandwidth,
+       .set_throttled_vcp_size =
+               enc1_stream_encoder_set_throttled_vcp_size,
        .update_hdmi_info_packets =
                enc3_stream_encoder_update_hdmi_info_packets,
        .stop_hdmi_info_packets =
index 11ce06e..0184cef 100644 (file)
@@ -143,7 +143,7 @@ struct stream_encoder_funcs {
                struct stream_encoder *enc,
                struct dc_crtc_timing *crtc_timing);
 
-       void (*set_mst_bandwidth)(
+       void (*set_throttled_vcp_size)(
                struct stream_encoder *enc,
                struct fixed31_32 avg_time_slots_per_mtp);
 
index 944c032..f0a0d41 100644 (file)
@@ -46,9 +46,10 @@ static void virtual_stream_encoder_dvi_set_stream_attribute(
        struct dc_crtc_timing *crtc_timing,
        bool is_dual_link) {}
 
-static void virtual_stream_encoder_set_mst_bandwidth(
+static void virtual_stream_encoder_set_throttled_vcp_size(
        struct stream_encoder *enc,
-       struct fixed31_32 avg_time_slots_per_mtp) {}
+       struct fixed31_32 avg_time_slots_per_mtp)
+{}
 
 static void virtual_stream_encoder_update_hdmi_info_packets(
        struct stream_encoder *enc,
@@ -107,8 +108,8 @@ static const struct stream_encoder_funcs virtual_str_enc_funcs = {
                virtual_stream_encoder_hdmi_set_stream_attribute,
        .dvi_set_stream_attribute =
                virtual_stream_encoder_dvi_set_stream_attribute,
-       .set_mst_bandwidth =
-               virtual_stream_encoder_set_mst_bandwidth,
+       .set_throttled_vcp_size =
+               virtual_stream_encoder_set_throttled_vcp_size,
        .update_hdmi_info_packets =
                virtual_stream_encoder_update_hdmi_info_packets,
        .stop_hdmi_info_packets =