Skip to content

dart: allow the locked DCP DART view on T600x, so desktop M1 Pro/Max/Ultra DCPs boot - #46

Open
riopierrefrancois wants to merge 1 commit into
omacom:integration/aurorafrom
riopierrefrancois:t600x-locked-dcp-dart
Open

riopierrefrancois wants to merge 1 commit into
omacom:integration/aurorafrom
riopierrefrancois:t600x-locked-dcp-dart

Conversation

@riopierrefrancois

Copy link
Copy Markdown

On a Mac Studio M1 Max (J375c, T6001) the HDMI DCP never comes up under Linux and the desktop stays on 1080p simpledrm (omacom/linux-aurora#379). Stage 2 logs:

dart: dart /arm-io/dart-dcp at 0x38b30c000 is a t6000 (locked)
rtkit(dcp): booting with version 12
rtkit(dcp): failed to DART map (size 0x4000)
dcp: failed to boot RTKit
display: failed to initialize DCP

7e00d54 added a mutable view of a configuration-locked DCP DART, but only for T8103. T600x has the same lock on a DART_T6000, so RTKit's buffer grant is refused, dcp_init() backs out, and the DCP is left mid-handshake. Linux then gets no HELLO.

This extends that view, and the FDT reservation of the L2 pages it publishes, to T6000/T6001/T6002.

Tested: J375c (T6001), OS firmware 13.5, system firmware 26.5, stage 2 built from bc79acc with this change, stock linux-aurora 7.2.11.aurora14-1. apple-drm binds both DCPs and HDMI runs 3840x2160@60. The booted build also printed a line in dart_reserve_legacy_tables(); that line is dropped here so the host test can still lift the function body.

Not tested: T6000 and T6002 are included by analogy and have not been booted.

Not changed: the T8103-only inherited-prefix block in kboot_prepare_dt(). A stage 1 carrying this change would need it; I left it out because it adds bail conditions I could not test.

Tests: new T600x cases in test_t8103_display_dart.py and test_legacy_table_lifetime.py. They fail without the source change. I ran those two files and test_locked_dart_tables.py locally, not the full suite.

Maintainers are welcome to push to this branch or take the change over.

🤖 Generated with Claude Code

On a Mac Studio M1 Max (J375c, T6001) the HDMI DCP never comes up under
Linux and the desktop stays on 1080p simpledrm (omacom/linux-aurora#379).
Stage 2 logs:

  dart: dart /arm-io/dart-dcp at 0x38b30c000 is a t6000 (locked)
  rtkit(dcp): booting with version 12
  rtkit(dcp): failed to DART map (size 0x4000)
  dcp: failed to boot RTKit
  display: failed to initialize DCP

7e00d54 added a mutable view of a configuration-locked DCP DART for
T8103 only. T600x has the same lock on a DART_T6000, so RTKit's buffer
grant is refused, dcp_init() backs out and the DCP is left mid-handshake.
Linux then gets no HELLO from it.

Extend that view, and the FDT reservation of the L2 pages it publishes,
to T6000, T6001 and T6002. The register layout is shared with DART_T8020;
only the PTE offset field differs, which the existing params cover.

Tested on J375c (T6001) with OS firmware 13.5 and system firmware 26.5:
apple-drm binds both DCPs and HDMI runs 3840x2160@60 on the stock
linux-aurora 7.2.11.aurora14-1 kernel. T6000 and T6002 are included by
analogy and have not been booted.

The T8103-only inherited-prefix block in kboot_prepare_dt() is not
changed. A stage 1 carrying this change would need it.

Add T600x cases to the display DART and legacy table lifetime host
tests. They fail without the source change.

Generated-by: LLM
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Signed-off-by: riopierrefrancois <rio.pierrefrancois@gmail.com>
@greptile-apps

greptile-apps Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge within its stated stage 2 scope.

Summary

Extends the locked display DART view to T6000, T6001, and T6002.

  • T600x DCPs can now map RTKit buffers through their locked DART tables.

No actionable issues were found. Tests were not run during this review.

riopierrefrancois explicitly deferred extending the inherited-prefix reservation in kboot_prepare_dt() to T600x stage 1 builds because the added failure checks were not tested.

Reviews (1) · Last reviewed commit: "dart: allow the locked DCP DART view on ..." · Reviewed by Greptile

@Sair0ns

Sair0ns commented Nov 11, 2026

Copy link
Copy Markdown

Confirmed working on a third j375c (Mac Studio M1 Max, 2022), stock linux-aurora 7.2.11.aurora14-1, m1n1-aurora 1.6.1.aurora22-1, U-Boot 2026.07.aurora6-1, OS firmware 13.5. Stage 2 built from bc79acc4 plus this PR's src/dart.c change, installed with update-m1n1; stage 1 and the kernel were unchanged.

Result: apple-dcp binds both DCPs, DCP booted, HDMI-A-1 runs a Samsung Q90A at 3840x2160@60, and the -62 RTKit timeout is gone.

Build note: a native aarch64 GCC 16.1.1 build works too (make ARCH= BUILDSTD=1 CARGO_PROFILE_RELEASE_OPT_LEVEL=s), adding -lgcc after the objects for __popcountdi2. The edge m1n1-aurora 1.6.1.aurora23-2 still points at ba130ffb and does not include this yet.

Thanks @riopierrefrancois for tracking down the locked DCP DART and for the fix. A merged/rebased package would let other j375c owners get 4K without building.

@joshuaswarren joshuaswarren left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Tested on 16-inch M1 Max MacBook Pro (T6001), Omarchy, Studio Display over Thunderbolt.

Current m1n1 (v1.6.1-omarchy.aurora14 from integration/aurora) only handles T8103 for locked DCP DART. The PR extends this to T600x (T6000/T6001/T6002).

DCP initialization succeeds. Display comes up at 3840x2160@59 Hz. No "dart locked" or "failed to DART map" errors in dmesg. The T600x DCP DART is not locked on this hardware.

I didn't boot the PR build of m1n1.

The bug cannot be reproduced on this hardware. The fix is correct in principle (extending locked DCP DART support to T600x), but I cannot confirm it resolves a real issue here.

@joshuaswarren

Copy link
Copy Markdown

Follow-up with a real boot. I built this branch (a2218a9), put it into the boot image in place of the stock m1n1, and booted a 16-inch M1 Max MacBook Pro (T6001) with a Studio Display on Thunderbolt.

What I saw on that boot:

  • The machine reached Linux and the desktop. The PR build of m1n1 does not stall the boot.
  • DP-3 came up at 5120x2880@60 in the compositor with the display's 512-byte EDID. The Studio Display's USB hub enumerated (05ac:101d USB2, 05ac:101e USB3 Gen2), and the display's camera and audio showed up as a UVC device and a USB audio card.
  • The camera streamed: 120 frames at 21.4 fps from the display's UVC node, with no xHCI or uvcvideo errors in dmesg.

What I did not check:

  • I did not read the m1n1 console, so I did not see the dart: ... is locked; mapping through its existing roots line. I can't say from this boot that the locked-DART path ran.
  • I did not boot the stock m1n1 on the same cable for a side-by-side, so this shows the PR does not break the display path on T600x. It does not show the PR fixes a failure.

I'll add the stock-m1n1 comparison next.

@jcrowthe

Copy link
Copy Markdown

Rebase check for the current package source: this PR's commit cherry-picks cleanly onto ba130ffb (what m1n1-aurora 1.6.1.aurora23 builds). With the T602x follow-up mentioned below also applied, test_t8103_display_dart.py and test_legacy_table_lifetime.py pass (33/33). I did not run them on this PR alone.

The same locked-DART approach, extended to the T8110 dcpext DART (ytgconsulting's follow-up patch in omacom/linux-aurora#379), also fixes HDMI on the M2 Ultra Mac Studio (j475d / T6022, dart-dcpext4). It has now been boot-tested on M2 Max and M2 Ultra; details are in omacom/linux-aurora#428. That belongs in a separate PR, as discussed. This is just a note that the T602x follow-up builds on this commit as-is.

@ure

ure commented Nov 13, 2026

Copy link
Copy Markdown

Fourth j375c confirming this PR, plus two results not yet reported on it: DisplayPort alt mode over Type-C, and the rear USB-C ports as USB hosts.

Versions

  • Mac Studio (M1 Max), apple,j375c / apple,t6001
  • linux-aurora 7.2.11.aurora14-1 (7.2.11-14-1-ARCH), m1n1-aurora 1.6.1.aurora22-1 (stage 1 v1.6.1-dirty, stage 2 bc79acc4-dirty), uboot-aurora 2026.07.aurora6-1, omarchy-mac 0.2.3-2
  • OS firmware 13.5 (iBoot-8422.141.2), system firmware 15.6

The system firmware differs from the 26.5 and 26.6.2 reported by the other j375c testers in linux-aurora#379, while the failure and the fix are identical. So the locked-DART path does not appear to depend on the system firmware version.

Before (stock aurora22)

m1n1 stage 2 log, from a stock boot:

display: Display is external
display: External display found, reconfiguring
dart: dart /arm-io/dart-dcp at 0x38b30c000 is a t6000 (locked)
rtkit(dcp): booting with version 12
rtkit(dcp): failed to DART map (size 0x4000)
rtkit(dcp): unable to allocate buffer
rtkit(dcp): failed to handle system message 0x04: 10400000000000
display: failed to initialize DCP
fb init: 1920x1080 (30) [s=1920] @0x107e5084000

and the kernel, as in linux-aurora#379:

apple-dcp 38bc00000.dcp: RTKit: endpoint discovery failed: -62
apple-dcp 38bc00000.dcp: error -ETIME: Failed to boot RTKit: -62

The desktop stayed on simpledrm Unknown-1 at 1920x1080 with a 0-byte EDID, on a 4K panel.

After (bc79acc4 + a2218a9, stock kernel)

apple-dcp 38bc00000.dcp: RTKit: Initializing (protocol version 12)
apple-drm soc:display-subsystem: bound 38bc00000.dcp (ops dcp_comp_ops [appledrm])
apple-dcp 28cc00000.dcp: DCP index:2 dptx target phy: 0 dptx die: 0
apple-dcp 28cc00000.dcp: RTKit: Initializing (protocol version 12)
apple-drm soc:display-subsystem: bound 28cc00000.dcp (ops dcp_comp_ops [appledrm])

HDMI-A-1 runs a 4K panel at 3840x2160@60.

New here: DisplayPort alt mode over Type-C works

linux-aurora#379 reports that Thunderbolt/USB-C displays stay dark on T602x, and I could not find a j375c result either way. On this T6001, with this patch and a stock kernel, a second 4K panel on a USB-C-to-HDMI adapter in a rear Thunderbolt port comes up as a real DP connector:

apple-dcp 28cc00000.dcp: allocated Type-C DPTX PHY 2
apple-display-crossbar f0304c000.mux: Switched dpphy to dispext1,0

card2-DP-3 goes connected at 3840x2160, and both panels run together. All four rear ports advertise DP alt mode as a display source:

port0.0: svid=ff01 active=yes vdo=0x00000c02    (DFP_D, pin assignments C and D)
port0.1: svid=8087 active=yes

The adapter I used caps the second panel at 30 Hz, but that is its own EDID (no 4K60 mode offered at all), not the link.

New here: the rear USB-C ports work as USB hosts

This confirms the first part of linux-aurora#380 on a second machine. With the patch, all four tps6598x port managers bind, a port takes the host role on attach, and a hub enumerates at SuperSpeed:

port0: [host] device  partner=YES
usb 4-1: new SuperSpeed USB device number 2 using xhci-hcd
usb 4-1: New USB device found, idVendor=14b0, idProduct=046b   (5000 Mb/s)

To be precise about what I can and cannot claim: I did not capture the tps6598x or typec sysfs state on this machine before applying the patch, so I am confirming the working end state rather than independently reproducing the stated cause. The user-visible before state was that nothing plugged into a rear USB-C port did anything.

Reproducible build, for verifying a tester's binary

Two comments on linux-aurora#379 mention difficulty matching the packaged binary, so in case it is useful: an unpatched build of bc79acc4 comes out byte-identical to the shipped /usr/lib/asahi-boot/m1n1.bin using the aurora22 PKGBUILD recipe plus two conditions:

RUSTUP_TOOLCHAIN=1.89.0     # --profile minimal --target aarch64-unknown-none-softfloat
                            # rust-src must NOT be installed
RUSTFLAGS=--remap-path-prefix=$HOME/.cargo=/home/builder/.cargo
make -j10 EXTRA_CFLAGS=-Os RELEASE=1 CHAINLOADING=1 ESP_STAGE2=1 USE_CLANG=1

with the package's bootlogo_{48,128,256}.bin copied over data/ first. Installing rust-src makes the build reference the toolchain's own std sources instead of the /rustc/<hash>/ paths in the precompiled std, which changes the hash while changing no code. With the above, sha256(unpatched) == sha256(packaged), so a patched binary differs from the shipped loader by this commit alone, which is what makes a tester's "it works" worth something.

@cardoso-bots

Copy link
Copy Markdown

Confirmed on a 2022 M1 Max Mac Studio (apple,j375c / apple,t6001) running linux-aurora 7.2.11.aurora14-1 with OS firmware 13.5. With stock m1n1-aurora 1.6.1.aurora22-1, the display controller timed out with RTKit error -62, HDMI fell back to 1080p, and the LG 40U990A stayed black on Thunderbolt.

With patched stage 2 (a2218a9b-dirty) on the same kernel, Linux enumerated the LG as a Thunderbolt device and logged display routed to Thunderbolt DP tunnel dpin0. The desktop was visible at 5120×2160 at 60 Hz and stayed visible after HDMI was physically unplugged. The first patched boot had both cables attached.

Omarchy’s updater rejects the custom stage‑2 image because it differs from the installed package. Is there an official test package we could validate through the normal update path?

@cardoso-bots

Copy link
Copy Markdown

Follow-up on the same 2022 M1 Max Mac Studio (apple,j375c / apple,t6001, linux-aurora 7.2.11.aurora14-1, stage 2 from a2218a9b):

  • 5120×2160 @ 100 Hz works over a single Thunderbolt cable (no HDMI attached). apple-dcp locks the mode cleanly:
    apple-dcp 28cc00000.dcp: display routed to Thunderbolt DP tunnel dpin0
    UnifiedPipeline::mode_set_gated: 5120x2160@100 Hz link: 1
    program_frame_size: pixel_clock 1196340000
    IOMFB: switch to normal mode succeeded
    
  • hyprctl monitors reports 5120x2160@100.03500 (with 85 Hz / 60 Hz / 30 Hz modes also exposed) and DisplayPort audio (dcp-dp-audio) works.
  • Tested across two rear Thunderbolt ports (DP-4 / 1301ac0000.cio and DP-2 / b01ac0000.cio); both enumerate the LG 40U990A and bring up dpin0 at 5120x2160@100Hz.
  • Side note on omarchy update: setting M1N1_UPDATE_DISABLED=1 in /etc/default/update-m1n1 lets omarchy-apple-silicon-boot-check --boot-chain pass cleanly in the meantime, though an official m1n1-aurora test package would still be great so this works through the normal update path.

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.

6 participants