Skip to content

t600x: vote GPU activity to the PMP (J314s GPU -25% -> fixed), report JPEG to it - #1290

Merged
RyanTheTide merged 4 commits into
integration/aurorafrom
pmpvote/t600x-agx-vote
Nov 9, 2026
Merged

RyanTheTide merged 4 commits into
integration/aurorafrom
pmpvote/t600x-agx-vote

Conversation

@RyanTheTide

Copy link
Copy Markdown
Contributor

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.

  • Joshua Warren's AGX activity vote (soc: apple: vote GPU activity to the PMP so memory leaves idle DVFS on t600x omacom/linux-aurora#334, head b36d0192f408), squashed onto integration/aurora with his authorship and sign-off. The GPU driver reports operations in flight. pmp-report sets bit 9 at the first one and clears it 250 ms after the last one, at unbind and across sleep. The policy is a plain header with a host suite (13 cases plus mutants).
  • T6000 too, on by default. T6000 has the same record and bit (AGX = soc-device 10, PS-REQ bit 9). The vote writes only while the PMP runs, so boards that keep the PMP off are unchanged. pmp_report.agx_vote=0 turns it off.
  • JPEG codecs on their PMP report entry (bit 19) under 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)

row PMP off PMP on (today's J314s) PMP on + AGX request
glmark2 800x600 offscreen 9938 - 10117 7222 - 7327 (-25%) see vote rows below
JPEG enc 1080p / 4K fps 390-415 / 120 406-419 / 105 413-432 / 107
ANE MobileNet p50 4.85 ms 3.68 ms 3.67 ms
idle, Total System Power 6.69 W 5.64 W 5.28 W

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

  • Vote host suite: AGX-VOTE-SELFCHECK-OK; --mutations: every mutant caught.
  • DTB semantic diff against integration: only J314s changes (pmp-jpg entry enabled, jpeg0/1 on it); J316s, J316c, J375c, J375d unchanged.
  • Hardware rows with this branch: pending (comment).

🤖 Generated with Claude Code

joshuaswarren and others added 4 commits November 9, 2026 17:00
…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
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

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 apple,dvfs in the DT. The J316s DTB was built from this branch with #define APPLE_USE_PMP, which is the J314s profile, loaded by an aura-try RAM-only trial. Each "PMP off" row is a one-shot of the same kernel on the configured Stage 2.

row PMP off PMP on, this PR (agx_vote=1, default) PMP on, agx_vote=0 (= J314s today)
glmark2 800x600 offscreen 10122 / 10193 / 10002 12251 / 12300 / 12166 (+20%) 7544 / 7634 / 7627 (-25%)
AVD h264/hevc 1080p fps 63 / 62 36 / 36 36 / 36
AVD 4K fps 16 / 15 9 / 9 9 / 9
JPEG enc 1080p / 4K fps 392-411 / 118-119 405-432 / 106-107 406-422 / 106
ANE MobileNet p50 4.85 ms 3.68 ms 3.68 ms
idle, Total System Power 30 s 3.93 W 3.29 W 3.10 W

The vote-on and vote-off columns come from the same boot, with pmp_report.agx_vote toggled at run time. In every boot: hardware decode md5 identical, 0 AVC (Enforcing), 0 GPU faults, no new kernel warnings. With the vote on, the GPU runs 20% faster than with the PMP off and 61% faster than the J314s does today. AVD under the PMP is fixed in #1293.

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.

@RyanTheTide
RyanTheTide marked this pull request as ready for review November 9, 2026 07:53
@RyanTheTide
RyanTheTide merged commit 9bec84b into integration/aurora Nov 9, 2026
5 checks passed
@RyanTheTide
RyanTheTide deleted the pmpvote/t600x-agx-vote branch November 9, 2026 07:54
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