Repository navigation
arm64: dts: apple: t6001: Enable PMP memory DVFS and DRAM OPPs - #3401
Conversation
Add the M1 Max 512-bit LPDDR5-6400 DRAM OPP table and bandwidth properties to t6001.dtsi, wire the PMP memory floor and media block report power domains under APPLE_USE_PMP matching t6000.dtsi, and enable APPLE_USE_PMP on the 16-inch M1 Max (J316c). Signed-off-by: Dante Loi <[email protected]>
There was a problem hiding this comment.
I rebuilt six DTBs at the commit and its parent. J316c, J314c and J375c all change. On the latter two, the new DCS count and DRAM metadata are present on pmp_report even though APPLE_USE_PMP is false. The M1 Pro and Ultra controls were byte-identical. Please correct the stated scope and show what the shared metadata does on the two non-enabled Max boards. For PMP ownership and the media-domain changes, document the hardware capability that warrants enabling J316c alone, or put the common description at SoC scope once the hardware evidence supports it. Cite a public-clean or measured source for the floor levels and exercise JPEG/AVE/scaler power transitions and suspend/resume on the landing head, alongside the bandwidth result.
|
Merge readiness at
Areas: Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
… DRAM scope ProRes (apr0) is disabled on T6001, so its PMP report power domain and the pmp_report_scodec entry did nothing; drop them. Say in t6001.dtsi that the DRAM description applies to every T6001 board, PMP or not, and is only validated and published read-only by the report, and that the floor levels are the top of the four DCS and three fabric states in the PMP's DVFS domain table. Note in t6001-j316c.dts that only the J316c is qualified for PMP. Signed-off-by: Dante Loi <[email protected]>
The PMP's fabric and DCS management, the CPU memory floor and the media
report entries describe the SoC: the PMP firmware, its DVFS domain table
(four DCS and three fabric states) and the report layout are the same on
every T6001 board. Define APPLE_USE_PMP in t6001.dtsi rather than in the
J316c's board file, so the J314c and J375c get the same description;
t6001-j316c.dtb does not change.
Measured on J316c (M1 Max, 64 GiB) with this series merged into main:
GPU fill, gpubench diag.fill depth 4 172 GB/s (AGX vote off)
287-292 GB/s (vote on)
P-core / E-core pointer chase, 512 MiB 139 / 152 ns -> 128 / 141 ns
with the floor, GPU idle
STREAM 1T triad 67 -> 68-69 GB/s with the floor
PMP DVFS-STATE under CPU load 0x...0103 -> 0x...0203 with it
JPEG0/1, scaler0 and AVD took their PMP report domains on while working
and off after, five runs each, before and after each of three s2idle
cycles (3/3 resumed, floor re-admitted, GPU fill 292-297 GB/s after).
The video encoder does not probe on that machine (its m1n1 does not hand
over the encoder firmware); its PMP entry stays off.
Signed-off-by: Dante Loi <[email protected]>
|
Thanks. I merged
Details are in the updated Testing section. |
There was a problem hiding this comment.
Verdict: HOLD at 029a5dd64ca8
Blockers: A J314c or J375c peer boot and suspend/resume, plus completed hosted checks. The current J316c machine lacks the preloaded encoder firmware, so AVE transition coverage is still open.
Checked: Code approved. The PMP gate is now at common T6001 scope and respects the M1 Pro subset. Rebuilt six DTBs. All three Max boards receive the floor, and both Pro controls plus the Ultra control match their previous DTBs byte for byte. Independently reproduced the byte-identical J316c DTB comparison against the revision used for the reported media and suspend tests.
Evidence
Rebuilt the DTS inputs with the kernel DTC. The J316c binaries at this head and 73ef025 had identical SHA-256 digests. The raw DTC diagnostics on that pair differ only in source-line locations.
|
Following up on the three items in the HOLD at
|
T6001 (M1 Max) is covered by aurora-silicon#3401, which adds the DRAM OPP table, CPU memory floor, and media report entries on top of APPLE_USE_PMP. Drop the T6001 define and restore the two T6000 board defines so this PR touches only T6002 (M1 Ultra) and the die-1 AVD fallback. Signed-off-by: Joshua Warren <[email protected]>
…otes (#1217) Clarifies the kernel prerequisite behind the 16-inch Apple M1 Max (32-core GPU) parity card rows in `README.md` and the v0.7.54 / v0.7.55 release notes: - Keeps all four M1 Max parity card rows and adds a note that they were measured with the Apple PMP (`apple_pmp`) memory DVFS driver active, which the shipped Linux kernel does not yet turn on for M1 Max (`t6001`). - Links [`aurora-silicon/linux#3401`](aurora-silicon/linux#3401) as the kernel change that turns it on. - Adds matched decode measurements on the same 16-inch M1 Max, same build (`cccad65` + `#1203`), and Mesa `53ad9af196f5` (`MLX_OMARCHY_DEFER_TOKENS=0`, identical greedy SHA-256) without PMP vs with PMP: | Model (snapshot) | Context | Without PMP | With PMP | Delta (with vs without) | Without PMP vs macOS | Greedy SHA-256 (12 hex) | |---|---:|---:|---:|---:|---:|---| | `mlx-community/Qwen3-4B-Instruct-2507-4bit` (`50d42775`) | 512 | **98.48 tok/s** (`98.39`, `98.57`) | **107.87 tok/s** (`107.90`, `107.84`) | +9.5% (−8.7% without) | 94.2% | `efb521ae04af` | | `mlx-community/Qwen3.5-9B-MLX-4bit` (`938d8919`) | 512 | **58.56 tok/s** (`58.53`, `58.59`) | **64.09 tok/s** (`64.11`, `64.07`) | +9.4% (−8.6% without) | 101.4% | `697272134f42` | | `mlx-community/Qwen3.5-9B-MLX-4bit` (`938d8919`) | 2048 | **57.74 tok/s** (1 leg × 3) | **63.49 tok/s** steady (leg 2: `60.44` under fan ramp) | +10.0% steady (−9.1% without) | 101.2% | `7dd7261b2fb8` | `Qwen3-4B-Instruct-2507-4bit` at `ctx=2048` was not separately re-measured without PMP in this pair. Author-Model: antigravity/gemini-4-neon-high
|
Extra J316c (16-inch M1 Max, T6001) evidence from a three-boot A-B-A decode check, isolating the Setup: J316c M1 Max (32-core GPU), kernel
*Leg 1 of the 9B ctx 2048 run hit a brief thermal fan ramp ( This measures only the PMP enablement (without this PR's CPU memory floor or media report entries), and confirms the memory-bandwidth lift carries through to ~9.5–10.5% faster LLM decode on J316c and reverses cleanly when the alias is removed. |
#1241) Follow-up to #1217 after completing all four 16-inch Apple M1 Max parity-card cells on the shipped Linux kernel (without `apple_pmp`, 5 pairs / 25 runs each, decode + prefill, Mesa `53ad9af196f5`, `MLX_OMARCHY_DEFER_TOKENS=0`, exact greedy SHA-256 on every run): - Promotes the shipped-kernel (no-PMP) numbers to the main parity-card cells and `Supported hardware` row, with `Linux / macOS` recomputed from the shipped-kernel decode rates: - `Qwen3-4B-Instruct-2507-4bit` (`50d42775`) `ctx=512`: **98.51 tok/s** dec / 877.84 tok/s pf (**94.2% (−5.8%)** vs 104.53 macOS) - `Qwen3-4B-Instruct-2507-4bit` (`50d42775`) `ctx=2048`: **89.52 tok/s** dec / 710.84 tok/s pf (**102.7% (+2.7%)** vs 87.20 macOS) - `Qwen3.5-9B-MLX-4bit` (`938d8919`) `ctx=512`: **58.54 tok/s** dec / 442.46 tok/s pf (**101.3% (+1.3%)** vs 57.77 macOS) - `Qwen3.5-9B-MLX-4bit` (`938d8919`) `ctx=2048`: **57.74 tok/s** dec / 378.80 tok/s pf (**101.2% (+1.2%)** vs 57.05 macOS) - Moves the four with-PMP parity-card numbers (`#1117`: 107.16 / 96.69 / 63.47 / 62.96 tok/s, 102.5%–110.9%) into the `†` note below the table, linking [`aurora-silicon/linux#3401`](aurora-silicon/linux#3401) as the kernel change that turns `apple_pmp` on. Author-Model: antigravity/gemini-4-neon-high
|
Measured the PMP alias effect this enables, on a 16-inch M1 Max MacBook Pro. Decode throughput on Qwen3-4B-Instruct 4-bit, three legs per arm, same kernel, same userspace stack, same environment — the only difference is whether the device tree carries the pmp alias:
That is +7.7% and +7.4% decode rate. Generated token ids were identical across every leg of both arms, so the gap is timing, not numerics. An earlier A-B-A on the same chip put the alias at +9.5%, so this lands in the same range. From the hardware side this patch is the piece shipped machines are missing: the alias, the DVFS domain table wiring, and the power-domain handoff arrive together here. What do the maintainers still need to see before this can land? |
|
Completing the A-B-A on the same 16-inch M1 Max MacBook Pro, Qwen3-4B-Instruct 4-bit, same prompts — generated token ids hash-identical across all three arms. Second no-alias arm (same boot payload as the first, measured after the alias arm): ctx 512 decode 98.9, 99.6, 100.1 tok/s (median 99.6); ctx 2048 decode 89.6, 89.9, 90.3 tok/s (median 89.9). Against the first arm (99.5 / 90.6) and the alias arm (107.2 / 97.3): the return arm lands within 0.8% of the baseline, so the +7.7% / +7.4% in the middle arm tracks the device-tree PMP alias and not run order or thermal state. |
|
Head-test attempt on the 16-inch M1 Max (boot.bin.pr3401 Evidence:
This is orthogonal to the PMP-alias result above — the A-B-A numbers stand. What it says: the head DTB as packaged does not boot this box to a usable state. Recovery is via the KVM/macOS ESP-restore rung (in progress, w73). The test object had been staged as the ESP default (since ruled out-of-policy — test boots are one-shot); the next attempt feeds the payload over the M2 debugusb chainload so the ESP stays stock and any reset lands the default boot. |
|
Merging at |
What: Let the PMP manage the fabric and DCS memory p-states on every M1 Max (T6001), describe its 512-bit LPDDR5-6400 DRAM interface, and wire the CPU memory floor and the JPEG, scaler, AVD and video encoder PMP report entries. Without this, memory-bound GPU work stays at the idle memory state: 172 GB/s fill on a J316c, against 287–292 GB/s with it.
Tested: J316c M1 Max at
029a5dd64ca8. Run on73ef025cd09b; the head only moves theAPPLE_USE_PMPdefine, and itst6001-j316c.dtbis byte-identical. Results:M1 Pro (J314s, J316s) and M1 Ultra (J375d) DTBs are byte-identical, so they're unaffected.
Risk: two-way · M1 Max (J314c, J316c, J375c)
Not yet:
Details
The change is all in
t6001.dtsiandt6001-peripherals.dtsi, so it applies to every T6001 board.t6001-j314c,t6001-j316candt6001-j375ceach gain the same 56 lines (compared with phandles resolved to labels).APPLE_USE_PMPfor the SoC: m1n1 boots the PMP, which takes over the fabric and DCS p-states. The GPU's AGX vote, the display, ISP and AVD go through their PMP report entries via the shared T600x dtsi, as on T6000. The PMP firmware, its DVFS domain table and the report layout belong to the SoC, so the switch is selected by SoC. It is guarded byAPPLE_T6000_SUBSET, so M1 Pro is unchanged.dram_opptable and sixpmp_reportproperties (lpddr5, 512-bit, 4 DCS states, 409.6 GB/s peak, 400 GB/s class), with the same inference as T6000. Its only consumer isapple_pmp_dram_parse()in the report probe, which validates it and adds the read-onlydram/sysfs group. No OPP is registered with a clock or regulator.apple,cpu-memory-floor = <0x21 3 0x25 2>withapple,pmp-tables: CPU-only load does not raise DCS or fabric under the PMP. The SoC's PMP DVFS domain table (apple,tunable-dvfs-domainon/soc/pmp, from the ADT) listsDCSwith 4 states andFABand everyFAB_*domain with 3. Level 3 and level 2 are therefore the top of each, as on T6000 (1e5893840450).apple,adt-dvfson the video encoder (itsperfdomain), AVD, JPEG and scaler entries. JPEG0/1 and scaler0 take their report entry as power domain. ProRes (apr0) is disabled on T6001, so its entry stays off. Where the bootloader does not fillapple,dvfs(the J316c's m1n1 does not), an entry sends its power request only.Evidence
Row: T6001 / J316c (16-inch MacBook Pro, M1 Max, 64 GiB), default command line, m1n1-aurora 1.6.1. The kernel is built from
73ef025cd09b, with the stock config plus the Apple JPEG/scaler/AVE/ProRes drivers as modules; GPU numbers use Borealis84a37aaf130. One scripted run of the kit. The head029a5dd64ca8only moves the define fromt6001-j316c.dtstot6001.dtsi, andt6001-j316c.dtbis byte-identical between the two. All 139 Apple DTBs build with 0 dtc warnings.checkpatch.pl: 0 errors, 0 warnings on each commit.Bring-up:
apple-pmgr-miscreportsPMP manages fabric and DCS p-states, the PMP RTKit (protocol 12) comes up, and the memory floor owner is admitted (0x2002000300000000, 3 CPU clients).dram/readslpddr5, width 512, 4 states, 6.4 GT/s max, 409.6 GB/s peak, 400 GB/s class.GPU fill (
gpubench-vk diag.fill, depth 4):CPU memory floor A/B (single thread, GPU idle, two interleaved rounds, round 1 / round 2):
0x20000200000002030x2000020000000103Media power transitions: each block's runtime PM status and its PMP report domain (genpd debugfs) were sampled every 20 ms. Each block ran cold, again, and after each of three resumes. JPEG0 and JPEG1 (
pmp-jpg), scaler0 (pmp-msr0) and AVD (pmp-avd-sys) went off → on → off in each of their 5 runs and were runtime-suspended afterwards. JPEG output decoded with 0 errors, every H.264 decode succeeded, and all four domains endedoff-0. The AVE did not probe (apple-ave: error -ENODEV: no preloaded firmware), and itsperfdomainpmp-venc-sysstayedoff-0throughout.s2idle: 3/3 suspend/resume cycles (PMU RTC wake), 0 failures. After each resume the floor was re-admitted (
suspended=0, not faulted), the media blocks repeated the same transitions, and GPU fill reached 295.0, 296.6 and 291.8 GB/s.Kernel errors this boot:
apple-ave(above).dwc3-apple: device_prepare(): genpd_prepare returns -11, once per suspend. That is the USB driver's intentional syscore retry, which the PM core treats as success.No PMP, pmgr, genpd or GPU errors.