Skip to content

drm/asahi: g16: accept the J604's ADT performance layout - #1329

Merged
RyanTheTide merged 1 commit into
aurora-silicon:integration/aurorafrom
aeries0x:j604-g16-pr
Nov 10, 2026
Merged

RyanTheTide merged 1 commit into
aurora-silicon:integration/aurorafrom
aeries0x:j604-g16-pr

Conversation

@aeries0x

@aeries0x aeries0x commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Summary

On the base M4 MacBook Pro 14" (J604), the G16 backend never starts on integration/aurora:

aurora-g16 302600000.gpu: M4 original ADT performance layout rejected: Shape
aurora-g16 302600000.gpu: G16 start failed: EINVAL; session retained until reboot

board/data.rs folds the ADT's sixteen GPU states into the firmware's ten rows with one fixed index map, the J713's
(four low states, then six equal-voltage pairs). The J604's ADT has the same sixteen states in another shape: five low
states, five equal-voltage pairs (5/6 to 13/14) and a single top state 15. The J713 map then pairs states of
different voltage and admission fails.

This keeps a short list of qualified layouts and takes the first one whose rows all pair states of equal frequency,
SRAM frequency and voltages. The J713 map stays as it is and is tried first; each layout's pairing check rejects the
other shape, so nothing changes on the J713. For the J604, eleven distinct rows don't fit in ten, so the fifth low
state (4) is left out; the four lowest states, every pair and the top state keep their own ADT values. The boot log
names the layout that matched. select() keeps its signature for the host tests; test-perf.py gains a J604-shaped
case (its selected rows, the J713 fixture still choosing the J713 layout, and an unequal pair matching neither).

Machine and test

J604 (Mac16,1, T8132, 10-core GPU), macOS 27.2 system firmware, asahi,os-fw-version 26.6.2, GPU firmware 25G83.
Tethered RAM-only boot of integration/aurora 8f48481 + this patch with the tree's t8132-j604.dtb (the test
build also carried local changes outside these files: read-only RTC/NVMEM, sound nodes off, an MTP DT experiment):

M4 ADT DVFS: 16 source states -> 10 firmware rows (J604 layout), top 1578 MHz
M4 ADT DVFS S9: main=1578 MHz auxiliary=1578 MHz core=1045 mV SRAM=1045 mV
M4 firmware accepted owned initdata ...; READY
G16: firmware at READY, starting the backend
[drm] Initialized aurora 1.0.0 for 302600000.gpu on minor 1

Then an unattended run of aurora-silicon/gpubench's core-a chunk on Aurora's Mesa (Vulkan), started by a unit at
boot since I couldn't log in (below): all four suites rc=0, 23 results, no G16 fault or recovery lines in the
kernel log. Median us per submit, depth 1 / 64: submit.empty 1.2 / 1.1, compute.light 367 / 264, render.light (tri)
1563 / 1068, render.light (clear) d1 386.

On the stock J604 tree the internal keyboard/trackpad (MTP, -62) and Wi-Fi (PCIe port 0, -517) don't come up, so
there was no login or network in these boots; I'm looking at those separately.

Assisted-by: LLM

The G16 backend folds the original ADT's sixteen GPU performance
states into the firmware's ten rows with one fixed index map, the
J713's: four low states followed by six equal-voltage pairs. The base
M4 MacBook Pro 14-inch (J604) has the same sixteen states in another
shape: five low states, five equal-voltage pairs (5/6 to 13/14) and a
single top state. The J713 map pairs states of different voltage
there, so admission fails and the GPU never starts:

  aurora-g16 302600000.gpu: M4 original ADT performance layout rejected: Shape
  aurora-g16 302600000.gpu: G16 start failed: EINVAL; session retained until reboot

Keep a short list of qualified layouts and take the first one whose
rows all pair states of equal frequency, SRAM frequency and voltages.
The J604 layout drops the fifth low state (4), since eleven distinct
rows do not fit in ten; the four lowest states, every pair and the top
state keep their own ADT values. The J713 keeps its current map and is
tried first, and each layout's pairing check rejects the other shape,
so nothing changes for it. select() keeps its signature for the host
tests; select_named() also returns the layout's name, which the boot
log prints. test-perf.py gains a J604-shaped case (its selected rows,
the J713 fixture still choosing the J713 layout, and an unequal pair
matching neither).

The J604 layout was read from the machine's own ADT (16 states,
1578 MHz @ 1045 mV at the top). Tested on a J604 (25G83 firmware) on
integration/aurora 8f48481: the J604 layout is chosen, the firmware
reaches READY, the DRM device registers, and gpubench's core-a chunk
(submit.empty, compute.light, render.light; 23 results) passes on
Aurora's Mesa with no GPU faults.

Assisted-by: LLM
Signed-off-by: Friedrich <261542475+aeries0x@users.noreply.github.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