Skip to content

drm/asahi: enable the J773g PMP and G16 firmware path - #1191

Open
techmore wants to merge 10 commits into
aurora-silicon:integration/aurorafrom
techmore:j773g/g16-pmp-20261107
Open

techmore wants to merge 10 commits into
aurora-silicon:integration/aurorafrom
techmore:j773g/g16-pmp-20261107

Conversation

@techmore

@techmore techmore commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

This branch is #2232's commit (unchanged), the five commits of this PR (unchanged), #2239's commit (unchanged), the session commit, and one new head commit (b58acd59) that replaces the two board compares asked about in review.

Dependencies

Head commit: "soc: apple: pmp-display: retain the T8132 PMP session on any firmware"

Widened to every T8132 on any OS firmware: the retained session, i.e. the bridge registration, the report readiness wait, the telemetry endpoint, apple_pmp_keep_bound() (the owner is not unbound) and the owner's latch that treats an unhandled message as fatal. The bridge registration no longer compares the board: it needs the exact PMP node with an AGX or a DISP record in apple,tunable-soc-device, and a vote of either kind is refused without its record (DISP is now checked as AGX was). Its log line changes from J773g PMP vote bridge ready; … / T8132 PMP vote bridge ready; … to T8132 PMP vote bridge ready (AGX record); retained existing PMP owner (or DISP, AGX+DISP): this is the line quoted in DjDeveloperr's results, so anything matching the old text must follow.

Not widened: G16. asahi_g16_board() and the AGX vote entry points (pmp_power_consumer() for AGX, apple_pmp_j713_gpu_prepare() and its two siblings) are on apple_pmp_t8132_g16_board(), which is the 26.6.2 firmware path as before.

An earlier form of the head commit (9e699c3d) ran on one J773g off 26.6.2; no other T8132 board has run it. It has not been run on 26.6.2.

Tested

  • J773g, 27.2 stub, head 0564795e on soc: apple: t8132: apply the PMGR policy on any firmware #2317, one boot: RTKit: Initializing (protocol version 12), PMP firmware and endpoint ready, firmware PMP started; 380500000.pmp bound to apple_pmp, 3803c0000.pmp-report to apple-pmp-report; no warnings; apple,tunable-soc-device: 4216 bytes, AGX and DISP records present (both pass the driver's identity checks); vote bridge not registered because registration is lazy: it is reached only from a consumer's prepare call (pmp_power_prepare() -> apple_pmp_display_bound_owner() -> apple_pmp_display_register()), and both consumers are on the 26.6.2 firmware path (apple_pmp_j713_display_prepare() through apple_pmp_j713_board(), apple_pmp_j713_gpu_prepare() through apple_pmp_t8132_g16_board()), besides the loader disabling the GPU node on that stub. So on 27.2 no vote, G16 or AGX code ran, by design. Without the head commit the PMP probe fails there with -62.
  • Two earlier heads of this series (9e699c3d, 7bd83d9c) on soc: apple: t8132: apply the PMGR policy on any firmware #2317 gave the same PMP lines on the same machine, one boot each.
  • The head commit has not run on 26.6.2.
  • DjDeveloperr's 26.6.2 results in this PR (vote bridge, G16 READY, glmark2, drm/asahi: g16: Run up to the board's top performance state (J773g S10) #2239's S10) were on e0835278 / be82a6f7, not on this head.
  • Host: per-commit build of the eight commits (W=1, touched C objects and drivers/gpu/drm/asahi/): all build. pmp-agx-vote-tests.py, t6030-pmp-graph-tests.py, t6030-pmp-supplier-tests.py, pmp-native26-tests.py pass. Rust host tests: pmp-power-tests.rs 3/3, g16/power/policy.rs 12/12.

Review of 2026-11-19 (two board compares): one more commit

The PR head 423a6c77 + one unsigned commit, b58acd59, "drm/asahi: g16: derive the DVFS rows and the DISP consumer from the tree". No machine has booted a kernel containing this commit.

Row count (glue.c:216). Derived from the shape of the machine's own ADT performance states; asahi_g16_perf_rows() and the board compare are gone. Four low states and six equal-voltage pairs give ten rows; five low states, five pairs and a single top state give eleven. Why the J604 had ten: its ADT has the eleven-row shape, and its ten-row selection left the fifth low state out because ten rows were thought to be the firmware's limit (the comment in board/data.rs said so); it was not a hardware cap, and I know of no cooling or other reason for one. So the J604 changes from ten rows to eleven with this commit, and no J604 has run it. If the J604 does need ten for a reason of its own, that reason should be a property of its tree; I did not invent one. #2239's top state follows the row count, so it becomes S10 on the J604 as on the J773g. No J604 ADT is in the tests: the J604-shaped source has the J604's values for states 0-3 and 5-15 and an invented state 4. There is no fallback to ten rows: if a J604's real state 4 fails the table checks, or its firmware refuses eleven rows, its GPU does not start.

DISP consumer (pmp-display.c:327). The absence of the DISP record does not hold: this J773g's apple,tunable-soc-device carries both the AGX and the DISP record (dumped from the running machine). What is true is that it has no internal panel: the DISP consumer is now an available main DCP without apple,connector-type (a main DCP that drives a connector, as with #1192 on the J773g, or one that is not available, is none).

The DVFS log line names the shape, (5+5 pairs+top layout), where it read (J773g layout).

Tests. test-perf.py now feeds two measured ADTs through the derivation, the J713's and this J773g's own (a new fixture with the six /arm-io/sgx properties from the running machine, its hash pinned in the test as the J713's is), and asserts ten and eleven rows with the exact tables; a J604-shaped source gives eleven. A constant row count fails one of them. New tools/asahi/pmp-disp-consumer-tests.py: six trees, and both constant mutants fail. Rust tests: policy.rs 12/12, pmp-power-tests.rs 3/3. The four PMP fixtures pass. The commit builds (W=1, drivers/gpu/drm/asahi/, drivers/soc/apple/).

What ran on hardware: nothing of this commit. Both changed paths run only with the GPU enabled on the 26.6.2 firmware path. On our unit (27.2 stub) the loader disables the GPU node, so G16 never probes and the row derivation is never called, and no DISP consumer asks. The derivation was run on this unit's real ADT bytes on the build host instead (the fixture above; the GPU performance-state properties are the same on the 26.6.2 and 27.2 ADTs), giving eleven rows, top 1578 MHz. I did not build a test kernel to log it on the machine: that would need the ADT parser to run for a disabled GPU node, which is new code for no new information. Needed from others: a J773g on 26.6.2 (DjDeveloperr's) for the eleven rows through this commit, and a J604 for the change from ten to eleven.

@techmore
techmore force-pushed the j773g/g16-pmp-20261107 branch from d8686de to 66896ea Compare November 8, 2026 05:20
@techmore

techmore commented Nov 8, 2026

Copy link
Copy Markdown
Contributor Author

Per Documentation/process/coding-assistants.rst, this draft branch deliberately carries no Signed-off-by added by an AI agent. After reviewing the final commits, the human submitter will run agents/sean-signoff.sh himself to add his own DCO certification and push the human-signed commits before the PR leaves draft.

@techmore
techmore force-pushed the j773g/g16-pmp-20261107 branch 2 times, most recently from e539e32 to 6b4f1ee Compare November 8, 2026 09:36
@techmore

techmore commented Nov 8, 2026

Copy link
Copy Markdown
Contributor Author

Rebased onto the latest integration/aurora and removed the observed voltage endpoints from the commit message. Repeated J713 voltage values in the tests now use synthetic bins; existing base fixtures are unchanged. The rewritten commits remain unsigned. CI is running on the new head.

@techmore
techmore force-pushed the j773g/g16-pmp-20261107 branch 2 times, most recently from bcd5763 to bb1286d Compare November 8, 2026 10:30

@RyanTheTide RyanTheTide 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.

  1. Rebase onto the current integration/aurora. It conflicts in:

    • drivers/gpu/drm/asahi/hw/t6041.rs, with 579bcc3 ("drm/asahi: run the 25G83 build on the 40-core M4 Max"). That commit splits the file into a shared BASE and two firmware builds, and each of their FirmwareBuilds needs boot_fields: &[].
    • drivers/soc/apple/pmp-display.c and include/linux/soc/apple/pmp-display.h, with 6fde3b9 ("soc: apple: pmp-display: let the J713 DCP release its DISP vote").
  2. The kunit failure on this head is not caused by this diff. It is error[E0615] at drivers/gpu/drm/asahi/g17/buffer.rs:482 (ids.used where QosIds::used is a method), which comes from the old base. Re-run CI after the rebase.

  3. The description says the rewritten series has not been booted. Please add the J773g result for the rebased head that your test plan lists: PMP readiness, the AGX vote, firmware READY and a compute job.

@techmore
techmore force-pushed the j773g/g16-pmp-20261107 branch from bb1286d to 370ad38 Compare November 10, 2026 13:57
@techmore

Copy link
Copy Markdown
Contributor Author

Rebased onto integration/aurora 63be486; the head is now 370ad38.

  1. Conflicts:

    • hw/t6041.rs vs 579bcc3: I kept the shared BASE and both firmware builds. ed38f0d has since replaced boot_fields with boot_filled, already &[] on every T6041 build, so no further change was needed.
    • pmp-display.c / .h vs 6fde3b9: the DISP release stays J713-only. The J773g AGX path passes release=false and never binds a DISP consumer.
    • Two more surfaced in the rebase:
      • Commit 5 vs 833be9c (J604): the DVFS layouts are now chosen by board row count. J713 and J604 keep their 10-row output unchanged; J773g gets an 11-row layout.
      • Commit 6 vs ed38f0d: I dropped the series' own zeroing in favour of boot_filled (0x224, 4) and (0x5c917, 8). The digest is unchanged (9154c7f8…e85a). The image identity also matches build 2 of the signed 25G83 armfw_g16g.im4p.
  2. CI is green on 370ad38 (kunit, host-tests, rust-build, source); the E0615 is gone with the new base. W=1 adds no new warnings in drivers/soc/apple, drivers/pmdomain/apple or drivers/gpu/drm/asahi, checked per commit.

  3. The J773g boot of this head is running now. I'll post PMP readiness, the AGX vote, firmware READY and a compute job when I have them; the PR stays a draft until then.

@techmore

Copy link
Copy Markdown
Contributor Author

J773g result for the rebased head 370ad389, as asked: PMP readiness, the AGX vote, firmware READY and a compute job all pass, with no faults.

What was booted. 370ad389 plus 13 TEST ONLY commits that are not part of this PR, on one J773g (Mac16,10, system firmware 26.6.2), GCC 15.2, cold entry, m1n1 stage 2 with our J773g DTB. Twelve are the bring-up commits our J773g tree needs to reach userspace and be observed: AQC113 RX, main DCP manual bind, coprocessor and display master, T8122 DPTX PHY, DCP ADT profile, HDMI alias, framebuffer/DART/PIODMA handoff, ADT USB2 host field, and a binding-only PMP report layout. The thirteenth limits the T8132 platform handoff and the pmgr-pwrstate status check to the Airs again (next section). None of them changes this PR's code in this config; the one shared header only gains !CONFIG_APPLE_PMP stubs. The kernel command line has pd_ignore_unused clk_ignore_unused, as in all our J773g runs. Unused power domains and clocks were therefore not switched off at late init, so this boot does not exercise that cleanup.

Boot e47fcc31-81d9-4f32-963b-5198fdbd329d, Linux 7.3.0-m4atlrx+ #2 SMP PREEMPT_DYNAMIC Tue Nov 10 14:42:57 EST 2026 aarch64.

Check Result Kernel log
PMP readiness ready apple_pmp 380500000.pmp: PMP firmware and endpoint ready; J773g PMP vote bridge ready; retained existing PMP owner
AGX vote accepted apple_pmp 380500000.pmp: Retained AGX enable accepted: request=0020f50100000000 reply=0021000000000000
25G83 firmware identity accepted aurora-g16 302600000.gpu: GPU firmware build: Apple GFX 25G83 (normalized loaded image, J773g); M4: firmware identity accepted
DVFS 11 rows, S0-S10 M4 ADT DVFS: 16 source states -> 11 firmware rows (J773g layout), top 1578 MHz; S0 main=0 MHz auxiliary=0 MHz core=125 mV SRAM=780 mV ... S10 main=1578 MHz auxiliary=1578 MHz core=1045 mV SRAM=1045 mV
Firmware READY yes M4 firmware accepted owned initdata root0xfffffc2000000000, NOP and policy; READY; G16: firmware at READY, starting the backend
DRM registered [drm] Initialized aurora 1.0.0 for 302600000.gpu on minor 1
Mesa compute job PASS G16JOB: device='Apple M4 (G16G B0)' vendor=0x10005 device=0x8132 api=1.4.363; G16JOB: PASS value=28 submissions=1 dispatches=1; G16JOB: clean exit
Faults none no DART, power-domain or RTKit fault lines before or after the job

The DVFS rows and voltages match what our older J773g tree reports on the same unit.

Why the handoff was limited to the Airs. The cause is our DTB. It is not this PR, and #1171 (31c3ec3, already in the base) behaves as designed. The DTB we boot was built before #1171. It wires pcie0, the apcie DARTs, ATC2 USB and the DPTX PHY to PMGR domains that have no status. Since 31c3ec3 ("soc: apple: t8132: apply the M4 PMGR policy on the qualified firmware"), a non-Air tree has to state the status of the domains it wires, and a domain without one takes the J713 policy's. For apcie_gp, apcie_sys_gp and apcie_phy_sw that is disabled, so with our DTB PCIe never comes up, and the Ethernet and our netconsole go with it. Upstream's t8132-j773g.dts is not affected. Simulating the policy on it leaves no enabled device on a disabled domain, apart from the USB4 tunnel ports, which are the same on every T8132 board. We'll make our DTB state those domains the way t6040-j616s.dts does. Then we'll rerun this head without the thirteenth commit, so the PMP/G16 path also runs with #1171's handoff active on J773g, and post that result here.

Not covered yet: that rerun; exact 370ad389 without the TEST ONLY layer (it can't reach Linux on J773g without the bring-up commits); J713/J715 regression; suspend/resume; repeated cold and warm boots.

@techmore

Copy link
Copy Markdown
Contributor Author

Rebased onto current integration/aurora (3a7a3f9); no functional change. The only conflict was in PmpDriver::suppress_bind_attrs() (drivers/soc/apple/pmp.rs): integration/aurora replaced its call with apple_pmp_keep_bound(), so the rebased commit keeps that call and only changes the comment above it from J713 to T8132, as before.

@techmore

Copy link
Copy Markdown
Contributor Author

Hardware test, Mac mini M4 (J773g), 2026-11-14: PASS for this PR's first five commits, 3fa83613bf92.

Kernel: aurora-silicon/linux integration/aurora 5d112b1d5493 plus the exact heads of #1192 36383187, #1718 5fbbff26, #1191 (first five commits) 3fa83613, #1865 9c71c29f, #1702 0430675d, #1703 9b0ca002 and #1872 2eb84498, merged without conflicts (release 7.3.0-prheads+, native arm64 build with GCC 15.2.0, 0 warnings). One boot on a Mac mini M4 (J773g, T8132) with a Fedora 44 userspace. The device tree came from the boot chain, not from this tree, so DT-only changes were not exercised.

Check Result Evidence
PMP firmware and retained owner PASS apple_pmp 380500000.pmp: PMP firmware and endpoint ready; J773g PMP vote bridge ready; retained existing PMP owner
GPU power vote through PMP PASS Retained AGX enable accepted: request=0020f50100000000 reply=0021000000000000; M4 G16G: power acknowledged … core-mask=0x3ff; 10 cores enabled
DVFS table from the ADT PASS M4 ADT DVFS: 16 source states -> 11 firmware rows (J773g layout), top 1578 MHz (S0 to S10 listed)
GPU firmware READY and a bounded GPU job PASS READY at 1.50 s; glmark2-es2-gbm --off-screen rc=0, score 971 (second run 980)
pmp-report driver PASS apple-pmp-report bound; no pmp-report errors in the kernel log

The top commit 35565c1d is the same change as #1718 (tested there at its head 5fbbff26, PASS) and will be dropped from this PR, leaving the five commits above.

@techmore

Copy link
Copy Markdown
Contributor Author

Restacked #1191 on #1718 at be82a6f7a383; the draft state is unchanged.

The branch now contains exactly the five retained #1191 commits directly on #1718 head 5fbbff263a800227f30e14f2178a0af4bcd65fc5. It cannot work without #1718. The unstacked five-commit head 4b9c16473e73f54a2ab4bcfb2299a81e23c3d82b was booted on 2026-11-14 at 17:59 EST and reached userspace, but G16 rejected the missing firmware identity with EINVAL and did not reach READY. Once #1718 merges, this branch must be restacked or rebased onto the then-current integration/aurora and CI rerun.

The existing human-signed commits are patch-identical to the five retained commits from the previous branch:

# previous now on #1718 stable patch-id
1 51e6f7ac2565 7edecc5ef1a2 99524673a1bd
2 21b6104d5b8a e2f2e3a83352 e418c374f60f
3 0db7b9d83655 b5de9ff45973 cc8335369c9d
4 59444dfc28a9 a04a35e51c5a 3bb9597d7d9f
5 3fa83613bf92 be82a6f7a383 835fd62ba3d4

#1718 is open at 5fbbff263a800227f30e14f2178a0af4bcd65fc5 and its reported host-tests check is green. In one identical SER8 Ubuntu 24.04 throwaway environment, python3 -I tools/asahi/run-host-tests.py --jobs 8 found no new failures versus #1718's head: 140 passed / 179 failed on both trees, with the same 179 failing test IDs, which are pre-existing runner limitations.

One boot of the exact composite be82a6f7a38329700c8a6663945c8d3c8963740f on our J773g used the 25G83 firmware from the macOS 26.6.2 stub and kernel 7.3.0-m4test-k3-1718-1191-be82a6f7+. #1718 admitted the 25G83 identity; PMP firmware and endpoint became ready; the retained owner and all eleven DVFS rows S0 through S10 were present; G16 enabled 10 cores and reached READY; the RTKit crash count was 0; and /dev/dri/renderD128 was present. timeout 45 glmark2-es2-gbm --off-screen -b build:duration=10 -b shading:duration=10 completed with rc 0 on Apple M4 (G16G B0) and score 935. This was a bounded smoke test, not a benchmark. CLPC recorded the host-GPU vote during the job. Image SHA-256 is e06b50f3fe730f97f7e996817631f198d57298c9dd1dfa1655e747b2437c952b and intended DTB SHA-256 is 981d8ce36e610c6af6703dfea08ff24cda97b207f0f103c6ab7756819e242a45.

Ethernet was absent because the exact DTB disables its PCI child and this tree does not include #1898. DRM reported card0-Unknown-1 connected and enabled at 640x1136, but there was no native HDMI or DCP output because this tree does not include #1192.

This is one boot only. It does not cover suspend, other firmware versions, 27.x firmware, thermal behavior under load, long runs, or other boards.

@RyanTheTide

Copy link
Copy Markdown
Contributor

The production boot stub pins at macOS 27.2 (26B123), so please retarget this to 27.2. 25G83 is the 26.6.2 stub's GPU image; please take the J773g PMP and G16 path from the 27.2 stub.

@DjDeveloperr

Copy link
Copy Markdown
Contributor

Hardware test, second Mac mini M4 (J773g, 24 GB), 2026-11-19: PASS for the five #1191 commits (e0835278), with #2232 in place of #1718's firmware entry.

Setup: macOS 26.6.2 stub and aura 1.0.0b13 + boot-HDMI Stage 2. The DTB is 9125b31 + #1898 (Ethernet). Kernel is the linux-aurora 7.3.0-40 pin (9125b31) + #1898 + this stack + #2232, built natively with the distribution config. Release 7.3.0-ARCH-m4gpu1, Arch Linux ARM userspace, Mesa 26.3.0-devel d4ad4a4dce, KWin 6.8.2.

Check Result
PMP AGX vote J773g PMP vote bridge ready; retained existing PMP owner; Retained AGX enable accepted: request=0020f50100000000 reply=0021000000000000
Power and cores M4 G16G: power acknowledged, version=0xa021100 counts=0x11010a core-mask=0x3ff, 10 cores
DVFS 16 source states -> 11 firmware rows (J773g layout), top 1578 MHz, S0-S10 listed
Firmware firmware at READY at 2.91 s; [drm] Initialized aurora 1.0.0 for 302600000.gpu on minor 1
Userspace EGL, Vulkan and KWin report Apple M4 (G16G B0). KWin composites with OpenGL ES, and its buffers are imported into simpledrm for 1920x1080 HDMI scanout.
GPU job glmark2-es2-drm --off-screen, 4 scenes × 10 s: rc 0, no GPU errors

Without #2232, #1718's digest does not match this machine (see #1718).

Separate issue on this machine: #1865's fixed J773g CPU masks (P 0,3-5) reject its numbering (P 0,7-9). apple-pmp-thermal fails with -22, so the GPU cooling device stays at state 8 and G16 stays at S1. A fix that takes the clusters from the CPU nodes will follow in its own PR.

🤖 Generated with Claude Code

@DjDeveloperr

Copy link
Copy Markdown
Contributor

On the J773g this series selects the eleven-row table (top S10 = 1578 MHz), but the G16 governor, the cooling ceiling and the pstate register check still stop at S9. As a result:

  • a busy GPU runs at 1470 MHz;
  • if only the governor is raised, the firmware reports state 10 and the next Regs::pstate() check fail-stops the GPU with EPROTO. I measured this on a Mac mini M4.

The fix is #2239: one commit on top of this branch's head (be82a6f). It takes the top state from the board table's row count for all three, so the ten-row J713/J604 behaviour is unchanged. You're welcome to fold it into this PR instead, if you prefer that.

🤖 Generated with Claude Code

DjDeveloperr and others added 8 commits November 19, 2026 08:22
iBoot writes into the 25G83 GPU TEXT it loads, and part of what it
writes depends on the machine. Compared with build b000 (G16G B0) of
armfw_g16g.im4p in 25G83, a Mac mini (J773g, 24 GB) loads a TEXT that
differs in:

- the header word at 0x224, which changes from boot to boot, and the
  DATA address at 0x23c;
- the value of each of the 39 boot parameter records the header at 0x22c
  places from 0x5c8df to 0x5cb10 (a tag, a 32-bit length and the value):
  carveout addresses just below the top of DRAM, which follow the memory
  size, a per-boot slide and the entropy;
- the entry count and body of the two 0x350-byte tunable tables at
  0x5cb10 and 0x5ce60, which the shipped image leaves empty.

The T8132 entries hash a loaded image with only the entropy or one
record zeroed, so each fits the machines it was measured on, and G16
refuses this Mac mini's image with EINVAL.

Add an entry that zeroes all of those ranges. Its digest is that of the
shipped build b000 TEXT with the same ranges zeroed, and two boots of the
Mac mini give the same digest, so it pins the 25G83 B0 code as Apple
ships it rather than one machine's memory map, slide or tunables. Every
other byte, including the record tags and lengths and the table headers,
is compared as loaded. The existing entries are unchanged. A test checks
the ranges' layout and that the digest selects the entry.

Signed-off-by: Diljit Singh <hey@djdev.me>
The existing telemetry predicate already selects firmware-qualified T8132,
including J773g, for endpoint 7. Name that condition for reuse by the
PMP and GPU paths; this is a refactoring, not a change in admission.
The misleading J713-only comments are corrected.

A prior J773g bring-up stack required endpoint 7 to complete PMP probe;
the current base already enables it on qualified T8132 machines.

Assisted-by: LLM checkpatch
Signed-off-by: Sean Dolbec <sdolbec1@gmail.com>
Use the shared retained T8132 predicate for the report readiness path.
The prior test already selected the T8132 report for a compatible T8132
supplier on the qualified firmware path. The new predicate additionally
requires the machine compatible apple,t8132; it does not newly enable
J773g. Update the host fixtures to provide the same helper.

A prior J773g bring-up stack sent and received an AGX request with its
PMP report present. This refactoring has not been isolated on hardware.

Assisted-by: LLM checkpatch
Signed-off-by: Sean Dolbec <sdolbec1@gmail.com>
The existing bridge treats every firmware-qualified T8132 machine as
J713 and requires a DISP record. Select J773g by its machine compatible
and require its AGX record instead, so the GPU can use the retained PMP
vote bridge without a DISP record. Reject display consumers on J773g;
other T8132 boards retain their existing behavior.

The fixed table shape and exact supplier checks remain in place, and an
accepted AGX vote is retained until reboot. The exported functions keep
their apple_pmp_j713_gpu_*() names to avoid Rust driver churn.

A prior J773g bring-up stack logged bridge registration and acknowledged
AGX requests on ten boots. That was a different implementation; this
change has not been booted on hardware.

Assisted-by: LLM checkpatch
Signed-off-by: Sean Dolbec <sdolbec1@gmail.com>
Use the shared retained T8132 predicate at the G16 board check. The old
apple_pmp_j713_board() already selected firmware-qualified T8132 machines,
including J773g, so this is a rename with no admission change. The later
handoff, firmware identity, DMA and hardware identity checks remain.

A prior J773g bring-up stack admitted the handoff and reached firmware
READY with subsequent changes; this rename was not isolated on hardware.

Assisted-by: LLM checkpatch
Signed-off-by: Sean Dolbec <sdolbec1@gmail.com>
The G16 driver builds its firmware DVFS table from the sixteen
performance states of the original ADT, using a list of qualified
ten-row index layouts: J713's (four single states, then six
equal-voltage pairs) and J604's. The M4 Mac mini (J773g) has the J604
shape: five single states, five equal-voltage pairs and a single top
state at 1578 MHz. That is eleven distinct rows, and the J604 layout
drops the fifth low state to fit in ten.

Keep every state on J773g. Add an eleven-row J773g layout and give each
layout its row count. The board pins the row count it is qualified
for, ten on J713 and J604 and eleven on J773g, and only layouts with
that count are tried, so the J604 and J773g layouts of the same shape
cannot be confused. The table holds up to eleven rows with a count,
Main 0xfc0 carries that count instead of a constant 10, and the
encoder's ceiling is the last row.

Nothing changes on J713 or J604: their layouts and order are kept, the
host tests' measured J713 ADT gives the same ten rows, the J604-shaped
case still selects the J604 layout on a ten-row board, and the
qualified initdata goldens still match at ceilings 1, 4 and 9. The
host tests use synthetic voltage bins rather than a measured chip's,
and substitute them into those goldens before comparing; every other
byte is compared unchanged.

The runtime ceiling policy is unchanged: it publishes at most S9, and
the hardware performance state is still refused above 9. On J773g the
top row (S10, 1578 MHz) is in the tables but never requested; using it
needs evidence of its own. The reported maximum frequency is the top
row's.

Tested on a J773g, on an earlier integration/aurora (19f71a1), with
a voltage-grouping selection that gives the same rows as the J773g
layout: the live ADT gave eleven rows, main/auxiliary 0/0, 338/338,
618/618, 796/796, 928/928, 1056/952, 1170/1053, 1278/1152, 1338/1204,
1470/1326 and 1578/1578 MHz. Voltage bins differ per chip; the table is
selected from its ADT. The firmware accepted these tables, reached
READY and completed a compute job. This layout-based version has not
been booted on hardware.

Assisted-by: LLM checkpatch
Signed-off-by: Sean Dolbec <sdolbec1@gmail.com>
The utilization governor, the cooling ceiling and the check of the
GPU's reported performance state all stopped at S9, the top row of the
ten-row J713 and J604 tables. The J773g (Mac mini) table has eleven
rows. Its top state S10 runs at 1578 MHz. Initdata already initializes
that state and names it the ceiling, but the governor never asked for
it, so a busy GPU ran at 1470 MHz.

Take the top state from the board's firmware table and use it for the
governor's load target, the configured ceiling and the bound on the
pstate register. A reported state above the table's top is still a
protocol error. Before this change, publishing S10 made the next
register check fail-stop the GPU with EPROTO. Cooling keeps one state
per level below the top, and S1 at full cooling on every table. The
ten-row tables behave exactly as before.

Signed-off-by: Diljit Singh <hey@djdev.me>
The retained T8132 PMP session follows apple_t8132_firmware_path(),
which admits the Macs on OS firmware 26.6.2 only. On another firmware
the PMP owner does not keep the session the boot loader left running
and its own start fails ("RTKit: IOP power acknowledgment failed:
-62"), as on a J773g on the macOS 27.2 stub.

The PMP is already running when Linux starts, whatever the firmware:
select the retained session by the SoC. With it go, on every T8132 and
any firmware: the bridge registration in pmp-display.c, the report
readiness wait, the telemetry endpoint, apple_pmp_keep_bound() (the
owner is not unbound) and the owner's latch that treats a message it
cannot handle as fatal.

The bridge registration no longer asks which board it is on: it needs
the exact PMP node with an AGX or a DISP record in
apple,tunable-soc-device, whichever the tree carries, and a vote of
either kind is refused without its record. Its log line names the
record instead of a board.

G16 does not follow. asahi_g16_board(), asahi_g16_perf_rows() and the
AGX vote entry points stay on the 26.6.2 firmware path through
apple_pmp_t8132_g16_board(), so no GPU is admitted, and no AGX vote
sent, on a firmware it was not run on.

An earlier form of the head commit (`9e699c3d`) ran on one J773g off
26.6.2; no other T8132 board has run it.

Assisted-by: LLM
Signed-off-by: Sean Dolbec <sdolbec1@gmail.com>
@techmore
techmore force-pushed the j773g/g16-pmp-20261107 branch from be82a6f to 423a6c7 Compare November 19, 2026 14:17
@techmore
techmore marked this pull request as ready for review November 19, 2026 14:17
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-19T14:17:23.829809Z
We couldn’t complete this review. Comment @codex review to try again.
423a6c7 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@RyanTheTide

Copy link
Copy Markdown
Contributor

Thanks for carrying this series through many rebases, and for the detailed J773g results.

One convention point on the new DVFS table selection. We select behaviour by a hardware property, not by the list of machines it was run on, and this adds two board compares:

  • drivers/gpu/drm/asahi/g16/glue.c:216: return of_machine_is_compatible("apple,j773g") ? 11 : 10;
  • drivers/soc/apple/pmp-display.c:328-329: apple_pmp_j713_board() && !of_machine_is_compatible("apple,j773g")

board/data.rs:20-21 says J604 and J773g have the same ADT shape and differ only in the row count "which the board selects". If the eleven-row table follows from the ADT shape, could asahi_g16_perf_rows() derive the count from the ADT performance states, so every T8132 with that shape gets it? If J604 really needs ten rows for a hardware reason (cooling, for example), please key that on a DT property that describes it and say why in a comment.

The same goes for the DISP consumer: the J773g has no internal panel, so the absence of the DISP record or of a display consumer node should select it rather than the board name.

We can run no-regression rows on our lab Macs.

Two selections in this series compare the machine name.

The G16 firmware table has ten or eleven rows and the row count was
taken from the board: eleven on the J773g, ten elsewhere. The count
follows from the shape of the machine's own ADT performance states:
four low states and six equal-voltage pairs give ten rows, five low
states, five pairs and a single top state give eleven. Derive it from
that. data::select_named() tries the two shapes and no longer takes a
row count, and asahi_g16_perf_rows() is gone.

This changes the J604: its ADT has the eleven-row shape, and the
ten-row selection it had left its fifth low state out only because ten
rows were thought to be the firmware's limit. It now gets eleven rows
like the J773g, on which eleven rows and the top state S10 were run.
No J604 has run this. The J713 shape keeps ten.

The DISP vote was refused on the J773g by name. What it has is no
internal panel: the DISP consumer is an available main DCP without
apple,connector-type. The PMP table cannot decide this; the J773g's
carries a DISP record as well as an AGX one.

The layouts are named by shape, so the DVFS log line reads "(5+5
pairs+top layout)" where it read "(J773g layout)".

Assisted-by: LLM
Signed-off-by: Sean Dolbec <sdolbec1@gmail.com>
@techmore

Copy link
Copy Markdown
Contributor Author

Pushed as b58acd5 on this PR: the row count is derived from the shape of the ADT performance states, and the DISP consumer is an available main DCP without apple,connector-type (the J773g's PMP table carries a DISP record, so its absence cannot select). No machine has booted it; our unit is on 27.2 with the GPU node disabled. The J604 changes from ten rows to eleven with no fallback, no real J604 ADT was tested, and we know no hardware reason for ten. Rows needed on 26.6.2: J604, J713, J773g.

@RyanTheTide

Copy link
Copy Markdown
Contributor

Thanks for b58acd5: the row count from the shape of the ADT states and the DISP consumer from the main DCP's apple,connector-type are the hardware keys we hoped for. Thanks also for being clear about what is untested; we'll treat J604, J713 and J773g rows on 26.6.2 as the remaining step.

The runner fails the whole run when a tools/asahi test file is not in
its table, so that a test cannot be silently skipped. The DISP consumer
test added with the DVFS row derivation was not registered: the host
test job stops before it runs anything.

Register it. It takes no arguments and has no mutation control.

Assisted-by: LLM
Signed-off-by: Sean Dolbec <sdolbec1@gmail.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.

3 participants