Repository navigation
soc: apple: sleep: T8112 (M2) suspend-to-RAM, enabled on J413 - #3647
Conversation
|
Row at this exact head, Setup:
Every cycle showed As the description says, Without linux#3595 the reboot afterwards took the 2-min watchdog path: the journal stops at 19:53:26 and the next boot starts at 19:55:36. That's the known DCP-unbind hang #3595 fixes, and it's independent of this series. |
There was a problem hiding this comment.
Verdict: FINISH, then merge at 32dede93
Blockers:
dt-checksfailure introduced byarch/arm64/boot/dts/apple/t8112.dtsi(run46297084614): all four T8112 DTBs (t8112-j413,t8112-j415,t8112-j473,t8112-j493) fail schema validation on two new additions:display-power@23b700000:["apple,t8112-display-power", "apple,t8103-display-power"]is not listed inDocumentation/devicetree/bindings/display/apple,t8140-display-power.yaml.gpu@206400000(apple,agx-t8112):apple,pwr-filter-time-constant,apple,pwr-integral-gain,apple,pwr-integral-min-clamp, andapple,pwr-proportional-gainfail schema validation (not documented inDocumentation/devicetree/bindings/gpu/apple,agx.yaml).
- Merge order dependency on #3595: enabling
.s2r = trueonapple,t8112-dcpindrivers/gpu/drm/apple/dcp.cactivates on default boots (not gated byapple_sleep.deep=1) and causes a 2-minute watchdog hang on reboot after DPMS off / deep sleep without #3595 (confirmed by the exact-head J413 comment). Wait for #3595 to merge first. - Default-boot T8112 peer regression row: while
&sleepis J413-only and.untested = truegates deep sleep, the sharedt8112.dtsiand driver edits (dcp.c.s2r/.s2r_ext,t8112.dtsigpu+seppower-domains,irq-apple-aic.c.fw_suspend,macsmc.csaved_enabled,pmp.rs,thunderbolt/apple.c) apply on default boots of all T8112 Macs (J413,J415,J473,J493). Please add a default-boot / s2idle no-regression row on a second T8112 board (e.g., J473) alongside the J413 deep-sleep row. - Queued hosted CI: wait for
apple-build,kunit,pr-text,readiness, andDWC3/ATC builtin-modular-atcto finish green after the DT schema fix (note: the redhost-testsrun46297084997failed only on pre-existingmainapple-scaler-recovery-testsandg17-output-fence-tests).
Checked:
- Reviewed the 21-commit series (
+1529/-20, all 21 commits carry DCOSigned-off-by) acrosssleep-t8112.h,sleep.c,sleep-test.c,apple-dart.c,dcp.c,irq-apple-aic.c,macsmc.c,pmp.rs,thunderbolt/apple.c,t8112.dtsi,t8112-j413.dts,apple,t8140-sleep.yaml, andtools/asahi/pciec-policy-tests.py. - Verified
apple,t8140-sleep.yamlpassesdt_binding_check(binding ok),t8112_sleep_sockeeps.untested = true, commit32dede93restricts the GFX power-off timeout panic togpu_bound, andapple_dart_t8112_display_streams()is scoped toapple,t8112-dart. - Verified
t8112_commit_off(20 entries) andt8112_aon_commit_off(7 entries) fit theiru32bitmasks (commit_lowered,aon_lowered), andpciec-policy-tests.pyextends shared-PHY ACIO sleep mutation coverage tot8112. - Reviewed the exact-head J413 row (
32dede939b, 3x 10 srtcwake -d rtc1 -m memcycles, DCS0x777->0x333->0x777, GPU firmware back in 2.9–4.5 ms, 25/25 GLES FBO renders PASS per wake,agx=1 gfx_err=0, 0 SLC timeouts).
Evidence
dt-checksrun46297084614(t8112-j413.dtb,t8112-j415.dtb,t8112-j473.dtb,t8112-j493.dtb):/soc/display-power@23b700000: failed to match any schema with compatible: ['apple,t8112-display-power', 'apple,t8103-display-power'](Documentation/devicetree/bindings/display/apple,t8140-display-power.yaml).gpu@206400000 (apple,agx-t8112): schema errors onapple,pwr-filter-time-constant,apple,pwr-integral-gain,apple,pwr-integral-min-clamp,apple,pwr-proportional-gain.
- Minor non-blocking notes:
drivers/soc/apple/sleep-t8112.h:1-8header comment still calls it a Phase 2 dry-run profile that refuses physical commit, whereas the file now implements full commit/wake.t8112_map()uses rawioremap_np()instead of adevm_helper; probe-error paths after the first mapping will leak earlier mappings.t8112_sleep_map_regs()callst8122_is_pcore()/t8122_read_hid4()/t8122_clean_range_slc()while defining identicalt8112_*helpers immediately below.
|
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 at 32dede93.
The board-only sleep override should be justified by hardware description. Please put the common T8112 sleep description in the SoC tree and use the presence of required resources to qualify deep sleep. Leave s2idle as the default where the required resources are absent or unqualified. If J413 is the only board with a required resource, identify that resource and explain which DT supplies it.
The current DT checks fail on the T8112 display-power compatible and undocumented GPU properties. Fix the bindings or remove the unsupported additions. Document the provenance of the GPU power values. The J413 trial passed three RTC wakes and post-wake renders, but shared DT and driver changes also affect J473. Add a J473 default-boot and s2idle regression run, and keep #3595 first so DPMS-off shutdown does not hang.
32dede9 to
d554575
Compare
|
Rebased onto current |
There was a problem hiding this comment.
Verdict: HOLD at d5545755.
The new bindings describe the display compatible and GPU properties. The PR still enables the sleep node on J413 alone. Please resolve the earlier request to select deep sleep using the required resources, or document the resource absent on the other T8112 boards. The schema descriptions also do not establish publishable provenance or explain why the GPU power values need to be literals in the shared DTS. Please resolve that before landing.
The new J413 result, a J473 default-boot and s2idle peer, fresh hosted checks, and #3595 first remain outstanding.
|
Moved the enable to the SoC: What was checked:
Old head |
There was a problem hiding this comment.
Verdict: HOLD at ec5d5289 — SoC-wide &sleep enablement and DT binding additions look clean; waiting on #3595, exact-head J413 + T8112 peer rows, hosted CI, and the open provenance note.
Blockers:
- Merge order (
#3595):aurora-silicon/linux#3595is still open; landing.s2r = trueonapple,t8112-dcpahead of#3595still causes the 2-minute watchdog hang on reboot after DPMS off / deep sleep. - Hardware rows at
ec5d5289:- Exact-head
ec5d5289J413 verification row is pending (last J413 row was at32dede93). - Default-boot and
s2idleregression row on a second T8112 board (e.g.J473) is still pending — especially relevant now thatec5d5289enables&sleepacross all T8112 boards (j413,j415,j473,j493).
- Exact-head
- Hosted CI at
ec5d5289:dt-checks,apple-build,kunit,host-tests,source,rust-build, andDWC3/ATCare still queued/running (onlypr-textandreadinesshave completed). - Open review item from
d5545755: please reply on the publishable provenance of the four newly addedapple,pwr-*GPU properties inapple,agx.yaml/t8112.dtsiand why they are needed in the shared DTS.
Checked:
- Audited
d5545755(Documentation/devicetree/bindings/display/apple,t8140-display-power.yaml,Documentation/devicetree/bindings/gpu/apple,agx.yaml) andec5d5289(arch/arm64/boot/dts/apple/t8112.dtsi,arch/arm64/boot/dts/apple/t8112-j413.dts):apple,t8140-display-power.yamladds the["apple,t8112-display-power", "apple,t8103-display-power"]fallback item and updates theallOfif:matcher tocontains: const: apple,t8103-display-powerso T8112 inherits the T8103 schema branch cleanly.apple,agx.yamldocuments all fourapple,pwr-*properties added tot8112.dtsi(matching the existingapple,perf-*/apple,ppm-*float/u32 conventions int8112.dtsi).ec5d5289removesstatus = "disabled"from&sleepint8112.dtsiand places the common SoC wake sources there, leaving only the MTP keyboard/trackpad additions (229,231,248) int8112-j413.dts(while.untested = truekeepss2idleas the default across all T8112 boards).
- Verified
&dcpis enabled ont8112-j473.dts(HDMI-A on primary DCP) as well asj413/j415/j493, soapple,display-coprocessors = <&dcp>resolves to an enabled node on every T8112 board. - Confirmed DCO
Signed-off-byond5545755andec5d5289, andMERGEABLEonmain.
Evidence
d5545755+ec5d5289:+28/-3acrossapple,t8140-display-power.yaml,apple,agx.yaml,t8112.dtsi, andt8112-j413.dts.- Non-blocking note:
t8112-jxxx.dtsiandt8112-j473.dtsalso enable&dcpext(for USB-C external displays), whereast8112.dtsilistsapple,display-coprocessors = <&dcp>;alone. Worth confirming in the J473 row thats2idle/ default boot with&dcpextenabled behaves cleanly and noting whether&dcpextS2R is intentionally deferred.
There was a problem hiding this comment.
The delta moves the shared sleep enable and wake sources into t8112.dtsi, with the J413 MTP wake sources kept in the board override. That addresses the board-only enable finding. Before landing, document the publishable provenance of the GPU power values, confirm the common wake-source mapping beyond the J413, and provide exact-head J413 and J473 rows and clean dtbs_check. Keep this behind #3595.
|
Binding check after the rebase, since
With the patch-ids unchanged, the J413 row at |
DjDeveloperr
left a comment
There was a problem hiding this comment.
Verdict: FINISH, then merge at c5a42377. The code is right, and the T8112 sleep code stays in sleep-t8112.h and the T8112 match entries, so other SoCs' paths don't change. Three things are still open before it can merge.
Missing:
- Merge after #3595.
apple_dcp_hw_t8112gains.s2r = true, so on a default boot DPMS off now stops the firmware and powers the display domains down. Without #3595, a reboot after that hangs indevice_shutdown()until the watchdog, as your J413 rows show. This PR's Risk line ("a default boot behaves as before") should say so too. - CI at this head: 8 self-hosted KUnit jobs have been queued since 03:00Z. One is
KUnit macsmc, and this PR changesdrivers/mfd/macsmc.c. - A default-boot row on a second T8112 board at this head.
c5a42377enables the sleep node, and the DCP and DART sleep paths now run on J415, J473 and J493 too. Their only coverage is J413. J473 is the one that differs most: it drives HDMI from the internal DCP and has no panel or MTP. One boot there is enough: HDMI on, DPMS off then on, an s2idle cycle, a reboot. As you planned, it covers both the driver and the SoC-level enable.
Checked: the four GPU apple,pwr-* values carry their ADT source in the binding. apple,t8112-display-power is documented, and dt_binding_check and the T8112 CHECK_DTBS add no warnings against main. Deep sleep still needs apple_sleep.deep=1 and untested_commit, both of which exist on main, so this adds no new parameter. All new driver branches select on device compatibles, not machine names. The J413 row at ec5d5289 carries over under unchanged patch-ids.
There was a problem hiding this comment.
Verdict: MERGE at c5a423774421
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: The rebase preserves the reviewed patch, including SoC-level selection. The prior J413 result still tests the same change. Keep the new-head J473 deep-sleep row, hosted DT checks, publishable GPU power provenance and the shutdown-fix landing order.
Follow-ups (not blocking): current CI, J473 deep-sleep row, GPU power provenance, shutdown-fix landing order
|
J473 row at
|
tools/asahi/pciec-policy-tests.py: main added the T6020 mutations (t6020-drop-sleep-removes-domains, t6020-drop-displays-first) to the shared-PHY ACIO sleep test, and this branch turns that test into one run per SoC (T8122 and T8112). Main's two T6020 entries are added to the per-SoC mutation table; the T6020 hw block is in the fixture for every SoC, so they apply to both runs.
|
Merged main in at |
|
Merging at |
What: T8112 (M2) suspend-to-RAM, enabled on the J413 MacBook Air: a T8112 profile in the Apple SoC sleep driver plus the pieces it needs elsewhere.
Sleep driver and DT:
ps_gfx, and the GPU'sapple,pwr-*controller properties.Other drivers:
This is the series from #3371, WJW's
feat/t8112-s2rat208e2a333. It's cherry-picked onto currentmainwith no conflicts and with each commit's author andSigned-off-byunchanged. The T8112 profile keeps.untested, so deep sleep is offered withapple_sleep.deep=1and a commit needsapple_sleep.untested_commit=1. The default stays s2idle.Tested: Current head
c5a423774421is the same code rebased ontomain(fromec5d52890140).26B123, GPU firmware 27.2), on the series plus linux#3595 (the separate post-sleep reboot fix):auroraand the desktop live. Each lasted its full alarm time with wake sourceNUB.SPMI0.SW3.0x777->0x333->0x777. The GPU firmware came back in 3.6–4.4 ms, and 25/25 GLES renders passed after each wake.32dede939b) on J413: 3 deep sleeps of 10 s each, all passing, with GPU renders passing after each wake. See the comment below.Risk: two-way door · T8112 only. Deep sleep itself needs
apple_sleep.deep=1plusuntested_commit, so defaultmem_sleepstays s2idle. Enabling.s2r = trueonapple_dcp_hw_t8112also makes DPMS off stop DCP firmware and lower display domains on a default boot, so this PR depends on #3595 merging first to avoid adevice_shutdown()hang on reboot after DPMS off.Not yet:
apple_soc_edacevent-log source 2 stays asserted after each wake. The first access to the PMGR clock-mux block raises it; T8112 (Apple M2 / J413) suspend-to-RAM support: coordination before opening a PR #3371 has the analysis. It's reported as UEs and masked after backoff, with no functional effect seen.apple,t8112-display-power). I left the commits unchanged.