Skip to content

drm/apple: dcp-fabric: keep DP alt mode pipelines free of a second tunnel - #2034

Merged
DjDeveloperr merged 1 commit into
integration/aurorafrom
djdev/t6050-tunnel-only-first
Nov 16, 2026
Merged

DjDeveloperr merged 1 commit into
integration/aurorafrom
djdev/t6050-tunnel-only-first

Conversation

@DjDeveloperr

@DjDeveloperr DjDeveloperr commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Stacks on #1921. This branch is integration/aurora c0a2a75 with #1921's head (4c6a7b4) merged in unchanged, plus one commit. Only the last commit is new here. Once #1921 is merged with its commits unchanged (not squashed or rebased), the merge adds nothing. Review #1921 first.

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

drm/apple: dcp-fabric: keep DP alt mode pipelines free of a second tunnel

On the J714s:

So three external displays fit: a DP alt mode display on dcpext0 or dcpext2, and a dock's two tunnels on the other two pipelines.

A tunnel takes the free pipeline with the lowest CRTC index, dcpext0 before dcpext1. So once one tunnel sits on dcpext2, the next one goes to dcpext0 even with dcpext1 free. For example, with a DP alt mode display on the left-front port and a dock on the right:

  1. left-front DP alt → dcpext0, dock DP IN 0 → dcpext1, dock DP IN 1 → dcpext2;
  2. the left-front display is unplugged, and the dock's DP IN 0 display is replugged → dcpext0;
  3. the left-front display is plugged again: dcpext0 and dcpext2 drive tunnels, dcpext1 is idle, and the DP alt mode display waits for a free pipeline.

Once another pipeline the port reaches drives a display, a tunnel now takes a tunnel-only route before one that can carry DP alt mode. A lone tunnel still takes the lowest pipeline, so a single dock display keeps its connector. Ports without tunnel-only routes keep the CRTC order. New KUnit case fabric_tunnel_only_first_test checks the choice behind step 2. With dcpext2 driving a display, a tunnel gets dcpext1 and a DP alt mode display still finds dcpext0. A lone tunnel, and a port without tunnel-only routes, keep the CRTC order.

Tested

In k3 to k6 the displays came up in the order DP alt mode first, then the two tunnels. Routing in every one of those boots: Dell → dcpext0 (DP-2), JTG on DP IN 0 → dcpext1 (DP-5), G81SF on DP IN 1 → dcpext2 (DP-3). That's what this commit chooses, and also what the CRTC order chose before it. The replug sequence above was not run on hardware. Only the routing choice is covered, by that KUnit case, and the case was not run either (the compile-proof config has no KUnit).

Compile: fedora-kcheck (cross build, M5 intg6 config, this branch with #1921): 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):

  • internal panel;
  • Dell S2725QC (3840x2160@120) on the left-front port, DP alt mode;
  • Thunderbolt 5 dock on the right port: JTG S123 (1920x1280@60) on DP IN 0, Samsung Odyssey G81SF (3840x2160, up to 240 Hz) on DP IN 1.

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 the serial keyword added to one log line in the EDID PR.

kit adds Dell (left-front) JTG (dock DP IN 0) G81SF (dock DP IN 1) DP IN 1 in the kernel log
stock (default kernel) 3840x2160@120 1920x1080@60, no EDID, no name dark
k2b EDID defaults, and an earlier tunnel clock restart not up in that boot ¹ 1920x1080@60 ², "JTG S123" dark 11 IRQ_HPD, 3 relinks, 5 failed paired mode sets
k3 + atc tunnel open, + tunnel-only first 3840x2160@120 1920x1280@60 dark 10 IRQ_HPD, 3 relinks, 4 failed paired mode sets
k4 + merged-mode limit 3840x2160@120 1920x1280@60 dark 8 IRQ_HPD, 3 relinks, 1 failed paired mode set
k5 + no paired call under the limit, + tunnel clock only for its link 3840x2160@120 1920x1280@60 dark 7 IRQ_HPD, 3 relinks, no failed paired mode set, no clock rate change
k6 + DPTX connection DP IN, + held CM Ack bandwidth allocation 3840x2160@120 1920x1280@60 3840x2160@120 no IRQ_HPD, no relink

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

No. The new preference applies only to a port with apple,tunnel-only routes, which only the J714s DT has (with #1921/#2006).

🤖 Generated with Claude Code

…nnel

On the J714s, dcpext0 and dcpext2 reach both USB-C ports for DP alt mode
and for USB4 DP tunnels, dcpext1 has tunnel-only routes, and dcpext3 is
the merged-mode peer. Three external displays fit: a DP alt mode display
on the left-front port on dcpext0 or dcpext2, and a dock's two tunnels on
the other two pipelines, one of them paired with dcpext3.

A tunnel takes the free pipeline with the lowest CRTC index, dcpext0
before dcpext1. Once one tunnel sits on dcpext2 (it came while dcpext0
and dcpext1 were taken), the next one goes to dcpext0 even with dcpext1
free. For example, with a DP alt mode display on the left-front port and
a dock on the right:

  left-front DP alt -> dcpext0, dock DP IN 0 -> dcpext1,
  dock DP IN 1 (4K240) -> dcpext2 + dcpext3
  left-front display unplugged, dock DP IN 0 display re-plugged
  -> dock DP IN 0 -> dcpext0
  left-front display plugged again: dcpext0 and dcpext2 drive tunnels,
  dcpext1 is idle, and the display waits for a free pipeline

Once another pipeline a port reaches drives a display, have a tunnel
take a tunnel-only route before one that can carry DP alt mode. A lone
tunnel still takes the lowest pipeline, so a single dock display keeps
its connector (DP-1), and ports without tunnel-only routes keep the CRTC
order.

Signed-off-by: Diljit Singh <hey@djdev.me>
@DjDeveloperr
DjDeveloperr force-pushed the djdev/t6050-tunnel-only-first branch from 54905b5 to 36f2fbe Compare November 16, 2026 01:39
@DjDeveloperr

Copy link
Copy Markdown
Contributor Author

Rebased onto integration/aurora 0c6db05. #1921 is merged there unchanged, with its harness update #2041, so the branch is now this PR's one commit on the tip: 36f2fbe, the same patch-id as 54905b5. The merge of #1921 is no longer in the branch.

@DjDeveloperr
DjDeveloperr merged commit 48cac48 into integration/aurora Nov 16, 2026
1 check passed
@RyanTheTide
RyanTheTide deleted the djdev/t6050-tunnel-only-first branch November 16, 2026 05:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant