Skip to content

Neo encoder performance request (1080p H.264 110 to 165 fps) - #786

Merged
RyanTheTide merged 3 commits into
aurora-wipfrom
ave/neo-perf-request
Nov 1, 2026
Merged

RyanTheTide merged 3 commits into
aurora-wipfrom
ave/neo-perf-request

Conversation

@RyanTheTide

Copy link
Copy Markdown
Contributor

Neo encoder performance request

The MacBook Neo (T8140) encoder ran at about 110 fps for 1080p H.264 because nothing asked the PMP to raise the encoder's clock while it was busy. This series gives the encoder the same kind of performance request the M4 Pro already has (#773), using the Neo's own PMP report entry and the PMC cluster enable bit for the encoder.

  • pmdomain: apple: pmc: a PMC child with apple,cluster-bit becomes a power domain for that cluster enable bit. The bits live in a control word with a status word next to it (new optional "clusters" reg). Updates are read-modify-write under the PMC lock, and the status is polled for up to 10 ms.
  • pmdomain: apple: pmp-report: an entry can carry apple,dvfs = <entry level>. After the power request is acknowledged it stores the level once to the update aperture, and drops it to 0 before clearing the power request. It never reads a request entry back after a store.
  • arm64: dts: apple: t8140: the PMC "clusters" reg, a cluster-venc child (bit 3), and a report entry for the encoder under ps_venc0_sys with apple,dvfs = <0x198 2>, given to the encoder as its "perf" domain.

The DT and the driver changes must land together: a kernel without the pmc change treats cluster-venc as an ordinary domain and fails to probe it. The Neo's Stage 2 DT is only refreshed from a fleet kernel that carries this series.

Tested on the Neo (J700)

Kernel 7.3.0-aurora-avenp1 (this series on fleet14c f41ac3d) with a one-shot Stage 2 carrying its t8140-j700.dtb, boot f366eae6:

avebench before (fleet14d, current DT) with this series macOS
1080p H.264 110.1 fps 165.2 fps (166.1 over 4000 frames) 178
1080p HEVC 101.6 152.9
1080p H.264, 2 sessions 55.2 + 55.0 83.3 + 83.0
4K H.264 30.2 47.4
4K HEVC 28.8 45.4
4096x2304 H.264 26.8 41.3
  • While encoding: PMC agent 0 floor 0x2000, honoured 0x2000; pmp-ave0 and pmc-venc-cluster on.
  • 2.5 s after the last frame: floor 0, both domains off.
  • journalctl -b -p 3 empty, no DART faults, no warnings. Die temperature stayed at 53-56 C.
  • The previous Stage 2 was restored early in that boot, and the Neo is back on its normal kernel and DT (110 fps again).

Build checks on this branch (rebased on aurora-wip): W=1 clean for drivers/pmdomain/apple, dtbs build, host tests 158/158 (dt-validate is not installed on the build host, so dtbs_check did not run). The rebased j700 DTB is byte-identical to the one tested above.

🤖 Generated with Claude Code

On T8140 the video encoder cluster (VENC-CLSTR-V) has an enable bit in a
PMC control word, with a matching status word. The PMP only raises the
encoder performance state while the cluster is enabled, and macOS sets
the bit, under its PMC lock, whenever the encoder is powered.

Describe such bits as child nodes with apple,cluster-bit, in an optional
"clusters" register range (control word, then status), and provide each
as a power domain: power on sets the bit and waits for its status, power
off clears it. The read-modify-write runs under the PMC lock.

Assisted-by: LLM
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
…th its power request

A PMP soc-device can have a performance request beside its power
request: on T8140 the encoder (soc-device 15, AVE0) asks for its VMAX
state in SOC-DEV-DVFS entry 0x198, and the PMP then votes the AVE rail
up itself, as it does under macOS.

Let a report entry name that entry and level with apple,dvfs. After the
PMP acknowledges the power request, write the level with the valid bit
in one 64-bit store; before clearing the power request, write level 0.
Never read a request entry back after storing it: that read retires the
pending PTD update before the PMP handles it, and the request is lost.

The T8140 offsets gain the update aperture and the SOC-DEV-DVFS range.
The T6030 graph host test harness follows the entry struct.

Assisted-by: LLM
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Add the VENC cluster enable bit to the PMC, a PMP report entry for
soc-device 15 (AVE0) under VENC0_SYS and the cluster that requests VMAX
in SOC-DEV-DVFS entry 0x198, and hand it to the encoder as its "perf"
power domain, held while the encoder is powered.

On a Neo one-shot (fleet14c, the same requests made by a test module)
1080p H.264 went from 110 to 165 fps (macOS 178), HEVC 101 to 153 and
4K H.264 30 to 47, with the PMP voting the AVE rail to state 2.

Assisted-by: LLM
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
@RyanTheTide
RyanTheTide merged commit 7f7035c into aurora-wip Nov 1, 2026
@RyanTheTide
RyanTheTide deleted the ave/neo-perf-request branch November 1, 2026 11:12
mchalunderscore pushed a commit to mchalunderscore/linux that referenced this pull request Nov 4, 2026
…tion/aurora

Bring integration/aurora up to aurora-wip b359258, the source of
7.3.0-aurora-fleet14f, promoted on the M1 Pro, M2, Neo and J616s on
2026-11-01 and 11-02. The range also covers the fleet14c, fleet14d and
fleet14e sources (f41ac3d, 4759557, 757fc07), each booted on
hardware. It adds aurora-silicon#773, aurora-silicon#776, aurora-silicon#777, aurora-silicon#737, aurora-silicon#713, aurora-silicon#785, aurora-silicon#786, aurora-silicon#788,
aurora-silicon#789 and aurora-silicon#787. No conflicts.

Assisted-by: LLM
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
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.

1 participant