Skip to content

J614s/T6040: Thunderbolt displays (Studio Display up to 5120x2880@60) - #2068

Merged
DjDeveloperr merged 7 commits into
aurora-silicon:mainfrom
petrskuta:pr/j614s-studio-display
Nov 24, 2026
Merged

DjDeveloperr merged 7 commits into
aurora-silicon:mainfrom
petrskuta:pr/j614s-studio-display

Conversation

@petrskuta

@petrskuta petrskuta commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

A Studio Display (2022) on a Thunderbolt port of the J614s (MacBook Pro 14" M4 Pro, T6040) now shows a picture, up to its native 5120x2880@60, as an extended desktop. Before this series it only charged. Findings and the whole path are in #1589.

Most of the credit goes to @fbalazsy. The first two commits are his work, kept under his authorship and sign-off: the T6040 DP tunnel pixel clock, and the T604X crossbar ATC enable that sat in his hibernation commit. Without them there is no picture at all. So is the host-test update for his clock (commit 6). The review rework in commits 1 and 6 is noted in them as [petr: …]. The other four commits are mine.

Commits

  1. phy: apple: t6040: DP tunnel pixel clock (František Balázsy). In CIO mode the PHY's AUSPLL feeds the DP IN pixel clocks. The AUSPLL start follows the toggle protocol at either ACK level and waits for lock. appledrm drives it through phy_configure() with three new DP options in include/linux/phy/phy-dp.h (set_tunnel_rate, tunnel_dpin, tunnel_rate). dcp-fabric picks this path from the PHY behind the route, an apple,t6040-atcphy, not from the machine compatible, and it covers T6040 and T6041. From fbalazsy/linux j616s/split-display.
  2. mux: apple-display-crossbar: enable the T604X ATC for a DP IN tunnel (František Balázsy). On T604X, 0x34 is the per-clock UHBR select and the DP IN ATC enable is at 0x38. Writing the T6030 enable to 0x34 set UHBR for an HBR2 stream and left the ATC off, so no pixel data reached the DP IN (~480 clock-sync packets/s). With this commit it is ~976,000 packets/s at 1080p60. Split out of fbalazsy/linux 5e6657513.
  3. thunderbolt: apple: drive displays behind T6040/T6041 DP tunnels. The M4 (T8132) DP IN policy for the T6040 ACIO, and T6040/T6041 added to the qualified SoCs.
  4. drm/apple: enable a T6041 tunnel's crossbar at its first link up. dcp_tunnel_crossbar_up() enabled the connection at the first link up only when dcp_t602x_tunnel_route() matched, and it never matches the T6041 crossbar on 26.6. Lower modes worked only because the firmware retrained after the mode set. 5120x2880 keeps the trained link and stayed dark with the crossbar clocks off.
  5. phy: apple: t6040: release both AUSPLL clock outputs when a tunnel stops. The tunnel's AUSPLL start sets CLKOUT_MASTER 0x808 and refuses to start while either bit is set, but the stop cleared only 0x8. After a DPMS off the clock could not start again (AUSPLL already in use), and the display stayed dark after DPMS on.
  6. tools: asahi: model the T6040 tunnel clock in the T6030 clock host test (František Balázsy). The host test extracts dcp_route_clock_rate() and now models the PHY check and phy_configure(). A new case runs a T6040 ATC PHY on the T6040, T6041 and T6030 machines through DP IN 0 and 1. From fbalazsy/linux ca29f8ed9.
  7. drm/apple: dptx: no PHY lane check for a DP tunnel on any SoC. A tunnel has no PHY lanes, so set_active_lane_count logged unexpected lane count:4 phy: 0 at error level on every tunnel link up. The check already skipped T8132 tunnels; it now skips any tunnel output (dcp_is_usb4_output()). Only the message changes.

The TMU change that was commit 5 is gone: #2088 (merged as 5d336151) makes bi-directional HiFi the default for every Apple CIO host. Other SoCs and DP alt mode routes are unchanged.

Testing

On 7b0416bd0edb alone (without #2069), rebased onto main f6577c089bd4. The full §5 evidence is in the review reply.

  • tools/asahi/t6030-clock-tests.py: 22/22 pass. Full LLVM=1 + Rust build with the linux-aurora 7.3.0.aurora1-41 config, with no new warnings.
  • MacBook Pro 14" M4 Pro (apple,j614s apple,t6040), with this series' own DTBs loaded through an update-m1n1 Stage 2 trial. Default command line, 0 failed units, no new kernel errors against the stock 7.3.0-1-41 boot.
    • Studio Display (2022) over Thunderbolt: coldplug, and hotplug on all three ports (ATC0/1/2), each at 5120x2880@60. DPMS off/on brings the picture back.
    • T6040 DP alt mode: a Dell 2560x1440 through a DisplayPort-to-USB-C adapter on all three ports.
    • HDMI port (DP2HDMI): the same Dell at 2560x1440.
    • s2idle: 3/3 resumes, with the Studio Display, the Dell over DP alt mode, and the Dell over HDMI; each display came back.
  • With J614s: PCIe-C on the Thunderbolt ports (Studio Display USB, audio, camera) #2069 on top: the Studio Display's USB side (speakers, microphone, camera, USB hubs) works too.

Earlier testing of the previous head (os-fw 26.6.2, system-fw 27.2, Hyprland 0.57.2) also covered 1920x1080 and 2560x1440, and 6 hotplugs in 90 s across all three ports. On the same port with #2069, the display's USB side (speakers, microphones, camera, USB-C ports) works too.

Known limitations, not addressed here:

  • The second tile / dpin1 is not used: 5K60 runs on dpin0 alone, as on macOS. In a macOS ioreg of this Mac with the Studio Display attached, only one DP IN / DP OUT pair is active (display DP OUT 11 "DP State" 2, DP OUT 12 idle). Displays that need two streams are not tested.

@joshuaswarren

joshuaswarren commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

[Joshua's agent] Thank you, Petr. Your commit 5 of this PR ("thunderbolt: apple: run T6040's TMU in bi-directional HiFi", 0737589) is carried for the T6050 in #2088, with you as the commit author. On a 14-inch M5 Max the display kept its link on the boots we ran with it. #2088 carries the same commit alone: your commit 5 here already defines QUIRK_TMU_HIFI_BI as BIT(15) with the same tb.c hunks, so the two PRs overlap and there is no bit clash. Whichever of #2068 and #2088 lands second drops the duplicate. (Edited: an earlier version of this comment wrongly named a BIT(12) clash.)

joshuaswarren pushed a commit to joshuaswarren/linux that referenced this pull request Nov 16, 2026
Per Petr Skuta's T6040 work (aurora-silicon#2068), a Studio Display's router and DP OUT
adapter report "Min Required TMU Mode" 3, bi-directional HiFi, and macOS runs
the link that way. A device router
that already reads as bi-directional HiFi is left alone by tb_enable_tmu(),
so the host never disables and re-enables its TMU, and the display drops HPD
about a second into 5120x2880@60 ("IOAVVideoInterface terminated").

Add QUIRK_TMU_HIFI_BI: every device router is configured for
bi-directional HiFi, disabled, offered the host's time and enabled again.
On the Studio Display tried (14-inch M5 Max) the router logs the disable and
the mode set and no local_time line, and sysfs reads it as generation 3, so
tb_switch_is_usb4() is false and tb_switch_tmu_post_time() returns early: the
time post is a no-op there and the effect is the disable and enable. Whether
posting the time matters on a USB4 device router is not shown.
The host router's TMU stays with its firmware where QUIRK_HOST_TMU is set.
Set for T6050 only: T6040's DP IN is disabled in this tree, so its entry is
left alone.

Signed-off-by: Petr Škuta <[email protected]>
[joshuaswarren: set for T6050, BIT(15); commit message reworded to say what the logs show of the time post]
Signed-off-by: Joshua Warren <[email protected]>
@RyanTheTide

Copy link
Copy Markdown
Contributor

Thanks for the Studio Display bring-up on the J614s, and for keeping František's commits under his name.

Two parts don't match how we usually structure things.

drivers/gpu/drm/apple/dcp-fabric.c:459-463 picks the tunnel pixel-clock path with of_machine_is_compatible("apple,t6040") || ("apple,t6041"). The PHY on the route already identifies itself, so the choice could follow the PHY (its ops or compatible). We select by a hardware property rather than by SoC name.

drivers/phy/apple/t6040-usb2.c:2241-2257 exports a third per-chip *_dp_tunnel_rate() symbol ("a symbol of its own, as for T6050"), which dcp-fabric fetches with symbol_get() at :488-496 and :3101-3106. Could this be a single PHY operation (for example phy_configure() with DP options) that each ATC PHY driver implements? Then dcp-fabric needs no per-chip branch.

Also, drivers/thunderbolt/apple.c:250-255 sets tmu_hifi_bi for T6040 only. The reason is macOS and sink behaviour, so it fits better as the default for every Apple CIO host (see #2088).

We can run Thunderbolt display rows on our M1 Pro, M2, M4 Pro and A18 Pro.

@RyanTheTide

Copy link
Copy Markdown
Contributor

dcp_fabric_t6040_tunnel_clock() in dcp-fabric.c decides whether apple_t6040_dp_tunnel_rate() drives the tunnel and whether dcp_tunnel_prepare() skips apple_atc_dp_tunnel_open(), and it decides this with of_machine_is_compatible("apple,t6040"/"apple,t6041"). Which clock feeds DP IN 0/1 is a property of the ATC PHY behind the route. It should come from that PHY's compatible or match data, or from a property on the DCP or route node, not from the machine compatible. Until then this should stay a draft.

@RyanTheTide
RyanTheTide marked this pull request as draft November 20, 2026 23:55
@RyanTheTide

Copy link
Copy Markdown
Contributor

@petrskuta, a tidy-up pass over the open PRs here. These of yours need something:

If any of these are no longer needed, closing them helps; otherwise a merge or rebase onto integration/aurora is usually all they need. Thanks!

@petrskuta
petrskuta force-pushed the pr/j614s-studio-display branch from d64847a to 8d87e19 Compare November 22, 2026 20:09
@petrskuta

Copy link
Copy Markdown
Contributor Author

@RyanTheTide thanks for the review. Rebased onto integration/aurora f5fae3cbb047 and reworked:

  • TMU: the T6040 TMU commit is dropped. thunderbolt: apple: default device routers to bidirectional HiFi #2088 (merged as 5d336151) already makes QUIRK_TMU_HIFI_BI the default for every Apple CIO host, T6040 included. This PR no longer touches nhi.h or tb.c.
  • Clock path from the PHY, not the machine: dcp_fabric_t6040_tunnel_clock() and its of_machine_is_compatible("apple,t6040"/"apple,t6041") checks are gone. dcp-fabric now asks the PHY behind the route (dcp_phy_clocks_tunnel()): a PHY with compatible apple,t6040-atcphy clocks the DP IN adapters itself. That covers T6040 and T6041 with no SoC list. The same check decides whether dcp_tunnel_prepare() skips apple_atc_dp_tunnel_open().
  • No per-chip symbol: apple_t6040_dp_tunnel_rate() and its symbol_get() calls are removed. The clock goes through phy_configure() with three new DP options in include/linux/phy/phy-dp.h: set_tunnel_rate, tunnel_dpin and tunnel_rate (the link rate code, 0 to stop). t6040_dp_configure() handles them, refusing them in combination with the other set_* flags or with a DP IN above 1. Any other ATC PHY driver can implement the same options. The T6050 and older ATC paths are unchanged in this PR.
  • František's two commits and his host test keep his authorship; the rework is noted in them as [petr: …]. The host test now models phy_configure() and checks that a T6040 ATC PHY takes that path on the T6040, T6041 and T6030 machines alike.

Checks:

  • tools/asahi/t6030-clock-tests.py: 22/22 pass.
  • Full LLVM=1 + Rust build (Image, modules, dtbs) with the linux-aurora 7.3.0.aurora1-41 config: no new warnings. checkpatch is clean on the kernel code.
  • J614s (M4 Pro), Studio Display (2022), kernel 7.3.0-pr2068+ (this PR plus J614s: PCIe-C on the Thunderbolt ports (Studio Display USB, audio, camera) #2069, stock 7.3.0-1-41 DTB), KDE Plasma:
    • Hotplug on all three Thunderbolt ports (ATC0/1/2): each logs DP tunnel 0: rate 0x14 from the T6040 PHY through the new phy_configure() path and shows a picture, 5120x2880@60.
    • DPMS off for 10 s and back on: the clock stops and restarts (no AUSPLL already in use), and the picture returns.
    • s2idle (systemctl suspend) with the display attached: suspend_stats success 1, fail 0. After wake the tunnel clock restarts and the display is back at 5120x2880@60.
    • Coldplug (display attached at boot): the picture survives the login screen at 5120x2880@60.
    • No oops, warnings or AUSPLL errors in the kernel log across these boots.

#2069 is rebased on top of this; its three commits are unchanged.

@petrskuta
petrskuta marked this pull request as ready for review November 22, 2026 20:10

@DjDeveloperr DjDeveloperr left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Formal §1–§6 pre-PR review on 8d87e19b0abc:

What passes

  • Architecture & §1: Reworking the T6040 tunnel pixel clock onto phy_configure() (include/linux/phy/phy-dp.h), selecting the clock path via the PHY's apple,t6040-atcphy compatible in dcp-fabric.c instead of machine compatibles, using xbar->hw->t604x_dpin_atc in apple-display-crossbar.c, dropping the superseded TMU commit after #2088, and preserving František Balázsy's authorship on commits 1, 2, and 6 are all in the right direction.
  • §6 Naming & CI: Clean; live host-tests CI is green on 8d87e19b0abc (including the new t6040-tunnel-clock host-test case).

Blocking findings

  1. §4 Attribution (hard rule): All 6 commits (d09a208c6845, 8b2ff009f717, f6a80ac0f409, afe228ed9494, 70fb03405868, 8d87e19b0abc) carry Co-Authored-By: Claude Opus 5.5 <[email protected]>. Git commits must carry human author/committer and human Signed-off-by: only (zero AI trailers); please strip Co-Authored-By: from every commit and keep AI disclosure in the PR description only.
  2. §2 Correctness bug in drivers/phy/apple/t6040-usb2.c (t6040_tun_pll_start()):
    ack = readl(core + T6040_CORE_AUSPLL_CMD) & T6040_CORE_AUSPLL_CMD_ACK;
    if (t6040_tun_pll_cmd(tphy, (ack ? 0 : T6040_CORE_AUSPLL_CMD_REQ) | 0x10000000, true) ||
        readl_poll_timeout(core + T6040_CORE_DP_PCLK_STATUS, v,
                           !!(v & T6040_CORE_DP_PCLK_STATUS_LOCK) == !ack,
                           10, 500 * USEC_PER_MSEC) ||
        t6040_tun_pll_cmd(tphy, (ack ? T6040_CORE_AUSPLL_CMD_REQ : 0) | 0x10010000, ack)) {
    The entry check at t6040_tun_pll_start() only rejects AUSPLL_CMD_REQ (not a stale AUSPLL_CMD_ACK == 1, which can occur after a PHY power/reset cycle). If ack == true:
    • The first t6040_tun_pll_cmd() waits for hardcoded true instead of !ack, so it returns immediately without waiting for ACK to toggle low.
    • The T6040_CORE_DP_PCLK_STATUS_LOCK poll waits for !!(v & LOCK) == !ack (i.e. LOCK == 0, unlocked!) instead of LOCK == 1.
      Please pass !ack to the first t6040_tun_pll_cmd() (matching t6040_tun_pll_stop()) and poll unconditionally for v & T6040_CORE_DP_PCLK_STATUS_LOCK.
  3. §5 Evidence & regression counts: The J614s run on 8d87e19b0abc was tested stacked with #2069 and omits the §5 regression counts (default command line confirmation, SELinux AVC count if enforcing, failed systemd units count, and new kernel errors vs baseline). Please post explicit §5 regression counts on the updated head, and note a non-T6040 regression check (or T6040 DP alt-mode check) since dcp-fabric.c, apple-display-crossbar.c, and include/linux/phy/phy-dp.h are shared paths.

Non-blocking notes

  • In t6040_tun_select_write(), retuning DP IN 0 while DP IN 1 is active clears PCLK1's enable bit between the two writel() calls, momentarily gating DP IN 1's prerequisite clock (compare drivers/phy/apple/atc.c:2979). Also, if t6040_tun_switch(tphy, 0, true) times out when starting DP IN 1 alone, tphy->tun_pre is still false so switch_failed does not clear switch 0's sw_gate bit.
  • dcp_tunnel_split_up_locked() does not call dcp_dpxbar_link(..., true) after first mux_control_try_select() on apple,t6041-display-crossbar (only relevant for dpin1/tiled displays, which you already note are untested).

fbalazsy and others added 7 commits November 24, 2026 12:54
In CIO mode the T6040 ATC PHY's AUSPLL feeds the pixel clocks of the
router's DP IN adapters: one fixed AUSPLL frequency, a divider select per
link rate in TX_DP_CTRL0 (RBR 4, HBR 3, HBR2 1, HBR3 0), the clock switch
gate in the cfg bank, and the stop. DP IN 0 uses PCLK1 and switch 1; DP IN
1 uses PCLK2 and switch 2 and needs PCLK1 running as well.

appledrm drives it through phy_configure() on the PHY's DP phy, with three
new DP options: set_tunnel_rate, tunnel_dpin and tunnel_rate (the DP link
rate code, 0 to stop). Which path a tunnel takes follows the PHY behind
the route, not the machine: an "apple,t6040-atcphy" PHY clocks the tunnel
itself (on T6040 and T6041 alike) and needs no apple_atc_dp_tunnel_open().
The PHY stops the tunnel clocks when it leaves CIO.

[petr: taken from fbalazsy/linux j616s/split-display (the tunnel clock,
 432f1ec "give the DP tunnel pixel clock a symbol of its own" and
 346a417 "give DP IN 1 of a tunnel its PCLK1 prerequisite") onto
 integration/aurora. Tested on the J614s with a Studio Display (2022) on
 Thunderbolt up to 5120x2880@60, aurora-silicon#1589.]
[petr: per review, the clock goes through phy_configure() instead of an
 exported apple_t6040_dp_tunnel_rate(), and dcp-fabric selects it by the
 PHY's compatible instead of of_machine_is_compatible("apple,t6040"/"t6041").]
[petr: per review, the AUSPLL start waits for ACK at either level and for
 the lock, as the stop does; retuning DP IN 0 keeps PCLK1 on under a running
 DP IN 1; a DP IN 1 whose switch 1 times out also releases it.]

Signed-off-by: František Balázsy <[email protected]>
Signed-off-by: Petr Škuta <[email protected]>
On T6040/T6041 the crossbar's 0x34 is a per-clock UHBR select (bit n set
when the link rate is UHBR) and the ATC enable of a DP IN output is at
0x38. The T6030 link wrote the ATC enable to 0x34, which set the UHBR
select of an HBR2 stream and left the ATC disabled: the tunnel trained
but no pixel data reached the DP IN. DP IN tunnels carry DP 1.x rates
only, so clear the UHBR select and set the enable at 0x38; the DP alt
mode output keeps the T6030 write. Resume checks the same register.

[petr: split out of fbalazsy/linux 5e66575 "drm/apple: T6041 display
 coprocessors across hibernation and S2R" (with its comment from
 ed490dd). On the J614s this took the Studio Display's video path from
 ~480 to ~976,000 packets/s at 1080p60, aurora-silicon#1589.]

Signed-off-by: František Balázsy <[email protected]>
Signed-off-by: Petr Škuta <[email protected]>
Give the T6040 ACIO the M4 (T8132) DP IN policy and qualify T6040 and
T6041 for DP tunnels. Their DP IN adapters take the t8103 handshake and
the M3 flow, as on T8132; the pixel clock is the ATC PHY's AUSPLL,
set through phy_configure().

Tested on the J614s (M4 Pro) with a Studio Display (2022) on the left
Thunderbolt port: 1920x1080, 2560x1440 and 5120x2880 at 60 Hz, extended
desktop, aurora-silicon#1589.

Signed-off-by: Petr Škuta <[email protected]>
dcp_tunnel_crossbar_up() routes the mux at the first
DidChangeLinkConfiguration and enables the connection only for
dcp_t602x_tunnel_route(), which never matches the T6041 crossbar on 26.6.
Its clocks then stay off until a retrain runs the up path again. 1080p
and 1440p got video only because the firmware retrained after the mode
set; 5120x2880 keeps the trained link ("Forcing link status to true for
synched-pipe config") and stayed dark with the crossbar's FIFO and pixel
clocks off.

Also enable the connection at the first link up for the T6041 crossbar.
Tested on the J614s with a Studio Display (2022): 5120x2880@60,
aurora-silicon#1589.

Signed-off-by: Petr Škuta <[email protected]>
The tunnel's AUSPLL start sets CLKOUT_MASTER 0x808 and refuses to start
while either bit is set ('already in use'), but the stop cleared only
0x8. After the first stop, e.g. a DPMS off of a Studio Display, the
tunnel clock could not start again:

  DP tunnel: AUSPLL already in use (master 0x81d54, cmd 0x10000018)
  DP tunnel pixel clock (rate 0x14) failed: -16

and the display stayed dark after DPMS on. Clear both outputs.

Signed-off-by: Petr Škuta <[email protected]>
The host test extracts dcp_route_clock_rate() from the display fabric and
builds it on its own. The fabric now sets the tunnel clock through
phy_configure() when the route's PHY is a T6040 ATC PHY, so the test needs
those helpers and a model of the PHY operation.

Extract dcp_phy_clocks_tunnel() and dcp_phy_tunnel_rate() with the other
fabric functions, give the model PHY an OF node and stub phy_configure()
with the DP tunnel options. Add a case that runs a T6040 ATC PHY on the
T6040, T6041 and T6030 machines through DP IN 0 and 1: the rate reaches
the PHY with set_tunnel_rate alone and the right adapter, neither the ATC
nor the T6050 provider is called, and a clock that fails to start leaves
the route's rate alone.

[petr: reworked for phy_configure() and the PHY compatible.]

Signed-off-by: František Balázsy <[email protected]>
Signed-off-by: Petr Škuta <[email protected]>
SET_ACTIVE_LANE_COUNT compares the requested lane count with the PHY's.
A DP tunnel has no PHY lanes: its lane count is the tunnel's, and the
PHY's holds the previous active one. The check already skipped tunnels on
a T8132 dcpext; on other SoCs every tunnel link up logged

  set_active_lane_count: unexpected lane count:4 phy: 0

at error level, as on the J614s (T6040) with a Studio Display at every
hotplug and resume. Skip the check for any tunnel output
(dcp_is_usb4_output()), which is a property of the route rather than of
the SoC. Only the message changes: the lane count was accepted either
way.

Signed-off-by: Petr Škuta <[email protected]>
@github-actions github-actions Bot added area:display Area from CODEOWNERS (bot) area:gpu Area from CODEOWNERS (bot) area:usb Area from CODEOWNERS (bot) changes-requested A reviewer requested changes (bot) needs-hw-row No hardware row at the PR head (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) needs-template PR body lacks Tested or Risk (bot) labels Nov 24, 2026
@petrskuta
petrskuta force-pushed the pr/j614s-studio-display branch from 8d87e19 to 7b0416b Compare November 24, 2026 13:25
@petrskuta
petrskuta requested review from a team as code owners November 24, 2026 13:25
@petrskuta

Copy link
Copy Markdown
Contributor Author

@DjDeveloperr thanks for the review. New head 7b0416bd0edb, rebased onto main f6577c089bd4.

§4 Attribution: the Co-Authored-By: trailers are removed from every commit, here and in #2069. The commits carry only human authors and Signed-off-by:. AI use is disclosed in the PR description.

§2 t6040_tun_pll_start(): fixed as you suggested. The first command now waits for !ack, matching t6040_tun_pll_stop(), and the lock poll waits for DP_PCLK_STATUS_LOCK set at either ACK level. The ACK-clear path, which all tests so far ran, is unchanged.

Non-blocking notes:

  • Retuning DP IN 0 now keeps PCLK1 enabled while DP IN 1 runs, as atc.c does.
  • For DP IN 1 alone, tun_pre is set before switch 0 is gated on, so a timeout there also releases switch 0.
  • These two and the §2 fix are folded into commit 1 with a [petr: …] note.
  • dcp_tunnel_split_up_locked() on the T6041 crossbar is left as it is. It only affects dpin1 tiled displays, which I can't test (see Known limitations).

New commit 7, drm/apple: dptx: no PHY lane check for a DP tunnel on any SoC: the §5 run showed set_active_lane_count: unexpected lane count:4 phy: 0 at error level on every tunnel link up. The check already skipped tunnels on a T8132 dcpext. It now skips any tunnel output (dcp_is_usb4_output()). Only the message changes.

§5 evidence on 7b0416bd0edb alone (without #2069)

Setup: J614s (M4 Pro), kernel 7.3.0-pr2068a+, LLVM=1 + Rust, linux-aurora 7.3.0.aurora1-41 config. Its own DTBs (no PCIe-C nodes) were loaded through an update-m1n1 Stage 2 trial, which committed.

  • Default command line: matches the GRUB entry exactly (root=UUID=… rw rootflags=subvol=root … quiet splash, nothing added).
  • SELinux: not present (Arch Linux ARM), so the AVC count is n/a.
  • Failed systemd units: 0.
  • Kernel errors at boot: 1 line, the apple_sep matching message, which the stock 7.3.0-1-41 boot also logs. No new errors against stock, no oops, no WARNING.
  • Studio Display (2022) over Thunderbolt: coldplug, and hotplug on all three ports (ATC0/1/2), each at 5120x2880@60. DPMS off/on: the clock restarts, no AUSPLL already in use.
  • Shared-path check, T6040 DP alt mode: a Dell 2560x1440 monitor through a DisplayPort-to-USB-C adapter on all three ports. Each connects and lights up.
  • Shared-path check, HDMI: the same Dell on the HDMI port, through the DP2HDMI path, at 2560x1440.
  • s2idle: 3/3 resumes, with the Studio Display, with the Dell over DP alt mode, and with the Dell over HDMI. Each display came back.
  • tools/asahi/t6030-clock-tests.py: 22/22 pass. run-host-tests.py --only t6030-clock-tests passes. --only apple-dcp fails cases 87 same-handle-srcu-index and 88 mux-release-stages on this machine, identically on plain main f6577c089bd4, so this series doesn't cause them.

After resume, outside the paths this PR touches (reported, not hidden):

  • The AOP crashed once (AOP firmware crashed, 18 s after a resume, followed by Too many inflight calls on endpoint 34 and speaker ASoC errors).
  • drm_gem.c:1161 WARNING in drm_gem_object_free from asahi_core::mmu VM teardown, twice, when kscreenlocker_greet closed its DRM file after a resume.

Neither showed up on the stock 7.3.0-1-41 kernel with a suspend, lock/unlock and speaker playback. But stock predates 111 main commits in drivers/gpu/drm/asahi, the AOP and Apple audio, and this series touches none of those files. Stock also does not bring the HDMI output back after resume, while this kernel does. The set_digital_out_mode returned 0x00000006 error on an HDMI connect appears on stock too.

I have no non-T6040 Mac. @RyanTheTide's offered M1 Pro / M2 / M4 Pro Thunderbolt display rows would cover the other SoCs for the shared dcp-fabric.c, apple-display-crossbar.c and phy-dp.h changes.

#2069 is rebased on this head; its three commits are unchanged apart from the trailers.

@DjDeveloperr DjDeveloperr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: HOLD at 7b0416bd0edb

Blockers:

  • PR body (last line, §4): remove the trailing tool-attribution footer line (also flagged by pr-text). Under the 2026-11-24 §4 policy update, PR bodies must have no tool attribution either; editing the PR description in place is sufficient (no commit changes or force-push needed).

Checked: All code, commits, and standalone J614s hardware evidence at 7b0416bd0edb are clean — every prior code and commit-trailer blocker is resolved, and commit 7 (dptxep.c) removes a SoC gate cleanly. Once the PR body footer is removed and kunit / readiness pass, this is ready to approve.

Evidence
  • §1 No model gating: Pass. dcp-fabric.c selects the tunnel pixel-clock path by apple,t6040-atcphy (dcp_phy_clocks_tunnel()) and enables the crossbar on first link up by apple,t6041-display-crossbar; apple-display-crossbar.c uses xbar->hw->t604x_dpin_atc; dptxep.c replaces dcp_is_t8132_ext(dcp) with !dcp_is_usb4_output(dcp); drivers/thunderbolt/apple.c wires apple_dpin_m4 and qualifies apple,t6040/apple,t6041.
  • §2 Production-ready / correctness: Pass. t6040_tun_pll_start() now passes !ack to the first t6040_tun_pll_cmd() and polls v & T6040_CORE_DP_PCLK_STATUS_LOCK unconditionally. Both prior non-blocking notes (t6040_tun_select_write() preserving pclk[0].en when retuning DP IN 0 with DP IN 1 active, and t6040_tun_rate_locked() setting tun_pre = true before gating switch 0) are also fixed. Default kernel cmdline confirmed.
  • §3 Safety: Pass. No hardcoded safety limits; proper cleanup on timeout and CIO teardown (t6040_tun_stop_all_locked()).
  • §4 Attribution: Commits pass — all 7 commits (1e10b5670f51..7b0416bd0edb) carry human authors (František Balázsy on commits 1, 2, 6; Petr Škuta on commits 3, 4, 5, 7), human committer, and human Signed-off-by: with zero tool trailers. PR body fails due to the trailing footer line noted in Blockers (non-blocking: pr-text also warns about missing Tested: / Risk: summary lines).
  • §5 Evidence & CI at 7b0416bd0edb: Standalone J614s run (without #2069) covers Studio Display 5120x2880@60 across ATC0/1/2 (coldplug, hotplug, DPMS off/on, s2idle), DP alt mode on all three ports, HDMI DP2HDMI, default cmdline, 0 failed units, and 0 new kernel errors vs baseline. Live CI: host-tests PASS (including t6040-tunnel-clock), pr-text PASS (with warnings), kunit IN_PROGRESS, readiness QUEUED.
  • §6 Naming: Pass (existing tools/asahi/ path and update-m1n1 CLI name are upstream/installed identifiers).

@github-actions github-actions Bot added the ci-failing A check failed at the PR head (bot) label Nov 24, 2026
@github-actions

github-actions Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Merge readiness at 7b0416bd: not ready yet

Check Detail
CI at head no failing: pr-text / pr-text
Review ok approved by DjDeveloperr
Requested changes ok none
Hardware row at head ok comment at 7b0416bd
Conflicts ok none
PR text adopt when you next edit add a 'Tested:' line; a 'Risk:' line (door and Macs) (guide)

Areas: area:display, area:gpu, area:usb

Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels.

@DjDeveloperr DjDeveloperr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: FINISH, then merge at 7b0416bd0edb: the code is ready; it needs one more row.

Blockers: none in the code. Missing row: commit 7 removes a SoC gate, and dcp-fabric.c, dptxep.c and thunderbolt/apple.c run on every generation, so before it merges it also needs one run at this head on a non-M4 Mac: an external display over USB-C at boot and on hotplug, and one s2idle. We'll run it on our J714s or J700.

Checked: thank you, this is a big one. No Apple material. Your standalone J614s run at this head: a Studio Display at 5120x2880@60 on all three ports (coldplug, hotplug, DPMS, s2idle), DP alt mode and DP2HDMI, 0 failed units, 0 new kernel errors. I removed the footer from the body; the readiness failure is the bot, not CI.

@DjDeveloperr
DjDeveloperr dismissed stale reviews from themself November 24, 2026 22:36

Superseded by the review at 7b0416b

@DjDeveloperr

Copy link
Copy Markdown
Contributor

J714s (M5 Pro, T6050) row at 7b0416bd0edb: PASS

Kernel: one combined candidate 94ea5d0cb4ec (tree 3c2a50b08e3c) = main 065904c137fa + PRs 2909, 2227, 2217, 2068, 2870 and 2954 at their exact heads, merged in that order with no conflicts and the PR commits unchanged. Built natively on the M5 as 7.3.0-m5-fb4 and booted with the default's DTB, Stage 2 and command line (MTE on, SEP writes on). Baseline: the M5 default 7.3.0-m5-cdirect14, same Mesa.

On T6050 the T6040 PHY clock path and the T6041 crossbar step are not taken (other PHY and crossbar). The shared change that runs here is commit 7.

  • Boot: the panel, a Dell S2725QC over USB-C DP alt mode (DP-2, 3840x2160 at 120 Hz) and a Samsung G81SF through the TB5 dock (DP-5, 3840x2160 at 240 Hz, a DP tunnel). All three were enumerated at boot and driven by Hyprland.
  • The boot's err-level lines are the default's set minus one: set_active_lane_count: unexpected lane count:4 phy: 0 on the G81SF's tunnel DCP, which commit 7 removes. 0 new.
  • Sleep: automated boot plus one system sleep, with no physical unplug or replug (a remote run). The J714s sleeps deep (the mem_sleep default; s2idle has no wake IRQ on this DT), so this is systemctl suspend with a PMU RTC wake: in at 22:10:53, out at 22:11:20 UTC, woken by the RTC.
  • After the wake all three displays came back connected and enabled at the same modes. Hyprland kept its pid, the GPU stayed live, 0 GPU recoveries.
  • The wake also logged 53 err-level lines: DCP services announced again ("unable to match service ...", "undeclared provider clock index"), one dock PCIe port D3hot to D0, one dwc3 genpd_prepare -11. None come from the dptx lane check, the tunnel clock or the crossbar. This slot did not run a sleep on the default kernel to compare.

Health on the candidate boot: 0 oops or WARN, 0 GPU recoveries over the whole boot, 0 DART faults. Its err-level lines at boot are the default's set minus one line (the lane-count message that 2068 removes), so 0 new. Failed units: only tailscaled.service, which fails on the default too. LSMs capability,landlock: no SELinux or AppArmor, 0 avc: lines.

@github-actions github-actions Bot removed changes-requested A reviewer requested changes (bot) needs-hw-row No hardware row at the PR head (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) labels Nov 24, 2026
@DjDeveloperr
DjDeveloperr merged commit 70e700c into aurora-silicon:main Nov 24, 2026
9 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:display Area from CODEOWNERS (bot) area:gpu Area from CODEOWNERS (bot) area:usb Area from CODEOWNERS (bot) ci-failing A check failed at the PR head (bot) needs-template PR body lacks Tested or Risk (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants