Skip to content

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

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

RyanTheTide wants to merge 2 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 92cab990: not ready yet

Check Detail
CI at head running running: apple-build, host-tests, pr-text / pr-text, KUnit plan
Review no needs one approving review from Core or Omarchy Mac (not the author)
Requested changes ok none
Hardware row at head no no line with the head SHA 92cab990, a Mac and a result in the PR body or a comment
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 now sets PTD request bit 4 while its firmware runs. The gate also removes the loader's apple,no-auto-pm from GFX on these boots. Still to run: - J516s exact-head row (Dj): effective S in /sys/kernel/debug/aurora-g16/stats above S1 under load and back down at idle, plus glmark2/vkmark before and after. - s2idle with the request held. - J514s if anyone has one. - J615 (T8122) is not affected: the overlay is T6030-only.

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.

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) door:two-way Revertible or not, from Merge risk (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants