Skip to content

drm/asahi: g16 + t8132: scale CLPC memory states by GPU busy share - #3491

Merged
RyanTheTide merged 4 commits into
mainfrom
feat/t8132-clpc-gpu-busy-ladder
Dec 1, 2026
Merged

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

Conversation

@erikwb

@erikwb erikwb commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

What: Report per-window G16 GPU busy share to CLPC (apple_clpc_gpu_set_busy() / apple_clpc_gpu_clear_busy()) and add the DT-configured apple,gpu-busy-memory-states / apple,gpu-busy-permille ladder to t8132-memory.dtsi so light paced GPU workloads on M4 (T8132) drop from pinned DCS 5 / SoC 3 to DCS 1–2 / SoC 0. Retargeted onto origin/main (19ee1b5bc9d5, including #3407 merge 43715890e29f) at 7b9c8f3baba2.

Tested: Host tests (test-thermal-policy.py 23/23 + 571,828 C trace rows, clpc-gpu-demand-tests.py including T8132 + T6050 + T8142 DT parsing, 18 DT negative controls, 6 BusyShare negative controls, and 23 policy negative controls, clpc-high-power-cleanup-tests.py, apple-adt-coverage-test.py 19/19, apple-agx-binding-test.py 7/7), DT check (CHECK_DTBS=y across all 6 apple/t8132-*.dtb with 0 CLPC warnings), KUnit (clpc 20/20, asahi 520 passed / 4 skipped / 0 failed, including asahi_g17_idle_hold 17/17), W=1 g16 build (0 warnings), and checkpatch.pl --strict --no-signoff (0 errors) pass at 7b9c8f3baba2 (after resolving the single merge conflict in tools/asahi/clpc-gpu-demand-tests.py, leaving all runtime driver and DT files unchanged relative to main + 44d22bf36fb3). Prior dt_binding_check on apple,pmc.yaml and full j713 arm64 Image.gz + modules + dtbs build passed at 44d22bf36fb3. J713 (M4 MacBook Air, T8132, 27.2 firmware, default command line) at 44d22bf36fb3 (Linux 7.3.0 built from 429e7e15f122 with 44d22bf36fb3 merged, one-shot Stage 2 carrying that tree's t8132-j713.dtb; 7b9c8f3baba2 only changed tools/asahi/clpc-gpu-demand-tests.py relative to main + 44d22bf36fb3): booted with apple,gpu-busy-memory-states / apple,gpu-busy-permille in the device tree (dcs map 1,2,4,5, soc map 0,0,1,3 in the CLPC debugfs status), 0 failed units (system and user), 0 AppArmor denials, 0 oops/WARN, eDP-1 2560x1664@60 enabled, wireless 3/3 gateway pings, input enumerated, speakerguardd-v2 active (no speaker playback), CLPC ladder on a Borealis-rendered mpv test pattern: 720p60 230-254 permille, level 1, vote 0x2 (DCS 2); heavy 4K scaling 731-1000 permille, level 2-3, vote 0x35; idle vote 0x0. The PR's own runtime and DT diff has not changed since ccc239812d7b, so the earlier J713 rows at ccc239812d7b / 76649338a1bc (full 8-item smoke matrix, glmark2 5,099, and the 1080p30 / 1080p60 AVD video A/B of -740 mW / -585 mW PSTR) are kept under Evidence as history for the same diff.

Risk: two-way door · M4 (T8132) Macs (t8132-memory.dtsi is T8132-only; g16 changes compile into the shared asahi DRM module; #3407 is now merged on origin/main)

Not yet: hosted GitHub Actions CI green at 7b9c8f3baba2 (prior runs on 44d22bf36fb3 were cancelled); post-merge J713 hardware check at 7b9c8f3baba2 (7b9c8f3baba2 only modified tools/asahi/clpc-gpu-demand-tests.py relative to main + 44d22bf36fb3), a fresh AVD video power A/B, and a second-family asahi module non-regression smoke boot (e.g. J313 M1 or J716c M5 Max); other T8132 boards (e.g. J773g) and other g16-supported SoCs not in the lab (T6030, T8122).

Details

Revert: git revert -m 1 <merge_sha> (or revert commits ccc239812d7b and 8d5353fe05d3; #3407 is already merged on origin/main) and rebuild/redeploy kernel modules and t8132-*.dtb; leaves no persistent on-disk or firmware state.

Previously, G16 only toggled apple_clpc_gpu_set_active(), and t8132-memory.dtsi did not provide apple,gpu-busy-memory-states or apple,gpu-busy-permille. Every active GPU frame therefore pinned DRAM and SoC fabric to DCS 5 / SoC 3 (0x35), keeping 0x35 active continuously during paced 24–60 fps video playback and light desktop compositing.

  1. Prerequisite #3407 (merged on origin/main at 43715890e29f: 54bad83f2aaa, 883f0567e5d6, 206e5628ffd4):
    • Adds apple_clpc_gpu_clear_busy(), preserves clpc busy share across brief inactivity clears (< 100 ms), and clears explicitly after genuine idle, sleep, and teardown. Now part of origin/main (19ee1b5bc9d5), leaving only #3491's two feature commits and two merge commits ahead of origin/main.
  2. 8d5353fe05d3 (drm/asahi: g16: report GPU busy share to CLPC):
    • Adds C glue wrappers asahi_g16_clpc_gpu_set_busy() / asahi_g16_clpc_gpu_clear_busy() in drivers/gpu/drm/asahi/g16/glue.c.
    • Adds ClpcBusyShare in drivers/gpu/drm/asahi/g16/power/policy.rs:
      • Measures actual publication-to-drain GPU busy time across 200 ms windows without counting inter-flight idle gaps.
      • Preserves the window across brief inter-frame idle shorter than 100 ms so paced 15–120 fps streams settle on the lower ladder buckets.
      • Evaluates genuine idle (>= 100 ms) from the drain timestamp on the publication path (independent of delayed idle polls), calling clpc_hold.release_now() + apple_clpc_gpu_clear_busy() so the next publication produces a fresh active wake edge at the top column. Stale windows (> 2 s), fail-stop, and suspend likewise clear local and provider state.
      • Tracks continuous unbroken run age (continuous_since) independently of window rolls and overrides to 1000 permille (both early lift and window close, regardless of prior state) once a continuous run reaches 50 ms, or when an active partial window of at least 50 ms reaches >= 800 permille actual busy time.
    • Wires publication (engine.rs), drain (poll.rs), service_power(), report_work(), and release_clpc_now() (power.rs), with call-site coverage in test-thermal-policy.py.
  3. ccc239812d7b (arm64: dts: apple: t8132: add CLPC GPU busy-share memory states):
    • Adds the T8132 ladder to clpc: performance-controller@3 in arch/arm64/boot/dts/apple/t8132-memory.dtsi (within t8132's dcs_max = 5, soc_max = 3):
      • < 160 permille -> DCS 1 / SoC 0 (0x01)
      • < 500 permille -> DCS 2 / SoC 0 (0x02)
      • < 800 permille -> DCS 4 / SoC 0 (0x04)
      • >= 800 permille or unknown -> DCS 5 / SoC 3 (0x35)
    • Extends tools/asahi/clpc-gpu-demand-tests.py with T8132 DT parsing, negative controls, and ladder/hysteresis tests.
  4. 44d22bf36fb3 (Merge branch 'main' into feat/t8132-clpc-gpu-busy-ladder):
    • Merges main (07cb39a2895d) and reconciles tools/asahi/clpc-gpu-demand-tests.py to share DT parsing helpers between T8132 and main's T6050 cases and expect T8132's stepped CPU memory floor (047f6b5e17c2), leaving all runtime and DT files unchanged from ccc239812d7b.
  5. 7b9c8f3baba2 (Merge branch 'main' into feat/t8132-clpc-gpu-busy-ladder):
    • Merges origin/main (19ee1b5bc9d5, including #3407 merge 43715890e29f); auto-merged g16/engine.rs, g16/poll.rs, g16/power.rs, g16/power/policy.rs, g16/glue.c, and arch/arm64/boot/dts/apple/t8132-memory.dtsi cleanly and resolved the single conflict in tools/asahi/clpc-gpu-demand-tests.py by keeping parse_t8132_gpu_busy, parse_t6050_gpu_busy, and origin/main's parse_t8142_gpu_busy, unifying test_dt_negative_controls(dts_text, prefix, parser), and running t8132, t6050, and t8142 DT parsing and negative controls alongside #3407's brief-idle BusyShare and CLPC tests. Only tools/asahi/clpc-gpu-demand-tests.py changed relative to main + 44d22bf36fb3.
Evidence

J713 row (44d22bf36fb3, M4 MacBook Air, T8132, 27.2 firmware, default command line; 7b9c8f3baba2 only changed tools/asahi/clpc-gpu-demand-tests.py relative to main + 44d22bf36fb3)

  • Build: Linux 7.3.0 from 429e7e15f122 with 44d22bf36fb3 and six other open PR heads merged cleanly; the booted t8132-j713.dtb differs from the one built from 44d22bf36fb3 alone only in the 912 MHz opp-microwatt cell that 43f8add3e7d1 changed on main.
  • Smoke without speaker playback: eDP-1 2560x1664@60 enabled, input devices enumerated, wlan0 associated with 3/3 gateway pings (0% loss), speakerguardd-v2 active with the protection sink present, Borealis rendering mpv (GL_RENDERER Apple M4 (G16G B0)), systemctl --failed 0 (system and user), apparmor="DENIED" / avc: denied 0, WARN / BUG / Oops 0; kernel err lines: the 3 on the default boot plus 2 from the unprobed external display processors and, after deep sleep, the GPU stop reported 1 line that the default boot also logs.
  • CLPC ladder (debugfs status, 1 s samples, 12 samples each): 720p60 test pattern 230-254 permille (reported) level 1, last_vote 0x2 (one 0x35 sample from the CPU vote); 3840x2160 ewa_lanczos scaling 731-1000 permille, level 2-3, last_vote 0x35 (one 0x34); idle (no client) last_vote 0x0, dcs: state 0.

Commits ahead of origin/main (19ee1b5bc9d5, includes #3407 merge 43715890e29f)

  • 8d5353fe05d3 drm/asahi: g16: report GPU busy share to CLPC
  • ccc239812d7b arm64: dts: apple: t8132: add CLPC GPU busy-share memory states
  • 44d22bf36fb3 Merge branch 'main' into feat/t8132-clpc-gpu-busy-ladder (merged main 07cb39a2895d)
  • 7b9c8f3baba2 Merge branch 'main' into feat/t8132-clpc-gpu-busy-ladder (merged origin/main 19ee1b5bc9d5)

Host Tests, DT Checks, KUnit & Build (7b9c8f3baba2, plus prior 44d22bf36fb3 full cross-build)

  • python3 tools/testing/selftests/drivers/gpu/asahi-m4/test-thermal-policy.py (7b9c8f3baba2): 23/23 Rust unit tests + 571,828 C cooling trace rows + call-site wiring + lease/ENODATA checks PASS.
  • python3 tools/asahi/clpc-gpu-demand-tests.py (7b9c8f3baba2): PASS (t8132, t6050, and t8142 DT parsing and 18 DT negative controls + 6 BusyShare negative controls + 23 policy negative controls).
  • python3 tools/asahi/clpc-high-power-cleanup-tests.py (7b9c8f3baba2): PASS.
  • python3 scripts/dtc/apple-adt-coverage-test.py (7b9c8f3baba2): 19/19 PASS.
  • python3 scripts/dtc/apple-agx-binding-test.py (7b9c8f3baba2): 7/7 PASS.
  • make ARCH=arm64 LLVM=1 CHECK_DTBS=y across all 6 apple/t8132-*.dtb (j604, j623, j624, j713, j715, j773g) at 7b9c8f3baba2: PASS (0 warnings on power-management@382800000 / performance-controller@3; fdtget on t8132-j713.dtb confirms apple,gpu-busy-memory-states = 1 2 4 5 0 0 0 3 and apple,gpu-busy-permille = 160 500 800).
  • ./tools/testing/kunit/kunit.py run --arch=arm64 --make_options LLVM=1 --kunitconfig=drivers/soc/apple/clpc.kunitconfig (7b9c8f3baba2): 20/20 passed (apple-clpc-gpu 15/15, apple-clpc-policy 5/5).
  • ./tools/testing/kunit/kunit.py run --arch=arm64 --make_options LLVM=1 --kunitconfig=drivers/gpu/drm/asahi/.kunitconfig (7b9c8f3baba2): Ran 524 tests: passed: 520, skipped: 4 (asahi_g17_idle_hold 17/17 passed, 0 failed).
  • make ARCH=arm64 LLVM=1 W=1 drivers/gpu/drm/asahi/g16/glue.o drivers/gpu/drm/asahi/ (7b9c8f3baba2): built cleanly with 0 warnings in drivers/gpu/drm/asahi/g16/.
  • ./scripts/checkpatch.pl --strict --no-signoff on origin/main..7b9c8f3baba2: total: 0 errors, 2 warnings, 0 checks, 613 lines checked (only the 2 pre-existing extern prototype warnings in drivers/gpu/drm/asahi/g16/glue.c).
  • Prior at 44d22bf36fb3 (same runtime/DT diff as 7b9c8f3baba2): make ARCH=arm64 LLVM=1 dt_binding_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/power/apple,pmc.yaml PASS; full j713 arm64 cross-build (ARCH=arm64 LLVM=1, Image.gz, modules, dtbs, release 7.3.0+) built cleanly (Image.gz SHA-256 4328f3380251a7ed0a3971591241f54ce8e51f9ec73c22fb6d82b9c6e96d7af9, t8132-j713.dtb SHA-256 59c1f42da8605c3cce3ac27fc713ffef2202f8a79757d5f49331f340bb09f5ea), 0 warnings/errors in changed files (clpc.c, g16/*, g17/*).

Earlier J713 (M4 MacBook Air, T8132, 27.2) Batched Verification (76649338a1bc, ancestor ccc239812d7b, 2026-11-28)

  • Kernel image SHA-256: e8e9fd2813dd6347176d0e4a55a70d1c694bdab75817c3ab83c441c203140491
  • Trial Stage 2 SHA-256: f7d4e2f7ebbfb423bd71f233f1aef7af0a39091b288a749d25f9250eb80adbfa (one-shot aura-try, default Stage 2 3b2d2f059858d1891b225910864c02d68afb1b42893667e0afa8666491651071 untouched)
  • DTB t8132-j713.dtb SHA-256: ceacf1d413c651396f4c1dfd9fa27b15c710dd849e46c2753fcff0a23a6681c6
  • Booted DT properties: apple,gpu-busy-memory-states = <1 2 4 5>, <0 0 0 3> and apple,gpu-busy-permille = <160 500 800>.
  • 8-item smoke matrix PASS (default command line + panic=10, undocked DP-1..DP-4 disconnected):
    1. Display: eDP-1 2560x1664@60 enabled, Hyprland idle (0.6% CPU).
    2. Input: /proc/bus/input/devices and hyprctl devices enumerated.
    3. Networking: nmcli, iw dev wlan0 link, 3x gateway ping PASS.
    4. Permitted audio sink: ALSA cards, wpctl status, speakerguardd-v2 active, 1 s 440 Hz tone at -26 dB via sgv2.voicing only (rc 0).
    5. GPU rendering: Borealis vulkaninfo --summary and glmark2-es2-wayland --off-screen score 5,099.
    6. systemctl --failed (system + user): 0.
    7. LSM (apparmor="DENIED" / avc: denied): 0.
    8. dmesg -l err,crit,alert,emerg: 4 lines (3 pre-existing baseline lines plus 1 transient brcmfmac ring 4: r_ptr 0 outside depth 0 line at 9.2 s, never repeated across 5x wlan0 down/up or 5 s2idle cycles; 0 clpc / asahi errors).
  • CLPC ladder classification (debugfs status):
    • Paced vkcube (60 Hz): host_gpu busy: 102-123 permille (reported) level 0
    • glmark2 build: 760-785 permille (reported) level 2 (after load: (none) level 3)
    • Idle (read before any other load): last_vote 0x0, dcs: state 0
    • Caveats: with the active SSH session and Hyprland compositor present, the CPU vote (cluster cpu1: busy 80%) holds last_vote 0x35 (reason bits 0x1), so the combined final vote is dominated by the CPU floor in that setup; the 2026-11-28 batched run did not repeat the power A/B.

Earlier Hardware A/B on J713 (M4 MacBook Air, T8132, 27.2; bl=150, eDP-1 + DP-1 + DP-3, Hyprland, AC)

Same-machine comparison between the prior J713 27.2 baseline kernel (no busy share, map 5,5,5,5 / 3,3,3,3) and the prior J713 27.2 kernel carrying #3407 + 8d5353fe05d3 + ccc239812d7b + compiled t8132-j713.dtb with apple,gpu-busy-memory-states / apple,gpu-busy-permille (all 6 runtime/DT files byte-identical to ccc239812d7b):

Workload (15 s each) Baseline (no busy share) With #3407 + #3491 (ccc239812d7b) Delta
Static idle 5,770.0 mW PSTR (2,121.3 mW 3.8 V), 0x0 (54/60) 5,878.6 mW PSTR (2,101.7 mW 3.8 V), 0x0 (43/48) within noise (-19.6 mW 3.8 V)
1080p30 AVD video (mpv --vo=gpu --hwdec=auto-safe) 7,427.9 mW PSTR (3,457.8 mW 3.8 V), 75/75 0x35 6,687.5 mW PSTR (2,777.0 mW 3.8 V), 65/75 0x1 (132‰ med, 149‰ max) -740.4 mW PSTR (-680.8 mW 3.8 V)
1080p60 AVD video (mpv --vo=gpu --hwdec=auto-safe) 8,027.7 mW PSTR (3,998.3 mW 3.8 V), 75/75 0x35 7,442.9 mW PSTR (3,462.4 mW 3.8 V), 67/75 DCS 2 (229‰ med, 245‰ max) -584.8 mW PSTR (-535.9 mW 3.8 V)
Heavy GPU shader (180 untimed frames, heavy.glsl) 3.372 s (53.38 fps), 0x35 (32/33) 3.314 s (54.32 fps), 0x35 (30/33) / 0x34 (2/33), 1000‰ max, post-idle 0x0 +1.8% (no regression)

Regression check on that prior J713 27.2 run: systemctl --failed: 0; dmesg -l err,crit,alert,emerg: 9 (identical to baseline 9); WARNING/BUG/Oops/Call trace: 0.

Track per-window G16 GPU busy share (200 ms window) from actual
publication-to-drain execution time and report it to the CLPC memory and
fabric demand provider via apple_clpc_gpu_set_busy().

Brief inter-frame idle shorter than 100 ms preserves the busy-share window
so paced 24-120 fps video and light desktop compositing settle on the lower
DT-configured CLPC memory states. Genuine idle (>= 100 ms from the drain
timestamp, fail-stop, or system sleep) expires any delayed hold and clears
the cached share via apple_clpc_gpu_clear_busy() so the next burst starts
at the top column with a fresh active edge; stale windows (> 2 s) likewise
clear the cached share.

A continuous unbroken busy run reaching 50 ms overrides both early lift and
window close to 1000 permille regardless of prior state, and an active
partial window of at least 50 ms with >= 800 permille actual busy time
lifts early without counting idle gaps.

Signed-off-by: Erik Bourget <[email protected]>
Add apple,gpu-busy-memory-states and apple,gpu-busy-permille to the T8132
CLPC node so light GPU workloads scale DCS/SoC memory floors instead of
pinning every active frame at DCS 5 / SoC 3:

  < 16.0% busy -> DCS 1 / SoC 0
  < 50.0% busy -> DCS 2 / SoC 0
  < 80.0% busy -> DCS 4 / SoC 0
  >= 80.0% or unknown -> DCS 5 / SoC 3

Extend clpc-gpu-demand-tests.py with T8132 DT parsing, negative controls,
and ladder/hysteresis checks.

Signed-off-by: Erik Bourget <[email protected]>
@erikwb
erikwb requested review from a team and DjDeveloperr as code owners November 28, 2026 05:43
@github-actions github-actions Bot added area:bringup Area from CODEOWNERS (bot) area:gpu Area from CODEOWNERS (bot) blast:m4 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 28, 2026
@github-actions

github-actions Bot commented Nov 28, 2026 •

Copy link
Copy Markdown

Merge readiness at 7b9c8f3b: not ready yet

Check Detail
CI at head no failing: host-tests
Review ok approved by DjDeveloperr
Requested changes ok none
Hardware row at head ok in the PR body at 7b9c8f3b
Conflicts ok none
PR text ok Risk: two-way · M4 (T8132) Macs (t8132-memory.dtsi is T8132-only; g16 changes compile into the shared asahi DRM module; #3407 is now merged on origin/main)

Areas: area:bringup, area:gpu

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

@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.

Verdict: HOLD at ccc23981

Blockers:

  1. Targets open non-default base branch fix/clpc-gpu-busy-brief-idle. Retarget to main once the parent PR merges so full main CI (apple-build, dt-checks, host-tests, KUnit) can run on the final diff.

Checked:

  • 8d5353fe (g16 GPU busy-share reporting to CLPC) and ccc23981 (t8132 DT CLPC memory states) are cleanly structured and MERGEABLE against fix/clpc-gpu-busy-brief-idle; pr-text and readiness pass.
  • Checked for Apple material, tool attribution, private serials, and board gating: clean; human Signed-off-by present.
Evidence
  • Head: ccc23981 (base: fix/clpc-gpu-busy-brief-idle, mergeable: MERGEABLE, +530/-1 across 8 files).

@erikwb

erikwb commented Nov 28, 2026

Copy link
Copy Markdown
Contributor Author

#3491 remains cleanly MERGEABLE on #3407 (fix/clpc-gpu-busy-brief-idle, currently still open at 206e5628ffd4). Per branch policy, #3491 will be retargeted to main before #3407 merges, then I will reconcile the final diff (tools/asahi/clpc-gpu-demand-tests.py, where #3400 added overlapping DTS comment-stripping helpers) and verify full main CI.

Local exact-head checks re-verified at ccc239812d7b:

  • python3 tools/testing/selftests/drivers/gpu/asahi-m4/test-thermal-policy.py: 23/23 unit tests + 571,828 C cooling trace rows + call-site/lease checks PASS.
  • python3 tools/asahi/clpc-gpu-demand-tests.py: PASS (including 6 t8132-dt-* negative controls, t8132_from_dt, check_t8132_busy).
  • python3 tools/asahi/clpc-high-power-cleanup-tests.py: PASS.
  • python3 scripts/dtc/apple-adt-coverage-test.py: 19/19 PASS.
  • make ARCH=arm64 LLVM=1 dt_binding_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/power/apple,pmc.yaml and CHECK_DTBS=y across all six apple/t8132-*.dtb: clean for power-management@382800000 / performance-controller@3, 0 new warnings.
  • KUnit (drivers/soc/apple/clpc.kunitconfig): 19/19 passed; (drivers/gpu/drm/asahi/.kunitconfig): 491 passed, 4 skipped, 0 failed.
  • Cross-build ARCH=arm64 LLVM=1 (defconfig + asahi.config, CONFIG_DRM_ASAHI_G16=y and CONFIG_APPLE_CLPC=y): full Image, modules, apple/t8132-j713.dtb, apple/t8132-j773g.dtb, drivers/soc/apple/clpc.o, drivers/gpu/drm/asahi/g16/glue.o, and drivers/gpu/drm/asahi/asahi_core.o built cleanly with 0 new warnings (0 warnings in changed files).
  • ./scripts/checkpatch.pl --git 206e5628ffd4..ccc239812d7b --no-tree: 0 errors (2 extern style warnings in drivers/gpu/drm/asahi/g16/glue.c matching the existing FFI declarations).
  • 2026-11-28 J713 (M4 MacBook Air, T8132, 27.2) batched verification (76649338a1bc, ccc239812d7b an ancestor; kernel SHA-256 e8e9fd2813dd6347176d0e4a55a70d1c694bdab75817c3ab83c441c203140491, Stage 2 SHA-256 f7d4e2f7ebbfb423bd71f233f1aef7af0a39091b288a749d25f9250eb80adbfa, DTB t8132-j713.dtb SHA-256 ceacf1d413c651396f4c1dfd9fa27b15c710dd849e46c2753fcff0a23a6681c6):
    • Parity: #3491's own diff against #3407 touches 8 files (6 runtime/DT + 2 host tests), while the 8/16 files (7/14 runtime files) blob-identical parity check measures the #3407+#3491 stack relative to main, with PR hunks present in all 7 remaining shared runtime files (g16/engine.rs, g16/poll.rs, g16/power/policy.rs, g17/{mod.rs,port.rs,sleep.rs}, clpc.c); tools/asahi/clpc-gpu-demand-tests.py reported DIFFERS(hunks not all present) in the batched tree (some hunks differed in the batched tree) and passed separately directly at ccc239812d7b.
    • Full 8-item smoke matrix PASS: eDP-1 2560x1664@60 enabled, input devices enumerated, wlan0 networking + 3x gateway ping PASS, protected audio sink via speakerguardd-v2 (sgv2.voicing tone rc 0), Borealis vulkaninfo + glmark2 (5,099), 0 failed units, 0 AppArmor denials, 0 clpc/asahi error lines.
    • Ladder classification PASS: paced vkcube (60 Hz) 102–123‰ level 0, glmark2 build 760–785‰ level 2, idle (before other load) last_vote 0x0 / dcs: state 0.
    • Caveats: with the active SSH session and Hyprland compositor present, the CPU floor (cluster cpu1: busy 80%) holds last_vote 0x35; the 2026-11-28 batched run did not repeat the power A/B (-740 mW PSTR on 1080p30 / -585 mW PSTR on 1080p60 came from the earlier J713 27.2 run on AC power with two external displays — eDP-1 + DP-1 + DP-3, bl=150, Hyprland — where all 6 runtime/DT files matched ccc239812d7b byte-for-byte).

Remaining open under **Not yet:**: retargeting to main before #3407 merges (and reconciling/verifying full main CI), a second-family aurora module non-regression smoke boot (J313 M1 or J716c M5 Max), and other T8132 / g16 SoCs not in the local lab.

@DjDeveloperr
DjDeveloperr changed the base branch from fix/clpc-gpu-busy-brief-idle to main November 30, 2026 23:11
@github-actions github-actions Bot added area:platform Area from CODEOWNERS (bot) merge-conflict Conflicts with the base branch (bot) labels Nov 30, 2026
Resolve clpc-gpu-demand-tests: share the DT parsing helpers between the T8132 cases from this branch and the T6050 cases from main, and run both negative-control sets. The T8132 DT case now expects the stepped CPU memory floor main gave T8132 (047f6b5); its GPU busy ladder is unchanged.

Signed-off-by: DjDeveloperr <[email protected]>

@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.

Verdict: HOLD at 44d22bf36fb3

Blockers:

  • Hosted CI at 44d22bf36fb3 is still queued (29 jobs queued: apple-build, dt-checks, host-tests, pr-text, readiness, and KUnit suites) — wait for all checks to complete green.

Checked:

  • Verified 44d22bf36fb3 (MERGEABLE against main, 16 files +796/-51) cleanly retargets onto main and reconciles tools/asahi/clpc-gpu-demand-tests.py to share DT parsing helpers between the T8132 cases and main's T6050 cases while updating the T8132 DT expectation for main's stepped CPU memory floor (047f6b5e17c2).
  • Confirmed runtime/DT files (g16 GPU busy-share reporting and t8132-memory.dtsi GPU busy ladder) remain intact with the previously verified J713 (T8132) 8-item smoke, ladder classification, and AVD video power A/B (-740 mW / -585 mW) evidence.
Evidence
  • Head: 44d22bf36fb311d962f1128c590f94b6a1005529 (base main, MERGEABLE).
  • Status checks at review time: 29 queued, 9 skipped, 0 failed.
  • Ready to approve once hosted CI completes green at 44d22bf36fb3 (parent #3407 is already approved).

RyanTheTide
RyanTheTide previously approved these changes Dec 1, 2026

@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.

Reviewed the conflict-pass merge commit 44d22bf only: clpc-gpu-demand-tests.py gains the T6050 gpu-busy parser for main's die0 node; DT negative controls extended to t6050. The resolution keeps what each side had and adds nothing outside the conflict. Approved for the merge-up; merging still waits on CI and the rows at this head.

@github-actions github-actions Bot added ci-failing A check failed at the PR head (bot) needs-hw-row No hardware row at the PR head (bot) and removed merge-conflict Conflicts with the base branch (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) labels Dec 1, 2026

@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.

Verdict: MERGE at 44d22bf36fb3

Converts this App's earlier review at the same head to an approval under the 12-01 merge bar (better than before and doesn't break; block only on a shown failure). No code blocker was found in it. The merge gate (a row on one Mac at this head + fast CI) is tracked by pr-readiness, not held here.

Checked: - Verified 44d22bf36fb3 (MERGEABLE against main, 16 files +796/-51) cleanly retargets onto main and reconciles tools/asahi/clpc-gpu-demand-tests.py to share DT parsing helpers between the T8132 cases and main's T6050 cases while updating the T8132 DT expectation for main's stepped CPU memory floor (047f6b5e17c2).

  • Confirmed runtime/DT files (g16 GPU busy-share reporting and t8132-memory.dtsi GPU busy ladder) remain intact with the previously verified J713 (T8132) 8-item smoke, ladder classification, and AVD video power A/B (-740 mW / -585 mW) evidence.

Follow-ups (not blocking): queued hosted CI

@github-actions github-actions Bot added the merge-conflict Conflicts with the base branch (bot) label Dec 1, 2026
Resolve tools/asahi/clpc-gpu-demand-tests.py against origin/main (#3407 and T8142 DT checks) by keeping T8132, T6050, and T8142 DT parsing and negative controls together with the brief-idle BusyShare and CLPC tests.

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

erikwb commented Dec 1, 2026

Copy link
Copy Markdown
Contributor Author

Updated feat/t8132-clpc-gpu-busy-ladder to 7b9c8f3baba2 by merging origin/main (19ee1b5bc9d5, including #3407 merge 43715890e29f):

  • Conflict resolution: g16/engine.rs, g16/poll.rs, g16/power.rs, g16/power/policy.rs, g16/glue.c, and arch/arm64/boot/dts/apple/t8132-memory.dtsi auto-merged cleanly, leaving only #3491's two feature commits (8d5353fe05d3, ccc239812d7b) and two merge commits (44d22bf36fb3, 7b9c8f3baba2) ahead of origin/main. Resolved the single conflict in tools/asahi/clpc-gpu-demand-tests.py by keeping parse_t8132_gpu_busy, parse_t6050_gpu_busy, and origin/main's parse_t8142_gpu_busy, unifying test_dt_negative_controls(dts_text, prefix, parser), and running t8132, t6050, and t8142 DT parsing and negative controls alongside #3407's brief-idle BusyShare and CLPC tests. Only tools/asahi/clpc-gpu-demand-tests.py changed relative to main + 44d22bf36fb3.
  • Host tests at 7b9c8f3baba2: tools/testing/selftests/drivers/gpu/asahi-m4/test-thermal-policy.py (23/23 Rust unit tests + 571,828 C trace rows + call-site wiring + lease/ENODATA checks), tools/asahi/clpc-gpu-demand-tests.py (t8132, t6050, t8142 DT parsing, 18 DT negative controls, 6 BusyShare negative controls, 23 policy negative controls), tools/asahi/clpc-high-power-cleanup-tests.py, scripts/dtc/apple-adt-coverage-test.py (19/19), and scripts/dtc/apple-agx-binding-test.py (7/7) all pass.
  • DT checks at 7b9c8f3baba2: make ARCH=arm64 LLVM=1 CHECK_DTBS=y across all six apple/t8132-*.dtb (j604, j623, j624, j713, j715, j773g) passes with 0 warnings on power-management@382800000 / performance-controller@3; fdtget on t8132-j713.dtb confirms apple,gpu-busy-memory-states = 1 2 4 5 0 0 0 3 and apple,gpu-busy-permille = 160 500 800 (prior dt_binding_check on apple,pmc.yaml also passed at 44d22bf36fb3).
  • KUnit at 7b9c8f3baba2: drivers/soc/apple/clpc.kunitconfig 20/20 passed (apple-clpc-gpu 15/15, apple-clpc-policy 5/5); drivers/gpu/drm/asahi/.kunitconfig 520 passed, 4 skipped, 0 failed (asahi_g17_idle_hold 17/17 passed).
  • Build & style at 7b9c8f3baba2: make ARCH=arm64 LLVM=1 W=1 drivers/gpu/drm/asahi/g16/glue.o drivers/gpu/drm/asahi/ builds cleanly with 0 warnings in drivers/gpu/drm/asahi/g16/; ./scripts/checkpatch.pl --strict --no-signoff on origin/main..7b9c8f3baba2 reports 0 errors (2 pre-existing extern prototype warnings in g16/glue.c; 613 lines checked). Prior full j713 arm64 Image.gz + modules + dtbs build also passed at 44d22bf36fb3.
  • J713 (M4 MacBook Air, T8132, 27.2 firmware) at 44d22bf36fb3 (Linux 7.3.0 from 429e7e15f122 with 44d22bf36fb3 merged, default command line; 7b9c8f3baba2 only changed tools/asahi/clpc-gpu-demand-tests.py relative to main + 44d22bf36fb3): boots with the ladder in the device tree; 0 failed units, 0 AppArmor denials, 0 oops/WARN; CLPC ladder 230-254 permille (level 1, vote 0x2) on a 720p60 test pattern, 731-1000 permille (vote 0x35) on heavy 4K scaling, idle vote 0x0.

Remaining before merge:

  • Hosted GitHub Actions CI green at 7b9c8f3baba2 (previous runs on 44d22bf36fb3 were cancelled after ~3.5 h in queue).
  • Post-merge J713 hardware check at 7b9c8f3baba2 (only tools/asahi/clpc-gpu-demand-tests.py changed relative to main + 44d22bf36fb3), a fresh AVD video power A/B, and a second-family asahi module smoke boot on J716c or J313.

@github-actions github-actions Bot added needs-review No approving review from Core or Omarchy Mac yet (bot) and removed area:platform Area from CODEOWNERS (bot) ci-failing A check failed at the PR head (bot) merge-conflict Conflicts with the base branch (bot) needs-hw-row No hardware row at the PR head (bot) labels Dec 1, 2026

@DjDeveloperr DjDeveloperr 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.

Reviewed publication and drain accounting, idle expiry, burst lift, and the CLPC vote release on sleep or fail-stop. Before merging, please verify the current head on J713 and run the shared g16 module on a second family. Hosted Apple build and KUnit are still pending.

@RyanTheTide

Copy link
Copy Markdown
Contributor

Merging at 7b9c8f3baba2 (B2 merge train, 12-01 merge bar). Approval at this head: DjDeveloperr. Row: the hardware row at 7b9c8f3 that the readiness check found (PR body or comment). CI: train L12 = main 645b086 + #3595 #3777 #3713 #3508 #3491: Apple build + DTBs pass, KUnit dcp-fabric/dcp-topology/dcp-display/prores/asahi pass, host tests apple-dcp/dcp/g16 93 ok; hosted reds at these heads = Ubuntu apt outage (Install the tools exit 100) or main's known ave/brcmf host-test fails Revert: git revert -m 1 <merge commit>.

@RyanTheTide
RyanTheTide merged commit cafee21 into main Dec 1, 2026
9 of 13 checks passed
@RyanTheTide
RyanTheTide deleted the feat/t8132-clpc-gpu-busy-ladder branch December 1, 2026 15:27
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:m4 Macs affected, from Merge risk (bot) ci-failing A check failed at the PR head (bot) door:two-way Revertible or not, from Merge risk (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants