Commit b5cd418f authored by Wayne Lin's avatar Wayne Lin Committed by Alex Deucher
Browse files

drm/amd/display: Validate mdoe under MST LCT=1 case as well

[Why & How]
Currently in dm_dp_mst_is_port_support_mode(), when valdidating mode
under dsc decoding at the last DP link config, we only validate the
case when there is an UFP. However, if the MSTB LCT=1, there is no
UFP.

Under this case, use root_link_bw_in_kbps as the available bw to
compare.

Link: https://gitlab.freedesktop.org/drm/amd/-/issues/3720


Fixes: fa57924c ("drm/amd/display: Refactor function dm_dp_mst_is_port_support_mode()")
Cc: Mario Limonciello <mario.limonciello@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: default avatarJerry Zuo <jerry.zuo@amd.com>
Signed-off-by: default avatarWayne Lin <Wayne.Lin@amd.com>
Signed-off-by: default avatarTom Chung <chiahsuan.chung@amd.com>
Tested-by: default avatarDaniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
(cherry picked from commit a04d9534)
Cc: stable@vger.kernel.org
parent 11510e67
Loading
Loading
Loading
Loading
+9 −5
Original line number Diff line number Diff line
@@ -1835,13 +1835,17 @@ enum dc_status dm_dp_mst_is_port_support_mode(
			if (immediate_upstream_port) {
				virtual_channel_bw_in_kbps = kbps_from_pbn(immediate_upstream_port->full_pbn);
				virtual_channel_bw_in_kbps = min(root_link_bw_in_kbps, virtual_channel_bw_in_kbps);
			} else {
				/* For topology LCT 1 case - only one mstb*/
				virtual_channel_bw_in_kbps = root_link_bw_in_kbps;
			}

			if (bw_range.min_kbps > virtual_channel_bw_in_kbps) {
				DRM_DEBUG_DRIVER("MST_DSC dsc decode at last link."
						 "Max dsc compression can't fit into MST available bw\n");
				return DC_FAIL_BANDWIDTH_VALIDATE;
			}
		}
		}

		/*Confirm if we can obtain dsc config*/
		dc_dsc_get_default_config_option(stream->link->dc, &dsc_options);