Skip to content

pmdomain: apple: pmp-report: start each entry from its request bit - #614

Closed
RyanTheTide wants to merge 1 commit into
aurora-wipfrom
claude/bootlog-pmp-report-request-bit
Closed

RyanTheTide wants to merge 1 commit into
aurora-wipfrom
claude/bootlog-pmp-report-request-bit

Conversation

@RyanTheTide

@RyanTheTide RyanTheTide commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Each PMP report entry registered its genpd domain as off, whatever the request word held. genpd refuses to add a power state that is already on below a parent it thinks is off, so on the J616s DISPEXT1_SYS (left on, below the DISPEXT1 entry, request bit 18) failed every boot:

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

This registers each entry in the state of its request bit. On a report that defers requests until its PMP runs (T6041), a bit found set is kept in memory too, so the hand-over writes it back. Always-on entries get GENPD_FLAG_ALWAYS_ON, since genpd now sees them on and must not drop them as unused.

A KUnit case covers the new state lookup (bit from the request word, then from memory after an entry changes it).

Testing

  • KUnit (.kunitconfig.apple-pmp-start, arm64 QEMU, LLVM=1): 27 of 27 passed, including the new pmp_report_requested_test.
  • Hardware: not booted yet. The J616s test is in the lead's reboot batch. Pass means no power-controller@490 lines, power-controller@498 binds, and USB-C DisplayPort on the external display lights up.
  • Assumes request bit 18 is set at boot on the J616s. If it is clear while DISPEXT1_SYS is on, the error stays, and that would show in the boot test.

Draft until the J616s boot passes.

🤖 Generated with Claude Code

Every report entry registered its genpd as off, whatever the request
word held. A PMGR power state that is already on cannot be added below
a domain genpd thinks is off, so a chain the bootloader left powered
failed to probe. On the MacBook Pro M4 Pro (J616s) DISPEXT1_SYS sits
below the DISPEXT1 entry (request bit 18), and every boot logged

  power-controller@490: failed to add to parent domain: -22 (report -> power-controller)

after which DISPEXT1_FE deferred forever and USB-C DisplayPort had no
controller.

Read the request bit when the entry probes and register the domain in
that state. On a report that defers requests until its PMP runs, a bit
found set is also kept in memory, so the hand-over writes it back
instead of dropping it. Always-on entries are requested from probe on;
mark them GENPD_FLAG_ALWAYS_ON so that genpd, which now sees them on,
never turns them off as unused.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

J616s boot test, one-shot 7.3.0-aurora-fleet9h (fleet9 695d974 + this PR + #591 + the gamma debug commit, src e2ce1e6e). This does not fix the J616s yet.

[ 2.787103] apple-pmgr-pwrstate 502800000.power-management:power-controller@490: failed to add to parent domain: -22 (report -> power-controller)
[ 2.788753] apple-pmgr-pwrstate 502800000.power-management:power-controller@490: probe with driver apple-pmgr-pwrstate failed with error -22
[ 4.124424] apple-pmp-report 5003c0000.pmp-report: PMP running (status 0x1), requests 0x23c00
[20.535717] platform 502800000.power-management:power-controller@498: deferred probe pending: platform: supplier 502800000.power-management:power-controller@490 not ready

The request word is 0x23c00 on this boot, the same as on fleet9 and fleet10, so bit 18 (0x40000, DISPEXT1) is not set and the new probe path still registers that entry as off. pm_genpd_summary shows pmp-dispext1 off-0 while dispext0 is on. Whatever leaves DISPEXT1_SYS powered on the J616s is not reflected in the request word this driver reads, at least not at the point the entry probes (2.79 s, before the PMP runs at 4.12 s). The commit message assumes the bit is set there; on this machine it is not.

Full dmesg: reports/j616s-night-20261030/fleet9h-dmesg.txt.

🤖 Generated with Claude Code

@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Superseded by #628, closing this.

On the J616s the request bit for DISPEXT1 is never set at probe. The T6041 PMP starts with no requests, so the entry's register can't show whether the device is in use. The -22 actually comes from DISPEXT1_SYS having two parents. With two, the platform bus powers neither before probe, while DISPEXT0_SYS (one parent) gets its PMP entry powered by the bus. #628 powers both parents of a domain that is on at probe, and gives dcpext1 its DISPEXT1_FE power domain. Booted on the J616s: no power-controller@490 lines, and the PMP now gets requests 0x63c00.

🤖 Generated with Claude Code

RyanTheTide added a commit that referenced this pull request Oct 30, 2026
…-parents

pmdomain: apple: power both parents of DISPEXT1_SYS on the J616s (replaces #614)
@RyanTheTide
RyanTheTide deleted the claude/bootlog-pmp-report-request-bit branch November 27, 2026 13:22
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