Skip to content

PCI: apple: keep the M4 (T8132) PCIe-C tunnel link through suspend-to-idle - #956

Merged
RyanTheTide merged 1 commit into
aurora-silicon:integration/aurorafrom
erikwb:j713/extdisp-pciec
Nov 5, 2026
Merged

RyanTheTide merged 1 commit into
aurora-silicon:integration/aurorafrom
erikwb:j713/extdisp-pciec

Conversation

@erikwb

@erikwb erikwb commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

A tunneled PCIe host keeps its link through suspend-to-idle only when its power domain is marked always-on. The M4's PCIe-C domain isn't, so the link was stopped for every s2idle, and with a dock's DP tunnel up the Thunderbolt side then refuses the sleep (the PCIe-C tunnel would be rebuilt at resume and take the DP tunnels with it).

The domain does stay on while a cable is in: ACIO holds it for the connection, through power-domain devices it marks as syscore, which system sleep leaves alone. On a host that opts in with a new s2idle_hold_domain hardware flag (T8132 only), this decides from the domain itself instead of the always-on flag:

  • a host whose domain isn't always-on registers a genpd power notifier for the sleep, from its suspend_noirq to its resume_noirq
  • it keeps its link only if the notifier is registered and the domain is on
  • the notifier refuses GENPD_NOTIFY_PRE_OFF, so the domain (and its parents) can't be powered off under the kept link during the sleep

There's no module parameter and no new DT property; apple,always-on would be wrong here, since the domain does go off without a cable.

Only T8132 sets the flag, so the other PCIe-C hosts behave exactly as before; T6030/T6040 can opt in once tested on them.

Part of the J713 external display series (six PRs, see #957). It doesn't depend on the others.

Tested on a J713 (M4 MacBook Air) with a CalDigit TS5 dock, with the six PRs together: s2idle with the dock attached and two monitors lit (the PCIe-C link is kept, so the DP tunnels stay up and the monitors come back after resume), and s2idle without the dock.

This was developed and tested by Claude (Anthropic), working with me on the J713.

…n stays on

A tunneled host keeps its link through suspend-to-idle only when its power
domain is marked always-on. The T8132 PCIe-C domain is not, so the link was
stopped for the sleep, and the Thunderbolt NHI refuses system sleep while a
DP tunnel to an external display is up.

That domain stays on while a cable is connected all the same: ACIO holds it
for the lifetime of the connection, through power-domain devices it marks
as syscore devices, which system sleep leaves alone. On a host that opts in
with the new s2idle_hold_domain hardware flag, decide from the domain
itself instead of the always-on flag: a host whose domain is not always-on
registers a genpd power notifier for the sleep, from its suspend_noirq to
its resume_noirq, and keeps its link only if the notifier is registered and
the domain is on. The notifier refuses GENPD_NOTIFY_PRE_OFF, so a genpd
power-off of the domain during the sleep fails, and the domain stays on,
its parents with it, whatever happens to ACIO's hold meanwhile.

Only T8132 sets the flag; other SoCs keep their current behaviour and can
opt in once tested.

Signed-off-by: Erik Bourget <[email protected]>

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

Reviewed and tested here with the whole series on top of integration/aurora, thanks Erik.

  • Fedora-base universal config build is clean, W=1 adds no warnings, dtbs_check adds none and only the t8132 DTBs change
  • KUnit passes (atc 49/49, apple-dpin 94 + 1 skip, drm/apple 112 + 1 skip, the arm64 gate set 74 + 1 skip)
  • one-shot boots on the M4 Pro (J616s, dock and external display attached) and the M2, both with zero err lines, no new warnings, 0 AVCs with SELinux enforcing, a freezer pm_test pass and the external display still up on the J616s
  • the host selftests needed fixture updates for the renamed and new helpers, those come in with the #957 merge, all groups pass with them

Merging.

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.

2 participants