Repository navigation
drm/asahi: g16: lower governed GPU floor from S3 to S2 - #3548
Conversation
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]>
There was a problem hiding this comment.
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: lowersFLOORfrom3(S3) to2(S2), preserving all governor ramp thresholds (>= 70%,>= 40%, 5 ms fast ramp) and thermal/user ceilings (S1).- Verified all
policy.rsunit tests parameterize onFLOOR(16 passed, 0 failedreported,checkpatch.pl0/0). - Exact-head J713 M4 Air isolated same-machine A/B at
34c952759432saves-116.9 mWPSTR (-162.3 mW3.8 V) at idle,-124.8 mWPSTR on 1080p30 AVD video, and-129.9 mWPSTR on 1080p60 AVD video (fps=60 drop=0 vdrop=0, CLPC memory rungs unchanged at0x01/0x02, 0 failed units). - Checked for Apple material, tool attribution, and private serials: clean;
MERGEABLEonmain; humanSigned-off-by;Tested:andRisk: two-way doorpresent.
Evidence
- Head:
34c95275(base: main,mergeable: MERGEABLE,+5/-3indrivers/gpu/drm/asahi/g16/power/policy.rs). - Hosted CI at
34c95275is currently queued.
|
code-owner ping <@422957901716652033> / @DjDeveloperr: merge train at |
|
Merge readiness at
Areas: Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
|
J615 (M3 Air, T8122), exact Linux #3548 head The live platform driver was 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: |
|
Head Local host and KUnit verification at
Hardware and CI status:
|
|
Landed exact head |
What: Lower the G16 governed GPU performance floor (
FLOOR) fromS3toS2(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 at34c952759432:T8132,G16G) at34c952759432(isolated same-machine A/B, default command line): saves-116.9 mWPSTR (-162.3 mW3.8 V rail) at idle,-124.8 mWPSTR (-125.9 mW3.8 V) on 1080p30 AVD video, and-129.9 mWPSTR (-137.3 mW3.8 V) on 1080p60 AVD video (mpvfps=60, drop=0, vdrop=0, CLPC memory rungs0x01/0x02unchanged);renderD128present,0failed units, same 9 error-level dmesg lines as baseline.T8122,aurora-g16) at exact head34c952759432: passed 4/4 offscreen Borealis Vulkan cases (compute.light/render.lightat queue depths 1 and 4), demand and effectiveS2at idle and post-workload, zero scoped GPU faults (J615 regression row).T8132) 2026-11-28 batched smoke run (76649338a1bc, carries#3548+#3491ing16/power/policy.rs, default command line pluspanic=10): full peripheral smoke matrix PASS (display, input enumeration, networking, protected audio sink viaspeakerguardd-v2, Borealisvulkaninfo/glmark2onApple M4 (G16G B0),0failed units,0AppArmor denials; see Evidence for hashes and dmesg).34c952759432:policy.rsunit tests (16/16),test-thermal-policy.py(22/22+571,828regression rows),asahi-m4host suites (26/26), ARM64 KUnit (491passed,4skipped,0failed), andcheckpatch.pl --strict(0/0/0) pass.Risk: two-way door · Macs using the G16 GPU backend (
apple,agx-t8132M4, plusapple,agx-t6030/apple,agx-t8122where bootloader handoff selectsg16).Revert:
git revert -m 1 <merge-commit>(orgit revert 34c952759432) restoresFLOOR = 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/J773gT8132,J516sT6030).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
FLOORwasS3(796 MHz on J713). LoweringFLOORtoS2(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 (includingS1at full cooling) remain unchanged. Theg16platform driver bindsapple,agx-t8132,apple,agx-t6030, andapple,agx-t8122(drivers/gpu/drm/asahi/g16/mod.rs);apple,agx-t6040(J616s) usesg17(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 failedpython3 tools/testing/selftests/drivers/gpu/asahi-m4/test-thermal-policy.py: 22/22 Rust unit tests + 571,828 C/Rust policy regression rows passedpython3 tools/testing/selftests/drivers/gpu/asahi-m4/run-host-tests.py: 26/26 host test suites passed (includingtest-perf.py12/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_testneedingCONFIG_UCLAMP_TASK, 3asahi_fwidtests)./scripts/checkpatch.pl --strict --git 34c952759432^..34c952759432: 0 errors, 0 warnings, 0 checksIsolated J713 M4 Air same-machine A/B (exact-head patch, identical HZ=1000 kernel with CLPC ladders, default command line)
FLOOR = S3(PSTR / 3.8 V /PP1b)FLOOR = S2(PSTR / 3.8 V /PP1b)5810.7 / 2112.1 / 27.1 mW5693.8 / 1949.8 / 25.0 mW-116.9 / -162.3 mW0x0057/606449.9 / 2566.4 / 150.6 mW6325.1 / 2440.5 / 129.2 mW-124.8 / -125.9 mW0x0156/60 (unchanged)7014.2 / 3072.0 / 251.7 mW6884.3 / 2934.7 / 211.6 mW-129.9 / -137.3 mW0x0258/60 (unchanged),mpvfps=60 drop=0 vdrop=0Boot regression check on J713:
renderD128present,0failed systemd units,9error-level dmesg lines (identical to baseline).J615 M3 Air (
T8122) second-board exact-head row (34c952759432)aurora-g16(signedauroramodule build ID04527088f869badd7318f9f1c81d04c72c3cca83, preserving the exactpolicy.rssource from34c952759432, one-shot combined with#3558and one PMU RTCs2idle): Borealis passedcompute.lightandrender.lightat queue depths 1 and 4 (4/4), G16 readback showed demand and effectiveS2at 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)34c952759432is an ancestor of76649338a1bc;g16/power/policy.rscarries 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 pluspanic=10.e8e9fd2813dd6347176d0e4a55a70d1c694bdab75817c3ab83c441c203140491, one-shot Stage 2 SHA-256f7d4e2f7ebbfb423bd71f233f1aef7af0a39091b288a749d25f9250eb80adbfa(default Stage 2 and kernel untouched).eDP-12560x1664@60enabled; no external monitor or dock attached), input (Apple MTP keyboard and trackpad enumerated, not exercised remotely), networking (wlan0connected, gateway ping 0% loss), permitted audio sink (speakerguardd-v2active, 1 s 440 Hz tone at-26 dBthrough protected default sink, rc0), GPU rendering (Borealisvulkaninfo --summaryApple M4 (G16G B0), Vulkan1.4.363,glmark2-es2-wayland --off-screenbuild/shading run4,684(build4,764fps,shading4,607fps) and separate build/texture smoke run5,099;aurora-g16statshealth: failed 0, render and computefailed 0),0failed systemd units,0AppArmor denials (no SELinux on this userland).dmesgexcerpt:[ 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-leveldmesg: 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 newbrcmfmac 0000:01:00.0: brcmf_pcie_ring_mb_update_rptr: ring 4: r_ptr 0 outside depth 0line at9.2 s; no PR in the batch touchesbrcmfmac, and the source of that line was not bisected.