Repository navigation
thunderbolt: run a T6050 host DP IN's bandwidth allocation as macOS does - #2038
Merged
Merged
Conversation
On the J714s dock, a display on the dock's second DP OUT, tunnelled from the host's DP IN 1 beside a display on DP IN 0, never holds its link: the sink raises IRQ_HPD in the window where the DCP firmware has finished link training and asks the DP IN adapter for the tunnel's bandwidth, and the firmware then drops the display. macOS, in the same setup, sees no IRQ_HPD there and grants the request at once. Both run the adapters' USB4 bandwidth allocation mode, but not the same way: - macOS programs both host DP IN adapters with 1 Gb/s granularity. The driver picks the finest granularity that still covers UHBR20 x4, which on this dock is 0.5 Gb/s, so the estimated, requested and allocated bandwidths the firmware reads and writes are in other units than the ones it gets from macOS; - macOS acknowledges a DPTX request by setting CM Ack after writing the allocated bandwidth, waits for the adapter to clear the request with CM Ack still set, and clears CM Ack after that. The driver set CM Ack and cleared it again at once, before the adapter had taken the request. Do as macOS on the T6050 host's DP IN adapters (new host policy TB_HOST_DP_BW_HELD_ACK, in the M5 policy only). A held CM Ack is cleared again if the request does not clear in time or cannot be read. Other hosts and the device routers' adapters are unchanged. Tested only together with the DPTX connection DP IN change; with both, the DP IN 1 display holds its link. Signed-off-by: Diljit Singh <hey@djdev.me>
This was referenced Nov 16, 2026
Contributor
Author
|
Neo (J700, T8140) no-regression row on hardware, 2026-11-15:
Result: PASS, no T8140 regression found. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of a set of seven J714s external-display PRs, measured together (table below): #2032 EDID defaults, #2033 atc tunnel open, #2034 tunnel-only first (stacks on #1921), #2035 merged-mode limit, #2036 tunnel clock, #2037 DPTX connection DP IN and #2038 DP IN bandwidth allocation (merge those two together). Suggested order: #1921, #2006, then the set in any order.
What
One commit,
thunderbolt: run a T6050 host DP IN's bandwidth allocation as macOS does.On the T6050 host's DP IN adapters, the USB4 bandwidth allocation mode now runs:
This is gated by a new host policy,
TB_HOST_DP_BW_HELD_ACK, set only in the T6050 (M5) policy (apple_dpin_m5), and it applies only to host DP IN adapters (tb_port_is_apple_host_dpin()). Other hosts, Intel and other USB4 hosts included, and device routers' adapters keep the generic behaviour.Change from what ran in the kits: if the request doesn't clear in time, or the wait's read fails, a held CM Ack is now cleared before returning. Before, it stayed set on that error path. The path was not reached in any kit (no
timeout waiting for DPTX request to clear).Why
On the J714s dock, a display on the dock's second DP OUT, tunnelled from the host's DP IN 1 beside a display on DP IN 0, never held its link. The sink raised IRQ_HPD in the window where the DCP firmware had finished link training and asked the DP IN adapter for the tunnel's bandwidth, and the firmware then dropped the display.
Stacking
None in code: this applies to integration/aurora alone. It goes with #2037: the G81SF on DP IN 1 held its link only in k6, which added this and #2037 together. Neither was tested alone, so I can't say whether one of them would be enough. Please merge them together.
In the kits both ran with #1921, #2006 and the rest of this set.
Tested
timeout waiting for DPTX request to clear. The G81SF runs at 3840x2160@120 beside the Dell (3840x2160@120), the JTG (1920x1280@60) and the panel. Same at both read-outs. The Thunderbolt dock and the devices behind it (USB hubs, 2.5G Ethernet) stayed up.Compile: fedora-kcheck (cross build, M5 intg6 config): OK (vmlinux, Image and modules linked), 0 new warnings. checkpatch --strict: 0 errors; its one warning is the From/Signed-off-by name mismatch these commits always have.
Rig and kits
J714s (MacBook Pro 14", M5 Pro):
Each kit was integration/aurora 514ae1f + #2006 (which carries #1921) + #2018 as it was at 0521255 (its earlier PHY-side version) + the changes up to that row. Built natively on the M5, one-shot test boot, read-outs only (sysfs, debugfs, kernel log,
hyprctl monitors), then the default kernel restored and verified byte-identical. Since 514ae1f, integration/aurora has gained only #2022, which touches none of these files. The k6 tree is the tree of all seven PRs of this set merged on #2006, apart from a diagnostic log commit used only in the kits and theserialkeyword added to one log line in the EDID PR.The internal panel ran at 3024x1964@120 in every row. k6 was read at about 60 s and 150 s after boot, with the same result both times, and with no oops, WARN, DART fault or GPU fault.
¹ The left-front port's PD controller came up late in that boot and the Dell never entered DP alt mode. None of these changes touch that path.
² In k2b the JTG was on DP-1 and the compositor ran it at 1920x1080; from k3 on it is DP-5 at its native 1920x1280.
Neo rows needed
Yes, before merge. This touches shared Thunderbolt/USB4 code (
tunnel.c,usb4.c,tb.h,nhi.h). The new behaviour is gated to the T6050 policy, and T8140 has no USB4 router. So the Neo rows are a no-regression check of the shared code: boot, USB-C and the external display on the Neo's port.🤖 Generated with Claude Code