Repository navigation
arm64: dts: apple: t6050: add CLPC GPU busy-share memory states - #3400
Conversation
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]>
There was a problem hiding this comment.
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.
|
Merge readiness at
Areas: 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]>
|
Same curve as #3442 (J714s, Isaac-Duarte). Both are T6050, so it belongs once in the |
|
Moved the CLPC GPU busy-share ladder to shared T6050 DT in
J716c (16-inch M5 Max, T6050) live hardware at |
There was a problem hiding this comment.
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.
|
@erikwb @RyanTheTide Closing #3442 in favor of #3400 since #3400 already carries the shared Here is peer runtime validation on J714s (MacBook Pro 14-inch M5 Pro,
1. Bandwidth-sensitive 4-level Vulkan DRAM copy ladder (multi-display active)2×128 MiB device-local
2.
|
RyanTheTide
left a comment
There was a problem hiding this comment.
Verdict at 0b688b6: merge once CI is green and the body says where the values come from.
Blockers:
- 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 800T6041 policy main already carries (t6041.dtsi:399-400), the top column isapple_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.
|
Updated the PR body with the public-clean policy derivation and direct
|
|
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. |
What: Move
apple,gpu-busy-memory-states(<1 2 4 6>, <0 0 0 2>) andapple,gpu-busy-permille(<160 500 800>) fromt6050-j716c.dtsonto the sharedclpcnode int6050-die0.dtsiso every T6050 Mac scales GPU memory/fabric floors with reported GPU busy share instead of pinningDCS 6 / fabric 2on light workloads.Tested:
tools/asahi/clpc-gpu-demand-tests.pyPASS at0b688b6d47b3(2 positive groups + 33 negative controls, parsing comment-strippedt6050-die0.dtsidirectly across all four ladder levels, threshold boundaries, and 400 ms down-step hold);tools/asahi/clpc-high-power-cleanup-tests.pyPASS at0b688b6d47b3;scripts/dtc/apple-adt-coverage-test.pyPASS (19/19 tests) at0b688b6d47b3; arm64 KUnitapple-clpc*PASS (18/18 tests: 14 inapple-clpc-gpu, 4 inapple-clpc-policy) at0b688b6d47b3; all 11t6050-*.dtbboards passW=1 CHECK_DTBS=ywith zeroclpc/pmcschema warnings at0b688b6d47b3; J716c (16-inch M5 Max, T6050) live run at0b688b6d47b3in batched candidatec3da8eed6f72(overmain9af21b007425, default command line, default Stage 2, Linux 7.3.0, AC 100%): the live DT carriesapple,gpu-busy-memory-states = <1 2 4 6>, <0 0 0 2>andapple,gpu-busy-permille = <160 500 800>, and the sampled ladder was idleDCS 0 / SOC 0, light FIFOvkcube(~30permille) ->level 0,DCS 1,SOC 0-1, saturatingvk_burn/glmark2(1000permille) ->level 3,DCS 6,SOC 2, then back to idleDCS 0 / SOC 0; a paced Vulkan compute load (one dispatch every8-10 mswith>= 2 msidle gaps,clpcdebugfs sampled every20 ms) then reached every level in batched candidatef59b93fb961f(overmain9af21b007425, default command line, default Stage 2, Linux 7.3.0, AC 100%):97-99permille ->level 0/DCS 1/SOC 0,285-300permille ->level 1/DCS 2/SOC 0,624-638permille ->level 2/DCS 4/SOC 0, saturating back-to-back dispatches (1000permille) ->level 3/DCS 6/SOC 2, each steady over every sample after the first0.9 sof its phase; burst fromlevel 0reachedDCS 6 / SOC 224.6 msafter the first saturating dispatch (27.4 msfromlevel 2), a single120 mscompute dispatch from steadylevel 0lifted toDCS 6 / SOC 270.6 msafter it started, after saturating work stoppedDCS 6was held for433.5 msbefore dropping toDCS 1(SOC 0at474.1 ms) while light paced work continued, and idle returnedDCS 0 / SOC 072.8 msafter the last dispatch;0panics/Oops/BUG/SErrors/DART faults/GPU faults/LSM denials; earlier headcd2cae185bbcon default cmdline verified 60 fps redraw atlevel 0/DCS 1 / SOC 0dropping heatpipe3,134 -> 1,642 mWand 120 fps at4,068 -> 2,656 mW, and peakglmark2atlevel 3/DCS 6 / SOC 2, returning to0x0at idle. Peer runtime validation on J714s (14-inch M5 Pro,G17S B1, T6050,Tested-by: Isaac Duarte <[email protected]>, cleanmain8b0a383plus matchingt6050-die0.dtsiDT change at0b688b6d47b3,#3442closed in favor of#3400): with3x 1080p165+eDP-1active (0dropouts/underruns), 4-level Vulkan DRAM copy ladder held80/80level 0(122.63 GB/sGPU median),80/80level 1(215.12 GB/s),80/80level 2(239.27 GB/s),70/70level 3(271.41 GB/s), and stepped down in+487.2 ms, and the 8-loopgpubenchvk+gl soak (232/232 ok),12/12fresh Vulkan clients, andgpubench-stress-vk(3/3PASS) ran with0CLPC update errors and0dmesg 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),gpubenchvk+gl soak (>= 8loops +10fresh short-lived Vulkan clients), and multi-display (eDP+ external DP) at0b688b6d47b3(already covered on peer T6050 boardJ714s); external T6050 boards (J716s,J714c,J775c,J775d,J873s,K114*,K116*) not on site.Details
Four commits on
main: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).93595a0d9560(arm64: dts: apple: t6050: move CLPC GPU busy-share ladder to shared die0): movesapple,gpu-busy-memory-statesandapple,gpu-busy-permilleintoclpc: performance-controller@1inarch/arm64/boot/dts/apple/t6050-die0.dtsiand updatestools/asahi/clpc-gpu-demand-tests.pyto parset6050-die0.dtsidirectly and exercisecheck_t6050_busy()againstapple_clpc_hw_t6050.d6080cd45886(asahi: clpc-gpu-demand-tests: require both T6050 DT properties): drops the hardcoded T6050 fallback intools/asahi/clpc-gpu-demand-tests.pyand requires bothapple,gpu-busy-memory-statesandapple,gpu-busy-permilleto be present and non-empty int6050-die0.dtsi.0b688b6d47b3(asahi: clpc-gpu-demand-tests: strip DTS comments before parsing): strips/* ... */and// ...DTS comments (while preserving string literals) before parsingapple,gpu-busy-memory-statesandapple,gpu-busy-permillefromt6041.dtsiandt6050-die0.dtsi, and adds 6 negative controls testing deletion, block-commenting, and line-commenting of each T6050 DT property.Policy derivation (public-clean):
<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 inarch/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 msBusySharewindow (BUSY_WINDOW_NS = 200_000_000indrivers/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 idle0), moderate intermittent work steps geometrically throughDCS 2andDCS 4atfabric 0(kept belowapple_clpc_hw_t6050.map's CPU floors ofDCS 2, 4, 5, 5andfabric 1, 2, 2, 2), and sustained/heavy GPU work enters the top bucket (>= 800permille, or immediately on long>= 50 mscommands / cold wake).<6>, <2>): taken directly fromapple_clpc_hw_t6050.gpuindrivers/soc/apple/clpc.c(DCS 6 / fabric 2), whereclpc.cdocuments that bandwidth-bound T6050 GPU work runs ~11% slower atDCS 5and gains nothing fromfabric 3overfabric 2.tools/asahi/clpc-gpu-demand-tests.py(which parsest6050-die0.dtsidirectly) 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:clpc: performance-controller@1(compatible = "apple,t6050-clpc", "apple,t6041-clpc") int6050-die0.dtsi,apple_clpc_hw_t6050indrivers/soc/apple/clpc.c(DCS states 0–6, fabric states 0–3, GPU default floorDCS 6 / fabric 2), and theg17GPU driver (apple,agx-g17s) reporting 200 msBusySharewindows.t6050-j716c.dtsgated a common T6050 policy to the tested board, unliket6041.dtsi(shared acrossJ614c/J616c/J575c). On T6050 boards without an active GPU,apple_clpc_probe()allocatesclpc->gpu(apple_clpc_hw_t6050.gpu_inputistrue), but no GPU driver binds to callapple_clpc_gpu_get()orapple_clpc_gpu_set_active(), soclpc->gpu->activeremainsfalse(apple_clpc_gpu_input_demand()returnsfalse) and the properties have no runtime effect.Evidence
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=yon all 11t6050-*.dtbboards (t6050-j714c,t6050-j714s,t6050-j716c,t6050-j716s,t6050-j775c,t6050-j775d,t6050-j873s,t6050-k114c,t6050-k114s,t6050-k116c,t6050-k116s): exit 0, zeroclpc/pmcschema warningspython3 tools/asahi/clpc-gpu-demand-tests.py: PASS (2 positive groups + 33 negative controls: 5 intest_g17_busy_share(), 6 intest_t6050_dt_negative_controls(), and 22 inmain(), includingt6050_from_dt()andcheck_t6050_busy())python3 tools/asahi/clpc-high-power-cleanup-tests.py: PASSpython3 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 inapple-clpc-gpu, 4 inapple-clpc-policy)0b688b6d47b3in batched candidatec3da8eed6f72(overmain9af21b007425, default cmdline, default Stage 2, Linux 7.3.0, AC 100%):apple,gpu-busy-memory-states = <1 2 4 6>, <0 0 0 2>,apple,gpu-busy-permille = <160 500 800>DCS 0 / SOC 0vkcube(~30permille):level 0,DCS 1,SOC 0-1vk_burn/glmark2(1000permille):level 3,DCS 6,SOC 2DCS 0 / SOC 00b688b6d47b3(four-PR batched candidatef59b93fb961f, overmain9af21b007425, default command line, default Stage 2, Linux 7.3.0, AC 100%):Apple M5 Max (G17C B1)); a dispatch with calibrated GPU time submitted every8 ms(levels 0 and 1) or10 ms(level 2), each waited on before sleeping to the next deadline, so idle gaps stayed>= 2 ms; saturating phases submit back-to-back5 msdispatches;clpcdebugfsstatussampled every20 ms(DCSandSOCstate,host_gpu busypermille andlevel).0.9 sof each3 sphase):~0.8 msdispatches every8 ms:97-99permille,level 0,DCS 1 / SOC 0(103/103samples);~2.4 msevery8 ms:285-300permille,level 1,DCS 2 / SOC 0(103/103);~6.5 msevery10 ms:624-638permille,level 2,DCS 4 / SOC 0(103/103); saturating:1000permille,level 3,DCS 6 / SOC 2(54/54); idle:DCS 0 / SOC 0(54/54).+94.8 msand level 1 -> level 2 at+185.8 msafter the load changed.level 0->DCS 6 / SOC 2at+24.6 ms; fromlevel 2at+27.4 ms.>= 50 mscompute lift: one120 msdispatch after steadylevel 0(97-99permille) ->DCS 6 / SOC 2at+70.6 ms(busy 1000permille);DCS 0 / SOC 0again~51 msafter the dispatch retired.DCS 6held for433.5 ms, thenDCS 1withSOC 2until+474.1 ms, thenDCS 1 / SOC 0(level 0); sampling resolution20 ms.DCS 0 / SOC 072.8 msafter the last saturating dispatch and~52 msafter the last paced dispatch.DCS 6 / SOC 2) for~0.6 s(one200 msbusy window plus the400 mshold) before settling atlevel 0, as designed (busy_validis cleared on idle).0panics/Oops/BUG/SErrors/DART faults/GPU faults/WARNINGlines/LSM denials; the only error-level kernel lines are the2xpre-existingsystemd-gpt-auto-generator.cd2cae185bbc(unplugged,bl=150, VRR on, default cmdline):8,221 mW(3,134 mWHP,DCS 6 / SOC 2) ->7,322 mW(1,642 mWHP,DCS 1 / SOC 0,-1,492 mWHP)8,664 mW(4,068 mWHP,DCS 6 / SOC 2) ->7,904 mW(2,656 mWHP,DCS 1 / SOC 0,-1,412 mWHP)glmark2):level 3->DCS 6 / SOC 2(last_vote: 0x26), returning to0x0at idleG17S B1, T6050,balanced, AC100%;Tested-by: Isaac Duarte <[email protected]>,#issuecomment-7230034917,#3442closed in favor of#3400, accepted by reviewer for intermediate bandwidth, multi-display, and GPU power gate):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]), matchingt6050-die0.dtsiat0b688b6d47b3.card1-DP-2,card1-DP-4,card1-DP-6(1920x1080@165via dock) +card1-eDP-1(3024x1964) allconnected/enabled(0dropouts/underruns).2x128 MiBvkCmdCopyBufferping-pong, steady after+2.5 s):bw_level0(87–105, med100permille)80/80level 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, med320permille)80/80level 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, med615permille)80/80level 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(1000permille)70/70level 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_level0drops fromDCS 6 / SOC 2toDCS 1 / SOC 0at+487.2 ms(60/60level 0),post_idlehost_gpu active=0at+38.9 ms; frame-pacedpaced60(60/60level 0),paced120(61/61level 0),gpu_bound(60/60level 3).gpubench15b1aa4,BorealisMesa26.3.0-devel git-d4ad4a4dce): 8-loopgpubenchvk+gl soak (56/56gpubench-vk,32/32gpubench-glasahi,32/32gpubench-glzink—232/232ok,0failures,0timeouts),12/12fresh sequentialgpubench-vkclients ok,gpubench-stress-vk(idle.wake,render.first,life.churn, 30 s)3/3PASS, CLPCupdate errors: 0(97816 -> 139757),0display dropouts,0GPU/CLPC/DCP/DRM errors indmesg.