Skip to content

drm/asahi: g16: lower governed GPU floor from S3 to S2 - #3548

Merged
RyanTheTide merged 1 commit into
mainfrom
feat/g16-gpu-floor-s2
Nov 29, 2026
Merged

RyanTheTide merged 1 commit into
mainfrom
feat/g16-gpu-floor-s2

Conversation

@erikwb

@erikwb erikwb commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

What: Lower the G16 governed GPU performance floor (FLOOR) from S3 to S2 (618 MHz vs 796 MHz on J713) so idle desktop and paced hardware-decoded video workloads rest at a lower GPU voltage state while keeping upward ramp behavior unchanged.
Tested: J713 (T8132) isolated A/B + J615 (T8122) exact-head Vulkan/S2 row + J713 batched smoke + host/KUnit at 34c952759432:

  • J713 (M4 Air, T8132, G16G) at 34c952759432 (isolated same-machine A/B, default command line): saves -116.9 mW PSTR (-162.3 mW 3.8 V rail) at idle, -124.8 mW PSTR (-125.9 mW 3.8 V) on 1080p30 AVD video, and -129.9 mW PSTR (-137.3 mW 3.8 V) on 1080p60 AVD video (mpv fps=60, drop=0, vdrop=0, CLPC memory rungs 0x01/0x02 unchanged); renderD128 present, 0 failed units, same 9 error-level dmesg lines as baseline.
  • J615 (M3 Air, T8122, aurora-g16) at exact head 34c952759432: passed 4/4 offscreen Borealis Vulkan cases (compute.light/render.light at queue depths 1 and 4), demand and effective S2 at idle and post-workload, zero scoped GPU faults (J615 regression row).
  • J713 (T8132) 2026-11-28 batched smoke run (76649338a1bc, carries #3548 + #3491 in g16/power/policy.rs, default command line plus panic=10): full peripheral smoke matrix PASS (display, input enumeration, networking, protected audio sink via speakerguardd-v2, Borealis vulkaninfo / glmark2 on Apple M4 (G16G B0), 0 failed units, 0 AppArmor denials; see Evidence for hashes and dmesg).
  • Host & KUnit at 34c952759432: policy.rs unit tests (16/16), test-thermal-policy.py (22/22 + 571,828 regression rows), asahi-m4 host suites (26/26), ARM64 KUnit (491 passed, 4 skipped, 0 failed), and checkpatch.pl --strict (0/0/0) pass.
    Risk: two-way door · Macs using the G16 GPU backend (apple,agx-t8132 M4, plus apple,agx-t6030 / apple,agx-t8122 where bootloader handoff selects g16).
    Revert: git revert -m 1 <merge-commit> (or git revert 34c952759432) restores FLOOR = 3 (S3) cleanly; no persistent disk, DT, or firmware state is written.
    Not yet: Hosted KUnit CI completion (some hosted KUnit jobs were still queued when checked); candidate-kernel SELinux-enforcing verification (the J615 row verified SELinux Enforcing after returning to the saved boot, and the local J713 runs Arch ARM without SELinux policy); other G16 boards/SoCs not tested here (J604/J773g T8132, J516s T6030).
Details

Because G16 firmware keeps the GPU powered while idle, the governed floor sets the resting p-state during idle desktop and light paced compositing. Previously FLOOR was S3 (796 MHz on J713). Lowering FLOOR to S2 (618 MHz on J713) reduces GPU rail power (PP1b) and overall 3.8 V SoC power at idle and during 1080p30/1080p60 hardware-decoded video playback without pushing GPU busy share into a higher CLPC memory rung or dropping frames.

All existing governor thresholds (>= 70% -> top, >= 40% -> +1, 5 ms fast ramp) and thermal/user ceilings (including S1 at full cooling) remain unchanged. The g16 platform driver binds apple,agx-t8132, apple,agx-t6030, and apple,agx-t8122 (drivers/gpu/drm/asahi/g16/mod.rs); apple,agx-t6040 (J616s) uses g17 (drivers/gpu/drm/asahi/driver.rs).

Evidence

Host & KUnit checks (34c952759432)

  • rustc --test --edition=2021 -Dwarnings drivers/gpu/drm/asahi/g16/power/policy.rs: 16 passed, 0 failed
  • python3 tools/testing/selftests/drivers/gpu/asahi-m4/test-thermal-policy.py: 22/22 Rust unit tests + 571,828 C/Rust policy regression rows passed
  • python3 tools/testing/selftests/drivers/gpu/asahi-m4/run-host-tests.py: 26/26 host test suites passed (including test-perf.py 12/12)
  • ./tools/testing/kunit/kunit.py run --arch=arm64 --make_options=LLVM=1 --kunitconfig=drivers/gpu/drm/asahi/.kunitconfig: 495 run, 491 passed, 4 skipped (apple_g17_rx_util_min_test needing CONFIG_UCLAMP_TASK, 3 asahi_fwid tests)
  • ./scripts/checkpatch.pl --strict --git 34c952759432^..34c952759432: 0 errors, 0 warnings, 0 checks

Isolated J713 M4 Air same-machine A/B (exact-head patch, identical HZ=1000 kernel with CLPC ladders, default command line)

Workload FLOOR = S3 (PSTR / 3.8 V / PP1b) FLOOR = S2 (PSTR / 3.8 V / PP1b) Delta (PSTR / 3.8 V) CLPC floor
Static idle 5810.7 / 2112.1 / 27.1 mW 5693.8 / 1949.8 / 25.0 mW -116.9 / -162.3 mW 0x00 57/60
1080p30 AVD video 6449.9 / 2566.4 / 150.6 mW 6325.1 / 2440.5 / 129.2 mW -124.8 / -125.9 mW 0x01 56/60 (unchanged)
1080p60 AVD video 7014.2 / 3072.0 / 251.7 mW 6884.3 / 2934.7 / 211.6 mW -129.9 / -137.3 mW 0x02 58/60 (unchanged), mpv fps=60 drop=0 vdrop=0

Boot regression check on J713: renderD128 present, 0 failed systemd units, 9 error-level dmesg lines (identical to baseline).

J615 M3 Air (T8122) second-board exact-head row (34c952759432)

  • Live platform driver aurora-g16 (signed aurora module build ID 04527088f869badd7318f9f1c81d04c72c3cca83, preserving the exact policy.rs source from 34c952759432, one-shot combined with #3558 and one PMU RTC s2idle): Borealis passed compute.light and render.light at queue depths 1 and 4 (4/4), G16 readback showed demand and effective S2 at idle and post-workload, zero scoped GPU faults; verified saved boot return with SELinux Enforcing and 0 failed units (J615 regression row).

J713 M4 Air (T8132) 2026-11-28 batched smoke run (76649338a1bc)

  • Composition: J713 default kernel source plus 10 PR heads (34c952759432 is an ancestor of 76649338a1bc; g16/power/policy.rs carries both #3548's and #3491's hunks, so the file differs from both individual heads). Separate from the isolated default-command-line J713 power A/B above. Default command line plus panic=10.
  • Hashes: booted kernel image SHA-256 e8e9fd2813dd6347176d0e4a55a70d1c694bdab75817c3ab83c441c203140491, one-shot Stage 2 SHA-256 f7d4e2f7ebbfb423bd71f233f1aef7af0a39091b288a749d25f9250eb80adbfa (default Stage 2 and kernel untouched).
  • Smoke matrix: display (eDP-1 2560x1664@60 enabled; no external monitor or dock attached), input (Apple MTP keyboard and trackpad enumerated, not exercised remotely), networking (wlan0 connected, gateway ping 0% loss), permitted audio sink (speakerguardd-v2 active, 1 s 440 Hz tone at -26 dB through protected default sink, rc 0), GPU rendering (Borealis vulkaninfo --summary Apple M4 (G16G B0), Vulkan 1.4.363, glmark2-es2-wayland --off-screen build/shading run 4,684 (build 4,764 fps, shading 4,607 fps) and separate build/texture smoke run 5,099; aurora-g16 stats health: failed 0, render and compute failed 0), 0 failed systemd units, 0 AppArmor denials (no SELinux on this userland).
  • Redacted dmesg excerpt: [ 2.551701] aurora-g16 302600000.gpu: G16: probing, [ 2.612688] aurora-g16 302600000.gpu: G16: 27.2 host block published, scratch 0x9f7d2257, [ 2.884802] aurora-g16 302600000.gpu: G16: firmware at READY, starting the backend.
  • err-level dmesg: logged the three baseline lines from the default kernel (apple-dcp 30ae00000.dcp: AFK[ep:20]: failed to extract init props: -2, unsupported DFB layout 2560x1664 format=0x62336138 compression=3 (-22), apple_sep ... matching unavailable this boot) plus one new brcmfmac 0000:01:00.0: brcmf_pcie_ring_mb_update_rptr: ring 4: r_ptr 0 outside depth 0 line at 9.2 s; no PR in the batch touches brcmfmac, and the source of that line was not bisected.

G16 currently sets its governed GPU floor to S3 (796 MHz on J713).
Because G16 firmware keeps the GPU powered while idle, resting at S3
holds a higher GPU voltage rail at idle and during paced video playback.

Lower FLOOR from S3 to S2 (618 MHz on J713). Same-machine A/B on J713
saves ~117 mW PSTR (~162 mW 3.8 V rail) at idle, ~125 mW PSTR on
1080p30 AVD video, and ~130 mW PSTR on 1080p60 AVD video while keeping
CLPC memory states on the same lowest rungs (0x01 / 0x02) and ramping
up to top state under sustained load unchanged.

Signed-off-by: Erik Bourget <[email protected]>
@erikwb
erikwb requested review from a team and DjDeveloperr as code owners November 28, 2026 16:09

@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 34c95275

Blockers: none (wait for the queued CI checks at 34c95275 to finish green before merging).

Checked:

  • drivers/gpu/drm/asahi/g16/power/policy.rs: lowers FLOOR from 3 (S3) to 2 (S2), preserving all governor ramp thresholds (>= 70%, >= 40%, 5 ms fast ramp) and thermal/user ceilings (S1).
  • Verified all policy.rs unit tests parameterize on FLOOR (16 passed, 0 failed reported, checkpatch.pl 0/0).
  • Exact-head J713 M4 Air isolated same-machine A/B at 34c952759432 saves -116.9 mW PSTR (-162.3 mW 3.8 V) at idle, -124.8 mW PSTR on 1080p30 AVD video, and -129.9 mW PSTR on 1080p60 AVD video (fps=60 drop=0 vdrop=0, CLPC memory rungs unchanged at 0x01/0x02, 0 failed units).
  • Checked for Apple material, tool attribution, and private serials: clean; MERGEABLE on main; human Signed-off-by; Tested: and Risk: two-way door present.
Evidence
  • Head: 34c95275 (base: main, mergeable: MERGEABLE, +5/-3 in drivers/gpu/drm/asahi/g16/power/policy.rs).
  • Hosted CI at 34c95275 is currently queued.

@RyanTheTide

Copy link
Copy Markdown
Contributor

code-owner ping <@422957901716652033> / @DjDeveloperr: merge train at 34c95275. App approved (NEON-PR-REVIEW2). J713 exact-head PASS; the G16 governor is shared with the J616s/J773g, so one G16 S/G row at this head is needed (J616s idle + glmark2 short, 0 GPU faults). Merges under the 6-point rule after that and green CI, unless you object.

@github-actions github-actions Bot added area:gpu Area from CODEOWNERS (bot) blast:m3 Macs affected, from Merge risk (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 34c95275: not ready yet

Check Detail
CI at head running running: pr-text / pr-text, KUnit macsmc, KUnit clpc, KUnit apple-spmi-nvmem, KUnit trusted-keys
Review no needs one approving review from Core or Omarchy Mac (not the author)
Requested changes ok none
Hardware row at head ok in the PR body at 34c95275
Conflicts ok none
PR text ok Risk: two-way · Macs using the G16 GPU backend (apple,agx-t8132 M4, plus apple,agx-t6030 / apple,agx-t8122 where bootloader handoff selects g16). Revert: git revert -m 1 <merge-commit> (or git revert 34c952759432) restores FLOOR = 3 (S3) cleanly; no persistent disk, DT, or firmware state is written.

Areas: area:gpu

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

@RyanTheTide

RyanTheTide commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

J615 (M3 Air, T8122), exact Linux #3548 head 34c95275943262ff0d3b9a824703cc329428a4da — PASS.

The live platform driver was aurora-g16. The exact J615 trial boot passed the SELinux Enforcing and zero failed-unit checks before the workloads. Its retained kernel journal also records the transition to enforcing. The signed aurora module loaded with build ID 04527088f869badd7318f9f1c81d04c72c3cca83 and preserved the exact policy source from this head. Borealis on the native Apple renderer passed compute.light and render.light at queue depths 1 and 4 (4/4). The G16 readback showed demand and effective S2 at idle and again after the workload, with no scoped GPU faults.

The single signed one-shot also covered #3558 and one PMU RTC s2idle. Verified the saved Edge boot, original Stage 2 and command line, empty next entry, GRUB boot success 1, SELinux Enforcing and zero failed units after return. Removed the one-shot files. This is the independent T8122 G16 path alongside J713 T8132.

Lab evidence: traces/ci/20261129-j615-3548-3558.

@erikwb

erikwb commented Nov 28, 2026

Copy link
Copy Markdown
Contributor Author

Head 34c952759432 merges cleanly onto origin/main (0 conflicts via git merge-tree) with no code changes needed.

Local host and KUnit verification at 34c952759432:

  • rustc --test --edition=2021 -Dwarnings drivers/gpu/drm/asahi/g16/power/policy.rs: 16/16 passed.
  • python3 tools/testing/selftests/drivers/gpu/asahi-m4/test-thermal-policy.py: 22/22 unit tests and 571,828 regression rows passed.
  • python3 tools/testing/selftests/drivers/gpu/asahi-m4/run-host-tests.py: 26/26 host suites passed.
  • ARM64 KUnit (drivers/gpu/drm/asahi/.kunitconfig): 495 run, 491 passed, 4 skipped (apple_g17_rx_util_min_test needing CONFIG_UCLAMP_TASK, plus 3 asahi_fwid tests).
  • ./scripts/checkpatch.pl --strict --git 34c952759432^..34c952759432: 0 errors, 0 warnings, 0 checks.

Hardware and CI status:

  • Preserved the exact-head J615 (T8122, aurora-g16) pass from the J615 regression row (4/4 offscreen Borealis Vulkan cases, demand/effective S2 at idle and post-workload, zero scoped GPU faults, saved boot verified SELinux Enforcing after return) as the second G16 board/family row alongside J713 (T8132).
  • Added a separate 2026-11-28 J713 batched smoke run (76649338a1bc, where g16/power/policy.rs carries both #3548 and #3491, default command line plus panic=10; kernel SHA-256 e8e9fd2813dd6347176d0e4a55a70d1c694bdab75817c3ab83c441c203140491, one-shot Stage 2 SHA-256 f7d4e2f7ebbfb423bd71f233f1aef7af0a39091b288a749d25f9250eb80adbfa): full peripheral smoke matrix passed on Borealis Apple M4 (G16G B0) (glmark2 4,684 build/shading run and 5,099 build/texture smoke run, aurora-g16 failed 0, 0 failed units, 0 AppArmor denials). The batched boot logged the three baseline err lines plus one new brcmfmac ring error (r_ptr 0 outside depth 0); no PR in the batch touches brcmfmac, and it was not bisected.
  • The PR description now carries **Revert:**, the local host/KUnit results, both J713 runs (keeping the earlier isolated default-command-line power A/B separate from the batched smoke run), and the preserved J615 row. The reviewer's hosted KUnit CI condition remains open while queued hosted KUnit jobs complete, and candidate-kernel SELinux-enforcing verification plus untested G16 boards (J604/J773g/J516s) remain tracked under **Not yet:**.

@github-actions github-actions Bot added the ci-failing A check failed at the PR head (bot) label Nov 28, 2026
@github-actions github-actions Bot removed the ci-failing A check failed at the PR head (bot) label Nov 29, 2026
@RyanTheTide

RyanTheTide commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

Landed exact head 34c952759432 at 06cce2ac58d8. The independent review App approved this head. Apple build, host checks, the complete Apple KUnit matrix and PR-text passed. The J713 T8132 power/video and smoke rows and the signed J615 T8122 Vulkan and S2 rows passed. The code owner was notified more than one hour before merge, with no outstanding blocking review. The preview on b6db145c67d2 preserves the tested G16 source. Revert with git revert -m 1 06cce2ac58d83a5bf019b0ee19a14db155bfa925.

@RyanTheTide
RyanTheTide merged commit 06cce2a into main Nov 29, 2026
22 of 26 checks passed
@RyanTheTide
RyanTheTide deleted the feat/g16-gpu-floor-s2 branch November 29, 2026 01:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:gpu Area from CODEOWNERS (bot) blast:m3 Macs affected, from Merge risk (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)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants