Repository navigation
Conversation
…m sleep
On firmware 27.2 the G14 GPU firmware keeps running through
suspend-to-idle. Without apple,sleep-retained, genpd gates the GFX
domain under it in the noirq phase. At the wake the domain does not
power on ("PS gfx: Failed to reach power state 0xf"), and the next GPU
access hangs a CPU. This is the J713 case that
apple,sleep-retained was added for, and the same property T8132 and
T6050 carry.
Only the firmware-27 J413 tree needs it, since only that tree runs the
GPU on 27.2. With the GPU disabled the domain is already off at
runtime, and the property changes nothing.
Signed-off-by: Satya Benson <satya@benson.earth>
|
Looks good. One small point: what needs this is the 27.2 GPU firmware, not the J413 board. Today only J413 has a -fw27 DTB, so nothing else is affected, but saying in the comment that any T8112 board file for 27.x firmware needs the same property would help whoever adds the next one. The untested items you list (several cycles in one boot, a long sleep, sleep power with GFX held on) are the ones I would still like to see once the suspend commit in #2544 settles. Assisted-by: LLM (Claude:Opus 5.5) |
8203f55 to
017a1ab
Compare
DjDeveloperr
left a comment
There was a problem hiding this comment.
Pre-PR checklist review at 017a1abaf2ba9027cc52d0dbf4ede072c18a9a8b (§1–§6): 0 code/policy/CI blockers — COMMENT (holding for §5 HW regression row).
Code & Source Verification
arch/arm64/boot/dts/apple/t8112-j413-fw27.dtsaddsapple,sleep-retained;to&ps_gfx, matchingt8132-gpu.dtsi:96andt6050-k114c-gpu.dtsi:111.- Verified
arch/arm64/boot/dts/apple/t8112-pmgr.dtsi:810-816:ps_gfxhas no parentpower-domainsand no conflicting policy properties. - Verified
drivers/pmdomain/apple/pmgr-pwrstate.c:443,547-569,951-967:apple,sleep-retainedonly returns-EBUSYfromapple_pmgr_ps_power_off()whileps->system_sleepis true (suspend_late..resume_early). Runtime PM is unchanged, and ifps_gfxis already off (GPU disabled/unbound) it stays off. - Verified
t8112-j413-fw27.dtsis currently the only-fw27board DTS in the tree andDocumentation/devicetree/bindings/power/apple,pmgr-pwrstate.yaml:138permits the property.
Checklist Summary
- §1 No model gating: Pass — hardware/firmware behavior expressed in DT (
t8112-j413-fw27.dts), no driver-side board/chip gating. - §2 Production-ready: Pass — default command line, no hacks.
- §3 Safety: Pass — prevents GFX power-domain wedge and post-resume CPU hang.
- §4 Clean-room & attribution: Pass — commit
017a1abacarries human author/committer andSigned-off-by: Satya Benson <satya@benson.earth>with no AI trailers;Assisted-by:is in the PR body. - §6 Naming: Pass.
- CI:
dt-checksSUCCESS andhost-testsSUCCESS on live head017a1aba.
Missing §5 Evidence (Hold)
- Regression gate counts missing: none of the reported phellos runs record
0 SELinux denials (AVC),0 failed units, and0 new kernel errors. - Compiled PR DTB / default-boot s2idle coverage: runs used
fdtputon a lab kernel carrying#2544+aura#402with GPU enabled; a plain default-config boot on J413 using the compiledt8112-j413-fw27.dtbfrom017a1aba(including an s2idle cycle with GPU disabled, the current default, and the 0/0/0 regression gate) is needed to complete §5.
Non-blocking nit: echoing the earlier comment, noting in the DTS comment that any future T8112 -fw27 board file needs the same &ps_gfx property would be helpful.
Assisted-by: LLM (Gemini 4 Neon)
|
Applies cleanly onto integration/aurora (4a17f73); t8112-j413-fw27.dts has not changed since and ps_gfx there still lacks apple,sleep-retained (only T8132 and T6050 carry it), so this is still needed for #2544. Both reviews found no code blocker. What is still asked for is one default-configuration J413 boot with the DTB built from this commit, including an s2idle cycle with the GPU disabled, and the comment noting that any T8112 tree for 27.x firmware needs the same property. |
RyanTheTide
left a comment
There was a problem hiding this comment.
Independent source review at 017a1abaf2ba. The DT property matches the measured failure mode on a running GPU. The reported A/B changes the kernel callback as well as the DT, so it does not isolate the retention change. Please compare the same kernel and suspend callback with and without the property, and include the GPU-disabled default and a multi-cycle live-GPU row with a dispatch after each wake. If the shared driver hold in #2715 covers this GPU too, use one retention mechanism and verify the J473 consumer path with the same stack.
DjDeveloperr
left a comment
There was a problem hiding this comment.
Formal adversarial §1–§6 pre-PR re-review at live head 017a1abaf2ba9027cc52d0dbf4ede072c18a9a8b (checked against live integration/aurora 70a00e583b03: not superseded; t8112-j413-fw27.dts still lacks apple,sleep-retained on &ps_gfx).
Code, DT, Policy & CI Audit (§1–§4, §6)
- DT / driver interaction: Clean. Adding
apple,sleep-retained;to&ps_gfxinarch/arm64/boot/dts/apple/t8112-j413-fw27.dtsmatchest8132-gpu.dtsiandt6050-k114c-gpu.dtsi;ps_gfxon T8112 has no parentpower-domains(t8112-pmgr.dtsi:810-816), andpmgr-pwrstate.c:443only refuses power-off whileps->system_sleepis set, leaving runtime PM and already-off domains unchanged. - §1 No model gating: Pass — firmware-specific retention expressed in DT, no driver-side board/chip gating.
- §2 Production-ready: Pass — default command line, no hacks.
- §3 Safety: Pass — prevents GFX domain wedge and post-resume CPU hang.
- §4 Clean-room & attribution: Pass — commit
017a1abaf2bacarries human author/committer and humanSigned-off-by:only (zero AI trailers); PR body carriesAssisted-by:. - §6 Naming & live CI: Pass (
host-tests:success,dt-checks:success;MERGEABLE/CLEAN).
§5 Blockers (Required Before Approve)
- No compiled-DTB run on exact head
017a1abaf2baand no 0/0/0 regression gate: reported phellos trials usedfdtputon a lab kernel (#2544+aura#402) and omitted SELinux AVC denials, failed systemd units, and kernel error counts. - No default-config (GPU-disabled) s2idle row on J413: please boot J413 with the compiled
t8112-j413-fw27.dtbfrom017a1abaf2baon the default config, run an s2idle cycle, and record the 0/0/0 regression gate. - Confounded A/B and single-cycle coverage: the reported before/after changed both the kernel suspend callback (
up5vsup4+#2544) and the DT property. Please provide a same-kernel A/B isolatingapple,sleep-retainedplus a multi-cycle live-GPU s2idle row with compute dispatches after each wake. - Coordination with open
#2715(drm/asahi: hold GPU power domain across suspend-to-idle): clarify whether DTapple,sleep-retainedis still required alongside#2715's driver-level hold so T8112/fw27 uses one coherent retention mechanism.
Assisted-by: LLM (Gemini 4 Neon)
|
MERGETRAIN6 source review at Assisted-by: LLM (Codex) |
|
Codex on @satchlj's behalf: Yes, for the bound GPU on the J413 fw27 tree using its single PMGR domain, #2715 covers the s2idle power-off that #2614 addresses. The GPU's power-domains property points to ps_gfx. With #2715 integrated, the driver's suspend_noirq callback vetoes power-off of that attached domain while the firmware stays live, and resume_noirq releases the veto. #2614 applies retention at the domain provider. I would omit the DT property for this case once the driver hold is integrated and verified. The earlier J413 runs described here exercised the DT property. No J413 or J473 hardware boot or suspend/resume test was run for this comparison. |
Claude Opus 5.5 on @satchlj's behalf.
Adds
apple,sleep-retainedto&ps_gfxint8112-j413-fw27.dts, the J413 tree for macOS 27 system firmware. It is the GPU-side half of the suspend handling in #2544.Why. On firmware 27.2 the G14 GPU firmware keeps running through suspend-to-idle. Without the property, genpd gates the GFX domain under it in the noirq phase. At the wake the domain does not come back: pmgr logs
PS gfx: Failed to reach power state 0xf (requested 0xf00200f, now: 0xf002b0f), which means target active, actual power-gated, BUSY. The next GPU access then hangs a CPU: on phellos on 2026-11-20, an RCU stall with a CPU unresponsive to NMI after a post-resume compute dispatch, and earlier a hang on unbind. This is the J713 failure thatapple,sleep-retained(8fd377b) addresses, and T8132 and T6050 carry the property for the same reason.Tested on phellos (J413, 27.2 stub), one-shot boots of the up4 default kernel (integration/aurora df62a8c + our PRs) with the GPU published by aura#402 and #2544's suspend commit (0aac788) as the module. The property was added to the Stage 2's
t8112-j413-fw27.dtbwithfdtput; the DTB is otherwise the tip's (d73ea1e0…).Untested: idle power during the sleep (the GFX domain now stays on while the GPU is bound); a long sleep or many cycles in one boot; lid-close sleep. With the GPU disabled (the phellos default), the domain is already off at runtime and the property has no effect, but no s2idle was run on such a boot with this tree.
Assisted-by: LLM (Anthropic:Claude Opus 5.5)