Skip to content

soc: apple: clpc: give dense light GPU work the T8140 GPU floor (stacked on #270) - #271

Open
DjDeveloperr wants to merge 2 commits into
neo/clpc-gpu-activity-20261028from
neo/t8140-clpc-dense-light-20261028
Open

DjDeveloperr wants to merge 2 commits into
neo/clpc-gpu-activity-20261028from
neo/t8140-clpc-dense-light-20261028

Conversation

@DjDeveloperr

@DjDeveloperr DjDeveloperr commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

Stacked on #270, which adds the GPU activity input this counts submissions through and is itself stacked on #244 → #229.

Mirror of aurora-silicon#563 (commit 264558d, merged there as 50eb52d), cherry-picked with -x.

On the Neo (J700, T8140), light GPU submissions a few milliseconds apart never got the GPU floor (DCS 4, fabric 3). Graphics powers off between them, so they never count as streaming. Each submission then waits on a low fabric, which nothing else holds up while the panel is off. gpubench idle.wake at a 2 ms gap shows it: 192 µs, against 153 µs on macOS.

This gives such work the floor:

  • Work with two or more submissions in each of four 4 ms samples in a row (one 60 Hz frame) counts as dense. Frame-paced loads such as video leave a quiet period in every frame and stay below that.
  • The floor keeps the PMP back-off and the vote hold that streaming work has.
  • A publication doesn't trigger a sample of its own. One taken as each video frame starts finds the CPUs busy and raises the DCS through their vote; that was +0.07 W in video in an earlier version.
  • debugfs counts the samples that applied the floor for streaming and for dense work.
  • The T8140 GPU node now links its CLPC (apple,clpc = <&clpc>;). Device trees without that link still find the single T8140 CLPC, as a hint the GPU probes without.

Conflicts resolved against omacom's clpc.c

omacom has none of the aurora code below, so it is left out:

The gpu floor samples: streaming … dense … debugfs line sits in the existing gpu: block. The dense logic, the threshold, the T8140 table entry, the DT fallback and the KUnit case are AsahiLinux#563's, unchanged.

Results

Measured on the Neo on the aurora tree, comparing aurora integration d266c70 with and without this change. That tree also has the 100 ms PMP hand-back from #245 and the counters from #263. Boots strictly alternated, ×2 each, 4 rounds of each row per boot. Panel off except the power legs and the "panel on" row.

row before after macOS
idle.wake 2 ms, wake latency 192.5 µs 170.5 µs (−11%) 153
idle.wake 2 ms, panel on 188.1 µs 160.3 µs (−15%) 153
idle.wake 2 ms, awake latency ~170 µs ~148 µs 157.5
idle.wake 20 ms 588.8 µs 588.5 µs 607
compute.light d1 104.6 µs 104.0 µs –
render fill 1080p d1 / d2 / d4 694 / 575 / 592 µs 694 / 578 / 596 µs 825 / 643 / 653
power: idle / 1080p30 video / browsing 4.91 / 7.05 / 5.00 W 4.88 / 7.06 / 5.00 W –
  • Across the whole idle.wake 2 ms process, including device setup and teardown, the floor is applied in about two thirds of the CLPC samples: roughly 32 dense and 32 streaming out of about 95.
  • Video, browsing and idle power are unchanged, and so is the DCS residency in video.
  • The awake latency now beats macOS. What's left of the 2 ms gap is the wake cost, about 22 µs, which macOS doesn't show at that gap. That's the firmware's idle power-off, a separate issue.
  • No kernel errors on any boot. KUnit apple-clpc-gpu: 4/4 on aurora.
  • Regression gate PERFORMANCE-REGRESSION-PASS. Targeted Vulkan CTS: 4687 Pass / 681 NotSupported / 0 Fail. Desktop alive.

The G17 glue (#270) is the same as aurora's at d266c70, so the dense threshold sees the same counts.

Testing on this branch

On T8140 the GPU floor (DCS 4, fabric 3) follows graphics power: work that
keeps graphics powered for 64 ms streams and gets it, while frame-paced
loads power graphics up and down and leave it down. Light submissions a
few milliseconds apart also let graphics power off between them, so they
never stream, yet each of them waits on the fabric, which with the panel
off nothing else holds up.

Count the GPU driver's submissions through its activity input, and give
the floor to work with two or more submissions in each of four sampling
periods in a row (16 ms, one 60 Hz frame). A frame-paced load leaves a
quieter period in every frame and stays below. The floor keeps the PMP
back-off and the vote hold of streaming work.

A publication does not trigger a sample of its own. One taken at the start
of each frame of video playback finds the CPUs busy and holds the DCS up
through their vote.

debugfs counts the samples that applied the floor for streaming and for
dense work.

The T8140 GPU node now links its CLPC. Device trees without that link
still find the single T8140 CLPC, as a hint the GPU probes without.

(cherry picked from commit 264558d)
[DjDeveloperr: without the T6040 host demand, the debugfs reason bits and
 the floor release counters, which this tree does not have; the sampler
 has no wake on a cold publication here, so there is none to skip]
Signed-off-by: DjDeveloperr <hey@djdev.me>
…se-light-20261028

Pick up #229's restored DRM module owner (6c66b41) through #244 and #270. No conflicts.

Signed-off-by: DjDeveloperr <hey@djdev.me>
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