Repository navigation
phy: apple: atc: DisplayPort tunnel pixel clocks on the M4 (T8132) - #953
Merged
RyanTheTide merged 2 commits intoNov 5, 2026
Merged
Conversation
A display route of an external DCP names the DP PHY of each ATC, and the DisplayPort tunnel pixel clock is reached through it, but the T8132 PHY has none. Create it for a PHY with its USB3/USB4 banks. Creating it touches no register. The T8132 PHY has no DisplayPort alternate mode in this driver, so its DP ops must never program one: - phy_configure() returns -EOPNOTSUPP; - phy_set_mode_ext(DP or INVALID), sent around a tunnel's DPTX Activate and Deactivate, succeeds as a no-op while the PHY is in USB4/TBT mode and returns -EOPNOTSUPP otherwise. phy_validate() stays as it is: pure software, it reports no lanes outside a DP mode. Signed-off-by: Erik Bourget <[email protected]>
The T8132 PHY has the T8122 tunnel pixel clock: the same AUSPLL descriptor, APB handshake, lock bit and TX_DP_CTRL0 selects. Use it on T8132 as on T6030. The T8132 sources are display crossbar states 2 (dcpext0) and 4 (dcpext1), each feeding DP IN 0 through PCLK1 and DP IN 1 through PCLK2: add apple_dp_tunnel_t8132_pclk(). apple_atc_dp_tunnel_rate() passes source 0, which T8132 refuses, so its callers name their source. As on T6030, a DP IN 1 stream needs PCLK1 at its rate as well as PCLK2: without PCLK1 its picture is lost. PCLK1 is set up with DP IN 1 when it starts alone, and stays on while DP IN 1 runs, also when DP IN 0 is released; releasing DP IN 1 clears PCLK2, and PCLK1 only with DP IN 0 gone too. apple_dp_tunnel_pclks() names the gates the running streams need. Both DP IN streams of a PHY need one link rate: next to a DP IN 0 stream at another rate, the DP IN 1 stream stays dark. A stream at another rate than the one running is refused (-EBUSY) before anything is programmed. The T8132 ATC domain switches off at runtime outside a CIO mode. There a rate request is refused with -EBUSY and a stop only drops the bookkeeping, with no register access; and leaving a CIO mode stops a running tunnel clock first, since the PHY stop takes its PLL with it. Signed-off-by: Erik Bourget <[email protected]>
RyanTheTide
approved these changes
Nov 5, 2026
RyanTheTide
left a comment
Contributor
There was a problem hiding this comment.
Reviewed and tested here with the whole series on top of integration/aurora, thanks Erik.
- Fedora-base universal config build is clean, W=1 adds no warnings, dtbs_check adds none and only the t8132 DTBs change
- KUnit passes (atc 49/49, apple-dpin 94 + 1 skip, drm/apple 112 + 1 skip, the arm64 gate set 74 + 1 skip)
- one-shot boots on the M4 Pro (J616s, dock and external display attached) and the M2, both with zero err lines, no new warnings, 0 AVCs with SELinux enforcing, a freezer pm_test pass and the external display still up on the J616s
- the host selftests needed fixture updates for the renamed and new helpers, those come in with the #957 merge, all groups pass with them
Merging.
erikwb
pushed a commit
to erikwb/linux
that referenced
this pull request
Nov 5, 2026
The J713 external display series (aurora-silicon#952, aurora-silicon#953 and aurora-silicon#957) renamed or added production helpers that the host fixtures extract or call, so host test groups stopped compiling: - apple-dart-fw: the borrowed-DART unmap path calls apple_dart_dcp_invalidate_tlb_gated() now; stub that name. - t6030-clock: apple_atc_tunnel_is_t6030() became apple_atc_tunnel_t8122_clock(), and the PCLK gates moved to apple_dp_tunnel_pclks() in dp-tunnel.h. Extract them, the T8132 rate check and dcp_fabric_clock_refused(), and stub the T8132 dcpext leaves as never taken on T6030. - tiled-split: extract dcp_typec_route_no_dp_alt() and add two T8132 dcpext cases (DP IN 1 alone, and with a tile hint) plus a mutation that makes a dcpext tileable. - tunnel-route: extract dcp_route_tunnel_clock_blocked() and check that a dcpext is a tunnel clock source only as crossbar source 2 or 4. - apple-dcp quiesce (six groups): the modelled DCP gains tb_clock_refused, and dcp_typec_route_no_dp_alt() is false, since no route there is a T8132 dcpext. - apple-dcp publication-hpd, fast-replug-bounce, readiness and the service-rebind control: stub dcp_is_t8132_ext() as false, the T8132-only leaves (t8132_ext_drm_hotplug(), afk_compact_orphans_pending(), dcp_t8132_wait_teardown_answers()) as never reached, t8132_ext_drm_init() as 0 (what it returns on anything but J713), and give the modelled DCP the dptxep, t8132_release_late and afk_alloc members the series reads. Fixtures only: no production code changes, and no existing case is weakened. Signed-off-by: Ryan Murray <[email protected]> Assisted-by: LLM (cherry picked from commit 4f0a21107e9a71eacd4faf36f1ff0ae9a2071aae)
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.
A DisplayPort tunnel through a USB4 dock needs a pixel clock from the ATC PHY of the port, for each of its two DP IN adapters. The M4's PHY had no DP PHY object and no tunnel clock, so a display route had nothing to name and no tunnel could clock its stream.
phy_configure()is refused, andphy_set_mode_ext(DP/INVALID)is a no-op that succeeds while the PHY is in USB4/TBT mode.-EBUSY) before anything is programmed; the drm/apple side then keeps that output's crossbar link down and reports it unusable. The Thunderbolt PR makes the connection manager pick one rate per host router where it decides the rate, so this is the backstop for what the DPTX trains on its own.KUnit:
atc_tunnel_t8132_clock_sourceschecks the T8132 clock sources (2 and 4, PCLK1/PCLK2, nothing else),atc_tunnel_t8132_one_ratethe one-rate rule, andatc_tunnel_pclk_gatesthe gates the running streams need (PCLK1 kept for DP IN 1 when DP IN 0 goes, both cleared when both go).Part of the J713 external display series (six PRs, see #957). It doesn't depend on the others; the drm/apple PR uses it.
Tested on a J713 (M4 MacBook Air) with a CalDigit TS5 dock and two 4K monitors, with the six PRs together: both monitors at 3840x2160@60 on the two DP IN streams of one PHY at HBR2, replug, and s2idle with the monitors lit.
Known gaps (follow-ups): a single monitor is also capped at HBR2 (no HBR3 when it is alone).
On hardware, either of two monitors can be switched off while the other keeps its picture (DP IN 1 kept its PCLK1).
This was developed and tested by Claude (Anthropic), working with me on the J713.