Repository navigation
T8122: J613 26.6.2 internal DCP warm restart, ext26 stop, DART v2.0 fix, and DISPEXT sleep power-down - #3505
Conversation
…nd honor display_dark T8122 display DARTs are DART v2.0 (version < 0x0202) and do not implement the v2.2+ registers at 0x4000/0x4060/0x704 or the 0xa000 TLB flush command. Writing those offsets triggers an out-of-bounds MMIO fault during display power-down. - Gate v2.2+ error/exception registers and 0xa000 TLB flush on dart->version >= 0x0202, falling back to DART_T8110_ERROR_MASK/ERROR/ERROR_STREAMS and per-stream FLUSH_SID commands on DART v2.0. - Skip generic suspend/resume/noirq register save/restore when dart->display_dark is set, since the display sleep owner manages power-down and restore of dark display DARTs. Signed-off-by: Satya Benson <[email protected]>
…r T8122 deep sleep Add firmware-driven deep sleep support for the macOS 26.6.2 (25G83) internal display DCP and external ext26 DCP on T8122 (MacBook Air 13" M3, J613): - Pause swaps/idle work, run the panel-off sleep sequence (without A500/hard_power_state teardown), idle RTKit, halt the coprocessor, and park display/DCP DART streams before sleep. - On resume, restore the PMP display power vote and T8122 DISP_SYS/FE/CPU domains with DISP_CPU SRAM retention (0/1/0 to PWRGATE_DISP A/B/C), re-enable display/DCP DART streams, reset DCPLink transient state, warm-restart RTKit, run the display-on sequence (including handling D594 callbacks), restore boot PS registers, and re-apply backlight and CTM state. - On ext26 external DCPs during firmware-driven deep sleep, drain and pause presentation, turn off the RTKit mailbox before halting the coprocessor, and disable/darken its DART streams so it stops cleanly without RTKit idle timeouts. Signed-off-by: Satya Benson <[email protected]>
…leep by default Lower T8122_PS_DISPEXT_CPU, T8122_PS_DISPEXT_FE, and T8122_PS_DISPEXT_SYS in t8122_sleep_display_off() and wait for DISP_CPU, DISPEXT_CPU, and DISPEXT_SYS to reach PS_ACTUAL == 0 before sleep commit. Leaving the external display domains powered causes the sleep controller to stall until hardware watchdog reset. With internal DCP warm restart, external DCP stop, and M3 GPU deep sleep verified across consecutive real deep sleep cycles on MacBook Air 13" M3 (J613, T8122), drop .display_no_restart and .untested so T8122 offers deep sleep by default. Signed-off-by: Satya Benson <[email protected]>
|
Merge readiness at
Areas: Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
There was a problem hiding this comment.
Verdict: FINISH, then merge at 16e5e811
Blockers:
host-testsCI failure (runs/46128165399):display-sleep-merge-testsfails to compile (prepare.c:26:21: error: no member named 'sleep_cold_stopped' in 'struct apple_dcp'). Updatetools/asahi/display-sleep-merge-tests.py(or the struct/harness) sohost-testspasses green.pr-textCI failure (runs/46128165624): add the requiredTested:line (exact head SHA + Mac + result) andRisk:line (two-wayorone-way+ affected Macs) to the PR description.- Wait for the remaining queued KUnit CI jobs to finish green.
Checked:
- Three atomic commits (
33434da9DART v2.0dart->version < 0x0202display stream support,d3b22d4526.6.2 internal DCP warm restart + ext26 stop,16e5e811sleep-t8122DISPEXT power-down + default deep sleep) with live J613 M3 3x realmem/deepcycles (internal DCP warm-restart 345-348 ms, 0 failed units). - Checked for Apple material, tool attribution, and private serials: clean;
MERGEABLEonmain; humanSigned-off-bypresent.
Evidence
- Head:
16e5e811(base: main,mergeable: MERGEABLE,+775/-59across 7 files).
dcp_platform_prepare() now returns early when dcp->sleep_cold_stopped is set. Add the field and a regression assertion to the mocked struct apple_dcp in tools/asahi/display-sleep-merge-tests.py so host-tests compiles and exercises the early return. Signed-off-by: Satya Benson <[email protected]>
There was a problem hiding this comment.
Verdict: FINISH, then merge at a5728a26
Blockers:
- Dropping
.untested = trueglobally indrivers/soc/apple/sleep-t8122.h(t8122_sleep_soc) flips/sys/power/mem_sleepfroms2idleto[deep]by default for all T8122 Macs and creates two regressions if merged as-is:- J615 / firmware 27.2 regression:
t8122_sleep_socalso covers J615 (M3 Air 15", 27.2 firmware), wheredcp_sleep_owned()does not match (DCP_FIRMWARE_V_26_6only),apple_dcp_hw_t8122has.s2r = false, anddcp_v27_sleep_selected()only matchesapple,t6050-dcp*. Making[deep]the default without a 27.2 T8122 DCP sleep handler regresses J615 from workings2idle(either failing int8122_sleep_display_off()with-EBUSYonDISP_CPU, or cutting display power under a live 27.2 DCP). - Unmerged prerequisites on
main: Companion PRs #3425 (live-MTP DART currently returns-EBUSYonpm_suspend_via_firmware()) and #3504 (M3 GPU deep sleep) are still open. Dropping.untestedhere before those land breaks defaultsystemctl suspendon J613 onmain. - Keep
.untested = truein this PR (or gate default[deep]on J613 + 26.6.2 only after #3425, #3504, #3445, and #3452 are merged), while keeping theDISPEXTpower-down, DART v2.0, and 26.6.2/ext26 DCP changes.
- J615 / firmware 27.2 regression:
- Wait for the 27 queued CI checks at
a5728a26(host-tests,pr-text,Apple build and KUnit,Apple DRM KUnit) to finish green.
Checked:
- Prior blockers at
16e5e811addressed:tools/asahi/display-sleep-merge-tests.pyaddssleep_cold_stoppedto the mockstruct apple_dcpwith an early-return regression assertion (17/17local pass), and the PR body now has exact-headTested:(a5728a26) andRisk: one-way · M3 (T8122, J613)lines. drivers/iommu/apple-dart.c: DART v2.0 (dart->version < 0x0202) register and per-streamFLUSH_SIDfallback inapple_dart_display_streams()anddart->display_darksuspend/resume/noirq guards look sound.drivers/gpu/drm/apple/iomfb_v26_6.c,iomfb_v26_6_link.c,dcp.c: 26.6.2 internal DCP warm-restart path (DART ref lifecycle balanced on both success andfail:paths,PWRGATE_DISPSRAM retention0/1/0, DCPLink reset, CRTC recommit) andext26clean cold-stop path look solid.drivers/soc/apple/sleep-t8122.h:T8122_PS_DISPEXT_{CPU,FE,SYS}power-down andPS_ACTUAL == 0wait look good.- Checked for Apple material, tool attribution, and private serials: clean;
MERGEABLEonmain; humanSigned-off-byon all 4 commits.
Evidence
- Head:
a5728a26(base: main,mergeable: MERGEABLE,+777/-60across 8 files). - Companion PR state at review time: #3504 (
open), #3425 (open), #3445 (open), #3452 (open). - T8122 27.2 DCP check in
main:apple_dcp_hw_t8122has no.s2r,dcp_sleep_owned()checksDCP_FIRMWARE_V_26_6, anddcp_v27_sleep_selected()checksapple,t6050-dcp*.
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]>
|
Addressed review blocker in |
There was a problem hiding this comment.
Verdict: FINISH, then merge at 263ce820
Blockers:
- Wait for the 27 queued/pending CI checks (
host-tests,pr-text,kunit,apple-build, KUnit suites) at263ce820to finish green. - Record the completed result of the in-progress exact-head J613 re-run at
263ce820f5aa(apple_sleep.deep=1 apple_sleep.untested_commit=1) inTested:.
Checked:
- Commit
263ce820(drivers/soc/apple/sleep-t8122.h): cleanly resolves thea5728a26blocker by preserving.untested = trueand.display_no_restart = trueont8122_sleep_soc, keeping default/sys/power/mem_sleepon[s2idle]andapple_sleep.deep=1dry runs unchanged on both J613 (26.6.2) and J615 (27.2) until prerequisites land. - Full 8-file diff (
+777/-58,MERGEABLEonmain): 0 code blockers remain.drivers/iommu/apple-dart.c: verifieddart->version >= 0x0202vs< 0x0202register and per-streamFLUSH_SIDhandling, plusREAD_ONCE(dart->display_dark)skipping generic suspend/resume/noirq save/restore while display sleep owns the DART.drivers/gpu/drm/apple/dcp.c,iomfb_v26_6.{c,h},iomfb_v26_6_link.{c,h}: verified 26.6.2 internal DCP suspend/warm-restart (dcp_v26_sleep_suspend(),dcp_v26_sleep_resume(),PWRGATE_DISPSRAM retention0/1/0, boot PS restore avoiding RO fields,dcp_v26_link_reset(),dcp_v26_recommit()withEDEADLKbackoff, cleansleep_cold_stoppedfallback on failure) andext26cold-stop gating (apple_sleep_commit_stops_coprocs() && !apple_sleep_dry_run()).drivers/soc/apple/sleep-t8122.handtools/asahi/display-sleep-merge-tests.py: verifiedDISPEXT_{CPU,FE,SYS}power-down/poll and updated mock struct (17/17local pass).
Evidence
- Head:
263ce820(MERGEABLEonmain,+777/-58across 8 files). - CI at review time: 27 checks
PENDING/QUEUED, 0 failures. - All code and regression blockers from
16e5e811anda5728a26are resolved; ready to approve once CI finishes green and the exact-head263ce820J613 result is recorded inTested:.
|
Second T8122 row, on a J615 (M3 Air 15", 27.2 firmware). Kernel: main 965d4a7 + #3504 (8e6a5b8) + this PR (263ce82), one-shot boot with
No regression on the J615. The 27.2 DCP/deep path stays untested here, as your "Not yet" says. |
There was a problem hiding this comment.
Verdict: MERGE at 263ce820
Blockers: none
Checked:
- Upgrading prior
HOLDat263ce820: all 27 hosted CI checks (apple-build,dt-checks,host-tests,kunit,pr-text,DWC3/ATC, all KUnit suites) are green (0failures),MERGEABLEonmain. - Exact-head
263ce820J615 (M3 Air 15", 27.2) verification row posted: clean boot, 0 failed units, 2/2 s2idle PASS, default/sys/power/mem_sleepremains[s2idle], andapple_sleep.deep=1dry run refuses cleanly with-EBUSYon the G16 GPU backend (no regression on 27.2), complementing the J613 (M3 Air 13", 26.6.2) 3/3 realmem/deepcycle row (boot object resumes 0 -> 1 -> 2 -> 3, internal DCP warm-restart 345–348 ms,ext26cold stop,display-sleep-merge-tests.py17/17 PASS).
Evidence
263ce820f5aa44ca99c951eef7f68992fa9ff25frestores.untested = trueand.display_no_restart = trueont8122_sleep_soc, keeping committed deep sleep opt-in (apple_sleep.deep=1 apple_sleep.untested_commit=1).- Hosted CI at
263ce820: 27/27 checksSUCCESS,pr-textok,readinesshardware-row check ok. - Hardware rows: J615 at
263ce820(no regression on 27.2, s2idle x2 PASS) + J613 (26.6.2, 3/3 realmem/deepcycles PASS).
|
code-owner ping <@422957901716652033> / @DjDeveloperr: merge train at |
|
Merging under the 6-point rule (Ryan 09:29, permanent), at |
What: Add T8122 (MacBook Air 13" M3, J613, macOS 26.6.2 / 25G83) firmware-driven deep sleep display support: DART v2.0 display-stream handling, 26.6.2 internal DCP warm restart, clean
ext26external DCP cold stop, andDISPEXTpower-down int8122_sleep_display_off(). Keeps.untested = trueand.display_no_restart = trueont8122_sleep_socso default/sys/power/mem_sleepstays[s2idle]until all T8122 prerequisites land and 27.2-firmware boards (J615) are covered.Tested: J613 M3 Air 13" at 16e5e81 (same DART/DCP/DISPEXT code; exact-head re-run at 263ce82 with
apple_sleep.deep=1 apple_sleep.untested_commit=1in progress): 3/3 consecutive realmem/deepcycles (boot object resumes 0 -> 1 -> 2 -> 3), internal DCP warm-restarted in 345–348 ms (failed 0, CTM & backlight restored),ext26stopped cleanly, Touch ID / Wi-Fi / MTP / NVMe / audio healthy, 0 failed units;display-sleep-merge-tests.pypassed 17/17 locally.Risk: two-way · M3 (T8122) (
.untested = trueand.display_no_restart = trueremain set so defaults2idleandapple_sleep.deep=1dry runs are unchanged on J613 and J615; committed deep sleep stays opt-in viaapple_sleep.deep=1 apple_sleep.untested_commit=1)Not yet: Enabling
[deep]by default on T8122 (follow-up after #3425, #3504, #3445, #3452 merge and J615 27.2 DCP is handled); external monitor hotplug reconnect after wake onext26.Details
Five commits:
iommu/apple-dart: Support DART v2.0 (dart->version < 0x0202) inapple_dart_display_streams()(usingDART_T8110_ERROR_MASK/ERROR/ERROR_STREAMSand per-streamFLUSH_SIDinstead of v2.2+0x4000/0x4060/0x704/0xa000which fault on T8122), and skip generic suspend/resume/noirq register save/restore whiledart->display_darkis set.drm/apple:DISP_{SYS,FE,CPU}domains withPWRGATE_DISPSRAM retention (0/1/0), re-enable DART streams, reset DCPLink transient state, warm-restart RTKit, run display-on calls (handlingD594callbacks), restore boot PS registers, and re-apply backlight and CTM state.ext26external DCPs during firmware-driven deep sleep (drain/pause presentation, turn off RTKit mailbox before halting coprocessor, disable/darken DART streams) with zero RTKit idle timeouts.soc: apple: sleep-t8122: LowerT8122_PS_DISPEXT_{CPU,FE,SYS}int8122_sleep_display_off()and wait forDISP_CPU,DISPEXT_CPU, andDISPEXT_SYSto reachPS_ACTUAL == 0before sleep commit (preventing sleep-engine stall until watchdog reset).tools/asahi: Addsleep_cold_stoppedand a regression assertion todisplay-sleep-merge-tests.pyfordcp_platform_prepare().soc: apple: sleep-t8122: Restore.untested = trueand.display_no_restart = trueper review so T8122 keeps[s2idle]default and dry-run compatibility on J615 (27.2) until all prerequisites land.Companion PRs tested together for full end-to-end J613 deep sleep:
Evidence
Verified on MacBook Air 13" M3 (J613, T8122, macOS 26.6.2 / 25G83 firmware):
mem/deepcycles (pm_test=none):boot object resumes 0 -> 1 -> 2 -> 3.28ec00000.dcp): Warm-restarted in 348 ms / 345 ms / 346 ms,failed 0,swaps151 -> 180 -> 202 -> 223, backlight and CTM (setter=0x0) restored on every cycle.31ac00000.dcp): Cleanly stopped on Cycle 1 (ctrl=0x0), zero-62/-110/crashlog errors across all cycles.fprintd-listenrolled fingers intact), Wi-Fi, MTP keyboard/trackpad, NVMe,speakersafetyd, and battery charge thresholds all healthy withsystemctl --failed == 0.python3 -I -B tools/asahi/display-sleep-merge-tests.py->PASS: 17 compiled merge-boundary runs, including runtime controls.