Skip to content

drm/asahi: add the T6041 25G83 profile captured on the J616C - #1373

Merged
RyanTheTide merged 2 commits into
aurora-silicon:integration/aurorafrom
AxxzyWasTaken:t6041-25g83-profile-v3
Nov 10, 2026
Merged

RyanTheTide merged 2 commits into
aurora-silicon:integration/aurorafrom
AxxzyWasTaken:t6041-25g83-profile-v3

Conversation

@AxxzyWasTaken

Copy link
Copy Markdown
Contributor

Replaces #1050, rebased onto current integration/aurora as requested: the credit and authorship changes asked for in its review rewrite the commits.

Since #1050 was opened, integration/aurora gained #1345 ("drm/asahi: run the 25G83 build on the 40-core M4 Max"), which already has the per-build configuration that #1050 added. So this is now two commits on top of it:

  • drm/asahi: add the T6041 25G83 profile captured on the J616C (7b7c237)
  • tools/asahi: test the 32-core T6041 25G83 configuration on the host (226a65c)

What it does

The 32-core M4 Max in the J616C loads the T6041 25G83 image that #1345 admits, but that build runs the 40-core configuration, and its core check refuses this GPU. This PR lists the image a second time with a 32-core configuration (hw/t6041_25g83.rs). When several builds share an image, the selector takes the one whose configuration matches the probed clusters and enabled cores. If none matches, it takes the first one, so a 40-core part runs as before and any other layout is still refused. T6040 and T8140 are unchanged.

Changes from #1050

  • The captured contents are gone: t6041_captured.rs and the code that applied it. The 32-core configuration now runs the 25G83 builders, like the 40-core one, using the operating points and the CS and AFR tables that the loader fills from the ADT (aura#68). Those tables are the values that vary per unit (binned voltages, one per cluster).
  • Built on the host from this J616C's ADT values, the hardware data, power configuration and region C give the same hashes as the contents dumped on this unit on 25 Oct 2026. So the GPU gets exactly what it has run with.
  • Some values stay static, because the driver has no source for them on T6041:
    • the selector ladders;
    • the 110586 mW power limit and the leakage coefficients, which are M4 Pro values, not measurements of this unit;
    • the AON rows, which come from the ADT ptd_data_table but are not published by the loader;
    • five power configuration words.
      The commit message says where each one comes from.
  • Credits: the new file is GPL-2.0-only and carries Gravity Linux's copyright line. The commit has Niklas Sheth's Co-developed-by and Signed-off-by, copied from his commit 3a2ad76. Cody Ho is credited by name, with a link to his commit: the original encoder commit (bd25d19, cherry-picked from 778088823509) has no Signed-off-by to copy.
  • Same as in drm/asahi: add the T6041 25G83 profile captured on the J616C #1050: 32 cores, operand banks for all 40 slots, four-cluster deflake, TA mode 1, a 96-block compute pool, and a six-MCC register map. A compile-time check now holds the map to T6041 M4 Max: internal display on DCP through aura's handoff, and the 25G83 GPU build on 40 cores (#1332) #1345's 25G83 layout rule.

Testing

  • tools/asahi/run-host-tests.py --only g17: 30 of 30 pass.
    • g17-t6041-initdata-tests now builds the 32-core objects from the J616C's ADT operating points and checks the three hashes, and that the word at +0x9ec is -1000 / power limit.
    • g17-firmware-selection-tests compiles the real firmware_variant() and passes the new shared-image cases.
  • The two const assertion blocks of hw/t6041_25g83.rs were compiled with rustc and hold. This used a one-off harness built from the initdata test, not committed.
  • rustfmt --check is clean on the new file, and the changed hunks are stable under rustfmt. checkpatch.pl reports no errors, only the MAINTAINERS warning for a new file.
  • Not compile-tested in a kernel tree: the build VM had no space for a Rust tree build. So the Gpu::new reordering, the CONFIG literal, hw/mod.rs, and the KUnit edits in fwid.rs and render.rs have not been compiled by the kernel build. KUnit was not run.
  • Not booted. The J616C has run these contents on 25G83 only with the earlier 7.2 port.

Known gap, unchanged from #1050: on 7.2 this unit needed a 96-block render pool and clustering metadata sized for four clusters. Neither is in this PR.

The 32-core M4 Max in the J616C boots through a macOS 26.6.2 stub (iBoot
mBoot-18000.161.10) and loads the T6041 25G83 image that "drm/asahi: run
the 25G83 build on the 40-core M4 Max" admits. That build runs the
40-core configuration, whose core check refuses this GPU.

Admit the image a second time, with a 32-core configuration
(hw/t6041_25g83.rs). When builds share an image, the selector now takes
the one whose configuration matches the probed clusters and enabled
cores, else the first one, so a 40-core part runs as before and another
layout is still refused by the core check. The GPU ID is read before the
build is selected for this. T6040 and T8140 are unchanged.

The configuration:
- 4 clusters with 32 enabled cores. Operand-state banks for all 40 core
  slots: the enabled slots run to 39 (core mask 0xf6_fdbf6fdb), and with
  banks for the 32 enabled cores only, a compute load beside rendering hit
  reason-0 recoveries in 5 of 5 runs, and in 0 of 4 with 40 banks.
  Four-cluster deflake and TA mode 1, as the 40-core 25G83 build.
- A compute pool of 96 blocks, which the J616C has run with since
  23 Oct 2026; 21 blocks hang its firmware on grids of more than ten
  workgroups.
- The 40-core 25G83 register map with six memory controllers in slot 3
  (ADT active-mcc-bit-vector 0x3f), laid out by the same rule. A
  compile-time check holds it to that rule and to the 40-core windows.

What varies between units comes from the device tree, as on the 40-core
part: the boot loader fills the operating points with one voltage per
cluster (from the ADT perf-states tables) and the CS and AFR tables (from
cs-perf-states and afr-perf-states), and the 25G83 builders turn them
into the performance, CS and AFR tables of the hardware data. The
previous version of this change applied contents captured on this unit,
binned operating points included, because its device tree had no GPU
tables at the time.

The rest is static, because the driver has no source for it on T6041:
- The selector ladders: the highest and lowest of this unit's operating
  points at each of its 11 core voltages (state 5 of ladder B is OPP 5,
  where the 40-core profile has OPP 6), and the M4 Pro's relative
  ladders.
- The power limit, 110586 mW (the M4 Pro's 69116 mW for 20 cores, scaled
  to 32), and the M4 Pro's leakage coefficients for four clusters.
  Neither is in the ADT, and neither is a measurement of this unit.
- The AON rows of the four GPU clusters and the SoC, from the ADT's
  aon-ptd ptd_data_table, which the loader does not publish.
- Five power configuration words: -1000 / power limit at +0x9ec, the
  second temperature-sensor mask word at +0x3b5c, the temperature sources
  of clusters 2 and 3 at +0x6328 and +0x632c, and 5 at +0x6360.

Built on the host from the J616C's ADT operating points, the hardware
data, power configuration and region C hash (FNV-1a 64 without the
runtime words) to those of the contents this unit has run with since
October 2026, dumped on 25 Oct 2026.

Those contents, and so the static values above, were built by the M4 GPU
encoders of Gravity Linux (g16_fw.rs, g16_platform.rs, g16_power.rs),
with Jonathan Goyvaerts' T6040 values. Based on work by Cody Ho, who
wrote the encoders (GravityLinux bd25d19, cherry-picked from
778088823509, which carries no Signed-off-by), and Niklas Sheth, who
added the bootloader power limit (GravityLinux 3a2ad76).

Not run on hardware, and not built in a kernel tree: the host tests
compile the build selector, the configuration's constants with the 25G83
builders, and its compile-time checks.

Link: GravityLinux/linux@bd25d19
Link: GravityLinux/linux@3a2ad76
Link: aurora-silicon#1050
Co-developed-by: Niklas Sheth <hi@niklassheth.com>
Signed-off-by: Niklas Sheth <hi@niklassheth.com>
Signed-off-by: AxxzyWasTaken <axxzytte@gmail.com>
The build selector now takes the probed core layout. Model it, and check
that of two builds admitting one image, the configuration of the probed
layout is chosen, that another layout gets the first one, and that the
layout never changes which image is admitted.

Build the 32-core T6041 25G83 objects from the operating points the
loader publishes from the J616C's ADT (perf-states for four clusters,
cs-perf-states and afr-perf-states), and check that the hardware data,
power configuration and region C hash (FNV-1a 64, without the runtime
words) to those of the contents dumped on that unit on 25 Oct 2026, and
that the word at +0x9ec is -1000 / the power limit.

Signed-off-by: AxxzyWasTaken <axxzytte@gmail.com>
@RyanTheTide
RyanTheTide merged commit 0eb2dc3 into aurora-silicon:integration/aurora Nov 10, 2026
1 check passed
DjDeveloperr pushed a commit that referenced this pull request Nov 10, 2026
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>
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.

2 participants