Repository navigation
iommu/apple-dart: allow runtime CIO DART power cycles - #3320
Conversation
apple_dart_cio_prepare() restricts CIO DART power cycles to PM_SUSPEND_MEM because existing callers only ran during deep sleep. External display processors that power down while idle at runtime need the same save/disable/restore/reopen lifecycle outside system suspend, while apple_dart_suspend() and apple_dart_resume() already skip DART MMIO whenever cio_active is set. Factor the shared preparation logic into apple_dart_cio_prepare_common() and export apple_dart_cio_prepare_runtime() for runtime power-gating consumers, keeping the PM_SUSPEND_MEM check on apple_dart_cio_prepare(). Signed-off-by: Erik Bourget <erik@ebourget.net>
|
Merge readiness at
Areas: Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
…ommon Signed-off-by: Erik Bourget <erik@ebourget.net>
There was a problem hiding this comment.
Verdict: Code approved at 50257ff52fd4. Runtime hardware evidence remains open.
Checked: The suspend wrapper still rejects prep outside suspend-to-RAM. The runtime wrapper requires the same bound owner and takes the same writer-close, register-save and provider-reference path. I ran the exact-head owner harness here: 35 ownership cases and 14 negative controls passed. Hosted Apple build, KUnit and host tests pass.
Before merge, attach the current-head 26.6.2 external DCP runtime power-cycle row, including reopen and a working display after idle power-off.
Signed-off-by: Erik Bourget <erik@ebourget.net>
Document the caller's serialization and cleanup obligations on apple_dart_cio_prepare_runtime(). Signed-off-by: Erik Bourget <erik@ebourget.net>
|
Updated
At J713 (M4 MacBook Air, T8132, firmware 27.2) at The on-device 26.6.2-firmware external DCP runtime CIO DART power-cycle row remains open under |
There was a problem hiding this comment.
The follow-up documents the runtime transaction's serialization and finish requirements. Reviewed the signed forward merge and the current-head owner harness and J713 DPMS/s2idle report. Code approved. The external DCP runtime CIO DART power cycle on 26.6.2 remains the landing hold.
|
Acknowledged the code approval at Updated the PR body with
2026-11-28 J313 (M1 MacBook Air, T8103) Group A hardware verification:
Open items remain tracked under |
|
code-owner ping @DjDeveloperr: closeout merge at |
|
Merging under the 6-point rule (Ryan 09:29, permanent), at |
What: Factor the CIO DART power-cycle preparation in
apple_dart_cio_prepare()into a shared helper and exportapple_dart_cio_prepare_runtime()so runtime power-gating consumers (such as external display processors powering down while idle) can run the same save/disable/restore/reopen lifecycle outsidePM_SUSPEND_MEM, while keepingapple_dart_cio_prepare()restricted toPM_SUSPEND_MEM.Tested: J313 (M1 MacBook Air, T8103) Group A boot at
36a97130f2c5(merged ontomainee36fbdcd1c8, all 4 changed PR files verified byte-identical): smoke pass, DPMS off/on x3 PASS, deep S2R x2 PASS, 16 MB RAM integrity PASS, 0 Oops/BUG/WARN (same Group A boot saw an unisolated ISP capture failure-19/DART fault after the first deep-S2R resume, whereas baselinemaincaptured successfully after its first deep-S2R resume and became unreachable after its second deep-S2R cycle, cause unisolated;s2idlehard-resets J313 on baselinemain). J713 (M4 MacBook Air, T8132, firmware 27.2) at36a97130f2c5in batched candidateb3dbf237542b: boot, 3x DPMS off/on and 3xs2idleclean, 0 DART/CIO faults, 0 failed units (#3321external DCP idle-off inactive on 27.2). Host builds, KUnit (io-pgtable-dart31/31), and selftests pass at36a97130f2c5.Risk: two-way door · Apple Silicon CIO DART consumers (
drivers/iommu/apple-dart-cio.c+include/linux/soc/apple/dart-cio.hacross M1-M5:pcie-apple-cio.c,apple-cio-sleep.c,iomfb_m4.c); existingapple_dart_cio_prepare()behavior is unchanged.Revert:
git revert -m 1 <merge_commit>onmain(or revert36a97130f2c5,50257ff52fd4, and628ceb95daefin reverse order). Kernel driver, header, and host-test changes only; no persistent on-disk, ESP, Stage 2, or DT state is modified.Not yet: Current-head
26.6.2-firmware external-DCP runtime CIO DART power-cycle evidence showing that the CIO DART reopens and a working external display returns after idle power-off (via stacked PR#3321feat/iomfb-m4-ext-idle-off; the lab J713 runs27.2firmware, where that consumer is inactive); isolating the Group A post-first-S2R ISP capture failure (-19/DART fault) on J313 (left unisolated because J313 became unreachable after the second deep-S2R cycle on baselinemainand awaits physical recovery; note also thats2idlehard-resets J313 on baselinemain).Details
apple_dart_cio_prepare_common(struct apple_dart_cio *s)fromapple_dart_cio_prepare().apple_dart_cio_prepare_runtime(struct apple_dart_cio *state)ininclude/linux/soc/apple/dart-cio.h(with-EOPNOTSUPPinline stub whenCONFIG_APPLE_DARTis disabled) and documents its synchronization against suspend/removal paths andapple_dart_cio_finish()cleanup obligations.apple_dart_suspend()andapple_dart_resume()already skip DART MMIO whenevercio_activeis set, so runtime-prepared CIO DARTs stay safely powered off across system suspend and resume until the consumer callsapple_dart_cio_on()/apple_dart_cio_finish().main(aa3351bc8e6f) intofeat/apple-dart-cio-runtimeat830ce303e977(0 conflicts, signed off) to carry 27.2 internal-DCP support for stacked PR drm/apple: m4: power down idle external DCPs at runtime #3321.Evidence
mainee36fbdcd1c8+#3085,#3290,#3329,#3333,#3495,#3506,#3546,#3289,#3320, 2026-11-28):888c041944da96032a9252504c4d5543b906fd98717234eca5e091150af85798949dc089ed390b7535dd5ef2a6e99975c3026658e58dbd9d17e9b20d2bbb7d71#3320(36a97130f2c5) verified byte-identical against#3320merged alone ontomain(ee36fbdcd1c8).eDP-1connected/enabled, input, networking, audio enumeration, Borealis compute/render checks,0AVC denials; one baseline failed unitspeakerguardd-v2-switchtest.servicealso present on baselinemainee36fbdcd1c8); DPMS off/on x3 PASS (dpmsStatus, backlight0 -> 130); deep S2R (rtcwake -d rtc1 -m mem -s 30) x2 PASS (0 -> 2), 16 MB RAM integrity PASS,0Oops/BUG/WARN.apple-ispfirmware boot-19/ DART translation fault) after the first deep-S2R resume; on baselinemain(ee36fbdcd1c8, kernel SHA-256f750b04aebd30c439edbd3b995c17b3fd9ad805a4561dadc7ecbf78040c89289), ISP capture worked after the first deep-S2R resume, and J313 became unreachable after the second baselinemaindeep-S2R cycle (cause remains unisolated; awaiting physical recovery), leaving the Group A ISP failure unisolated. Also,s2idlehard-resets J313 on baselinemainand on the undocked daily kernel (while docked, the daily kernel — not baselinemain— refuses suspend with-16from the Thunderbolt NHI), so deep S2R with RTC wake is the working sleep path on J313.36a97130f2c5in batched candidateb3dbf237542b(main9e38a276dcb4, default cmdline): boot, 3x real DPMS off/on and 3xs2idlecompleted with 0 DART/CIO faults or errors and 0 failed units.git diff 36a97130f2c5..b3dbf237542b -- drivers/iommu/apple-dart-cio.c include/linux/soc/apple/dart-cio.h tools/asahi/dart-cio-owner-tests.c tools/asahi/dart-cio-owner-tests.pyis empty (all 4 files byte-identical to36a97130f2c5).make O=_build_3320 ARCH=arm64 LLVM=1 W=1 drivers/iommu/apple-dart.o(defconfig+asahi.config) at36a97130f2c5— 0 errors, 0 warnings (apple-dart-cio.cis included byapple-dart.c).python3 tools/asahi/dart-cio-owner-tests.pyat36a97130f2c5— PASS 35 CIO DART ownership cases, PASS 14 negative controls.python3 tools/asahi/apple-dart-range-tests.py,python3 tools/asahi/dart-sleep-writer-tests.py,python3 tools/testing/selftests/drivers/apple/bcm4377-radio-sids.pyat36a97130f2c5— PASS../tools/testing/kunit/kunit.py run --arch=arm64 --make_options LLVM=1 --kunitconfig=drivers/iommu/io-pgtable-dart.kunitconfigat36a97130f2c5— 31 passed, 0 failed../scripts/checkpatch.pl --strict --git aa3351bc8e6f..36a97130f2c5—628ceb95daef0 errors/0 warnings/0 checks;50257ff52fd40 errors, 1 pre-existing warning (Missing commit description);36a97130f2c50 errors, 1 commit-body line-length warning;git diff --checkclean.git merge-tree --write-tree 36a97130f2c5 origin/main(ee36fbdcd1c8) — clean (8d7e070a3c48), 0 conflicts.36a97130f2c5: 22/22 checks passed (apple-build,host-tests,kunit, 16 KUnit suites,pr-text,readiness).