Repository navigation
t600x: vote GPU activity to the PMP (J314s GPU -25% -> fixed), report JPEG to it - #1290
Conversation
…n t600x GPU reads on the M1 Max (t6001) top out at 241 GB/s on Linux; macOS reads 361 GB/s. Bit 9 of the PMP report PS-REQ word is the AGX power request: with it clear the PMP ignores the GPU bandwidth demand and keeps memory at its idle floor. With it set the same read microbenchmark reaches 368 GB/s. The GPU driver reports operations in flight with apple_pmp_agx_activity_begin()/end(). pmp-report sets bit 9 when the first operation starts and clears it 250 ms (pmp_report.agx_vote_idle_ms) after the last one ends, at GPU unbind, across system sleep and when the report goes away. A set that is not acknowledged is cleared and retried after a second; a PMP that does not run gets no write. The decisions are plain functions in pmp-agx-vote.h, covered by a host test suite with mutant controls (tools/asahi/pmp-agx-vote-tests.*). apple_pmp_report_set_request() is a locked, acknowledged update of one PS-REQ bit for clients outside this driver; it refuses the AGX bit on t600x so the vote stays its only writer. Off by default (pmp_report.agx_vote), apple,t6001 only. This is omacom/linux-aurora#334 (head b36d0192f408) squashed onto aurora-silicon integration/aurora; conflicts in the GPU unbind signature, the pmp-report.h stubs and bindings_helper.h resolved keeping both sides. The aurora-ci host-tests.json registration is left out (no such file here). Signed-off-by: Joshua Warren <[email protected]> Assisted-by: LLM Signed-off-by: Ryan Murray <[email protected]>
T6000 has the AGX soc-device record and request bit of T6001 (soc-device 10, PS-REQ bit 9), and the J314s ships with the PMP running. There the PMP runs the fabric at p-state 3 and DCS at 6 and, without the AGX request, never raises them for the GPU. Holding bit 9 on a J316s booted with the J314s PMP profile (same T6000 SoC, same session, glmark2 800x600 offscreen): PMP off 9938 - 10117 PMP on 7222 - 7327 (-25%) PMP on, AGX request 11909 - 12086 (+19% over PMP off) ANE MobileNet stays at 3.67 ms (4.85 with the PMP off) and idle Total System Power at 5.28 W (6.69 W with the PMP off). Take apple,t6000 into the vote and turn it on by default. It writes only while the PMP runs, so boards that keep the PMP off are unchanged; pmp_report.agx_vote=0 still turns it off. The vote is Joshua Warren's (previous commit); this only widens and enables it. Signed-off-by: Ryan Murray <[email protected]> Assisted-by: LLM
With APPLE_USE_PMP, put both JPEG codecs on their PMP report entry (soc-device JPEG0, request bit 19) as AVD, DCP and ISP already are, so the PMP knows when they work. On a J316s with the J314s PMP profile and the AGX vote, NV12 to JPEG encode runs 413-432 fps at 1080p (406-419 without the request) and 107 fps at 4K (105). Boards without APPLE_USE_PMP are unchanged. Signed-off-by: Ryan Murray <[email protected]> Assisted-by: LLM
Register pmp-agx-vote-tests.py (and its mutant run) in run-host-tests.py, which takes the place of the aurora-ci host-tests.json registration that omacom/linux-aurora#334 carries. Signed-off-by: Ryan Murray <[email protected]> Assisted-by: LLM
|
Hardware rows with this exact branch, on the M1 Pro J316s, 11-09 18:31-18:53. Setup: test kernel 7.3.0-aurora-f4pv2. That is this head plus #1293, whose code stays inert without
The vote-on and vote-off columns come from the same boot, with Live PTD read (lab-only probe module, separate trial): once bit 9 is set, the GPU firmware writes its own SOC-DEV-DVFS entry (0x10b, p-state 6 under glmark2). No host-side GPU DVFS request is needed. |
Summary
The J314s (M1 Pro 14") ships with the PMP on (
APPLE_USE_PMP, ec1ce6e). On T6000 the PMP then runs the fabric at p-state 3 and DCS at 6, and nothing asks it to raise them for the GPU, so the GPU loses about a quarter of its speed. Bit 9 of the PMP report request word is the AGX request. With it set, the PMP follows the GPU's bandwidth itself.pmp_report.agx_vote=0turns it off.APPLE_USE_PMP, as AVD, DCP and ISP already are.AVD decode under the PMP is still slow (about -40%), because it needs a SOC-DEV-DVFS performance request. That is separate work and not in this PR.
Benchmarks (J316s with the J314s PMP profile, same T6000 SoC, same session, aura-try RAM-only trial)
Bit 9 held for the whole boot (DT test, v1) gave glmark2 11909 - 12086 (+19% over PMP off). Rows with this exact branch (vote kernel) follow in a comment.
Validation
AGX-VOTE-SELFCHECK-OK;--mutations: every mutant caught.🤖 Generated with Claude Code