Skip to content

phy: apple: atc: leave a tunnel PHY of another driver unopened off t600x - #2033

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

DjDeveloperr merged 1 commit into
integration/aurorafrom
djdev/t6050-atc-tunnel-open

Conversation

@DjDeveloperr

@DjDeveloperr DjDeveloperr commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

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, phy: apple: atc: leave a tunnel PHY of another driver unopened off t600x.

Every DisplayPort tunnel on a T6050 logged a failed PHY open:

apple-dcp 2b2e00000.dcp: allocated Type-C DPTX PHY 2
apple-dcp 2b2e00000.dcp: DP tunnel PHY open failed: -22
apple-dcp 2b2e00000.dcp: display routed to Thunderbolt DP tunnel dpin0

dcp_tunnel_prepare() ignores -EOPNOTSUPP from apple_atc_dp_tunnel_open(), which the function returns on every SoC but t600x. But it checks the PHY's ops first, and a T6050 route's PHY comes from atc-t6050-dp.c, not atc.c, so it returned -EINVAL first. Nothing was lost: T6050's tunnel clocks start from the link rate in apple_t6050_dp_tunnel_clock(). The warning only read like a reason for a dark display.

The SoC is now checked before the PHY. Every SoC but t600x gets -EOPNOTSUPP whichever driver provides the PHY, and t600x still refuses a PHY that isn't one of its own.

Stacking

None. This applies to integration/aurora alone and is independent of #1921 and #2006. In the kits it ran with them.

Tested

  • k2b (without this): 2 DP tunnel PHY open failed: -22 in the boot, one per dock tunnel.
  • k3 to k6 (with this): none. Both dock tunnels still route, train and get their mode. In k6 all four displays light (table below).

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):

  • 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 function is reached only for a USB4 DP tunnel, which T8140 doesn't have. For a PHY from atc.c on a SoC other than t600x the result is -EOPNOTSUPP as before. Only a PHY from another driver on such a SoC changes, from -EINVAL to -EOPNOTSUPP, and that's T6050.

🤖 Generated with Claude Code

Every DisplayPort tunnel on the J714s dock logs a failed PHY open:

  apple-dcp 2b2e00000.dcp: allocated Type-C DPTX PHY 2
  apple-dcp 2b2e00000.dcp: DP tunnel PHY open failed: -22
  apple-dcp 2b2e00000.dcp: display routed to Thunderbolt DP tunnel dpin0
  apple-dcp 392e00000.dcp: allocated Type-C DPTX PHY 2
  apple-dcp 392e00000.dcp: DP tunnel PHY open failed: -22

dcp_tunnel_prepare() calls apple_atc_dp_tunnel_open() for every tunnel
and ignores -EOPNOTSUPP, the function's documented answer on every SoC
but t600x, where the rate call alone starts the clock path. It checks the
PHY's ops first, though, and a T6050 route's PHY is provided by
atc-t6050-dp.c, not by this driver, so it returns -EINVAL before it gets
to say so. Nothing is lost on T6050: the tunnel clocks start from
the link rate in apple_t6050_dp_tunnel_clock() (clock dpin + 1), and
both displays above train and get their mode. The warning only reads
like a reason for a dark display.

Check the SoC first and the PHY after, so that every SoC but t600x gets
-EOPNOTSUPP whichever driver provides the PHY; t600x still refuses a PHY
that is not one of its own.

Signed-off-by: Diljit Singh <hey@djdev.me>
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