Skip to content

soc: apple: t6030: restore the GPU's AGX PMP request entry - #4028

Open
RyanTheTide wants to merge 3 commits into
mainfrom
fix/t6030-pmp-agx-report-entry
Open

RyanTheTide wants to merge 3 commits into
mainfrom
fix/t6030-pmp-agx-report-entry

Conversation

@RyanTheTide

@RyanTheTide RyanTheTide commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

Problem: The T6030 GPU driver and display gate on main are written to make the GPU's PMP AGX request (PTD request bit 4), which macOS 27.2 on J516s holds while its GPU runs. The gate links the GPU to the PMP report entry at reg 4 (gate_gpu_agx_entry()), and g16 sets the request after its backend starts (shared.pmp_request(true)) and withdraws it around sleep. Neither T6030 PMP overlay defines report@4, though. The gate finds nothing to link, and every request call returns 0 without writing anything.

This is not the cause of the J516s S1 (338 MHz) nightly gap. Dj confirmed on J516s that the gap comes from a stale boot loader device tree without the macsmc_soc_die trip points, so the cooling backstop holds S1. With main's device tree, J516s reaches S8 (1380 MHz) without this request. This PR stays a draft until a J516s row shows what the request changes.

Change: Add the AGX request entry (report@4, pmp-agx) to both T6030 PMP overlays, exactly as Dj wrote it in ba42396 alongside the gate change. The #3815 squash (7d82fde) kept only the gate half. The host graph test now leaves this entry out of the PMP startup graph, which it is not part of, and checks that it stays an unseeded entry at reg 4.

Tested: buildbox only, at 92cab99 (no Mac row yet). Both overlays compile with report@4. t6030-pmp-supplier host test PASS. t6030-pmp-graph host test PASS: 27 cases, and all 25 mutations are caught. checkpatch --strict clean on both commits.
Risk: Two-way door. T6030 only, and only on boots where the display gate installs the PMP overlay (J516s/J514s with the 27.2 handoff). The GPU then sets PTD request bit 4 while its firmware runs. The gate also removes the loader's apple,no-auto-pm from GFX on those boots.

Still to run:

  • J516s exact-head row with main's device tree: GPU clocks and memory bandwidth under load with and without the request.
  • s2idle with the request held.
  • Dj to confirm whether the overlay half was left out on purpose. If it was, I'll close this PR.

DjDeveloperr and others added 2 commits December 3, 2026 11:48
Commit 7d82fde ("drm/apple: restore the T6030 firmware 27.2 display
after sleep") brought in gate_gpu_agx_entry(), which links a T6030 GPU to
the PMP report entry at reg 4 (apple,pmp-report-entry), but not the entry
itself: neither T6030 PMP overlay defines report@4. The gate therefore
never adds the link, the g16 driver's PMP request calls find no entry and
return without writing anything, and the GPU runs without the PMP's AGX
request on the 27.2 firmware.

macOS 27.2 on J516s holds that request (PTD request bit 4, soc-device
record 4 in the ADT iop-pmp-nub) while its GPU driver runs, withdraws it
before GFX goes off for a sleep and makes it again once GFX is back.
On the 27.2 firmware the J516s GPU has been seen held at its lowest
performance state (S1, 338 MHz) under load on kernels without the
request.

Add the entry, as it was written for the gate, to both T6030 PMP
overlays.

Fixes: 7d82fde ("drm/apple: restore the T6030 firmware 27.2 display after sleep")
Signed-off-by: DjDeveloperr <hey@djdev.me>
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
The T6030 PMP overlays now carry the GPU's AGX request entry (report@4).
The PMP start never seeds or acknowledges it: the GPU driver makes and
withdraws it through apple_pmp_report_entry_request(). Leave it out of
the four-entry startup graph the test models, and require it to stay a
plain, unseeded entry at reg 4.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
@RyanTheTide
RyanTheTide requested review from a team and DjDeveloperr as code owners December 3, 2026 00:56
@github-actions github-actions Bot added area:gpu Area from CODEOWNERS (bot) area:platform Area from CODEOWNERS (bot) blast:m3 Macs affected, from Merge risk (bot) door:two-way Revertible or not, from Merge risk (bot) needs-hw-row No hardware row at the PR head (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) labels Dec 3, 2026
@github-actions

github-actions Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

Merge readiness at f28a32b1: not ready yet

Check Detail
CI at head no failing: host-tests
Review no approved by aurora-silicon-review, but GitHub does not count it yet (code owner from Core, Omarchy Mac or Aurora Maintainers needed, or approval went stale)
Requested changes ok none
Hardware row at head ok comment at 92cab990; the changed files are byte-identical at f28a32b1
Conflicts ok none
PR text ok Risk: two-way · . T6030 only, and only on boots where the display gate installs the PMP overlay (J516s/J514s with the 27.2 handoff). The GPU then sets PTD request bit 4 while its firmware runs. The gate also removes the loader's apple,no-auto-pm from GFX on those boots. Still to run: - J516s exact-head row with main's device tree: GPU clocks and memory bandwidth under load with and without the request. - s2idle with the request held. - Dj to confirm whether the overlay half was left out on purpose. If it was, I'll close this PR.

Areas: area:gpu, area:platform

Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels.

@RyanTheTide
RyanTheTide marked this pull request as draft December 3, 2026 00:56
@github-actions github-actions Bot removed needs-hw-row No hardware row at the PR head (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) labels Dec 3, 2026
@DjDeveloperr

Copy link
Copy Markdown
Contributor

J516s (T6030, M3 Pro) A/B check at exact head 92cab990217d00b2d5dbaa65ed195d39a8edfa6c (base = 63e5785fcf14 without #4028; head = 246a75214d7b, identical tree + #4028 92cab990217d, same config and DTB splice):

  • Arm 1 (base): 7.3.0-m3-s2r-g63e5785fcf14, boot_id=b96545e6-2c19-418d-a748-73699b09b98f
  • Arm 2 (+#4028): 7.3.0-m3-s2r-g246a75214d7b, boot_id=e08a69be-038b-495d-8f76-6fb1ddcca5b3
    • /proc/device-tree/soc/pmp-report*/report@10 present alongside report@4, report@7, report@8, report@9.
    • PMP booted cleanly (apple-pmp-report 3503c0000.pmp-report: PMP ready: PTD status 0x1 request 0x10080 ack 0x10080; aurora-g16 still logs G16: 26B123: starting without PMP AGX vote on both arms as expected before the GPU side votes).
  • 60 s GPU idle, display off/on (bl_power 0 -> 4 -> 0), 10 s s2idle (0 -> 1): clean on both arms; sensor error -61 = 0, SError/pmp fault = 0, GPU fault/recovery/timeout lines = 0, kernel WARNING/BUG/Oops = 0.
  • Time to S8 under load: 503 ms (base) vs 504 ms (+#4028).
  • gpubench-vk (asahi_icd.aarch64.json, medians, all status: ok):
    • compute.heavy alu d1: 553.40 us (3880.50 GFLOP/s) -> 495.05 us (4337.92 GFLOP/s)
    • compute.heavy alu d4: 364.83 us (5886.25 GFLOP/s) -> 362.98 us (5916.32 GFLOP/s); post-s2idle d4: 363.90 us (5901.29 GFLOP/s)
    • compute.heavy bw d1: 1288.66 us (104.15 GB/s) -> 1121.08 us (119.72 GB/s)
    • compute.heavy bw d4: 1094.09 us (122.67 GB/s) -> 972.76 us (137.98 GB/s)
    • compute.light d1 / d16: 103.50 / 15.94 us -> 78.59 / 10.56 us
    • render.light d1 / d16: 135.03 / 38.05 us -> 86.04 / 27.29 us
  • Stock kernel and boot.bin restored afterward.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Updated: merged main @7b10eb104ce6 (f28a32b, clean). No code change.

  • Dj's J516s A/B at 92cab99 answers the open question: with report@4 the PMP comes up clean, idle/display/s2idle show no new faults, time to S8 is unchanged (503 vs 504 ms), and GPU throughput improves (e.g. compute.heavy bw d1 104 -> 120 GB/s, render.light d1 135 -> 86 us). So the overlay half was worth restoring.
  • The red host-tests at 92cab99 was apple/pmgr-inherited, a main breakage at the time; it passes on the merged head. On the merged head t6030-pmp-graph-tests --mutations fails with ('no-storage-policy', 2): main's fa82a98 (media/pmdomain/dts: apple: T6001 27.2 bring-up (AVE 26B123, South PMGR ProRes, South pmp_report) #4304) added a second ent->no_ack = of_property_read_bool(...) read in pmp-report.c, so the mutation's target is no longer unique. That is a main breakage, not this PR's; tools/asahi: fix two host tests broken by concurrent merges #4385 fixes that test. The PR's own cases pass (27 graph cases, supplier test PASS), and both overlays compile with report@4 (kernel dtc).

Still needed (queued in HWROWS): an exact-head J516s repeat of the A/B on the merged head.

@RyanTheTide
RyanTheTide marked this pull request as ready for review December 5, 2026 01:43
@github-actions github-actions Bot added needs-review No approving review from Core or Omarchy Mac yet (bot) ci-failing A check failed at the PR head (bot) labels Dec 5, 2026

@aurora-silicon-review aurora-silicon-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: MERGE at f28a32b

Checked: Both exact overlays compile and expose the same unseeded report entry to the existing GPU supplier lookup. The startup graph and supplier positives pass, including all 27 graph cases. The optional graph mutation run stops at the same duplicate match on the base and the head. The two overlays and graph fixture match the earlier J516s A/B revision byte for byte, and the source commits retain the original human authors and sign-offs.

The forward merge also changed adjacent PMP and display code. A current-head J516s run and the scoped GPU load and sleep regressions remain pending.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:gpu Area from CODEOWNERS (bot) area:platform Area from CODEOWNERS (bot) blast:m3 Macs affected, from Merge risk (bot) ci-failing A check failed at the PR head (bot) door:two-way Revertible or not, from Merge risk (bot) needs-review No approving review from Core or Omarchy Mac yet (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants