[PATCH 0/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
Hi,
This series fixes a missing 3840x2160@120 mode on a Dell U3225QE, a
monitor with a built-in USB4 hub and MST branch device, connected to a
laptop over USB4.
After every USB4 plug-in, 3840x2160@120 RGB is not available for the
U3225QE panel. It comes back after a monitor power cycle and is lost
again on the next plug-in. Up to 7.2 the mode is missing from the mode
list. Since commit 0b0ff65d3ca1 ("drm/amd/display: Refactor stream
validation") in 7.3, it is offered as YCbCr 4:2:2 without DSC instead,
and "Mode Validation Warning: Viewport size failed validation." is
logged on every atomic check.
The mode needs DSC: uncompressed it needs 28.5 Gbit/s, and the HBR3 x4
link gives 25.1 Gbit/s. The panel is on logical port 8 of the monitor's
branch device, and DSC is decoded at that port, so
dm_dp_mst_is_port_support_mode() checks the "last link" after it. It
reads DP_LINK_BW_SET and DP_LANE_COUNT_SET of the port once, caches the
result, and rejects modes whose uncompressed rate does not fit.
A logical port is the branch device's own internal sink, so no DP link
follows it. On this monitor its registers seem to show the state of the
monitor's internal link while it trains. DPCD 0x100-0x108 of port 8,
captured with bpftrace:
when driver's read read ~1 s later
after USB4 plug-in 06 01 00 00 00 00 00 00 01 1e 84 00 02 02 02 02 10 01
after power cycle 06 04 00 00 00 00 00 00 00 1e 84 00 02 02 02 02 10 01
0x100 is DP_LINK_BW_SET, 0x101 is DP_LANE_COUNT_SET (bit 7 is enhanced
framing) and 0x108 is DP_MAIN_LINK_CHANNEL_CODING_SET.
After a plug-in the driver sees RBR x1 (1.26 Gbit/s) and drops the
mode. After a power cycle it reads before the channel coding is set,
gets no bandwidth, and skips the check. Even the settled value, HBR3
x4, is too slow for the uncompressed mode, so reading the registers
later would not help.
Patch 1 skips the last link check for logical ports. Physical ports
keep it. Patch 2 adds KUnit tests.
Testing:
- Reproduced on a Lenovo IdeaPad Pro 5 16AHP9 (Ryzen 7 8845HS, Radeon
780M, DCN 3.1.4) and a ThinkPad P14s (Ryzen AI 7 PRO 350, Radeon
860M, DCN 3.5), with a Dell U2515H daisy-chained from the U3225QE's DP
output, on Fedora kernels 7.2.4 and 7.3.3.
- With patch 1 applied to the amdgpu module of Fedora's 7.3.3, on both
laptops every plug-in gives 3840x2160@120 RGB 8 bpc with DSC
(4 slices, 16 bpp), and there are no Viewport size warnings.
- Without patch 1, the new logical port test (from patch 2) fails.
- Not tested: other MST hubs, or other monitors with logical ports.
Physical ports read and cache the same registers in the same way, so
they may have the same timing problem. I have no hardware to check
that, and this series does not change it.
How this was made: I used an AI coding assistant (Claude Code with
Claude Opus 5.5) to investigate the problem, write the bpftrace script
and the patches, and draft the messages. I ran all the hardware tests
myself and reviewed and edited the patches, tests and messages. Before
posting the bug report and this series, I spent time understanding the
problem and the solution well enough to feel that posting this makes
sense. DP, MST and DSC are not areas I know well, and this is my first
attempt at contributing to the kernel, so please point out anything
that looks wrong, and I am sorry in advance if I did not adhere to some
kernel requirement or convention.
The bug report has dmesg logs, the MST topology and the bpftrace
script:
https://gitlab.freedesktop.org/drm/amd/-/work_items/6142
Signed-off-by: Karol Baryła <git@xxxxxxxxxx>
---
Karol Baryła (2):
drm/amd/display: Skip the MST last link check for logical ports
drm/amd/display: Add KUnit tests for the MST last link check on logical ports
.../amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 13 ++++--
.../amdgpu_dm/tests/amdgpu_dm_mst_types_test.c | 47 ++++++++++++++++++++++
2 files changed, 57 insertions(+), 3 deletions(-)
---
base-commit: 47df73aa49d1988c8f684b7caf8be6570e966844
change-id: 20261116-mst-logical-port-3c8a8397830e
Best regards,
--
Karol Baryła <git@xxxxxxxxxx>