Repository navigation
iommu: apple-dart: keep a live MTP through a firmware-driven sleep - #3425
Conversation
A DART that took a live MTP handoff (apple,bypass-handoff-streams) refused every system sleep but s2idle, so on J615 the deep sleep failed in dpm_suspend with -EBUSY before the sleep driver ran. The rtkit helper already keeps the MTP running through a firmware-driven sleep (it sends the AP idle notice and nothing else), so keep its DART the same way as through s2idle: no save, no reset, its domains on the awake path, and the resume checks that stream 1 is still in bypass. The noirq callbacks skip it, since the runtime suspend they would call refuses a live MTP. Signed-off-by: Ryan Murray <[email protected]>
There was a problem hiding this comment.
Verdict: HOLD at df442f67 pending hosted checks. The isolated DART change is approved.
Checked: A live MTP DART must pass the stream 1 bypass check before the retention flag is set. That flag skips the runtime suspend and resume path in noirq. Normal resume clears it and returns EIO if bypass was lost. The non-live path is untouched. The change adds no binding or board selector.
The author tested this exact DART commit in the combined build. J615 passed s2idle and deep dry run, and J473 passed the non-live control. A full J615 deep wake remains unqualified.
|
Merge readiness at
Areas: Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
|
Tested on J413 (MacBook Air 13" M2, T8112, macOS 27.2 stub
|
satchlj
left a comment
There was a problem hiding this comment.
Reviewed at exact head df442f67:
apple_dart_system_suspend()cleanly extends the existing live-MTP keep-alive path (device_set_awake_path(),live_mtp_sleep = true, stream 1 bypass check) topm_suspend_via_firmware(), failing closed (-EIO) if bypass is not active.apple_dart_sys_suspend_noirq()/apple_dart_sys_resume_noirq()skip runtime suspend/resume whendart->live_mtp_sleepis set, preventing a live-MTP refusal or inherited-DMA reset/invalidate.apple_dart_system_resume()clearslive_mtp_sleepand verifies stream 1 TCR bypass is still intact across sleep, failing closed (-EIO) otherwise.- Non-live-MTP DARTs and
s2idlebehavior are unchanged.
Hardware-verified on J613 (MacBook Air 13" M3, T8122) across 3/3 committed mem/deep cycles in addition to the J413 committed deep-sleep row above and the author's J615/J473 rows. CI is 19/19 green at df442f67.
Keep .untested = true and .display_no_restart = true on t8122_sleep_soc so /sys/power/mem_sleep remains [s2idle] by default until all T8122 deep-sleep prerequisites (aurora-silicon#3425, aurora-silicon#3504, aurora-silicon#3445, aurora-silicon#3452) have landed and 27.2-firmware T8122 boards (J615) have a matching display sleep path. With .untested and .display_no_restart preserved, default s2idle and apple_sleep.deep=1 dry runs stay intact on both 26.6.2 (J613) and 27.2 (J615), while committed J613 deep sleep runs via apple_sleep.deep=1 apple_sleep.untested_commit=1. Signed-off-by: Satya Benson <[email protected]>
What: A DART that took the boot loader's live MTP handoff (
apple,bypass-handoff-streams) refused every system sleep but suspend-to-idle with-EBUSY, so a firmware-driven (deep) sleep failed indpm_suspendbefore the sleep driver ran (J615, M3 Air 15"). The rtkit helper already keeps the MTP running through a firmware sleep (AP idle notice only), so its DART is now kept the same way as through s2idle: no save or reset, its domains on the awake path, and the resume checks that stream 1 is still in bypass. Split out of #3413, whose review cleared this part.Tested: J615 (M3 Air 15", 27.2 firmware) on a kernel carrying this exact commit (
df442f67, built as part of #3413's head6a757b15;drivers/iommu/apple-dart.cbyte-identical): default-cmdline boot smoke (eDP, MTP keyboard + trackpad bound, Wi-Fi, NVMe) and s2idle 3/3 with the MTP still bound and 0live MTP bypass lost; withapple_sleep.deep=1the deep dry run now passes every check (wasapple-dart 2fa808000.iommu: platform_pm_suspend returns -16). J473 (M2 mini, no live MTP handoff) on the same kernel: boot smoke + s2idle 3/3.Risk: two-way · only DARTs with a live MTP handoff (the loader sets the property; J615/J613 today), only in a firmware (deep) sleep, which T8122 still offers only with
apple_sleep.deep=1. s2idle unchanged.Not yet: a completed deep wake on the J615 (blocked elsewhere: see #3413) to show the MTP and its DART come back from a real power-down; until then the resume check fails closed (
-EIO, error logged) if the bypass is lost.Details
apple_dart_system_suspend(): a live-MTP DART now acceptspm_suspend_via_firmware()sleeps as well as s2idle, with the same handling (device_set_awake_path(),live_mtp_sleep, TCR bypass check).apple_dart_sys_suspend_noirq()/apple_dart_sys_resume_noirq(): skip a DART kept that way, since the runtime suspend they would call refuses a live MTP.Evidence
J615 rows
r1dry(before:-EBUSYfrom2fa808000.iommu),r2dry/prBdry(after:dry run: every check passed),prA(s2idle 3/3, MTP bound after each), J473prJ473: lab storetraces/power/20261128-m3-deepsleep/README.md. Review of the DART part on #3413: aurora-silicon-review, "The live-MTP DART retains bypass and checks it on resume."