Skip to content

soc: apple: clpc: count how often the GPU floor is released and comes back - #552

Merged
DjDeveloperr merged 1 commit into
integration/aurorafrom
neo/t8140-clpc-floor-returns
Oct 28, 2026
Merged

DjDeveloperr merged 1 commit into
integration/aurorafrom
neo/t8140-clpc-floor-returns

Conversation

@DjDeveloperr

Copy link
Copy Markdown
Contributor

Mirror of omacom/linux-aurora#263 (commit 8945c4c there): a debugfs count of how often the T8140 GPU floor is released and comes back, so flapping of the 100 ms backoff (#464) is visible.

The status file gets one more line under the existing gpu: line:

gpu floor releases: <n> returns: <n>

Both are counted at each sample that sees GPU work stream, as the floor goes from held to released and back. Two readings around a sustained heavy run show whether the floor came back while the PMP was still limiting. No behaviour change: the floor decision is the same expression, only split so its result can be counted. In this tree the branch also sets the sample's reason bit 4, which is kept inside the counted branch (the one conflict of the pick).

Testing: W=1 build of drivers/soc/apple/clpc.o with APPLE_PMC and APPLE_CLPC enabled is clean, apart from the existing kernel-doc warning for pmp_agent. There is no CLPC KUnit suite; reading the counts needs a Neo run.

… back

The GPU floor is released while the PMP limits the DCS and comes back
APPLE_CLPC_GPU_BACKOFF_MS after it last did. The debugfs status shows
when the PMP last limited the DCS, but not how often the floor changed,
so a backoff that is too short, letting the floor flap during sustained
heavy rendering, is not visible.

Count, at each sample that sees GPU work stream, the times the floor
went from held to released and back, and show both counts in the
status file. Two readings around a heavy run then show whether the
floor came back while the PMP was still limiting.

In this tree the GPU floor branch also sets the sample's reason bit 4;
that is kept, now inside the counted branch.

Signed-off-by: DjDeveloperr <hey@djdev.me>
(cherry picked from omacom/linux-aurora commit 8945c4c)
@DjDeveloperr

Copy link
Copy Markdown
Contributor Author

Qualified on the Neo (J700): integration/aurora core with this patch and a matching asahi module, Omarchy desktop, debugfs at /sys/kernel/debug/*performance-controller*/status.

point releases returns state
after boot settle 2 2 floor held
after 3 × 30 s render.heavy fill 2160p d4 (TVD0 72 → 107 °C) 10 9 released (PMP limited 39 ms earlier)
after 20 s idle + 2 × 2 s compute.light 46 46 floor back

Under heavy load the counter goes up only while the PMP limits the DCS. The floor comes back once the backoff expires. While the SoC is still hot, the light burst after the heavy leg flips the floor on and off many times (36 cycles), and those cycles are exactly what this counter was added to show. The kernel log has no CLPC errors or warnings. The status file reads without problems while the GPU is busy.

@DjDeveloperr
DjDeveloperr merged commit 87e3a4d into integration/aurora Oct 28, 2026
@RyanTheTide
RyanTheTide deleted the neo/t8140-clpc-floor-returns branch November 7, 2026 12:08
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