Skip to content

soc: apple: clpc / drm/asahi: g17: hold the low-power target with the CPUs and the GPU (J813/J815) - #3646

Merged
RyanTheTide merged 4 commits into
aurora-silicon:mainfrom
m0d16l14n1:j815/t8142-lpm-limit
Dec 2, 2026
Merged

RyanTheTide merged 4 commits into
aurora-silicon:mainfrom
m0d16l14n1:j815/t8142-lpm-limit

Conversation

@m0d16l14n1

@m0d16l14n1 m0d16l14n1 commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

What: on the M5 MacBook Airs (J813, J815) the low-power platform profile is only a CPU ceiling. This makes it also hold a power reading at the machine's Low Power target, with the CPU ceilings and (where the DT opts in with apple,low-power-gpu-cap) a cap on the GPU's power budget, as the profile already does with PHPC on T6050. The DT names the SMC reading (apple,power-key-id, PHPC by default); J813/J815 use PPSM, because PHPC and the SMC's package keys do not follow the load there under Linux. The target comes from the ADT through the boot loader (aurora-silicon/aura#580).
Tested: J815 (MacBook Air 15" M5), this series on j815/nightly4 6c8d964c01f1 (main 37a19f9 + #2549 + other open PRs) with aurora-silicon/aura#580 (target 5000 mW from the ADT): Power Saver through powerprofilesctl holds PPSM at 4.95 W under an all-core load (Balanced 23.1 W), 4.54 W under vkcube with the CPU ceilings untouched, 4.91 W with both (Balanced 22.8 W); one deep sleep in Power Saver under load woke OK and kept holding (4.72 W); 0 new kernel errors, 0 failed units, 0 suspend failures. Hardware at f99c021; ed8b0229 adds the apple,low-power-gpu-cap opt-in (set on J813/J815, so their behaviour is the same), drops the cap on CLPC unbind and updates the host tests (clpc-gpu-demand, clpc-high-power-cleanup, g17-m5-governor-stop and its 3 mutations pass locally).
Risk: two-way door. J813/J815 through their DT (and the loader PR); boards without apple,power-key-id keep PHPC. Other boards are unchanged: the GPU cap needs apple,low-power-gpu-cap, which only J813/J815 set, so T6050 keeps stepping only its CPU clusters. The cap and the ceilings only ever lower the clocks and the budget; Balanced and Performance are unchanged.
Not yet: J813; a J815 run at ed8b0229 (same DT behaviour); more sleep cycles (one so far). One idle PPSM snapshot of 656 W was seen once in debugfs (the samples around it are normal); it costs one step and is being looked at.

Details

Why PPSM. On J815 under Linux, PHPC reads ~30 mW at any load, and PZC0/PZC1 (package power under macOS) read 0 in every boot snapshot we have (83 boots). PPSM is live (1.9 to 17 W across those snapshots) and updates once a second. Measured on J815 under macOS, sampling all P* keys every 250 ms through a mixed CPU/GPU run of about 7 minutes, PPSM follows PZC0 with r = 0.989 (PPSM - PZC0: median 0.7 W at 4-6 W, 1.4 W at idle, 2.3 W above 10 W). Holding PPSM at the target is therefore somewhat stricter than holding the package figure; no offset is added.

Commits.

  1. dt-bindings: apple: clpc: apple,power-key-id in both bindings that carry a CLPC node, and apple,low-power-mw in apple,pmc.yaml.
  2. soc: apple: clpc:
    • the key from the DT; the GPU cap only with apple,low-power-gpu-cap;
    • no 100 ms polling without an SMC to read (a target alone keeps the static ceiling);
    • the GPU cap: it starts at the target, takes each step down first while the GPU is active (down to a quarter of the target), and gets its steps back last, after the CPU clusters; exported as apple_clpc_gpu_power_cap(), 0 outside the power-limited profile;
    • a clean restart after a sleep (ceilings and cap from their start, first reading after the wake counts); unbinding drops the cap (the GPU's reference outlives the CLPC);
    • debugfs shows the key, the target and the cap;
    • KUnit: a case for the cap's steps, and the queue case updated for the SMC requirement.
  3. drm/asahi: g17: M5: the cap is a ceiling on the Region C host power budget while the GPU is busy, with or without the thermal controller; an idle GPU goes back to its maximum. The cap is not raised to the thermal controller's floor. The governor also publishes again when the word no longer holds its last budget (e.g. after the init data is written again on a wake).
  4. arm64: dts: apple: t8142-j813-j815: apple,smc, apple,power-key-id = "PPSM" and apple,low-power-gpu-cap on the CLPC node, so both Airs get it.

Front ends. The profile is the existing apple-clpc platform profile, so KDE, GNOME and powerprofilesctl switch it through power-profiles-daemon: Power Saver = low-power. Distro kernels without ACPI also need #2549 for the class to exist. power-profiles-daemon builds that only read /sys/firmware/acpi/platform_profile need the class-device patch the alarm package carries.

Related. #3488 (skip idle clusters on the step down) is complementary: with this PR a GPU load takes its steps on the GPU first where the DT opts in. A board such as T6050 can opt in later with its own hardware row (#3450).

Deep sleep. The CLPC already halts on suspend and the device link to the SMC orders it before the SMC. On resume the low-power loop now starts again from its ceiling. Nothing is written to the SMC or the PMP.

Evidence

J815 hardware run (Power Saver = low-power, target 5000 mW, P ceiling 2220 MHz; PPSM sampled once a second from the CLPC's debugfs):

ppd       powerprofilesctl power-saver -> low-power, balanced -> balanced (PlatformDriver platform_profile)
reading   1 new PPSM reading/s; Balanced idle 2.16 W -> all-core load 24.1 W
cpu       10 x yes, 40 s: median (last 20 s) 4946 mW vs Balanced 23091 mW; the two clusters' ceilings 1608 / 1584 MHz
gpu       vkcube: 4.7 -> 6.8 W, cap 5000 -> 1250 mW in 6 s, median 4542 mW; CPU ceilings stay 2220 / 2352 MHz
mix       both: median 4909 mW vs Balanced 22842 mW; cap 1250 mW first, then ceilings 1308 / 1152 MHz
sleep     deep sleep under load in Power Saver: woke OK (PMU alarm, 24.9 s), still low-power, readings resumed, median 4720 mW
regress   0 new err/crit kernel lines, 0 failed units, suspend_stats fail 0

GPU phase, seconds 9-15 (power / cap, mW): 4925/5000 5012/4375 5950/3750 6846/3125 5732/2500 5637/1875 5656/1250

J815, Linux, macsmc-hwmon key dump at boot (mW), newest boots:

boot      PHPC  PZC0  PZC1  PPSM  PSTR
ff95f30f    28     0     0  4044  10823
a13cdf81    27     0     0  2117   8399
(all 83 snapshots: PZC0 = PZC1 = 0; PPSM min 1923, median 2986, max 17104)

J815, macOS, 250 ms SMC samples over the run (1650 samples): corr(PZC0, PPSM) 0.989, corr(PZC0, PHPS) 0.999, PHPC 0.02-0.04 W throughout.

Build (Docker, LLVM 19, Rust 1.99):

CONFIG_RUST=y CONFIG_DRM_ASAHI=m CONFIG_DRM_ASAHI_M5=y CONFIG_APPLE_CLPC=y CONFIG_ACPI_PLATFORM_PROFILE=y
clpc.o W=1: rc 0, no warnings    dtbs: rc 0    drivers/gpu/drm/asahi/: rc 0 (RUSTC [M] asahi_core.o), no warnings in the touched files

@m0d16l14n1

Copy link
Copy Markdown
Contributor Author

@sithglan @gig3m: this is ready for testing. Would you have a few minutes to try it on a J813 (or J815)? It needs this PR and aurora-silicon/aura#580 (the loader passes the target). Thank you!

cat /sys/class/platform-profile/*/name                 # apple-clpc
powerprofilesctl set power-saver                       # or Power Saver in KDE / GNOME
sudo grep -A1 '^profile:' /sys/kernel/debug/*/status   # "power key PPSM target <N> mW gpu cap ..."
for i in $(seq 10); do yes > /dev/null & done          # then vkcube, then both
watch -n1 "sudo grep '^profile:' /sys/kernel/debug/*/status"   # power should settle near the target
killall yes; powerprofilesctl set balanced

A suspend/resume in Power Saver with the profile still low-power afterwards would help too. The target <N> and the numbers you see are the interesting part (J815 holds 5000 mW: 4.95 W all-core vs 23 W in Balanced).

@github-actions github-actions Bot added area:bringup Area from CODEOWNERS (bot) area:gpu Area from CODEOWNERS (bot) area:platform Area from CODEOWNERS (bot) blast:m5 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) needs-review No approving review from Core or Omarchy Mac yet (bot) labels Nov 30, 2026
@github-actions

github-actions Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

Merge readiness at 6fe3caf3: ready to merge

Check Detail
CI at head ok 11 checks passed
Review ok approved by DjDeveloperr
Requested changes ok none
Hardware row at head ok comment at 6fe3caf3
Conflicts ok none
PR text ok Risk: two-way · . J813/J815 through their DT (and the loader PR); boards without apple,power-key-id keep PHPC. Other boards are unchanged: the GPU cap needs apple,low-power-gpu-cap, which only J813/J815 set, so T6050 keeps stepping only its CPU clusters. The cap and the ceilings only ever lower the clocks and the budget; Balanced and Performance are unchanged.

Areas: area:bringup, area:gpu, area:platform
Merge: gh pr merge 3646 --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.

@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: CHANGES_REQUESTED at f99c021e

Blockers:

  1. PR-introduced host-tests CI failures (6 failures across 3 harnesses in run 46296641487):
    • tools/asahi/clpc-gpu-demand-tests.py and tools/asahi/clpc-high-power-cleanup-tests.py: fail to compile with implicit declaration of function 'apple_clpc_power_limited' because the sliced apple_clpc_sample() and apple_clpc_profile_set() now call apple_clpc_power_limited(). Include apple_clpc_power_limited() in both harnesses.
    • tools/asahi/g17-m5-governor-stop-tests.py (base + all 3 mutations): fails to compile with error[E0609]: no field 'port' on type '&mut Firmware' at let cap = self.port.power_cap_mw();, and --mutation drop-ineligible-restore fails with AssertionError: mutation drop-ineligible-restore does not apply because self.governor.restore() was updated to self.governor.restore_capped(cap). Update the harness's mock Firmware and mutation target to match.
  2. Stale GPU power cap on CLPC provider removal (drivers/soc/apple/clpc.c): apple_clpc_stop() withdraws CPU max_qos ceilings, clears SMC high-power mode, and detaches clpc->gpu->wake = NULL, but never zeroes clpc->gpu->cap_mw. Because struct apple_clpc_gpu is reference-counted and outlives CLPC unbind while asahi holds its reference, unbinding apple-clpc while low-power is active leaves apple_clpc_gpu_power_cap() returning the last non-zero cap indefinitely. Clear WRITE_ONCE(clpc->gpu->cap_mw, 0) in apple_clpc_stop() after apple_clpc_halt(clpc) (and cover it in apple_clpc_gpu_provider_removal_test / apple_clpc_gpu_cap_test).
  3. Untested behavior change on T6050 (drivers/gpu/drm/asahi/g17/mod.rs, g17/thermal.rs): On T6050, thermal::enabled() is true and apple,low-power-mw is set, so Governor::tick() now applies cap_mw to the GPU budget before stepping CPU clusters (explicitly listed as untested under Risk: / Not yet:). Please add a T6050 hardware row exercising low-power under GPU load (and confirming balanced / idle restore back to calibrated max), plus an exact-head J815/J813 row after updating the PR.

Checked:

  • DT bindings (Documentation/devicetree/bindings/power/apple,pmc.yaml, apple,clpc.yaml) and arch/arm64/boot/dts/apple/t8142-j813-j815.dtsi: apple,power-key-id regex (^[A-Za-z0-9#!]{4}$), apple,low-power-mw, and apple,smc = <&smc> pass dt-checks.
  • drivers/soc/apple/clpc.c & include/linux/soc/apple/clpc.h: apple_clpc_power_limited() avoids 100 ms polling without an SMC, apple_clpc_gpu_cap_down() / apple_clpc_gpu_cap_up() step GPU cap down first (1/8 steps down to 1/4 target) while active and restore it after CPU ceilings, apple_clpc_resume() resets power_mw = -1, cluster max_khz = 0, and active gpu->cap_mw = low_power_mw, and !CONFIG_APPLE_CLPC inline stub returns 0.
  • drivers/gpu/drm/asahi/g17/{clpc.c,clpc.h,mod.rs,port.rs,power.rs,thermal.rs}: FFI wiring is NULL-safe (gpu ? READ_ONCE(gpu->cap_mw) : 0), Governor::set_maximum() marks self.unpublished = true when Region C diverges from self.budget_mw (e.g., after wake/recovery), Governor::capped() applies cap_mw down to STEP_MW without lifting to FLOOR_MW, and both thermal::enabled() and !thermal::enabled() paths release the cap when idle.
  • CI at f99c021e: apple-build, dt-checks, rust-build, source, pr-text, DWC3/ATC matrix, and all KUnit suites (including KUnit clpc and KUnit asahi) passed; only host-tests failed (826/837).
Evidence
  • Diff reviewed: linux#3646 at f99c021e46cbd1aaa456af895b5384d966755d42 (+309/-32, 11 files, 4 commits, MERGEABLE on main).
  • Failing host-tests job (run 46296641487, job 141526587268, 826/837):
    • PR-introduced (6): clpc-gpu-demand-tests, clpc-high-power-cleanup-tests, g17-m5-governor-stop-tests (base + 3 mutations).
    • Unrelated to this PR (5): apple-scaler-recovery-tests, g17-output-fence-tests (base + 3 mutations).
  • Nit (non-blocking): in apple_clpc_gpu_cap_down(), min_cap = clpc->low_power_mw / APPLE_CLPC_GPU_CAP_MIN_DIV could evaluate to 0 if a synthetic DT ever supplied low_power_mw < 4, causing READ_ONCE(gpu->cap_mw) ?: clpc->low_power_mw to re-initialize the cap on the next tick; max(clpc->low_power_mw / APPLE_CLPC_GPU_CAP_MIN_DIV, 1U) avoids that edge case cleanly.

@github-actions github-actions Bot added needs-hw-row No hardware row at the PR head (bot) and removed ci-failing A check failed at the PR head (bot) labels Nov 30, 2026
@m0d16l14n1

Copy link
Copy Markdown
Contributor Author

Thanks for the review. Addressed in ed8b0229 (folded into the four commits):

  1. host-tests: clpc-gpu-demand-tests and clpc-high-power-cleanup-tests slice apple_clpc_power_limited() (the cleanup harness only when the source has it, so --old-ref still compiles); the low-power polling case now expects no polling for a target without an SMC and polling with one. g17-m5-governor-stop-tests has a Port with power_cap_mw() in its mock Firmware, and drop-ineligible-restore targets restore_capped(cap) (falling back to restore() for older sources). Locally: both C harnesses pass, the governor harness passes and each of its 3 mutations fails.
  2. Stale cap on unbind: apple_clpc_stop() clears gpu->cap_mw after apple_clpc_halt(); the cleanup harness asserts it. Nit taken too: min_cap is at least 1.
  3. T6050: the GPU cap is now opt-in through a new boolean DT property, apple,low-power-gpu-cap (both bindings), set only in t8142-j813-j815.dtsi. T6050 keeps stepping only its CPU clusters, so no T6050 row is needed for this PR; KUnit covers the property-off case. The J815 row is at f99c021; behaviour there is unchanged by ed8b0229 (the property is set), and a run at the new head will follow.

@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 ed8b022d for the refreshed J815/J813 row. The source now clears the cap on provider stop and gates GPU capping on the DT property. The harness updates cover the provider cleanup and the new Rust and C interfaces. No failed hosted checks were visible on this head. Record the current-head hardware result or maintainer acceptance of equivalence before landing.

@sithglan

Copy link
Copy Markdown
Contributor

Hardware row at ed8b022d — MacBook Air 13-inch (M5, J813, T8142): PASS (kernel side; see loader note below).

  • Setup: One-shot aura-try trial boot of 7.3.0-aurora-j813-pr3646+ built from exact head ed8b022d99ae with CONFIG_EFI=y, CONFIG_ACPI=y, CONFIG_ACPI_PLATFORM_PROFILE=y, CONFIG_APPLE_CLPC=y, CONFIG_DRM_ASAHI=m, CONFIG_DRM_ASAHI_M5=y.
    • Loader note: This J813's enrolled Stage 1 (1.0.0b12-g693083b4-dirty) uses direct boot= rather than Stage 2 chainload, so aurora-silicon/aura#580 could not be chainloaded without modifying Stage 1/1TR. To exercise the full kernel path on J813, apple,low-power-frequency-max-mhz = <2220> (from J813's ADT) and apple,low-power-mw = <5000> were injected into the trial t8142-j813.dtb via fdtput alongside this PR's apple,power-key-id = "PPSM" and apple,low-power-gpu-cap.
  • Platform profile & debugfs:
    • /sys/class/platform-profile/platform-profile-0/name: apple-clpc
    • choices: low-power balanced performance
    • /sys/kernel/debug/382700000.power-management:performance-controller@1/status: power key PPSM target 5000 mW
  • Measurements (external displays/hubs attached, so PSTR total system power is ~9.1 W at idle; PPSM sampled 1/s from CLPC debugfs in low-power):
    • balanced idle (5 s): PSTR median 9,106 mW
    • balanced all-core CPU (10 x yes, 15 s): PSTR median (last 10 s) 34,478 mW
    • low-power all-core CPU (10 x yes, 35 s): PPSM dropped 18,427 -> 4,704 mW median (last 20 s), PSTR 13,186 mW (-21.3 W vs balanced), GPU cap 1250 mW, CPU ceilings settled at 1932 / 1584 MHz
    • low-power GPU-only (vkcube --present_mode 0 on wayland-1, 25 s): PPSM started at 9,456 mW; GPU cap stepped first 5000 -> 3750 -> 3125 -> 2500 -> 1875 -> 1250 mW in 5 s while CPU ceilings stayed untouched at 2220 / 2352 MHz, then CPU ceilings stepped down to hold near target (PSTR 19.4 -> 13.9 W, PPSM median last 15 s 5,379 mW, cycling 3.7–5.5 W)
    • low-power mixed CPU + GPU (10 x yes + vkcube --present_mode 0, 30 s): PPSM median (last 15 s) 4,838 mW, PSTR 13,055 mW vs balanced mixed 36,780 mW (-23.7 W), GPU cap 1250 mW, CPU ceilings 1608 / 1584 MHz
    • Deep sleep under load (10 x yes in low-power, t8142_wake_s=15, echo mem > /sys/power/state): woke cleanly after 15 s (suspend_stats/success=1, fail=0), profile remained low-power, ceilings restarted from 2220 / 2352 MHz on t=1s and stepped cleanly to 1932 / 1992 MHz by t=3s, holding PPSM at 4,727 mW median (t=4..18s).
  • Regressions: 0 failed systemd units, 0 new err/crit/alert/emerg kernel log lines before/after workloads and deep sleep. Returned cleanly to default kernel.

@github-actions github-actions Bot removed the needs-hw-row No hardware row at the PR head (bot) label Nov 30, 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 ed8b022d99ae

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: Code reviewed in the earlier App review at this head (6108232146).

Follow-ups (not blocking): current-head J815/J813 row or maintainer equivalence acceptance

@github-actions github-actions Bot added merge-conflict Conflicts with the base branch (bot) and removed merge-conflict Conflicts with the base branch (bot) labels Dec 1, 2026
The low-power platform profile holds an SMC power reading at
apple,low-power-mw. That reading has always been PHPC, which does not
carry the package power on every machine: on the M5 MacBook Airs it reads
about 30 mW at any load.

Add apple,power-key-id, the four-character SMC key of the reading (PHPC
when absent), and apple,low-power-gpu-cap, which lets the limit cap the
GPU's power budget first, and describe apple,low-power-mw in both
bindings that carry a CLPC node, as the boot loader passes it from the
ADT.

Signed-off-by: Nick <nekreshen@yandex.ru>
The low-power profile's power loop read PHPC and stepped only the CPU
clusters. Where PHPC does not follow the package power there is nothing
to hold, and a GPU load above the target walks the CPU clusters down to
their lowest state while the GPU keeps its whole budget.

- Read the SMC key the node names in apple,power-key-id (PHPC by
  default, so existing boards read what they read before).
- Poll only with an SMC to read: a target without apple,smc keeps the
  static ceiling and queues no 100 ms work.
- With apple,low-power-gpu-cap, give the GPU a share of the steps
  through its CLPC input: a cap that
  starts at the target, takes each step down first while the GPU is
  active, down to a quarter of the target, and gets its steps back last,
  after the CPU clusters. apple_clpc_gpu_power_cap() returns it to the
  GPU driver, 0 outside the power-limited low-power profile and on
  boards without the property, which keep stepping only the CPUs.
  Unbinding the CLPC drops the cap, as the GPU's reference outlives it.
- After a sleep, start again from the ceiling and the cap's start, and
  act on the first reading after the wake.
- debugfs shows the key, the target and the cap.
- Host tests: the sliced sample and profile code calls
  apple_clpc_power_limited(); a target polls only with an SMC; stop
  drops the cap.

Signed-off-by: Nick <nekreshen@yandex.ru>
The CLPC's low-power profile hands the GPU a power cap
(apple_clpc_gpu_power_cap()). Apply it to the host power budget word in
Region C while the GPU is busy, as a ceiling on whatever the budget
governor would publish, with or without the thermal controller. An idle
GPU goes back to the calibrated maximum as before. The cap is not raised
to the thermal controller's own floor: it limits the whole GPU for the
platform, not the controller's output range.

The governor stop host test gets the port's cap.

The governor also publishes again when the budget word no longer holds
the last published budget, as after the firmware's initialization data
is written again on a wake or a recovery.

Signed-off-by: Nick <nekreshen@yandex.ru>
The MacBook Airs' low-power profile has only its CPU ceiling. Give the
CLPC the SMC and name PPSM as the power reading to hold: the SoC power
the SMC measures, updated once a second and live under Linux. PHPC reads
about 30 mW at any load here, and the SMC's package power keys (PZC0,
PZC1) read 0 under Linux. On J815 PPSM follows the package power within
about 1 W under load (correlation 0.99 over a 7-minute mixed CPU/GPU
run).

With a boot loader that passes the ADT's Low Power target as
apple,low-power-mw, the profile holds PPSM at it with the CPU ceilings
and the GPU cap (apple,low-power-gpu-cap: a GPU load takes the limit
on the GPU's budget first). Without it only debugfs changes: it shows
the reading.

Signed-off-by: Nick <nekreshen@yandex.ru>
@m0d16l14n1
m0d16l14n1 force-pushed the j815/t8142-lpm-limit branch from ed8b022 to 6fe3caf Compare December 2, 2026 03:56
@m0d16l14n1

Copy link
Copy Markdown
Contributor Author

Rebased onto main (6c83a2a64539) to resolve the merge conflicts in clpc.c, g17/, and t8142-j813-j815.dtsi (head 6fe3caf3799b). No functional changes from ed8b022d.

  • Re-verified in container (ARCH=arm64 LLVM=1 W=1): drivers/soc/apple/clpc.o (plain + CONFIG_KUNIT=y), drivers/gpu/drm/asahi/, apple/t8142-j813.dtb, apple/t8142-j815.dtb — 0 errors, 0 new warnings.
  • Host tests: clpc-gpu-demand-tests.py, clpc-high-power-cleanup-tests.py (including --old-ref 677be395 negative control), and all g17-*.py harnesses — PASS.

@github-actions github-actions Bot added needs-hw-row No hardware row at the PR head (bot) and removed merge-conflict Conflicts with the base branch (bot) labels Dec 2, 2026
@m0d16l14n1

Copy link
Copy Markdown
Contributor Author

Hardware row at 6fe3caf3 — MacBook Air 15-inch (M5, J815, T8142): PASS (kernel 7.3.0-aurora-j815-dev carrying 6fe3caf3799b alongside #3868 and #3873, with aura#580 passing apple,low-power-mw = <5000> and apple,low-power-frequency-max-mhz = <2220>).

  • Platform profile & PPD (lpmkit-20261202-091704):
    • /sys/class/platform-profile/platform-profile-0/name: apple-clpc, choices low-power balanced performance.
    • powerprofilesctl set power-saver -> low-power, balanced -> balanced (PlatformDriver: platform_profile), aurora-power-budget stood aside.
    • Debugfs: power key PPSM target 5000 mW.
  • Measurements (low-power vs balanced, 40 s loaded runs, median over last 20 s):
    • Idle (low-power): 2,511 mW; balanced PPSM 2,817 mW idle -> 24,396 mW all-core CPU load.
    • All-core CPU (10 x yes): 4,680 mW (target 5,000 mW) vs 23,547 mW in balanced; ceilings stepped cleanly (policy0 2220 -> 1308 MHz, policy1 2964 -> 972 MHz).
    • GPU (vkcube --wsi wayland --present_mode 1): 4,625 mW (target 5,000 mW), GPU cap stepped down to 1,250 mW.
    • Mixed CPU + GPU: 4,977 mW (target 5,000 mW) vs 22,916 mW in balanced; GPU cap 1,250 mW, ceilings 1308 / 972 MHz.
  • Note: The lpm-kit deep-sleep-under-load step was not run in this pass (the same boot completed a 165 s deep sleep cleanly before the LPM run: suspend_stats/success=1, fail=0, apple-clpc suspend 16 us / resume 9 us).
  • Regressions: 0 new kernel err/crit log lines, 0 failed systemd units, 0 crashes.

@github-actions github-actions Bot removed the needs-hw-row No hardware row at the PR head (bot) label Dec 2, 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.

Looks right. The cap only lowers the GPU budget, and only on boards that opt in. It takes its steps first while the GPU is active and gives them back last. It's dropped on a profile change (power_next is reset, so profile_limit runs right away), on unbind, and restarted after a wake. A target without an SMC no longer polls for nothing. On boards without apple,low-power-gpu-cap the GPU budget path is unchanged, and m5_power_budget() keeps the new set_maximum() call M5-only. I started the hosted CI that was waiting for approval.

Two hardware gates are left. Neither is a code change:

  1. A J813 or J815 row at this exact head on its own. The J815 PASS at 6fe3caf3 ran with #3868 and #3873, which also change clpc.c. The J813 row was at ed8b022d, before the rebase that resolved conflicts in clpc.c, g17/ and the J813/J815 DT. Power Saver under an all-core load and under vkcube, Balanced unchanged, and one deep sleep in Power Saver are enough.
  2. A second-generation row, because CLPC and the M5 governor are shared. I've queued our J714s at this head: Balanced and Performance unchanged, Power Saver still steps only the CPU clusters, and one sleep/wake.

@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 Dec 2, 2026
@RyanTheTide

Copy link
Copy Markdown
Contributor

Merging at 6fe3caf3799b (B2 merge train, 12-01 merge bar). Approval at this head: DjDeveloperr. Row: exact-head row comment 7337086731 at 6fe3caf. CI: linux train L24 (candidate fdfedd05e955 on main a76093e): Apple driver build pass + touched objs pass (kernel/sched/psi.o verified with CONFIG_PSI=y) + DTBs pass + 12/12 relevant KUnit suites pass (ane-boot 333, clpc 22, ane-pm 20, dcp-fabric 117, dcp-topology 235/236, dcp-display 220/221, ave 57, apple-dart 40, jpeg 15, isp 61, mt7932 98/99, asahi 567/571; avd-pm-test.c pre-existing Clang 22 warning on main) + host tests pass (apple-dcp 1/1, dcp 96/96, g17 329/329). Revert: git revert -m 1 <merge commit>.

@RyanTheTide
RyanTheTide merged commit b64c848 into aurora-silicon:main Dec 2, 2026
12 checks passed
DjDeveloperr added a commit to m0d16l14n1/linux that referenced this pull request Dec 2, 2026
Conflicts and duplicates against aurora-silicon#3646, resolved to keep both sides:

- apple,pmc.yaml: main's low-power properties, then
  apple,low-power-smc-notice.
- t8142-j813-j815.dtsi: no textual conflict, but both sides add
  apple,smc to the CLPC node and dtc rejects the duplicate. Keep main's
  and add only apple,low-power-smc-notice.
- clpc-high-power-cleanup-tests.py: main's GPU cap case and
  apple_clpc_power_limited() handling, and the notice cases with the
  send_mode/SEQ switch.

drivers/soc/apple/clpc.c merges cleanly, with aurora-silicon#2856 and aurora-silicon#3992 in main.

Signed-off-by: DjDeveloperr <hey@djdev.me>
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) area:platform 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.

4 participants