Skip to content

arm64: dts: apple: t8132: fix inverted 912 MHz P-cluster OPP cost - #3547

Merged
RyanTheTide merged 1 commit into
mainfrom
fix/t8132-opp-energy-model
Dec 1, 2026
Merged

RyanTheTide merged 1 commit into
mainfrom
fix/t8132-opp-energy-model

Conversation

@erikwb

@erikwb erikwb commented Nov 28, 2026

Copy link
Copy Markdown
Contributor

What: Adjust donan_p_opp opp-912000000 opp-microwatt from <289000> to <279000> in arch/arm64/boot/dts/apple/t8132.dtsi so Linux's Energy Model no longer marks 912 MHz inefficient and skips it in favor of 1260 MHz.
Tested: J713 M4 Air settled PP0b OPP measurements + DTB compile/schema verification at 43f8add3e7d1: all 6 T8132 DTBs (J604, J623, J624, J713, J715, J773g) compile cleanly with only the 912 MHz opp-microwatt cell changed; J713 PP0b draws 454.0 mW (497.8 mW/GHz) at 912 MHz vs 644.4 mW (511.4 mW/GHz) at 1260 MHz.
Risk: two-way door · M4 (T8132) Macs
Not yet: Booting the updated Stage 2 DTB on J713 to record live /sys/kernel/debug/energy_model/pd0/ps:912000/inefficient and policy0/stats/time_in_state (kept as draft until that hardware row is recorded).

Details

In donan_p_opp, opp-912000000 currently specifies opp-microwatt = <289000> (316.89 uW/MHz), slightly above opp-1260000000 at <396000> (314.29 uW/MHz). In kernel/power/energy_model.c, em_compute_costs() computes an integer cost of 13827 for 912 MHz vs 13702 for 1260 MHz, marking 912 MHz inefficient. As a result, CPUFREQ_RELATION_LE skips 912 MHz and parks idle P-cores at 1260 MHz (~99.1% of uptime at 1260 MHz vs 0.16% at 912 MHz on J713).

Scaling the existing 1260 MHz table entry (396000 uW) by the measured J713 PP0b power ratio (454.0 / 644.4 = 0.70453) gives 278994 uW, rounded to <279000> (305.92 uW/MHz). That lowers the 912 MHz Energy Model cost to 13349 (< 13702), restoring monotonic cost across the low P-cluster OPPs.

Evidence

Settled 1-core PP0b power sweep on J713 (2.5 s settle per OPP)

P-cluster OPP Idle PP0b Busy PP0b mW / GHz
912 MHz 25.0 mW 454.0 mW 497.8
1260 MHz 25.0 mW 644.4 mW 511.4
1512 MHz 25.0 mW 863.6 mW 571.2
1800 MHz 27.0 mW 1036.8 mW 576.0
2088 MHz 31.0 mW 1378.4 mW 660.2

Build & static checks (43f8add3e7d1)

  • Built all 6 T8132 DTBs (t8132-j604.dtb, t8132-j623.dtb, t8132-j624.dtb, t8132-j713.dtb, t8132-j715.dtb, t8132-j773g.dtb); diff confirmed only the opp-912000000 power cell changed
  • ./scripts/checkpatch.pl --no-tree: 0 errors, 0 warnings

In donan_p_opp, opp-912000000 currently sets opp-microwatt = <289000>
(316.9 uW/MHz), slightly higher per MHz than opp-1260000000 at 396000 uW
(314.3 uW/MHz). Because the Energy Model marks lower-frequency states
with higher cost per performance as inefficient, CPUFREQ_RELATION_LE
permanently skips 912 MHz and parks idle P-cores at 1260 MHz.

Settled per-OPP PP0b rail measurements on J713 show 912 MHz draws
454.0 mW (497.8 mW/GHz) vs 644.4 mW (511.4 mW/GHz) at 1260 MHz, so
912 MHz is strictly more efficient per GHz. Update opp-912000000
opp-microwatt proportionally to <279000> (305.9 uW/MHz) so the Energy
Model keeps 912 MHz eligible.

Signed-off-by: Erik Bourget <[email protected]>
@erikwb
erikwb marked this pull request as ready for review November 30, 2026 22:08
@erikwb
erikwb requested review from a team as code owners November 30, 2026 22:08
@erikwb
erikwb requested review from LiamRay11 and maralcbr November 30, 2026 22:08
@github-actions github-actions Bot added area:bringup 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 30, 2026
@github-actions

github-actions Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

Merge readiness at 43f8add3: not ready yet

Check Detail
CI at head ok 4 checks passed
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 43f8add3
Conflicts ok none
PR text ok Risk: two-way · M4 (T8132) Macs

Areas: area:bringup

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 43f8add3

Blockers:

  • Live J713 (T8132) Stage 2 DTB boot verification missing (noted in PR body Not yet:): Please boot the updated Stage 2 DTB on J713 at 43f8add3 and post /sys/kernel/debug/energy_model/pd0/ps:912000/inefficient (0) and policy0/stats/time_in_state confirming 912 MHz is no longer marked inefficient/skipped. Once posted, this is ready to approve.

Checked:

  • Audited exact +1/-1 diff in arch/arm64/boot/dts/apple/t8132.dtsi (opp-912000000 opp-microwatt <289000> -> <279000>):
    • Verified the Energy Model cost arithmetic against the settled J713 PP0b power sweep (454.0 / 644.4 * 396000 = 278994 uW -> 279000 uW, reducing 912 MHz EM cost from 13827 to 13349 < 13702 at 1260 MHz).
  • Confirmed hosted CI is completely green (dt-checks, host-tests, pr-text, readiness all SUCCESS) and all 6 T8132 DTBs compile cleanly with checkpatch.pl 0/0.
Evidence
  • Head commit: 43f8add3e7d16784ed41ee1afba2f9e3dd9f81ef (MERGEABLE into main).
  • CI snapshot: dt-checks=SUCCESS, host-tests=SUCCESS, pr-text=SUCCESS, readiness=SUCCESS.

@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 43f8add3e7d1

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: - Audited exact +1/-1 diff in arch/arm64/boot/dts/apple/t8132.dtsi (opp-912000000 opp-microwatt <289000> -> <279000>):

  • Verified the Energy Model cost arithmetic against the settled J713 PP0b power sweep (454.0 / 644.4 * 396000 = 278994 uW -> 279000 uW, reducing 912 MHz EM cost from 13827 to 13349 < 13702 at 1260 MHz).
  • Confirmed hosted CI is completely green (dt-checks, host-tests, pr-text, readiness all SUCCESS) and all 6 T8132 DTBs compile cleanly with checkpatch.pl 0/0.

Follow-ups (not blocking): J713 Stage 2 DTB boot showing 912 MHz not inefficient

@RyanTheTide

Copy link
Copy Markdown
Contributor

Merging at 43f8add3e7d1 (B2 merge train, 12-01 merge bar). Approval at this head: aurora-silicon-review[bot]. Row: in the PR body at 43f8add. CI: linux train L2 = main (after train L1) + #1489 #3223 #3291 #3333 #3395 #3407 #3547 #3560 #3651 #3684 #3569 #3599 (candidate dd0c7bb9): Apple driver compile pass, Apple DTBs W=1 pass, planned KUnit ane-boot/clpc/ane-pm/dcp-topology/ave/asahi all pass; host-tests/dt-checks green at this head where they apply. The rest of the hosted run is queued behind the backlog. Revert: git revert -m 1 <merge commit>.

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) 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