Repository navigation
PCI: apple: keep the M4 (T8132) PCIe-C tunnel link through suspend-to-idle - #956
Merged
RyanTheTide merged 1 commit intoNov 5, 2026
Merged
Conversation
…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
approved these changes
Nov 5, 2026
RyanTheTide
left a comment
Contributor
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_domainhardware flag (T8132 only), this decides from the domain itself instead of the always-on flag:suspend_noirqto itsresume_noirqGENPD_NOTIFY_PRE_OFF, so the domain (and its parents) can't be powered off under the kept link during the sleepThere's no module parameter and no new DT property;
apple,always-onwould 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.