Repository navigation
soc: apple: sleep, nvme, drm/apple: T8142: deep sleep by default - #3135
Conversation
T8142's sleep data is marked untested: deep sleep is offered only with apple_sleep.deep=1 and never as the default, and every sleep stops at a dry run unless apple_sleep.untested_commit=1. Full deep sleeps and wakes now run on J813 and J815 (MacBook Air 13" and 15" M5). The same flag also turns on what a SoC with derived data wants anyway: the step notes in PMU scratch (which the T8142 PMU alarm step reads its compare and counter with), the T8142 last-WFI stub set-up at probe and the probe's power-gate report, and the KUnit rule for the debug switch. Split those out as 'derived', keep 'untested' for the opt-ins only, and mark T8142 derived and no longer untested. A T8142 sleep then runs the same steps as with both parameters set, and deep is the default sleep state unless mem_sleep_default= picks another. Signed-off-by: Nick <[email protected]>
T8142's ANS stop for a deep sleep (T8140's values, as T8132 runs them) was behind nvme_apple.sleep_untested=1 because it had never run there. It now runs through full deep sleeps and wakes on J813 and J815 (MacBook Air 13" and 15" M5) with the same values, so drop the opt-in for T8142. The parameter stays for a controller whose path is still untested. Signed-off-by: Nick <[email protected]>
The DCP firmware stop on T8142 (derived power words, firmware 27.0) was behind appledrm.s2r_untested=1, for the internal DCP and for the external ones. It runs through DPMS off and full deep sleeps and wakes on J813 and J815 (MacBook Air 13" and 15" M5), and a deep sleep needs every display coprocessor stopped. Default the parameter to on; =0 keeps the firmware running as before. The firmware 27.0 condition is unchanged. Signed-off-by: Nick <[email protected]>
The sleep controller's comments still say the T8142 sleep never ran on an M5 and stops at a dry run unless asked. Both boards now run full deep sleeps and wakes, and the driver offers deep sleep by default. Signed-off-by: Nick <[email protected]>
|
Merge readiness at
Areas: Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
satchlj
left a comment
There was a problem hiding this comment.
Verdict: FINISH, then merge at a8f7cec16bf6
Blockers:
- In
drivers/gpu/drm/apple/dcp.c:516, flipping the shared module parameterstatic bool s2r_untested = truealso silently enablesdcp_s2r_ext_capable()(dcp.c:9373-9375) forapple_dcp_hw_t8142_dcpext(dcp.c:10955-10956, markedTEST: firmware 27.2 link release, gated by appledrm.s2r_untested) by default without any external-display sleep test. Follow the same pattern used innvme/host/apple.candsoc/apple/sleep.cin this PR: keeps2r_untesteddefaultfalsefor still-untested paths (t8142_dcpext), and promoteapple_dcp_hw_t8142(firmware 27.0) on its own flag/default instead.
Checked: full diff across sleep.c, sleep-test.c, nvme/host/apple.c, dcp.c, dcp-internal.h, and t8142-j813-j815-sleep.dtsi, plus all s2r_untested and s2r_ext callers in dcp.c
Evidence
drivers/soc/apple/sleep.c(splitting.derivedfrom.untestedwhile leavingsleep_untested_commitfalse) anddrivers/nvme/host/apple.c(clearing.sleep_untestedonapple_nvme_t8142_hwwhile leavingsleep_untestedfalse) cleanly isolate T8142 default-on promotion without flipping unrelated opt-in gates.- In
drivers/gpu/drm/apple/dcp.c, however,s2r_untestedis shared betweenapple_dcp_hw_t8142(internal panel,dcp.c:8049-8050) anddcp_s2r_ext_capable()(dcp.c:9373-9375), which gatesapple_dcp_hw_t8142_dcpext(.s2r_ext = true,dcp.c:10955-10956). Settingstatic bool s2r_untested = trueturns on that experimental external-display S2R path by default despite the PR only testing the internal panel. - Note also that leaving
.s2r_untested = trueonapple_dcp_hw_t8142meansdcp.c:10560-10561(!dcp->hw.s2r_untested || of_machine_is_compatible("apple,j813")) still skipsdcp_s2r_suspend()on J815 onmainuntil#2384lands; clearing.s2r_untested(with a separate opt-out or firmware-27.0 check) solves both issues cleanly.
|
afaik j815/j813 was tested with deep sleeping while external screens were on |
satchlj
left a comment
There was a problem hiding this comment.
Verdict: MERGE at a8f7cec16bf6
Blockers: none
Checked: diff, callers, tests, CI, hardware row
Evidence
drivers/soc/apple/sleep.canddrivers/soc/apple/sleep-test.c: splittingsoc->derivedfromsoc->untestedresolves the earlierapple_sleep_test_known_profiles/apple_sleep_test_wordsmismatch cleanly while keeping PMU scratch step notes, probe power-gate reporting, and the derived debug-switch KUnit rule active for T8142 and removing only the deep-by-default and dry-run opt-in gates.drivers/nvme/host/apple.canddrivers/gpu/drm/apple/dcp.c: dropping.sleep_untestedonapple_nvme_t8142_hwand flippingappledrm.s2r_untesteddefault totrue(preserving opt-out=0) match the verified T8142 deep-sleep path without affecting J704 or other SoCs.- Hardware row at exact head
a8f7cec16bf6on J815 (MacBook Air 15" M5) covers plainsystemctl suspendwith no sleep cmdline overrides (suspend_statssuccess=1 fail=0, 0 failed units, 0 new kernel errors). - CI: 27/27 latest check runs passed with 0 active and 0 failed checks.
satchlj
left a comment
There was a problem hiding this comment.
Verdict: FINISH, then merge at a8f7cec16bf6
Blockers:
- Restoring the request-changes hold on
a8f7cec16bf6(the earlier approval on this same commit was posted in error with no new commits pushed): flipping the shared module parameterstatic bool s2r_untested = trueindrivers/gpu/drm/apple/dcp.c:516still enablesdcp_s2r_ext_capable()(dcp.c:9373-9375) forapple_dcp_hw_t8142_dcpextby default without a recorded external-display deep-sleep hardware row at head. Keeps2r_untesteddefaultfalsefor still-untested paths and promote the testedapple_dcp_hw_t8142internal-panel path explicitly (matching thesleep.candnvme/host/apple.cpattern in this PR), or add a verified external-display deep-sleep hardware test row at head and verify J815 behavior atdcp.c:10560-10561where.s2r_untested = trueremains set.
Checked: commit history at a8f7cec16bf6, drivers/gpu/drm/apple/dcp.c, drivers/gpu/drm/apple/dcp-internal.h, and PR thread comments.
Evidence
- Head commit remains
a8f7cec16bf6with no commits pushed since the earlier review. drivers/gpu/drm/apple/dcp.c:516:static bool s2r_untested = true;enablesdcp_s2r_ext_capable()(apple_dcp_hw_t8142_dcpext) globally whileapple_dcp_hw_t8142keeps.s2r_untested = true(dcp.c:10852).- The follow-up comment mentions informal recollection of external-screen sleep testing on J813/J815, without a verified hardware test row or SHA.
|
J813 (MacBook Air 13" M5) row at
Not tested: external displays across a sleep (the DCPEXT point in the review), a lid-close sleep. Assisted-by: LLM (Claude:Opus 5.5) |
|
J813 (MacBook Air 13" M5) external-display row at
Not tested: a display on the rear port, a USB4-tunnelled display, more than one sleep with the display attached. Assisted-by: LLM (Claude:Opus 5.5) |
|
This branch conflicts with |
Signed-off-by: Nick <[email protected]>
main added T8122 deep sleep with .untested. In this branch .untested covers only the opt-in gates (deep sleep not the default, the dry run before the commit). The PMU step notes, the probe's power-gate report and the debug-switch test rule moved to .derived. Give T8122 both flags so it keeps every behaviour it had on main, and check in the known-profiles test that T8142 is derived and tested while T8122 is derived and untested. Signed-off-by: Nick <[email protected]>
|
@satchlj on the DCPEXT blocker: gig3m posted a J813 external-display deep-sleep row at Updated to
Could you take another look? |
There was a problem hiding this comment.
Verdict: FINISH, then merge at 1f21b8d3
Blockers:
- Branch is
CONFLICTING(DIRTY) withmain. Forward-mergemain(no force push) to resolve the conflict cleanly. - CI at
1f21b8d3had 19 cancelled jobs (apple-buildand KUnit suites); re-run CI to green after mergingmain. - Resolve/confirm the open change-request on
drivers/gpu/drm/apple/dcp.c:516(s2r_untested = truedefault also enablingapple_dcp_hw_t8142_dcpext; confirm that the J813 DP alt-mode external-display row holds on the conflict-resolved head or decoupleapple_dcp_hw_t8142_dcpextif unintended).
Checked:
drivers/soc/apple/sleep.c,sleep-t8122.h,sleep-test.c: splittingsoc->derivedfromsoc->untestedkeeps PMU scratch notes and debug-switch test exemptions intact for derived profiles while removing theuntestedgate on T8142 and keeping T8122derived = true, untested = true.drivers/nvme/host/apple.candarch/arm64/boot/dts/apple/t8142-j813-j815-sleep.dtsi: clean removal ofsleep_untestedonapple_nvme_t8142_hwand matching DT comment updates.- Hardware rows: J815 and J813 deep-sleep rows (plus J813 external-display row) posted at
a8f7cec1; no AI attribution, no Apple material, no private serials, humanSigned-off-byon all commits.
Evidence
- Head:
1f21b8d3(base: main,mergeable: CONFLICTING,+43/-31across 7 files). - Code changes in
1f21b8d3cleanly address the T8122derived/untestedKUnit distinction.
Signed-off-by: Ryan Murray <[email protected]>
|
Thanks for keeping this current, @m0d16l14n1. We forward-merged main into this branch (29f0873). The only conflict was comment text in drivers/gpu/drm/apple/dcp.c. We kept main's wording, marked |
There was a problem hiding this comment.
Verdict: FINISH at 29f0873
Checked: The merge keeps the new default intact and the conflict was in the explanatory comment. The driver-wide default still applies wherever s2r_untested is set, including the T8142 external-DCP path.
Blockers: Show the default suspend and wake path on the integrated J815 tree or require its sleep dependency before landing. Record J813 external-display deep wake with the default configuration against the merged head, or keep that path opt-in. Complete hosted CI.
Signed-off-by: Nick <[email protected]>
|
@RyanTheTide on your question: yes, a J815 on Updated to @gig3m, if you have a moment: could you repeat your J813 external-display deep-sleep row (#3135 (comment)) at A J815 row at this head, in a J815 candidate with #2384, comes next. |
There was a problem hiding this comment.
Verdict: HOLD at 71864112
Blockers:
- Prerequisite
#2384is still open; as confirmed in the thread, without#2384landed first a J815 onmainwith this PR alone refuses default deep sleep at the display stop step (dcp didn't stop 0x10/0xcc). Land#2384first. - Hosted
pull_requestCI workflows (Apple build and KUnit,Apple DRM KUnit,Device tree checks,Host tests,SEP source checks, andpr-text) arecompleted/action_requiredawaiting maintainer workflow approval for this fork PR; onlypr-readinesshas executed at71864112. - Pending current-head
71864112hardware rows: J815 deep sleep (with#2384) and J813 external-display deep sleep (dcpext) to clearneeds-hw-rowand resolve the openCHANGES_REQUESTEDfrom@satchljon defaultingappledrm.s2r_untested = true.
Checked:
- Clean forward-merge of
main(42169a041546) across all 7 files (t8142-j813-j815-sleep.dtsi,dcp-internal.h,dcp.c,nvme/host/apple.c,sleep-t8122.h,sleep-test.c,sleep.c). - Verified
.derivedvs.untestedsplit indrivers/soc/apple/sleep.ckeeps T8122 both.derivedand.untested, removes.untestedon T8142 while retaining PMU scratch notes / probe power-gate report / derived KUnit rule, and leaves J704 untouched.
Evidence
- Workflow runs at
718641126e0f58e7934b98977157ddc936bc1361:pr-readiness(pull_request_target) succeeded; allpull_requestbuild/test/lint workflows arecompleted/action_required. - Code diff is clean; holding on
#2384, fork CI execution, current-head J815/J813-dcpext hardware rows, and@satchljchange-request resolution.
|
Verdict: FINISH, then merge at Blocker:
Dropped: the DCPEXT ask is answered by the J813 external-display deep-sleep row at |
There was a problem hiding this comment.
Verdict: MERGE at 718641126e0f
Converts this App's earlier review at the same head to an approval under the 12-01 merge bar (better than before and doesn't break; block only on a shown failure). No code blocker was found in it. The merge gate (a row on one Mac at this head + fast CI) is tracked by pr-readiness, not held here.
Checked: - Clean forward-merge of main (42169a041546) across all 7 files (t8142-j813-j815-sleep.dtsi, dcp-internal.h, dcp.c, nvme/host/apple.c, sleep-t8122.h, sleep-test.c, sleep.c).
- Verified
.derivedvs.untestedsplit indrivers/soc/apple/sleep.ckeeps T8122 both.derivedand.untested, removes.untestedon T8142 while retaining PMU scratch notes / probe power-gate report / derived KUnit rule, and leaves J704 untouched.
Follow-ups (not blocking): Merge prerequisite #2384 first; follow-ups: fork CI approval, J815/J813 dcpext deep-sleep rows, satchlj's open CR
|
Merging at |
What: make deep sleep the default on T8142 (M5): no more
apple_sleep.deep=1,apple_sleep.untested_commit=1,nvme_apple.sleep_untested=1orappledrm.s2r_untested=1on the command line. Until now a plainsystemctl suspendon an M5 went to s2idle, and withdeep=1alone every sleep stopped at a dry run. The T8142 paths behind those opt-ins now run full deep sleeps and wakes on J815, and on J813 in the runs behind #2384.Tested: J815 (MacBook Air 15" M5) at
a8f7cec16bf6, in the batched candidatem0d16l14n1/linuxj815/prtest-r87b4bbe9, with no sleep words on the command line: PASS. Defaults as booted:mem_sleeps2idle [deep], "deep sleep is the default",deep=N untested_commit=N,nvme_apple.sleep_untested=N,appledrm.s2r_untested=Y("firmware stop enabled"). A plainsystemctl suspendwith Wi-Fi connected committed (10 coprocessors stopped), stayed down for 185.3 s and woke on a key/trackpad touch: 9 cores in one burst, CPUs 0-9, panel back on the first frame, Wi-Fi reconnected,suspend_statssuccess=1 fail=0. Regression: 0 SELinux denials (SELinux off), 0 failed units, 0 new kernel errors after the wake, 0 WARN/BUG/Oops.Risk: two-way door; T8142 only, in effect J813 and J815. J704 is unchanged: it has no sleep-controller node, so there is no deep sleep and no NVMe stop (
pm_suspend_via_firmware()is never set), and its DCP node has noapple,display-power, so its firmware keeps running. Every opt-in is still a parameter:appledrm.s2r_untested=0,nvme_apple.sleep_untestedfor other controllers, andmem_sleep_default=s2idlegives the old sleep state.Not yet: a J813 row at this head. J704 and other T8142 boards without a sleep node are untouched. On
mainalone, J815's system-sleep paths still need #2384 (hardware keys in place of the J813 gate) and its N1 needs #2385 + the Alpha handshake default (stacked PR on #2385) + #3130. The timed wake is a separate PR (apple_sleep.t8142_wake_sdefault 0).Details
Commits:
soc: apple: sleep: T8142: offer deep sleep by default:untesteddid two jobs. It gated the opt-ins (deep never the default, a dry run unlessuntested_commit=1), and it also turned on what a SoC with derived data needs anyway: the PMU scratch step notes (the T8142 PMU alarm step reads its compare and counter with them), the last-WFI stub set-up and power-gate report at probe, and the KUnit debug-switch rule. Those move to a newderivedflag;untestedkeeps only the opt-ins; T8142 isderivedand no longeruntested. A T8142 sleep then runs exactly the steps it ran with both parameters set.sleep-test.cexpectsderivedand notuntestedfor T8142.nvme: apple: T8142: stop ANS for deep sleep by default: drops.sleep_untestedfrom the T8142 hardware data (same stop values as T8132); the parameter stays for any controller still marked untested.drm/apple: dcp: T8142: stop the firmware for sleep by default:appledrm.s2r_untesteddefaults to 1. It covers the internal DCP and the external ones on firmware 27.0 (the firmware condition is unchanged); a deep sleep needs every display coprocessor stopped.arm64: dts: apple: t8142-j813-j815-sleep: Drop the dry-run notes: comments only.Merges with #2384: conflicts in
dcp.ccomments and thesleep.cSoC table (keep #2384's.smc_notice_after_peers = truenext to.derived = true). Whichever merges second needs a small rebase; the batched candidate above has it resolved.Evidence
Candidate:
m0d16l14n1/linuxj815/prtest-r87b4bbe9 =j815/prtest-r7d70fd05 (maina60fef7 + #2384 f9d03e8, #2385 b1c3392, #2192 c5daf57, #2193 8be9e73, #3123 822a1dd, #3124 1a272ce, #3125 4ad71b8, #3129 6d5ec4d, #3130 76bf36c and the open J815 PRs, unchanged) +j815/t8142-no-timed-wake50bc7fa +j815/t8142-deep-defaulta8f7cec +j815/centauri-alpha-sleep-defaultf63bd68.Command line, with no sleep words:
console=tty0 user4k=on pcie_aspm=off idle=nop arm64.nowfxtplus the image's root/ESP words,apple_sep.xart_writes=0 apple_sep.provision_keybag=0(removed frommain, logged as unknown and ignored) andaurora.untested_commit=0 aurora.alphasleep=0(stop the test initramfs setting the two opt-ins, so the kernel defaults are what run).Boot
53a3b9b0:The boot before it (same build,
fd81f884) also committed both sleeps it was given, but they woke after 0.35 s and 0.63 s with an SMC USB-C plug wake. With nothing plugged in, one port controller was flapping between "disabled" and "no connection" about twice a second, each flip a plug event, after a liquid-detection read at probe returned "unavailable". It was quiet after a reboot. That is a tipd issue outside this PR; it gets its own report.