Repository navigation
drm/apple: dcp: leave the piodma DART alone at shutdown after DPMS off - #3595
Conversation
0a5150d to
aa2e0f7
Compare
|
Exact-head row on MacBook Air M3 13" (J613 / T8122): PASS on both shutdown paths. Kernel:
Not shown: the Unrelated, for the record: in the DPMS-off row the deep sleep before the reboot was refused ( |
There was a problem hiding this comment.
Verdict: MERGE at aa2e0f7e
Blockers: None (note that the red host-tests run 46222705579 failed on g17-compute-owed-stamp-tests from the 871400a8 base, and the four failed KUnit matrix jobs in 46222705608 hit an Ubuntu apt mirror timeout; apple-build, KUnit dcp-fabric, KUnit dcp-topology, and pr-text all passed).
Checked:
- Verified
dcp_comp_unbind()indrivers/gpu/drm/apple/dcp.c(:7746-7970):system_state > SYSTEM_RUNNING && dcp->dpms_powered_off && READ_ONCE(dcp->s2r_fw_down)tightly scopes thedcp_release_piodma_iommu_dev(dcp)skip to shutdown after DPMS off has already stopped firmware and powered down the display domains and display DART. Runtime unbind (SYSTEM_RUNNING) and active-display shutdowns retain the fullpiodma/fbdmateardown path unchanged.dcp_unbind_stopped_fw(dcp)runs whenREAD_ONCE(dcp->s2r_fw_down)is true and callscomplete_all(&eps[i]->stopped)on non-error, non-nullavep,dptx_controller_ep,ibootep,systemep, anddcpavservep. Verified againstafk_shutdown()(drivers/gpu/drm/apple/afk.c:196-218):wait_for_completion_timeout(&afkep->stopped, ...)returns immediately without waiting out 1 s timeouts per endpoint, whileafkep->stopping = true,afk_quiesce(afkep), andrx_scratchcleanup still run normally.dcp_unbind_step()only logs whensystem_state > SYSTEM_RUNNING, avoiding runtime log noise.
- Verified
afk_shutdown()timeoutdev_err()gains the missing\n(drivers/gpu/drm/apple/afk.c:206). - Verified hardware rows: J413 (M2 Air, DCP 27.2) before/after netconsole trace confirming the 2-minute watchdog hang at
piodmais eliminated (next kernel boots in 10 s), plus exact-head J613 (M3 Air, T8122) PASS on both display-on (33 s) and DPMS-off (IOMFB: power on -> off, 29 s) reboot paths. - Verified
LLVM=1 W=1build clean,checkpatch.pl --strict0/0/0, DCO sign-off, and two-way Risk description.
Evidence
drivers/gpu/drm/apple/dcp.c:7751-7764(dcp_unbind_stopped_fw,dcp_unbind_step),:7889-7953(dcp_comp_unbind),:5966-5985(dcp_release_piodma_iommu_dev).drivers/gpu/drm/apple/afk.c:196-218(afk_shutdown).- CI verification on
aa2e0f7e:apple-buildPASS,KUnit dcp-fabricPASS,KUnit dcp-topologyPASS;host-testsrun46222705579failed only ing17-compute-owed-stamp-tests; KUnit run46222705608(asahi/spi-hid-apple/avd/ave) failed inapt-get update(Could not wait for server fd, exit 100). - Minor non-blocking note:
dcp_unbind_stopped_fw()covers the five primary endpoints (avep,dptx_controller_ep,ibootep,systemep,dcpavservep); if an external/desktop DCP ever entersdcp_comp_unbind()withs2r_fw_downset,dcp->dptxepanddcp->desktop->graph[]could be included there in a future follow-up.
|
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: HOLD at aa2e0f7e for CI disposition.
I independently checked the shutdown predicate. The PIODMA release is skipped only during system shutdown, after DPMS has powered the display off and firmware is marked down. Runtime unbind and display-on shutdown retain the release. The stopped endpoint completions avoid timeout waits while AFK cleanup still runs. The J413 and J613 results cover the reported hang and both shutdown paths.
The existing code approval stands. Resolve or rerun the red and pending hosted checks before landing, then take this ahead of #3647.
|
The owed-stamp failure is present on the base. I matched all seven harness and source inputs between the PR job checkout The DCP code review stands. The train still needs to resolve the base CI failure and the remaining hosted checks before landing. |
aa2e0f7 to
7c5e39b
Compare
|
Rebased onto current Old head |
There was a problem hiding this comment.
Superseded 12-01: not a hold under the merge bar (no shown failure). Head moved (same patch-id); follow-ups: new hosted run, J613 rerun
The stable patch ID matches the previously reviewed shutdown-only DART change. The updated base is intended to pick up the owed-stamp fixture fix. Please keep landing on hold until the new hosted run and the promised J613 rerun pass.
|
Hardware row at this head on J613 (MacBook Air 13" M3, T8122): PASS. No Setup: Stage 2 Aura
In both rows the journal runs to Not captured: the |
7c5e39b to
459960d
Compare
|
Rebased onto current Old head |
|
J413 (M2 Air) at |
DjDeveloperr
left a comment
There was a problem hiding this comment.
The change is narrow: the piodma DART is kept only at shutdown, after DPMS off, with the firmware already stopped. Endpoints of stopped firmware no longer wait out their timeouts, and the step breadcrumbs print only during shutdown. The J613 row (same patch ID) and the J413 run cover two generations.
With an S2R-capable internal panel, drm_atomic_helper_shutdown() turns the display off as DPMS off does: the firmware is stopped and the display power domains, display DART included, are lowered. The component unbind that follows then destroys the piodma device, which detaches it from that DART. Its registers no longer answer, and the restart hangs in device_shutdown() until a watchdog resets the machine. On a J413 (M2 Air, firmware 27.2) this hung every reboot after a deep sleep for 2 minutes, until the hardware watchdog reset it. At shutdown, once DPMS off has powered the display down, leave the piodma device as it is: the system is going down. The unbind also asked every AFK endpoint of the stopped firmware to shut down. RTKit refuses each message to a stopped coprocessor, so each shutdown only waited out its timeout. Complete their stopped completions instead. afk_shutdown() timeout message gains its missing newline, which kept it in the printk continuation buffer. During shutdown the unbind logs each step, so a hang names the step it is in. Signed-off-by: Satya Benson <[email protected]>
|
Conflict-only rebase onto current Old head: |
459960d to
f3fb6f3
Compare
DjDeveloperr
left a comment
There was a problem hiding this comment.
Reviewed the rebase at f3fb6f3. The PIODMA bypass still applies only during system shutdown after DPMS off and firmware teardown. The surrounding declarations moved, and runtime unbind still takes the normal teardown. The DCP checks on the rebased head and an updated DPMS-off restart row remain the landing checks.
RyanTheTide
left a comment
There was a problem hiding this comment.
Compared the rebased patch with 459960d. The forward declarations remain in place and the rebase preserves the DCP unbind logic, including the shutdown-only PIODMA exception.
What: fixes a restart that hangs in
device_shutdown()once DPMS off has powered the internal display down.The hang:
drm_atomic_helper_shutdown()turns an S2R-capable internal panel off the way DPMS off does: it stops the firmware and lowers the display domains, display DART included.dcp_comp_unbind()then destroys the piodma device. That detaches it from a DART that no longer answers, and the restart hangs until a watchdog resets the machine.Changes:
system_state > SYSTEM_RUNNING), whendpms_powered_off && s2r_fw_down, the piodma device is left as it is.stoppedinstead of sending shutdowns that RTKit refuses, each of which waited 1 s.\nonafk_shutdown()'s timeout message, which kept it in the printk continuation buffer.unbind: <step>line for each step during shutdown.How it was found:
piodma.Tested: Current head
459960dc47adis the same code rebased ontomain(from7c5e39b2).rjianwei/feat/t8112-s2rplus the T8112 S2R fixes from T8112 (Apple M2 / J413) suspend-to-RAM support: coordination before opening a PR #3371 and this change. That tree is not this PR's head, which ismain871400a8plus one commit,aa2e0f7e.piodmauntil the 2-min watchdog reset.piodma.display powered off, piodma DART left for the restart, and shutdown continues throughapple-dcp shutdown, PMGR and DARTs. The next kernel booted 10 s after the reboot.dcp.oandafk.obuild withLLVM=1 W=1and no new warnings, andcheckpatch.pl --strictgives 0 errors, 0 warnings, 0 checks.459960dcon J613 (M3 Air), PASS (tested as7c5e39b2, the same patch before the rebase ontomain45d7f828;git patch-ididentical): with DPMS off (eDP-1dpmsreadingOff), the reboot reached the next kernel in 17 s with nodevice_shutdown()hang, both at this head and at this head + drm/asahi: m3: support firmware-driven deep sleep on T8122 #3504 after onemem/deepthrough the commit (boot object resumes 0 -> 1). At this head alone the GPU refuses deep sleep (drm/asahi: m3: support firmware-driven deep sleep on T8122 #3504 is needed on T8122). Thepiodma DART leftline prints after journald stops and the machine has no serial console, so it isn't captured. drm/apple: dcp: leave the piodma DART alone at shutdown after DPMS off #3595 (comment)Risk: two-way door. Shutdown only, and only after DPMS off has powered the display off. At runtime unbind and on other shutdowns nothing changes, except the endpoint shutdowns for firmware already stopped, which used to time out.