Repository navigation
T6041 M4 Max: internal display on DCP through aura's handoff, and the 25G83 GPU build on 40 cores (#1332) - #1345
Conversation
aura hands the M4 Max's internal display over the way it hands over the M4 Pro's: the DCP, the display subsystem and the DCP's piodma carry apple,t6041-handoff, the DCP names the 26.6.2 firmware, and the streams sit on the same DARTs. The M4 Max gate only enabled the external chains, so a handoff there was ignored and the panel stayed on simpledrm. Run the M4 Pro's internal display check on the M4 Max first. With the handoff and a running DCP it enables the DARTs, the mailbox, the display subsystem, the DCP and the panel; without it nothing changes. The external chains still need an enabled display subsystem, now the one this handoff enables, and still only add their DARTs to it. Link: #1332 Signed-off-by: Diljit Singh <hey@djdev.me>
…he handoff
The J614c/J616c tree enabled /display-subsystem itself. aura refuses
to hand over a display whose nodes are already enabled ("display is
not status "disabled"", linux#1332), so the panel stayed on simpledrm.
Keep the display subsystem disabled, and the panel with it, as the
J616s tree does. The display gate enables them with the DCP once the
boot loader has handed the display over.
Without a handoff the display subsystem now stays disabled, and the
external chains, which need it, stay off too. aura publishes the
external processors' firmware memory only together with the panel
handoff, so nothing that worked with aura before is lost. A loader
that fills that memory without handing the panel over loses the
external displays until it hands the panel over as well.
Link: #1332
Signed-off-by: Diljit Singh <hey@djdev.me>
The macOS 26.6.2 boot firmware (iBoot mBoot-18000.161.10) loads the 25G83 GPU firmware on the M4 Max as well. integration/aurora admits only 25F84 there, so a 40-core J614c booting through a 26.6.2 stub has no GPU (linux#1332). A firmware build can now carry the SoC configuration it runs with. Once the build is identified, that configuration replaces the probed one. This is the mechanism linux#1050 proposes, so its 32-core profile can build on it. T6041 gains a 25G83 build. Its configuration is the 40-core 25F84 profile with two changes: - the 25G83 variant, with the four-cluster tiler values (TA mode 1) that 25F84 uses on this machine and #1050 uses for 25G83; - the 25G83 register map. It has the same 25 windows (slot 3 holds the 40-core part's eight memory controllers), laid out the way 25G83 lays them out on the M4 Pro: from +0x200000, each window followed by a 16K guard page, with no reserved slots. This rule reproduces both known 25G83 maps, the M4 Pro's (four controllers) and #1050's 32-core M4 Max map (six). A compile-time check holds the M4 Pro's map and the new one to the rule, and the new one to 25F84's windows. The rest comes from the 25F84 profile: 40 cores in four clusters, the operand-state and deflake layouts, the 160-block compute pool, the hardware data and power words, and region C. The core count check stays, so a 32-core part is refused with this configuration. The build admits one loaded image: the only T6041 25G83 image measured so far (sha256 aa113ed6...effc5, measured on #1050's 32-core J616C). iBoot fills part of the loaded TEXT for each Mac (three J616s loaded three different T6040 images), so a 40-core Mac most likely loads a different one. If so, its "unsupported GPU firmware build" line gives the sha256 to add. KUnit tests cover the identities of both T6041 builds, the 25G83 configuration, and the render policy of both builds. The host model of the build selector now returns the build's configuration, and the T6041 initdata host test also builds the 25G83 objects. Not run on hardware. Link: #1332 Link: #1050 Signed-off-by: Diljit Singh <hey@djdev.me>
|
Tested on the J614c (MacBook Pro 14-inch M4 Max, 16-core CPU, 40-core GPU, 26.6.2 stub, system firmware 27.0). I used Internal display: works. simpledrm is gone, and GPU: the 25G83 build on 40 cores doesn't run work yet. With the J614c digest the image is admitted and RTKit comes up, but the first job never completes. This is the same with There was no firmware crash or fault, only the timeout. Every later client then waits behind the first job ( If you want the digest in this PR, here is the crate::fwid::FirmwareBuild {
name: "Apple GFX 25G83 for T6041 (normalized loaded image, 40-core J614C)",
text_size: 0x60000,
data_size: 0x138000,
entropy: [0x59839, 0x5991c],
text_sha256: [
0x7c, 0x04, 0x36, 0x0e, 0x05, 0xa6, 0xb8, 0x62, 0x8f, 0x61, 0x26, 0x2d, 0x0a,
0x24, 0x41, 0x66, 0x18, 0x7a, 0xd8, 0x7a, 0x73, 0x47, 0x16, 0xd8, 0x91, 0x09,
0x08, 0xe9, 0x4f, 0xfe, 0xc0, 0x8a,
],
},I'm happy to test the next GPU change on this machine. 🤖 Generated with Claude Code |
The 40-core T6041 runs 25G83 with the 25F84 profile and the 25G83 register map (#1345). On the J614C (MacBook Pro 14" M4 Max, 40 cores, macOS 26.6.2 stub) the firmware then starts, takes every job and marks its items done, but the GPU never runs one: no completion stamp, no fault, no firmware crash. Every job times out after two seconds. The 25F84 profile's hardware data words include +0x2610 = 1. The J616C's 25G83 contents, and #1373's 32-core builders that reproduce them, have 0 there. Bisected on the J614C, with the J616C capture as the baseline: capture as dumped (32-core words, 6-MCC map) runs + the 40-core words +0xf6c/+0xf88/+0xf8c/+0xfac/ +0xfb8/+0xfc0/+0x2570 and this unit's OPP/CS runs + +0x2610 = 1 alone hangs and on this tree: 40-core 25G83 configuration as merged hangs the same with +0x2610 left at 0 runs "Runs" means a Vulkan compute dispatch (1, 64 and 4096 workgroups), a buffer fill, a clear and a triangle render pass all complete with the expected contents. With the fix, vkcube and a full X11 desktop (Cinnamon on yserver, with fractional scaling and full-screen video) run on the GPU. Give the 40-core 25G83 configuration its own chip without the word. The 25F84 configuration keeps it. The initdata host test now builds the 25G83 objects with that chip and checks that they differ from 25F84's only in the register map and +0x2610. Link: #1372 Fixes: 579bcc3 ("drm/asahi: run the 25G83 build on the 40-core M4 Max") Signed-off-by: Jos Dehaes <jos.dehaes@gmail.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fixes the two remaining gaps of #1332 (J614c, MacBook Pro 14-inch M4 Max, 40-core GPU, 26.6.2 stub). The other fixes from that report are already merged (u-boot#42, alarm-aurora#204, aurora-sep-userspace#19).
1. Internal display on DCP for the J614c and J616c
aura hands the M4 Max display over the same way it hands over the M4 Pro's (
apple,t6041-handoffon the DCP, display subsystem and piodma). The two sides didn't agree, though:t6041-j614c-j616c.dtsienabled/display-subsystemitself. aura refuses a display whose nodes are already enabled (display is not status "disabled", joske's log in J614c (MacBook Pro 14-inch M4 Max) first boot: works, internal display on simpledrm, no GPU on a 40-core chip with 26.6.2 #1332).gate_t6041_max_run()) never looked at the internal display, so it would have ignored a handoff anyway.Both now work the way they do on the J616s:
soc: apple: display-gate: adopt the M4 Max internal display handoff: the M4 Max gate runsgate_t6041_internal()first, with the same marker, compatibles, 26.6.2 firmware, DART/SID and running-DCP checks as the M4 Pro. Then it enables the external chains, which need the display subsystem that this handoff enables. Without a handoff, nothing changes.arm64: dts: apple: t6041-j614c-j616c: leave the internal display to the handoff: the display subsystem stays disabled (thet604x.dtsidefault), and the panel is disabled too. The gate enables both with the DCP.aura side: aurora-silicon/aura#132 adds
apple,j614cto the M4 Max handoff. The J616c is already covered there (aura#67).Behaviour change: without a handoff, the external displays stay off together with the internal one, as on the J616s. aura publishes the external processors' firmware memory only together with the panel handoff, so nothing that worked with aura is lost. A loader that fills the external memory without handing the panel over (the local one #749 was tested with) would lose the external displays.
2. GPU: the 25G83 build on the 40-core M4 Max
drm/asahi: run the 25G83 build on the 40-core M4 Max: T6041 admitted only 25F84 (40 cores). The 25G83 profile in #1050 was captured on a 32-core J616C and is still open.Buildcan now carry the SoCConfigit runs with, which replaces the probed one once the build is identified. This is drm/asahi: add the T6041 25G83 profile captured on the J616C #1050's mechanism, so drm/asahi: add the T6041 25G83 profile captured on the J616C #1050's 32-core profile can build on it.Unsupported GPU core layout.One value can't be derived: the loaded-image identity. The build admits the only T6041 25G83 image measured so far (sha256
aa113ed6…effc5, from #1050's 32-core J616C). iBoot fills part of the loaded TEXT for each Mac (three J616s loaded three different T6040 images), so joske's 40-core J614c most likely loads a different one. In that case the driver logsunsupported GPU firmware build: TEXT 0x60000 DATA 0x138000 entropy 0x59839/0x5991c sha256 <hash>, and that hash is a one-line addition. #1332 asks joske for that line.The hardware-data words come from the 25F84 profile. The only other T6041 25G83 contents available are #1050's 32-core ones, which another driver built and which differ per core and per unit, so they can neither confirm nor refute those words.
Testing
./linux-build/build kernel --profile asahi linux-t6041-max-dcp -- Image modules dtbs(LLVM, Rust): builds, with no new warnings in the changed files.DRM_ASAHI=y,APPLE_DISPLAY_GATE_KUNIT_TEST=y): 286 tests, 284 passed, 2 skipped (UCLAMP_TASKand the G16 suite aren't configured). This covers all fiveapple-display-gate-*suites, including the 7apple-display-gate-t6041-maxcases, the newasahi_fwid.t6041_builds_admit_only_their_own_images, andasahi_g17_ta_mode.policy_is_local_to_the_admitted_t6041_builds.tools/asahi/g17-firmware-selection-tests.py: PASS (the selector returns the identified build's configuration).tools/asahi/g17-t6041-initdata-tests.py: builds the 25F84 and 25G83 objects. The hardware data builder accepts the 25G83 register map, and power configuration and region C are identical between the two.integration/aurora, decompiled:t6041-j614c.dtbandt6041-j616c.dtbeach change in exactly two properties (/display-subsystemand its panel becomestatus = "disabled"). Their DCP, display and DART nodes now have the same status as the J616s's.🤖 Generated with Claude Code