[PATCH 1/2] drm/amd/display: Skip the MST last link check for logical ports

From: Karol Baryła

Date: Mon Nov 16 2026 - 06:12:30 EST


[Why]
For MST DSC without passthrough, dm_dp_mst_is_port_support_mode() reads
DP_LINK_BW_SET/DP_LANE_COUNT_SET of the output port and rejects modes
whose uncompressed rate exceeds that "last link". The value is read once
and cached on the connector.

A logical port (port number 8 and above) is the branch device's own
internal sink, such as the panel of a monitor with a built-in MST hub.
No DP link follows it, so its link configuration registers do not
describe one. A Dell U3225QE behind a USB4 DP tunnel reports its
internal link in DP_LINK_BW_SET/DP_LANE_COUNT_SET while that link is
still training: right after a hotplug the read returns RBR x1
(1257120 kbps), which prunes every 3840x2160@120 mode (28512000 kbps
uncompressed, DSC required). After a monitor power cycle the same read
happens before the channel coding is set, gives 0, and the modes are
offered. Which of the two happens depends on timing. Once training
completes the registers show HBR3 x4 (25142400 kbps), which is still
below the uncompressed rate, so re-reading instead of caching would not
help.

Since commit 0b0ff65d3ca1 ("drm/amd/display: Refactor stream
validation"), a mode rejected by this check is retried as YCbCr 4:2:2,
which fits without DSC. So instead of disappearing, the mode is offered
as 4:2:2. Every atomic check then tries RGB first, fails, and logs
"Mode Validation Warning: Viewport size failed validation."

[How]
Skip the last link check for logical ports. Physical ports keep it
unchanged.

Fixes: fa57924c76d9 ("drm/amd/display: Refactor function dm_dp_mst_is_port_support_mode()")
Closes: https://gitlab.freedesktop.org/drm/amd/-/work_items/6142
Signed-off-by: Karol Baryła <git@xxxxxxxxxx>
---
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 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 5697645ef7cc..b9ff0880d150 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
@@ -2066,9 +2066,16 @@ enum dc_status dm_dp_mst_is_port_support_mode(
struct drm_dp_mst_port *immediate_upstream_port = NULL;
uint32_t end_link_bw = 0;

- /*Get last DP link BW capability. Mode shall be supported by Legacy peer*/
- if (aconnector->mst_output_port->pdt != DP_PEER_DEVICE_DP_LEGACY_CONV &&
- aconnector->mst_output_port->pdt != DP_PEER_DEVICE_NONE) {
+ /*
+ * Get last DP link BW capability. Mode shall be supported by Legacy peer.
+ *
+ * Skip logical ports: they are the branch device's own internal sink,
+ * so no DP link follows them and their link configuration registers
+ * do not describe one.
+ */
+ if (!drm_dp_mst_port_is_logical(aconnector->mst_output_port) &&
+ aconnector->mst_output_port->pdt != DP_PEER_DEVICE_DP_LEGACY_CONV &&
+ aconnector->mst_output_port->pdt != DP_PEER_DEVICE_NONE) {
if (aconnector->vc_full_pbn != aconnector->mst_output_port->full_pbn) {
dp_get_link_current_set_bw(&aconnector->mst_output_port->aux, &end_link_bw);
aconnector->vc_full_pbn = aconnector->mst_output_port->full_pbn;

--
2.56.1