[PATCH] Test patch
From: Kevin Holm
Date: Mon Jul 29 2024 - 07:24:38 EST
---
.../display/amdgpu_dm/amdgpu_dm_mst_types.c | 33 +++----------------
1 file changed, 5 insertions(+), 28 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c =
b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
index a5e1a93ddaea..5c555a37e367 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
@@ -1599,7 +1599,7 @@ enum dc_status dm_dp_mst_is_port_support_mode(
struct amdgpu_dm_connector *aconnector,
struct dc_stream_state *stream)
{
- int pbn, branch_max_throughput_mps =3D 0;
+ int bpp, pbn, branch_max_throughput_mps =3D 0;
struct dc_link_settings cur_link_settings;
unsigned int end_to_end_bw_in_kbps =3D 0;
unsigned int upper_link_bw_in_kbps =3D 0, down_link_bw_in_kbps =3D 0=
;
@@ -1649,34 +1649,11 @@ enum dc_status dm_dp_mst_is_port_support_mode(
}
}
} else {
- /* Check if mode could be supported within max slot
- * number of current mst link and full_pbn of mst links.
- */
- int pbn_div, slot_num, max_slot_num;
- enum dc_link_encoding_format link_encoding;
- uint32_t stream_kbps =3D
- dc_bandwidth_in_kbps_from_timing(&stream->timing,
- dc_link_get_highest_encoding_format(stream->link));
-
- pbn =3D kbps_to_peak_pbn(stream_kbps);
- pbn_div =3D dm_mst_get_pbn_divider(stream->link);
- slot_num =3D DIV_ROUND_UP(pbn, pbn_div);
-
- link_encoding =3D dc_link_get_highest_encoding_format(stream->li=
nk);
- if (link_encoding =3D=3D DC_LINK_ENCODING_DP_8b_10b)
- max_slot_num =3D 63;
- else if (link_encoding =3D=3D DC_LINK_ENCODING_DP_128b_132b)
- max_slot_num =3D 64;
- else {
- DRM_DEBUG_DRIVER("Invalid link encoding format\n");
+ /* check if mode could be supported within full_pbn */
+ bpp =3D convert_dc_color_depth_into_bpc(stream->timing.display_c=
olor_depth) * 3;
+ pbn =3D drm_dp_calc_pbn_mode(stream->timing.pix_clk_100hz / 10, =
bpp << 4);
+ if (pbn > aconnector->mst_output_port->full_pbn)
return DC_FAIL_BANDWIDTH_VALIDATE;
- }
-
- if (slot_num > max_slot_num ||
- pbn > aconnector->mst_output_port->full_pbn) {
- DRM_DEBUG_DRIVER("Mode can not be supported within mst links=
!");
- return DC_FAIL_BANDWIDTH_VALIDATE;
- }
}
=20
=20 /* check is mst dsc output bandwidth branch_overall_throughput_0_m=
ps */
--=20
2.45.2
Regards,
Kevin