Skip to content

arm64: dts: apple: t6050: add CLPC GPU busy-share memory states - #3400

Merged
RyanTheTide merged 4 commits into
mainfrom
feat/t6050-clpc-gpu-busy-ladder
Nov 28, 2026
Merged

RyanTheTide merged 4 commits into
mainfrom
feat/t6050-clpc-gpu-busy-ladder

Conversation

@erikwb

@erikwb erikwb commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

What: Move apple,gpu-busy-memory-states (<1 2 4 6>, <0 0 0 2>) and apple,gpu-busy-permille (<160 500 800>) from t6050-j716c.dts onto the shared clpc node in t6050-die0.dtsi so every T6050 Mac scales GPU memory/fabric floors with reported GPU busy share instead of pinning DCS 6 / fabric 2 on light workloads.
Tested: tools/asahi/clpc-gpu-demand-tests.py PASS at 0b688b6d47b3 (2 positive groups + 33 negative controls, parsing comment-stripped t6050-die0.dtsi directly across all four ladder levels, threshold boundaries, and 400 ms down-step hold); tools/asahi/clpc-high-power-cleanup-tests.py PASS at 0b688b6d47b3; scripts/dtc/apple-adt-coverage-test.py PASS (19/19 tests) at 0b688b6d47b3; arm64 KUnit apple-clpc* PASS (18/18 tests: 14 in apple-clpc-gpu, 4 in apple-clpc-policy) at 0b688b6d47b3; all 11 t6050-*.dtb boards pass W=1 CHECK_DTBS=y with zero clpc/pmc schema warnings at 0b688b6d47b3; J716c (16-inch M5 Max, T6050) live run at 0b688b6d47b3 in batched candidate c3da8eed6f72 (over main 9af21b007425, default command line, default Stage 2, Linux 7.3.0, AC 100%): the live DT carries apple,gpu-busy-memory-states = <1 2 4 6>, <0 0 0 2> and apple,gpu-busy-permille = <160 500 800>, and the sampled ladder was idle DCS 0 / SOC 0, light FIFO vkcube (~30 permille) -> level 0, DCS 1, SOC 0-1, saturating vk_burn/glmark2 (1000 permille) -> level 3, DCS 6, SOC 2, then back to idle DCS 0 / SOC 0; a paced Vulkan compute load (one dispatch every 8-10 ms with >= 2 ms idle gaps, clpc debugfs sampled every 20 ms) then reached every level in batched candidate f59b93fb961f (over main 9af21b007425, default command line, default Stage 2, Linux 7.3.0, AC 100%): 97-99 permille -> level 0 / DCS 1 / SOC 0, 285-300 permille -> level 1 / DCS 2 / SOC 0, 624-638 permille -> level 2 / DCS 4 / SOC 0, saturating back-to-back dispatches (1000 permille) -> level 3 / DCS 6 / SOC 2, each steady over every sample after the first 0.9 s of its phase; burst from level 0 reached DCS 6 / SOC 2 24.6 ms after the first saturating dispatch (27.4 ms from level 2), a single 120 ms compute dispatch from steady level 0 lifted to DCS 6 / SOC 2 70.6 ms after it started, after saturating work stopped DCS 6 was held for 433.5 ms before dropping to DCS 1 (SOC 0 at 474.1 ms) while light paced work continued, and idle returned DCS 0 / SOC 0 72.8 ms after the last dispatch; 0 panics/Oops/BUG/SErrors/DART faults/GPU faults/LSM denials; earlier head cd2cae185bbc on default cmdline verified 60 fps redraw at level 0 / DCS 1 / SOC 0 dropping heatpipe 3,134 -> 1,642 mW and 120 fps at 4,068 -> 2,656 mW, and peak glmark2 at level 3 / DCS 6 / SOC 2, returning to 0x0 at idle. Peer runtime validation on J714s (14-inch M5 Pro, G17S B1, T6050, Tested-by: Isaac Duarte <[email protected]>, clean main 8b0a383 plus matching t6050-die0.dtsi DT change at 0b688b6d47b3, #3442 closed in favor of #3400): with 3x 1080p165 + eDP-1 active (0 dropouts/underruns), 4-level Vulkan DRAM copy ladder held 80/80 level 0 (122.63 GB/s GPU median), 80/80 level 1 (215.12 GB/s), 80/80 level 2 (239.27 GB/s), 70/70 level 3 (271.41 GB/s), and stepped down in +487.2 ms, and the 8-loop gpubench vk+gl soak (232/232 ok), 12/12 fresh Vulkan clients, and gpubench-stress-vk (3/3 PASS) ran with 0 CLPC update errors and 0 dmesg errors (accepted by reviewer for intermediate bandwidth, multi-display, and the GPU power gate).
Risk: two-way door · T6050 Macs with GPU enabled (J716c, J714s, J775d, K114s/c, K116s/c; no-op on T6050 boards without an active GPU)
Not yet: J716c-specific per-DCS/fabric bandwidth/latency/power characterization across levels 0–3 (DCS 1/0, 2/0, 4/0, 6/2), gpubench vk+gl soak (>= 8 loops + 10 fresh short-lived Vulkan clients), and multi-display (eDP + external DP) at 0b688b6d47b3 (already covered on peer T6050 board J714s); external T6050 boards (J716s, J714c, J775c, J775d, J873s, K114*, K116*) not on site.

Details

Four commits on main:

  1. cd2cae185bbc (arm64: dts: apple: t6050-j716c: add CLPC GPU busy-share memory states): initial J716c ladder (<1 2 4 6>, <0 0 0 2> at <160 500 800> permille).
  2. 93595a0d9560 (arm64: dts: apple: t6050: move CLPC GPU busy-share ladder to shared die0): moves apple,gpu-busy-memory-states and apple,gpu-busy-permille into clpc: performance-controller@1 in arch/arm64/boot/dts/apple/t6050-die0.dtsi and updates tools/asahi/clpc-gpu-demand-tests.py to parse t6050-die0.dtsi directly and exercise check_t6050_busy() against apple_clpc_hw_t6050.
  3. d6080cd45886 (asahi: clpc-gpu-demand-tests: require both T6050 DT properties): drops the hardcoded T6050 fallback in tools/asahi/clpc-gpu-demand-tests.py and requires both apple,gpu-busy-memory-states and apple,gpu-busy-permille to be present and non-empty in t6050-die0.dtsi.
  4. 0b688b6d47b3 (asahi: clpc-gpu-demand-tests: strip DTS comments before parsing): strips /* ... */ and // ... DTS comments (while preserving string literals) before parsing apple,gpu-busy-memory-states and apple,gpu-busy-permille from t6041.dtsi and t6050-die0.dtsi, and adds 6 negative controls testing deletion, block-commenting, and line-commenting of each T6050 DT property.

Policy derivation (public-clean):

  • Thresholds (<160 500 800> permille) and lower/intermediate memory steps (<1 2 4>, fabric <0 0 0>): carried from T6041's shared GPU busy-share policy in arch/arm64/boot/dts/apple/t6041.dtsi (<1 2 4 5>, <0 0 0 3> at <160 500 800>). The thresholds partition the GPU driver's 200 ms BusyShare window (BUSY_WINDOW_NS = 200_000_000 in drivers/gpu/drm/asahi/g17/power.rs) at 16%, 50%, and 80% busy share: light display/compositing stays in level 0 (DCS 1 / fabric 0, the lowest active floor above idle 0), moderate intermittent work steps geometrically through DCS 2 and DCS 4 at fabric 0 (kept below apple_clpc_hw_t6050.map's CPU floors of DCS 2, 4, 5, 5 and fabric 1, 2, 2, 2), and sustained/heavy GPU work enters the top bucket (>= 800 permille, or immediately on long >= 50 ms commands / cold wake).
  • Top column (<6>, <2>): taken directly from apple_clpc_hw_t6050.gpu in drivers/soc/apple/clpc.c (DCS 6 / fabric 2), where clpc.c documents that bandwidth-bound T6050 GPU work runs ~11% slower at DCS 5 and gains nothing from fabric 3 over fabric 2.
  • None of these DT values come from tools/asahi/clpc-gpu-demand-tests.py (which parses t6050-die0.dtsi directly) or Apple binaries. Per-DCS/fabric bandwidth, latency, and power measurements on J716c across levels 0–3 remain listed under Not yet.

Why shared on t6050-die0.dtsi:

  • All T6050 boards (M5 Pro, M5 Max, and M5 Ultra die 0) share clpc: performance-controller@1 (compatible = "apple,t6050-clpc", "apple,t6041-clpc") in t6050-die0.dtsi, apple_clpc_hw_t6050 in drivers/soc/apple/clpc.c (DCS states 0–6, fabric states 0–3, GPU default floor DCS 6 / fabric 2), and the g17 GPU driver (apple,agx-g17s) reporting 200 ms BusyShare windows.
  • There is no J716c-specific hardware constraint in CLPC; keeping the ladder only in t6050-j716c.dts gated a common T6050 policy to the tested board, unlike t6041.dtsi (shared across J614c/J616c/J575c). On T6050 boards without an active GPU, apple_clpc_probe() allocates clpc->gpu (apple_clpc_hw_t6050.gpu_input is true), but no GPU driver binds to call apple_clpc_gpu_get() or apple_clpc_gpu_set_active(), so clpc->gpu->active remains false (apple_clpc_gpu_input_demand() returns false) and the properties have no runtime effect.
Evidence
  • Local checks at 0b688b6d47b3:
    • git diff --check fcb124279183..HEAD: clean
    • ./scripts/checkpatch.pl --strict --git fcb124279183..HEAD: 0 errors, 0 warnings, 0 checks on all four commits (cd2cae185bbc, 93595a0d9560, d6080cd45886, 0b688b6d47b3)
    • PATH="/home/ewb/venv-dtschema/bin:$PATH" make ARCH=arm64 LLVM=1 W=1 CHECK_DTBS=y on all 11 t6050-*.dtb boards (t6050-j714c, t6050-j714s, t6050-j716c, t6050-j716s, t6050-j775c, t6050-j775d, t6050-j873s, t6050-k114c, t6050-k114s, t6050-k116c, t6050-k116s): exit 0, zero clpc/pmc schema warnings
    • python3 tools/asahi/clpc-gpu-demand-tests.py: PASS (2 positive groups + 33 negative controls: 5 in test_g17_busy_share(), 6 in test_t6050_dt_negative_controls(), and 22 in main(), including t6050_from_dt() and check_t6050_busy())
    • python3 tools/asahi/clpc-high-power-cleanup-tests.py: PASS
    • python3 scripts/dtc/apple-adt-coverage-test.py: PASS (19/19 tests)
    • python3 tools/testing/kunit/kunit.py run --arch=arm64 --make_options LLVM=1 --kunitconfig=drivers/soc/apple/clpc.kunitconfig 'apple-clpc*': PASS (18/18 tests: 14 in apple-clpc-gpu, 4 in apple-clpc-policy)
  • Live J716c (16-inch M5 Max, T6050) at 0b688b6d47b3 in batched candidate c3da8eed6f72 (over main 9af21b007425, default cmdline, default Stage 2, Linux 7.3.0, AC 100%):
    • Live DT: apple,gpu-busy-memory-states = <1 2 4 6>, <0 0 0 2>, apple,gpu-busy-permille = <160 500 800>
    • Idle: DCS 0 / SOC 0
    • Light FIFO vkcube (~30 permille): level 0, DCS 1, SOC 0-1
    • Saturating vk_burn / glmark2 (1000 permille): level 3, DCS 6, SOC 2
    • Back to idle: DCS 0 / SOC 0
  • Live J716c paced-load run at 0b688b6d47b3 (four-PR batched candidate f59b93fb961f, over main 9af21b007425, default command line, default Stage 2, Linux 7.3.0, AC 100%):
    • Method: one Vulkan compute context (Borealis Apple M5 Max (G17C B1)); a dispatch with calibrated GPU time submitted every 8 ms (levels 0 and 1) or 10 ms (level 2), each waited on before sleeping to the next deadline, so idle gaps stayed >= 2 ms; saturating phases submit back-to-back 5 ms dispatches; clpc debugfs status sampled every 20 ms (DCS and SOC state, host_gpu busy permille and level).
    • Steady states (samples after the first 0.9 s of each 3 s phase): ~0.8 ms dispatches every 8 ms: 97-99 permille, level 0, DCS 1 / SOC 0 (103/103 samples); ~2.4 ms every 8 ms: 285-300 permille, level 1, DCS 2 / SOC 0 (103/103); ~6.5 ms every 10 ms: 624-638 permille, level 2, DCS 4 / SOC 0 (103/103); saturating: 1000 permille, level 3, DCS 6 / SOC 2 (54/54); idle: DCS 0 / SOC 0 (54/54).
    • Level 0 -> level 1 at +94.8 ms and level 1 -> level 2 at +185.8 ms after the load changed.
    • Burst step-up: first saturating dispatch after steady level 0 -> DCS 6 / SOC 2 at +24.6 ms; from level 2 at +27.4 ms.
    • >= 50 ms compute lift: one 120 ms dispatch after steady level 0 (97-99 permille) -> DCS 6 / SOC 2 at +70.6 ms (busy 1000 permille); DCS 0 / SOC 0 again ~51 ms after the dispatch retired.
    • Down-step hold: saturating work stopped, light paced work continued: DCS 6 held for 433.5 ms, then DCS 1 with SOC 2 until +474.1 ms, then DCS 1 / SOC 0 (level 0); sampling resolution 20 ms.
    • Return to idle: DCS 0 / SOC 0 72.8 ms after the last saturating dispatch and ~52 ms after the last paced dispatch.
    • A cold first burst after idle starts at the top column (DCS 6 / SOC 2) for ~0.6 s (one 200 ms busy window plus the 400 ms hold) before settling at level 0, as designed (busy_valid is cleared on idle).
    • Whole boot: 0 panics/Oops/BUG/SErrors/DART faults/GPU faults/WARNING lines/LSM denials; the only error-level kernel lines are the 2x pre-existing systemd-gpt-auto-generator.
  • Earlier-head J716c run at cd2cae185bbc (unplugged, bl=150, VRR on, default cmdline):
    • 60 fps terminal redraw (9–11 permille): 8,221 mW (3,134 mW HP, DCS 6 / SOC 2) -> 7,322 mW (1,642 mW HP, DCS 1 / SOC 0, -1,492 mW HP)
    • 120 fps terminal redraw (16 permille): 8,664 mW (4,068 mW HP, DCS 6 / SOC 2) -> 7,904 mW (2,656 mW HP, DCS 1 / SOC 0, -1,412 mW HP)
    • Heavy GPU (glmark2): level 3 -> DCS 6 / SOC 2 (last_vote: 0x26), returning to 0x0 at idle
  • Peer runtime row on J714s (14-inch M5 Pro, G17S B1, T6050, balanced, AC 100%; Tested-by: Isaac Duarte <[email protected]>, #issuecomment-7230034917, #3442 closed in favor of #3400, accepted by reviewer for intermediate bandwidth, multi-display, and GPU power gate):
    • Base & DT: clean main (8b0a383, zero other kernel/module patches) + DTB-only CLPC diff (apple,gpu-busy-memory-states = [1, 2, 4, 6, 0, 0, 0, 2], apple,gpu-busy-permille = [160, 500, 800]), matching t6050-die0.dtsi at 0b688b6d47b3.
    • Displays: card1-DP-2, card1-DP-4, card1-DP-6 (1920x1080@165 via dock) + card1-eDP-1 (3024x1964) all connected/enabled (0 dropouts/underruns).
    • 4-level Vulkan DRAM copy ladder (2x128 MiB vkCmdCopyBuffer ping-pong, steady after +2.5 s): bw_level0 (87–105, med 100 permille) 80/80 level 0 (DCS 1 / SOC 0, gpu_p50 122.63 GB/s, wall_p50 70.62 GB/s, PSTR 13.266 W, PHPC 5.228 W); bw_level1 (262–331, med 320 permille) 80/80 level 1 (DCS 2 / SOC 0, gpu_p50 215.12 GB/s, wall_p50 175.06 GB/s, PSTR 21.649 W, PHPC 11.367 W); bw_level2 (573–625, med 615 permille) 80/80 level 2 (DCS 4 / SOC 0, gpu_p50 239.27 GB/s, wall_p50 219.44 GB/s, PSTR 28.202 W, PHPC 17.298 W); bw_level3 (1000 permille) 70/70 level 3 (DCS 6 / SOC 2, gpu_p50 271.41 GB/s, wall_p50 251.72 GB/s, PSTR 39.662 W, PHPC 27.135 W); stepdown_level0 drops from DCS 6 / SOC 2 to DCS 1 / SOC 0 at +487.2 ms (60/60 level 0), post_idle host_gpu active=0 at +38.9 ms; frame-paced paced60 (60/60 level 0), paced120 (61/61 level 0), gpu_bound (60/60 level 3).
    • GPU power gate (gpubench 15b1aa4, Borealis Mesa 26.3.0-devel git-d4ad4a4dce): 8-loop gpubench vk+gl soak (56/56 gpubench-vk, 32/32 gpubench-gl asahi, 32/32 gpubench-gl zink — 232/232 ok, 0 failures, 0 timeouts), 12/12 fresh sequential gpubench-vk clients ok, gpubench-stress-vk (idle.wake,render.first,life.churn, 30 s) 3/3 PASS, CLPC update errors: 0 (97816 -> 139757), 0 display dropouts, 0 GPU/CLPC/DCP/DRM errors in dmesg.

Give the J716c's CLPC node the GPU busy-share memory-state ladder:
DCS 1, 2, 4, 6 and fabric 0, 0, 0, 2, split at 160, 500 and 800 permille
of the busy share reported by the GPU driver. The top column matches
apple_clpc_hw_t6050's DCS 6 / fabric 2 floor so saturated GPU workloads
keep full memory bandwidth while light desktop compositing drops to
DCS 1 / fabric 0.

Measured on J716c (16-inch M5 Max, eDP 3456x2234@120, VRR enabled,
backlight 150):
- 60 fps terminal redraw (9 permille): heatpipe power 3134 -> 1642 mW
  (-1492 mW), total system power 8221 -> 7322 mW (-899 mW).
- 120 fps terminal redraw (16 permille): heatpipe power 4068 -> 2656 mW
  (-1412 mW), total system power 8664 -> 7904 mW (-760 mW).

Signed-off-by: Erik Bourget <[email protected]>
@erikwb
erikwb requested review from a team as code owners November 27, 2026 14:40
@erikwb
erikwb requested review from LiamRay11 and maralcbr November 27, 2026 14:40

@aurora-silicon-review aurora-silicon-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The series shows a useful power reduction for a light single-display workload. The source cited for the new ladder is the host test's reference fixture. Please document how the three thresholds and each intermediate DCS/fabric vote were selected, and whether the ladder is a J716c board constraint or common T6050 policy. If it is common, put it in the appropriate shared hardware description and validate the affected peers. If board-specific, identify the hardware or measured constraint that requires it. Also include bandwidth-sensitive transitional and multi-display tests. Peak glmark2 establishes that the top vote survives, while the changed intermediate votes need their own coverage. Hosted DT checks are queued.

@github-actions github-actions Bot added area:bringup Area from CODEOWNERS (bot) blast:m5 Macs affected, from Merge risk (bot) door:two-way Revertible or not, from Merge risk (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) labels Nov 27, 2026
@github-actions

github-actions Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

Merge readiness at 0b688b6d: ready to merge

Check Detail
CI at head ok 3 checks passed
Review ok approved by RyanTheTide
Requested changes ok none
Hardware row at head ok in the PR body at 0b688b6d
Conflicts ok none
PR text ok Risk: two-way · T6050 Macs with GPU enabled (J716c, J714s, J775d, K114s/c, K116s/c; no-op on T6050 boards without an active GPU)

Areas: area:bringup, area:gpu
Merge: gh pr merge 3400 --merge (Owners and Core through the bypass: add --admin).

Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels.

Move apple,gpu-busy-memory-states (<1 2 4 6>, <0 0 0 2>) and
apple,gpu-busy-permille (<160 500 800>) from t6050-j716c.dts into
clpc on t6050-die0.dtsi so every T6050 board shares the same
apple_clpc_hw_t6050 GPU busy-share scaling policy instead of gating
it to J716c alone.

Also parse t6050-die0.dtsi directly in
tools/asahi/clpc-gpu-demand-tests.py and verify all four ladder
levels, threshold boundaries, and down-step hold against
apple_clpc_hw_t6050.

Signed-off-by: Erik Bourget <[email protected]>
Drop the hardcoded fallback when parsing t6050-die0.dtsi in
clpc-gpu-demand-tests.py and require both apple,gpu-busy-memory-states
and apple,gpu-busy-permille to be present and non-empty so missing DT
properties cannot silently pass.

Signed-off-by: Erik Bourget <[email protected]>
Strip /* ... */ and // ... DTS comments (while preserving string
literals) before parsing apple,gpu-busy-memory-states and
apple,gpu-busy-permille from t6041.dtsi and t6050-die0.dtsi so
commented-out properties cannot satisfy the parser.

Add negative controls verifying that deleting, block-commenting, or
line-commenting either T6050 GPU busy-share DT property fails the test.

Signed-off-by: Erik Bourget <[email protected]>
@RyanTheTide

Copy link
Copy Markdown
Contributor

Same curve as #3442 (J714s, Isaac-Duarte). Both are T6050, so it belongs once in the clpc node of t6050-die0.dtsi, as main does for T6041 in t6041.dtsi:399. Could you two agree on which PR carries the shared version and close the other? Details: #3442 (review)

@erikwb
erikwb requested a review from DjDeveloperr as a code owner November 27, 2026 22:46
@erikwb

erikwb commented Nov 27, 2026

Copy link
Copy Markdown
Contributor Author

Moved the CLPC GPU busy-share ladder to shared T6050 DT in 93595a0d9560, tightened the T6050 DT assertion in d6080cd45886, and stripped DTS comments before parsing with 6 new DT negative controls in 0b688b6d47b3 (arch/arm64/boot/dts/apple/t6050-die0.dtsi, arch/arm64/boot/dts/apple/t6050-j716c.dts, tools/asahi/clpc-gpu-demand-tests.py), with a J716c row at 0b688b6d47b3 now run (all four ladder levels; see below).

  • Common T6050 policy (93595a0d9560): This is common T6050 policy, not a J716c board constraint. Every T6050 board shares clpc: performance-controller@1 (compatible = "apple,t6050-clpc", "apple,t6041-clpc") in arch/arm64/boot/dts/apple/t6050-die0.dtsi, apple_clpc_hw_t6050 in drivers/soc/apple/clpc.c (DCS states 0–6, fabric states 0–3, GPU floor DCS 6 / fabric 2), and the g17 GPU driver (apple,agx-g17s) reporting 200 ms BusyShare windows. Moved apple,gpu-busy-memory-states and apple,gpu-busy-permille into t6050-die0.dtsi (matching t6041.dtsi). On T6050 boards without an active GPU, apple_clpc_probe() allocates clpc->gpu (apple_clpc_hw_t6050.gpu_input is true), but no GPU driver binds to call apple_clpc_gpu_get() or apple_clpc_gpu_set_active(), so clpc->gpu->active remains false (apple_clpc_gpu_input_demand() returns false) and the properties have no runtime effect.
  • Host fixture citation and strict DT parsing (93595a0d9560, d6080cd45886, 0b688b6d47b3): The previous PR description mis-cited tools/asahi/clpc-gpu-demand-tests.py as a T6050 reference source; that file only contained a DT parser bounds check (t6050_ok). 93595a0d9560 updates tools/asahi/clpc-gpu-demand-tests.py (t6050_from_dt(), check_t6050_busy()) to parse t6050-die0.dtsi directly and verify all four levels (0x01, 0x02, 0x04, 0x26), thresholds (160, 500, 800), and the 400 ms down-step hold against apple_clpc_hw_t6050. d6080cd45886 drops the hardcoded fallback so both apple,gpu-busy-memory-states and apple,gpu-busy-permille are required in t6050-die0.dtsi. 0b688b6d47b3 strips /* ... */ and // ... DTS comments (preserving string literals) before parsing t6041.dtsi and t6050-die0.dtsi so commented-out properties cannot pass, and adds 6 negative controls covering deletion, block-commenting, and line-commenting of each T6050 DT property.
  • Peer DT, KUnit, and local checks at 0b688b6d47b3:
    • make ARCH=arm64 LLVM=1 W=1 CHECK_DTBS=y built all 11 t6050-*.dtb peer boards (t6050-j714c, t6050-j714s, t6050-j716c, t6050-j716s, t6050-j775c, t6050-j775d, t6050-j873s, t6050-k114c, t6050-k114s, t6050-k116c, t6050-k116s; verified at d6080cd45886, no DTS changes in 0b688b6d47b3) with exit 0 and zero clpc/pmc schema warnings.
    • python3 tools/asahi/clpc-gpu-demand-tests.py: PASS (both positive groups + 33 negative controls: 5 in test_g17_busy_share(), 6 in test_t6050_dt_negative_controls(), and 22 in main()).
    • python3 tools/asahi/clpc-high-power-cleanup-tests.py: PASS.
    • python3 tools/testing/kunit/kunit.py run --arch=arm64 --make_options LLVM=1 ... 'apple-clpc*' (verified at d6080cd45886, no kernel changes in 0b688b6d47b3): PASS (18/18 tests across apple-clpc-gpu and apple-clpc-policy).
    • ./scripts/checkpatch.pl --strict --git fcb124279183..HEAD: 0 errors, 0 warnings, 0 checks across cd2cae185bbc, 93595a0d9560, d6080cd45886, and 0b688b6d47b3.

J716c (16-inch M5 Max, T6050) live hardware at 0b688b6d47b3 (batched candidate c3da8eed6f72 and, for the paced-load run below, four-PR batched candidate f59b93fb961f; default command line): the live DT carries apple,gpu-busy-memory-states = <1 2 4 6>, <0 0 0 2> and apple,gpu-busy-permille = <160 500 800>; sampled ladder idle DCS 0 / SOC 0, light FIFO vkcube (~30 permille) -> level 0 / DCS 1 / SOC 0-1, saturating vk_burn/glmark2 (1000 permille) -> level 3 / DCS 6 / SOC 2, back to idle DCS 0 / SOC 0. A paced Vulkan compute load (one dispatch every 8-10 ms with >= 2 ms idle gaps, clpc debugfs sampled every 20 ms) then reached the intermediate levels: 97-99 permille -> level 0 (DCS 1 / SOC 0), 285-300 permille -> level 1 (DCS 2 / SOC 0), 624-638 permille -> level 2 (DCS 4 / SOC 0), saturating 1000 permille -> level 3 (DCS 6 / SOC 2), steady in every sample after the first 0.9 s of each phase. Transitions: a burst reached DCS 6 / SOC 2 24.6 ms after the first saturating dispatch from level 0 (27.4 ms from level 2), a single 120 ms dispatch from steady level 0 lifted to DCS 6 / SOC 2 70.6 ms after it started, DCS 6 was held 433.5 ms after saturating work stopped before dropping to DCS 1 (SOC 0 at 474.1 ms), and idle returned DCS 0 / SOC 0 72.8 ms after the last dispatch. 0 panics, Oops, BUG, SErrors, DART faults, GPU faults and LSM denials on the boot. Not run: (1) per-DCS/fabric bandwidth, latency, and power measurements to document or refine <1 2 4 6>, <0 0 0 2> and <160 500 800> (the levels and timing were observed through the clpc debugfs state only), and (2) multi-display (eDP + external DP). Peer T6050 boards (J714s, J716s, J714c, J775c, J775d, J873s, K114*, K116*) are external hardware not on site (J716c stands in for the t6050 family).

@aurora-silicon-review aurora-silicon-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The shared T6050 placement, schema checks and J716c four-level state transitions address the scope and state-selection questions. The corrected fixture citation still does not establish where the chosen state/threshold values came from, and requested intermediate bandwidth/latency evidence is still missing as noted in the PR. Please document the public-clean policy derivation and add intermediate workload measurements and a runtime peer for the shared default.

@github-actions github-actions Bot added the area:gpu Area from CODEOWNERS (bot) label Nov 27, 2026
@Isaac-Duarte

Copy link
Copy Markdown
Contributor

@erikwb @RyanTheTide Closing #3442 in favor of #3400 since #3400 already carries the shared t6050-die0.dtsi curve (apple,gpu-busy-memory-states = <1 2 4 6>, <0 0 0 2> at apple,gpu-busy-permille = <160 500 800>) plus the clpc-gpu-demand-tests.py comment-stripping/negative controls and J716c coverage.

Here is peer runtime validation on J714s covering multi-display (3x 1080p165 + eDP-1), per-level DRAM bandwidth/power across all four ladder buckets, and the #3075 gpubench vk+gl soak on a clean main base:

J714s (MacBook Pro 14-inch M5 Pro, G17S B1, t6050, balanced, AC 100%) clean-main row:

  • Base & DT: plain main 7.3.0-8b0a383.j714s.fc44.aurora.aarch64 (#10, zero other kernel/module patches) + DTB-only CLPC diff (apple,gpu-busy-memory-states = [1, 2, 4, 6, 0, 0, 0, 2], apple,gpu-busy-permille = [160, 500, 800]), matching #3400's t6050-die0.dtsi values at 0b688b6d.
  • Displays: card1-DP-2, card1-DP-4, card1-DP-6 (1920x1080 @ 165 Hz via dock) + card1-eDP-1 (3024x1964) all connected / enabled throughout (0 dropouts or underruns).

1. Bandwidth-sensitive 4-level Vulkan DRAM copy ladder (multi-display active)

2×128 MiB device-local vkCmdCopyBuffer ping-pong (VK_QUERY_TYPE_TIMESTAMP, 10 ms pacing with >= 2.5 ms idle gaps for levels 0–2, back-to-back 256 MiB for level 3), clpc debugfs sampled every 50 ms and macsmc_hwmon (PSTR / PHPC) every 100 ms (steady state measured after +2.5 s settle):

Phase Copy / Period (duty) host_gpu busy (‰) CLPC steady state (vote mode) GPU BW (gpu_p50) Wall BW (wall_p50) PSTR med PHPC med
bw_level0 59 MiB / 10 ms (9.95%) 87–105 (med 100) 80/80 level 0 (DCS 1 / SOC 0, 0x1) 122.63 GB/s (1.009 ms) 70.62 GB/s (1.752 ms) 13.266 W 5.228 W
bw_level1 333 MiB / 10 ms (31.35%) 262–331 (med 320) 80/80 level 1 (DCS 2 / SOC 0, 0x2) 215.12 GB/s (3.246 ms) 175.06 GB/s (3.989 ms) 21.649 W 11.367 W
bw_level2 708 MiB / 10 ms (60.82%) 573–625 (med 615) 80/80 level 2 (DCS 4 / SOC 0, 0x4) 239.27 GB/s (6.206 ms) 219.44 GB/s (6.766 ms) 28.202 W 17.298 W
bw_level3 256 MiB saturated (90.73%) 1000 70/70 level 3 (DCS 6 / SOC 2, 0x26) 271.41 GB/s (1.978 ms) 251.72 GB/s (2.133 ms) 39.662 W 27.135 W
stepdown_level0 59 MiB / 10 ms (9.39%) 86–107 (med 100) Drops from DCS 6 / SOC 2 (0x26) to DCS 1 / SOC 0 (0x1) at +487.2 ms, 60/60 level 0 123.15 GB/s (1.005 ms) 72.08 GB/s (1.717 ms) 19.713 W 5.786 W
  • post_idle: host_gpu active dropped to 0 at +38.9 ms (1–5‰, level 0 / DCS 1 / SOC 0, PSTR 13.129 W, PHPC 4.054 W).
  • Frame-paced compute checks on the same clean 8b0a383 boot: paced60 (5–6‰) holds 60/60 level 0 (DCS 1 / SOC 0, 0x1, 1203.71 sub/s, PSTR 14.157 W, PHPC 6.693 W); paced120 (7–9‰) holds 61/61 level 0 (DCS 1 60/61, 0x1 mode, 1441.96 sub/s, PSTR 16.119 W, PHPC 7.695 W); gpu_bound (1000‰) holds 60/60 level 3 (DCS 6 / SOC 2, 0x26, 608.59 sub/s, PSTR 35.646 W, PHPC 23.699 W). (Previously measured A/B on 7.3.0-124e30a + #3437 against unset DTB gave 14.91 W -> 14.04 W PSTR on paced60 and 15.46 W -> 14.40 W PSTR on paced120.)

2. #3075 GPU power gate (gpubench 15b1aa4, Borealis Mesa 26.3.0-devel git-d4ad4a4dce)

  • 8-loop gpubench vk + gl soak (docked 3x 1080p165 + eDP-1): 56/56 gpubench-vk (compute.light, compute.heavy:bw, copy.bw:buf2buf, render.light:tri, render.heavy:fill/1080p, render.heavy:texture/1080p, idle.wake:20ms), 32/32 gpubench-gl (asahi), 32/32 gpubench-gl (zink) — 232/232 result rows status=ok, 0 failures, 0 timeouts.
  • Short-lived Vulkan clients & stress: 12/12 fresh sequential gpubench-vk clients status=ok (0 failures); gpubench-stress-vk --test idle.wake,render.first,life.churn --duration 30 --kernel-log 3/3 PASS (idle.wake 772 iters, render.first 79 iters / 13 devices / 0 late frames, life.churn 4,379 iters / 783 devices), 0 errors.
  • Kernel & CLPC health: update errors: 0 (delta = 0, 97816 -> 139757 samples), 0 display dropouts, 0 GPU/CLPC/DCP/DRM errors in dmesg.

Tested-by: Isaac Duarte [email protected]

@RyanTheTide RyanTheTide left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict at 0b688b6: merge once CI is green and the body says where the values come from.

Blockers:

  1. Derivation, the review bot's last open point. Please add one line to What or Details on how the four columns and three shares were chosen. As I read it: the shares are the same 160 500 800 T6041 policy main already carries (t6041.dtsi:399-400), the top column is apple_clpc_hw_t6050's DCS 6 / fabric 2 floor, and the lower columns were picked by measurement. If that is right, say so; if not, say what it is.

Answered (the bot's other asks):

  • Intermediate-level bandwidth and power, with a runtime peer for the shared default: Isaac's J714s row on clean main with this DT (#3400 (comment)) covers all four buckets with 3x 1080p165 + eDP-1, and 0 dropouts.
  • The GPU power gate (#3075 rule): the same row's 8-loop gpubench vk+gl soak (232/232 ok, 0 timeouts), 12 fresh Vulkan clients, and stress 3/3. CLPC update errors: 0.

Checked: one shared copy in t6050-die0.dtsi (J714s, J716c, J775c, K116s), as asked. The host test now reads it from there, and both properties are required. #3442 is closed in favour of this PR.

@github-actions github-actions Bot added ready-to-merge Meets the merge policy: merge it (bot) and removed needs-review No approving review from Core or Omarchy Mac yet (bot) labels Nov 28, 2026
@erikwb erikwb changed the title arm64: dts: apple: t6050-j716c: add CLPC GPU busy-share memory states arm64: dts: apple: t6050: add CLPC GPU busy-share memory states Nov 28, 2026
@erikwb

erikwb commented Nov 28, 2026

Copy link
Copy Markdown
Contributor Author

Updated the PR body with the public-clean policy derivation and direct 0b688b6d47b3 verification of KUnit and the 11 t6050-*.dtb boards.

  • Public-clean policy derivation:
    • Thresholds (<160 500 800> permille) and lower/intermediate memory states (<1 2 4>, fabric <0 0 0>): carried from T6041's shared ladder in arch/arm64/boot/dts/apple/t6041.dtsi (<1 2 4 5>, <0 0 0 3> at <160 500 800>). They partition the GPU driver's 200 ms BusyShare window (BUSY_WINDOW_NS = 200_000_000 in drivers/gpu/drm/asahi/g17/power.rs) at 16%, 50%, and 80%, keeping light compositing at DCS 1 / fabric 0 (lowest active floor above idle 0) and stepping geometrically through DCS 2 and DCS 4 at fabric 0 (below apple_clpc_hw_t6050.map CPU floors DCS 2, 4, 5, 5 / fabric 1, 2, 2, 2).
    • Top column (<6>, <2>): matches apple_clpc_hw_t6050.gpu (DCS 6 / fabric 2) in drivers/soc/apple/clpc.c, where clpc.c documents that bandwidth-bound T6050 GPU work runs ~11% slower at DCS 5 and gains nothing from fabric 3 over fabric 2.
    • None of the DT values come from tools/asahi/clpc-gpu-demand-tests.py (which parses t6050-die0.dtsi directly) or Apple binaries.
  • Direct verification at 0b688b6d47b3:
    • make ARCH=arm64 LLVM=1 W=1 CHECK_DTBS=y across all 11 t6050-*.dtb boards: exit 0, zero clpc/pmc schema warnings.
    • python3 tools/testing/kunit/kunit.py run --arch=arm64 --make_options LLVM=1 --kunitconfig=drivers/soc/apple/clpc.kunitconfig 'apple-clpc*': 18/18 passed (14 in apple-clpc-gpu, 4 in apple-clpc-policy).
    • python3 tools/asahi/clpc-gpu-demand-tests.py: PASS (2 positive groups + 33 negative controls); python3 tools/asahi/clpc-high-power-cleanup-tests.py: PASS; python3 scripts/dtc/apple-adt-coverage-test.py: 19/19 passed.
  • Shared T6050 placement and J714s peer validation: 93595a0d9560 already places the curve in the shared clpc node in arch/arm64/boot/dts/apple/t6050-die0.dtsi (matching t6041.dtsi). #3442 is now closed in favor of #3400, @Isaac-Duarte posted the J714s peer runtime row on clean main (8b0a383) plus the matching DT change at 0b688b6d47b3 (4-level DRAM copy bandwidth ladder across 3x 1080p165 + eDP-1 with 0 dropouts, 232/232 8-loop gpubench vk+gl soak, 12/12 fresh Vulkan clients, 3/3 stress, 0 CLPC update errors), and @RyanTheTide approved #3400 accepting that J714s row for intermediate bandwidth, multi-display, and the GPU power gate. Both the PR body and Evidence now cite that J714s row (Tested-by: Isaac Duarte <[email protected]>).
  • Remaining J716c-specific checks (0b688b6d47b3): Only J716c-specific per-DCS/fabric bandwidth, latency, and power characterization across levels 0–3 (DCS 1/0, 2/0, 4/0, 6/2), J716c gpubench vk+gl soak, J716c multi-display (eDP + external DP), and non-site external T6050 boards remain under **Not yet:**.

@RyanTheTide

Copy link
Copy Markdown
Contributor

Thanks, the derivation answers the last open point: the shares and lower columns are the T6041 ladder in main, the top column is the documented T6050 GPU floor, and nothing comes from the fixture. Merging at 0b688b6.

@RyanTheTide
RyanTheTide merged commit 61e791b into main Nov 28, 2026
5 of 8 checks passed
@RyanTheTide
RyanTheTide deleted the feat/t6050-clpc-gpu-busy-ladder branch November 28, 2026 02:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:bringup Area from CODEOWNERS (bot) area:gpu Area from CODEOWNERS (bot) blast:m5 Macs affected, from Merge risk (bot) door:two-way Revertible or not, from Merge risk (bot) ready-to-merge Meets the merge policy: merge it (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants