Skip to content

soc: apple: clpc: raise the T8140 fabric floor for GPU work - #440

Merged
DjDeveloperr merged 1 commit into
integration/aurorafrom
neo/fabric-dvfs-20261024
Oct 25, 2026
Merged

DjDeveloperr merged 1 commit into
integration/aurorafrom
neo/fabric-dvfs-20261024

Conversation

@DjDeveloperr

Copy link
Copy Markdown
Contributor

Problem

On Neo (T8140) the CLPC table never raised the SoC fabric. Busy CPU clusters only lifted the DCS, and graphics load lifted nothing. The GPU firmware takes up and completes every command over the fabric, so at fabric state 0 its per-command work ran slowly. This was the fixed firmware cost behind most of the light-workload gap to macOS, which holds the fabric at its top states while such work streams.

Fix

Set gpu_demand for T8140, as T8132 already does, and give the fabric a top-quartile state. While the graphics power state is on, the floor is DCS 4 and fabric 3. The firmware powers the GPU off when it is idle, so the floor follows GPU activity and drops HOLD_MS after the last work. An idle desktop leaves the fabric at state 0 (checked on Neo). The in-tree t8140.dtsi already provides apple,gpu-power-state.

The change is data-only: no type changes. The rebuilt core's BTF is byte-identical to the previous one.

Measurements (Neo, same GPU driver and Mesa; gpubench µs per submission)

Workload fabric 0 (before) this change macOS
compute, depth 1 158.9 108.2 111.3
compute, depth 64 19.3 14.7 14.0
compute, 16 processes 25.6 17.9 23.7
render, depth 1 149.9 137.3 239.0
render, depth 32 42.7 29.7 26.8
render, 8 queues 58.2 41.0 35.7
queue-to-queue handoff 42.2 31.9 19.5

Other measurements:

  • With this change, results match a forced fabric-3 vote within run-to-run noise, so the CLPC sampling adds no measurable latency.
  • Fabric 2 recovers about 80% of the gain.
  • A forced DCS 4 adds nothing over the CPU-driven DCS vote.
  • Heavy ALU work is unchanged.

Testing on Neo

  • Booted the rebuilt perf core with the existing modules and initramfs.
  • The floor follows GPU activity and is released at idle.
  • 10k cross-queue order/data iterations, slow-producer pressure and mixed stress passed.
  • No new GPU faults; the desktop stayed alive.

The T8140 table never raised the SoC fabric: busy CPU clusters only
lifted the DCS, and graphics load lifted nothing. The GPU firmware takes
up and completes every command over the fabric, so with the fabric at
state 0 each command's firmware work ran slowly, and light GPU work fell
well behind macOS, which holds the fabric at its top states while such
work streams.

Hold DCS 4 and fabric 3 while the graphics power state is on, as T8132
already does with its own top states. The firmware powers the GPU off
when it is idle, so the floor follows GPU activity and drops HOLD_MS
after the last work; an idle desktop leaves the fabric at state 0. A
cluster in its top frequency quartile now also raises the fabric.

Measured on Neo against the same driver and userspace (gpubench, us per
submission, fabric 0 -> 3):

  compute, depth 1          158.9 -> 108.2
  compute, depth 64          19.3 ->  14.7
  compute, 16 processes      25.6 ->  17.9
  render, depth 1           149.9 -> 137.3
  render, depth 32           42.7 ->  29.7
  render, 8 queues           58.2 ->  41.0
  queue-to-queue handoff     42.2 ->  31.9

Fabric 2 recovers about 80% of that; a forced DCS 4 adds nothing over
the CPU-driven DCS vote. Heavy ALU work is unchanged.
@DjDeveloperr
DjDeveloperr merged commit d3cf19b into integration/aurora Oct 25, 2026
@RyanTheTide
RyanTheTide deleted the neo/fabric-dvfs-20261024 branch October 25, 2026 05:47
RyanTheTide added a commit that referenced this pull request Oct 26, 2026
Apply DjDeveloperr's GPU-demand mechanism from d69f14f to T6040.
The CPU-only policy can leave the fabric low during GPU-only work. Enable
its graphics demand input and describe the existing graphics PMGR state
in DT, as T8140 and T8132 already do.

Use T6040's existing DCS 5 / fabric 2 table, not T8140's state numbers.
CPU demand keeps its three-sample sustain rule; graphics demand uses the
shared hold and idle release. No voltage, ceiling, parameter or new
platform option is introduced. Confirm powered-state tracking and idle
floor release on J616s before qualifying the performance result.

Link: #440
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.

1 participant