Skip to content

pmdomain: apple: power both parents of DISPEXT1_SYS on the J616s (replaces #614) - #628

Merged
RyanTheTide merged 2 commits into
aurora-wipfrom
claude/j616s-dispext1-two-parents
Oct 30, 2026
Merged

RyanTheTide merged 2 commits into
aurora-wipfrom
claude/j616s-dispext1-two-parents

Conversation

@RyanTheTide

Copy link
Copy Markdown
Contributor

Replaces #614. The J616s logged this on every boot with a display on a Type-C port:

apple-pmgr-pwrstate 502800000.power-management:power-controller@490: failed to add to parent domain: -22 (report -> power-controller)
platform 502800000.power-management:power-controller@498: deferred probe pending: ... supplier power-controller@490 not ready

#614 assumed request bit 18 was set at probe. It is not: the T6041 PMP starts with no requests, and the driver keeps requests in memory until it runs. The request word cannot tell genpd anything here.

What actually happens:

  • iBoot lights the external display and leaves DISPEXT1_SYS (0x490) and DISPEXT1_FE (0x498) on. Both read 0xff.
  • DISPEXT0_SYS is left on the same way below its PMP entry and never failed. The difference is the parent count. With one power-domains entry the platform bus attaches the device to that domain and powers it on before probe, so the PMP entry is on when the subdomain is added. DISPEXT1_SYS has two parents (FAB7_SOC and the PMP entry), the bus attaches to neither, and genpd refuses an active subdomain below the PMP entry that is still off.
  • Once that is fixed, a second bug shows. dcpext1, its DARTs and its mailbox name no power domain at all, unlike dcpext0's, so genpd would see DISPEXT1_FE unused and power it off under a running dcpext1. With no display at boot nothing powers DISPEXT1 for dcpext1.

Two commits:

  1. dts: dcpext1, dispext1_dart, dcpext1_dart and dcpext1_mbox get power-domains = <&ps_dispext1_fe>, as on DISPEXT0.
  2. pmgr-pwrstate: a domain that is on at probe and has more than one parent powers each parent through a virtual device until it is added below all of them. The subdomain links hold them after that.

Order matters on the J616s. Its DTB comes from Stage 2. Commit 2 without commit 1 in the running DTB would let genpd turn DISPEXT1 off under dcpext1. The Stage 2 DTB must carry commit 1 before a kernel with commit 2 goes on a J616s.

Testing (J616s, one-shot 7.3.0-aurora-fleet10k = fleet10 46b7a93f + this + test-only commits)

  • Stage 2 still has the old DTB, so a test-only commit in the display gate added the commit 1 properties to the live tree before the Type-C stage is enabled. That commit is not part of this PR.
  • No power-controller@490 or @498 lines. pm_genpd_summary: pmp-dispext1, dispext1_sys and dispext1_fe on, dispext1_fe holds 602340000.iommu, 602300000.iommu, 602e08000.mailbox and 602e00000.dcp. The PMP hand-over now requests 0x63c00 (was 0x23c00, bit 18 added). DP-2 (the USB-C display) is connected, dcpext1 brings up its services, and nothing new shows at -p 3.
  • The first attempt (fleet10j) only started the PMP entry on and kept the request-bit idea. It still failed with -22, and with dcpext1 waiting on a domain that never came the machine hung after about 15 s. The watchdog brought it back. That run is what pointed at the parent count.

dmesg: reports/j616s-followups-20261030/fleet10k-dmesg.txt, journals of the failed attempt in the same directory.

🤖 Generated with Claude Code

dcpext1, its two DARTs and its mailbox sit in the DISPEXT1 block, as
dcpext0 and its DARTs and mailbox sit in DISPEXT0. dcpext0's nodes name
ps_dispext0_fe as their power domain, dcpext1's name none.

So DISPEXT1 is powered only when iBoot left it on, which it does when an
external display is plugged into a Type-C port at boot. genpd then sees
DISPEXT1_FE with no consumer and turns it off once it has a provider,
under a running dcpext1. Without a display at boot nothing powers it
before dcpext1 probes.

Give them ps_dispext1_fe, as on DISPEXT0, so they hold DISPEXT1 (and
through it the PMP request) while they are bound.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
genpd adds a power state that is on only below parents that are on. For
a power state with one parent this always holds: the platform bus
attaches the device to its domain and powers it on before probe. With
more than one power-domains entry the bus attaches to none, so a domain
that the boot loader left on cannot be added below a parent that is off.

On the J616s DISPEXT1_SYS has two parents, FAB7_SOC and the PMP DISPEXT1
request. iBoot leaves DISPEXT1_SYS and DISPEXT1_FE on when a display is
plugged into a Type-C port at boot, and the PMP request entry starts off
(the PMP starts with no requests), so every such boot logged

  apple-pmgr-pwrstate 502800000.power-management:power-controller@490: failed to add to parent domain: -22 (report -> power-controller)
  platform 502800000.power-management:power-controller@498: deferred probe pending: ... supplier power-controller@490 not ready

DISPEXT0_SYS, left on the same way below its single PMP entry, never
failed, because the bus powered that entry on first.

When a domain with several parents is on at probe, attach a virtual
device to each parent and hold it powered until the domain is added below
them all; the subdomain links keep them on from there. The PMP request
for DISPEXT1 is then made and handed to the PMP when it runs (requests
0x63c00 instead of 0x23c00).

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.

1 participant