Skip to content

arm64: dts: apple: t6040: honour the PMP's memory votes - #523

Merged
RyanTheTide merged 1 commit into
aurora-silicon:integration/aurorafrom
jgoyvaerts:m4pro/t6040-pmc-pmp-votes
Oct 27, 2026
Merged

RyanTheTide merged 1 commit into
aurora-silicon:integration/aurorafrom
jgoyvaerts:m4pro/t6040-pmc-pmp-votes

Conversation

@jgoyvaerts

Copy link
Copy Markdown
Contributor

On T6040 the PMC enables only the CLPC (agent 1) and the AP (agent 3), so the DCS and the fabric rise only with CPU load. GPU work with the CPUs idle runs at a low DCS state and is up to ~4× slower than with one CPU spinning. This enables the PMP's agent (0), as t8140.dtsi does, and gates the PMC on the PMP through apple,pmp, as t8132-memory.dtsi does.

iBoot leaves agent 0's floor at the top DCS state, which is why the agent stayed off. With apple,pmp the PMC probes only once the PMP driver has bound (after its firmware reports ready), and the device link unbinds the PMC first, whose release writes back the boot enables. So agent 0 is never on while the PMP does not run. The trade, as on T8132: if the PMP never binds, the PMC and CLPC stay unprobed.

Measurements

J616s (T6040), PMP running, CPUs otherwise idle (the benchmark is a 2× MSAA R11G11B10 1440p render pass and GPU compute copies):

before after
MSAA pass 1100–1220 µs 300–311 µs
16 MiB compute copies, 8 ms gaps 19.4–19.7 GB/s 97–102 GB/s
256 MiB compute copies 167–213 GB/s 232 GB/s
CPU DRAM latency under the pass 423–454 ns 187–194 ns
CPU DRAM latency, GPU idle 301–309 ns 286–319 ns

Before the change, one spinning CPU (any cluster) gave the same pass 285–305 µs, so the gap is the DCS state, not the GPU. After it, idle DRAM latency returns to its idle level within seconds of the GPU going idle, so the floor is not held. The "after" numbers were taken with the CLPC unbound as well as bound (identical), so they come from agent 0 alone. glmark2-es2 went from ~6–7k to ~8.2k fps.

Testing

Booted in our J616s tree (integration 5ca226e3c40 + board patches): PMC and CLPC bind after apple_pmp, no new warnings, Vulkan smoke and glmark2 with 0 GPU recoveries. The DTB builds on 353e0801c with no new dtc warnings (W=1). No power rail sensor on this machine, so idle power is inferred from the DRAM latency returning to its idle level, not measured.

Assisted-by: LLM

On T6040 only the CLPC (agent 1) and the AP (agent 3) are enabled in the
PMC, so the DRAM controller (DCS) and the fabric are raised only by CPU
load. GPU work with the CPUs idle runs at a low DCS state. On J616s with
the PMP running and the CPUs otherwise idle:

                                 CPUs idle   one CPU spinning
  2x MSAA R11G11B10 1440p pass   1100-1220   285-305 us/pass
  16 MiB compute copy, 8 ms gaps 19.4-19.7   29.3-31.2 GB/s
  256 MiB compute copies         167-213     215-232 GB/s

The core and cluster of the spinning CPU make no difference. CPU DRAM
latency, from 2 ms bursts too short for the CLPC, shows the DCS: 301-309
ns with the GPU idle, 423-454 ns under GPU-only load, and 133-192 ns when
a spinning core holds the CLPC floor. GPU load alone never raises it.

On T8140 the PMP (agent 0) votes the DCS and fabric for the GPU and the
other memory clients. The PMP runs from boot on T6040 too, but its agent
stayed off because iBoot leaves its floor at the top DCS state. That only
matters while the PMP does not run.

Enable agent 0 and make the PMC depend on the PMP through apple,pmp, as
on T8132. The PMC then probes only after the PMP driver has bound, which
happens once the firmware is running, and the device link unbinds the
PMC, which puts back the boot enables, before the PMP. If the PMP never
binds, the PMC and the CLPC stay unprobed too, so busy CPUs no longer
raise the DCS either; T8132 makes the same trade.

With this change and the CPUs idle, the same pass takes 300-311 us, the
16 MiB copies reach 97-102 GB/s and the 256 MiB copies 232 GB/s. CPU DRAM
latency under the pass drops to 187-194 ns and returns to 286-319 ns
within seconds once the GPU idles.

Signed-off-by: Jonathan Goyvaerts <[email protected]>
Assisted-by: LLM
@RyanTheTide
RyanTheTide merged commit 647f084 into aurora-silicon:integration/aurora Oct 27, 2026
erikwb pushed a commit to erikwb/linux that referenced this pull request Oct 28, 2026
…ora-silicon#518, aurora-silicon#516, aurora-silicon#519 and aurora-silicon#451

This is the tree of the J616s test kernel 7.3.0-aurora-j616s-batch5, built
from these parents:

- wip/j616s-batch1-20261027 (e1a25b5): the J616s bring-up series
- integration/aurora 647f084 (includes aurora-silicon#498, aurora-silicon#512, aurora-silicon#523 and DJ's G17 merges)
- aurora-silicon#518 ad14f2d: 25G83 tiler growth fix (Jonathan Goyvaerts)
- aurora-silicon#516 31340ab: T6040 two-lane DP pin D beside USB3
- aurora-silicon#519 d769aaf: tipd reconcile of firmware-entered J616s DP Alt Mode
- aurora-silicon#451 0d43a7f: J616s external displays (František Balázsy)

Resolution notes:
- aurora-silicon#451's display code supersedes the older aurora-silicon#451 copy carried by batch1,
  including its desktop 26.6 adaptive sync. Batch1's callback guard,
  ProMotion presentation timestamps, minRR=0 restore and swap watchdog stay.
- The display gate finds a Type-C route's PHY by its typecN name, so aurora-silicon#451's
  dcpext0 route@0 is not enabled on a tether whose ATC0 PHY is disabled.
- aurora-silicon#516's pin D and aurora-silicon#519's tipd reconcile are kept as in the J616s series.
  Batch2's selftest fixture reconcile for the G17 owner and CLPC fixtures is
  part of this tree.

Tested on the J616s with the follow-up commits: boots with 0 WARN, external
display at 1920x1080@180 through DP Alt Mode, 20/20 mode switches and
15/15 DPMS cycles with no new kernel errors.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
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