Skip to content

arm64: dts: apple: t8112-j413-fw27: keep the GFX domain through system sleep - #2614

Open
satchlj wants to merge 1 commit into
integration/aurorafrom
satchlj/j413-fw27-gfx-sleep-retained
Open

satchlj wants to merge 1 commit into
integration/aurorafrom
satchlj/j413-fw27-gfx-sleep-retained

Conversation

@satchlj

@satchlj satchlj commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

Claude Opus 5.5 on @satchlj's behalf.

Adds apple,sleep-retained to &ps_gfx in t8112-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 that apple,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.dtb with fdtput; the DTB is otherwise the tip's (d73ea1e0…).

  • Without it (trial A, up5 kernel, no sleep callback): the PS gfx failure above at the wake, then the CPU hang when compute ran. The machine needed a power-button cycle.
  • With it, 4 boots (s3, s4, s5, s7): one rtc1 s2idle each, no PS gfx line. Vulkan compute, 3 × 1024 + 300 × 4096 dispatches with every word checked, PASS before and after the sleep on every boot (300-dispatch run after the wake: 53.3, 49.0, 49.3, 53.9 ms). s7's reboot afterwards was clean.

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)

…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>
@RyanTheTide

Copy link
Copy Markdown
Contributor

Looks good. apple,sleep-retained only makes apple_pmgr_ps_power_off() refuse while a system sleep is in progress (pmgr-pwrstate.c:442), so runtime PM is unchanged and a GFX domain that is already off (GPU not bound) is left alone. ps_gfx has no parent domains on T8112, so nothing else is held on.

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)

@satchlj
satchlj force-pushed the satchlj/j413-fw27-gfx-sleep-retained branch from 8203f55 to 017a1ab Compare November 21, 2026 21:12
@satchlj

satchlj commented Nov 21, 2026

Copy link
Copy Markdown
Member Author

Claude Opus 5.5 on @satchlj's behalf: trailer-only rewrite, removed Co-Authored-By from 1 commit(s); same trees, Signed-off-by kept (8203f55 -> 017a1ab, --force-with-lease).

@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.

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.dts adds apple,sleep-retained; to &ps_gfx, matching t8132-gpu.dtsi:96 and t6050-k114c-gpu.dtsi:111.
  • Verified arch/arm64/boot/dts/apple/t8112-pmgr.dtsi:810-816: ps_gfx has no parent power-domains and no conflicting policy properties.
  • Verified drivers/pmdomain/apple/pmgr-pwrstate.c:443,547-569,951-967: apple,sleep-retained only returns -EBUSY from apple_pmgr_ps_power_off() while ps->system_sleep is true (suspend_late..resume_early). Runtime PM is unchanged, and if ps_gfx is already off (GPU disabled/unbound) it stays off.
  • Verified t8112-j413-fw27.dts is currently the only -fw27 board DTS in the tree and Documentation/devicetree/bindings/power/apple,pmgr-pwrstate.yaml:138 permits 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 017a1aba carries human author/committer and Signed-off-by: Satya Benson <satya@benson.earth> with no AI trailers; Assisted-by: is in the PR body.
  • §6 Naming: Pass.
  • CI: dt-checks SUCCESS and host-tests SUCCESS on live head 017a1aba.

Missing §5 Evidence (Hold)

  1. Regression gate counts missing: none of the reported phellos runs record 0 SELinux denials (AVC), 0 failed units, and 0 new kernel errors.
  2. Compiled PR DTB / default-boot s2idle coverage: runs used fdtput on a lab kernel carrying #2544 + aura#402 with GPU enabled; a plain default-config boot on J413 using the compiled t8112-j413-fw27.dtb from 017a1aba (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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants