Repository navigation
drm/apple: T6041 host-driven sleep on DCP firmware 27 - #3687
Conversation
…m down On T6041 the display subsystem's suspend stops every DCP and lowers their power words (dcp_t6041_s2r_all()). Each DCP platform device suspends after it, and dcp_platform_suspend() then took its firmware sleep paths against a DCP that is already powered off. A read behind a powered-off block stalls the CPU on this fabric and the SoC resets: every deep sleep reset the J616c in the device suspend phase, with pm_test=devices too. ext_dead didn't cover it, since the stop sets it only for a DCP whose firmware ran. dcp_platform_resume() runs before the display subsystem's resume and would touch the same blocks. Both callbacks now return while dcp_t6041_down is set; the display subsystem's resume starts every DCP afterwards. Signed-off-by: Allan Clempe <allan.clempe@gmail.com>
dcp_t6041_stop_one() and dcp_t6041_recommit() sent the 26.6 desktop calls whatever the firmware. On DCP firmware 27 the AP-link release has its own tag in the v27 method table, the 26.6 one names a different method there and crashes each DCP, and _dcp_poweroff() does nothing for an internal panel, so the stop then timed out waiting for the display to go off. With DCP_FIRMWARE_V_27_0 the stop now powers the internal panel off with iomfb_s2r_power_v27() and keeps waiting for the firmware's display-off answer before the DART streams go off, releases the AP link with iomfb_s2r_500_v27() (refusing if the table has no tag for it), and the recommit powers the panel back on the same way. The dispatch follows the driver's existing fw_compat checks; T6040's steps are unchanged. Signed-off-by: Allan Clempe <allan.clempe@gmail.com>
|
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 3294c96d
Blockers:
- Fork
pull_requestCI workflows at3294c96d(Apple build and KUnit,Apple DRM KUnit,Host tests,pr-text) areaction_required(awaiting maintainer approval to run); onlypull_request_targetskipped/readiness ran, so no hosted build or KUnit/host test has executed yet. Code and J616c deep-sleep verification look solid — ready to approve once CI runs green.
Checked:
- Commit 1 (
7c2bf062): movingdcp_t6041_downabovedcp_platform_suspend()and skipping bothdcp_platform_suspend()anddcp_platform_resume()whileREAD_ONCE(dcp_t6041_down)is set prevents touching powered-off DCP register blocks (covering external DCPs whereext_deadwas never set);dcp_t6041_s2r_all(false)unwindsdcp_t6041_downon failure anddcp_t6041_s2r_all(true)clears it before restarting every DCP on resume. - Commit 2 (
3294c96d):dcp_t6041_stop_one()dispatchesDCP_FIRMWARE_V_27_0toiomfb_s2r_power_v27(dcp, false, true, false)(callingdcp_s2r_dart_end(dcp)beforeerr_unwindon error) andiomfb_s2r_500_v27(dcp)guarded ondcp->v27_methods && dcp->v27_methods[dcpep_unnamed_500].tag[0];dcp_t6041_recommit()dispatchesDCP_FIRMWARE_V_27_0toiomfb_s2r_power_v27(dcp, true, true, true)with D572 completion tracking (covering both normal resume andstop_oneerr_unwindwhenpowered_offis set). T6040 and v26.6 paths remain unchanged. - Both commits carry human
Signed-off-by:trailers, clean PR metadata (Risk: two-way), zero AI attribution, and exact-head J616c (M4 Max, macOS 27.2 stub) 15 s deep-sleep verification (pm_test+ realrtcwake -m mem).
Evidence
- Diff audited:
drivers/gpu/drm/apple/dcp.c(+68/-15), commits7c2bf062and3294c96d. - Verified
dcp_s2r_dart_power(),dcp_t6041_stop_one()(err_unwind),dcp_t6041_start_one(), anddcp_t6041_s2r_step()/dcp_t6041_s2r_all()state transitions. - Non-blocking nit:
dcp_t6041_downis read withREAD_ONCE()indcp_platform_suspend()/dcp_platform_resume()while written with plain assignment indcp_t6041_s2r_step(); matchingWRITE_ONCE()would keep accessors symmetric (serialized by PM core in practice). - Workflow runs at review time:
Apple build and KUnit,Apple DRM KUnit,Host tests, andpr-textarepull_request completed/action_required(fork PR);pull_request_targetjobs skipped.
There was a problem hiding this comment.
Verdict: MERGE at 3294c96db3b9
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: - Commit 1 (7c2bf062): moving dcp_t6041_down above dcp_platform_suspend() and skipping both dcp_platform_suspend() and dcp_platform_resume() while READ_ONCE(dcp_t6041_down) is set prevents touching powered-off DCP register blocks (covering external DCPs where ext_dead was never set); dcp_t6041_s2r_all(false) unwinds dcp_t6041_down on failure and dcp_t6041_s2r_all(true) clears it before restarting every DCP on resume.
- Commit 2 (
3294c96d):dcp_t6041_stop_one()dispatchesDCP_FIRMWARE_V_27_0toiomfb_s2r_power_v27(dcp, false, true, false)(callingdcp_s2r_dart_end(dcp)beforeerr_unwindon error) andiomfb_s2r_500_v27(dcp)guarded ondcp->v27_methods && dcp->v27_methods[dcpep_unnamed_500].tag[0];dcp_t6041_recommit()dispatchesDCP_FIRMWARE_V_27_0toiomfb_s2r_power_v27(dcp, true, true, true)with D572 completion tracking (covering both normal resume andstop_oneerr_unwindwhenpowered_offis set). T6040 and v26.6 paths remain unchanged. - Both commits carry human
Signed-off-by:trailers, clean PR metadata (Risk: two-way), zero AI attribution, and exact-head J616c (M4 Max, macOS 27.2 stub) 15 s deep-sleep verification (pm_test+ realrtcwake -m mem).
Follow-ups (not blocking): fork CI approval; WRITE_ONCE symmetry nit
|
Merging at |
What: T6041 deep sleep on DCP firmware 27 (a macOS 27.2 stub). The DCPs' own suspend and resume no longer touch DCPs the host stop has already powered off, which reset the SoC in device suspend, and the host stop and recommit use the firmware 27 calls where they sent 26.6's, which crashed each DCP.
Tested: J616c (M4 Max) at 3294c96 (with #3670 at 0d460a7 and the T6041 PMP SRAM fix in the same tree): deep sleep 1/1 with the SEP bound, slept 15 s and woke in the same boot, all five DCPs skipped their own callbacks; 0 failed units, no new kernel errors.
Risk: two-way door · M4 Max (T6041: J614c, J616c, J575c); the guard in the first commit also applies to any board on the host-driven stop. A plain revert undoes it.
Not yet: J614c and J575c rows; a T6041 on DCP firmware 26.6 (its paths are unchanged).
Details
dcp_t6041_downmoves abovedcp_platform_suspend(), which now returns 0 while it is set, as doesdcp_platform_resume(). The DCPs' own resume runs before the display subsystem's, whosedcp_t6041_s2r_all(true)starts every DCP.ext_deaddidn't cover this: the stop sets it only for a DCP whose firmware ran, and an external DCP with nothing attached takes the not-running branch.DCP_FIRMWARE_V_27_0,dcp_t6041_stop_one()powers the internal panel off withiomfb_s2r_power_v27(dcp, false, true, false)and keeps the D572 wait, then releases the AP link withiomfb_s2r_500_v27(), refusing if the v27 table has no tag for it.dcp_t6041_recommit()powers the panel back on withiomfb_s2r_power_v27(dcp, true, true, true)and its D572 wait. T6040's steps in the stop are unchanged.pm_testpasses atdevices,platform,processorsandcore.Evidence
Tree: main 45d7f82 + this branch (7c2bf06, 3294c96) + #3670 (0d460a7) +
fix/t6041-pmp-sram-data(f919dbb), nothing else, built as7.3.0-1-2.1-ARCH, default command line, J616c with a macOS 27.2 (26B123) stub.rtcwake -d rtc1 -m mem -s 15:PM: suspend entry (deep)14:29:25,PM: suspend exit14:29:42, same boot.T6041 S2R: down by the host stop, own suspend skipped, thenstill down by the host stop, own resume skipped.H16 preload matches none of 6 firmware profiles, DCPAFK[ep:20]: failed to extract init props: -2), plusapple_soc_edac … event-log source 9after the wake, which is unrelated and still open.pm_test=devicestoo.