Repository navigation
drm/apple: dcp: refuse a deep sleep for a firmware-27 external display processor without a stop - #2710
drm/apple: dcp: refuse a deep sleep for a firmware-27 external display processor without a stop#2710RyanTheTide wants to merge 2 commits into
Conversation
…thout a stop A deep sleep of an M4 MacBook Air with its 27.2 DCPEXTs bound woke and then stalled in device resume until the watchdog reset the machine: the sleep had stopped the DCPEXT firmware cold, and the DCPEXT, which has no firmware stop or restart of its own on 27.2, resumed by talking to it. Until it has one, refuse the deep sleep for such a DCP, as the other paths here refuse what they cannot bring back. That is a firmware-27 external DCP without hw.s2r_ext: the T6030 dcpext (dcp->external) and the T8132 DCPEXT that apple_t8132_dcpext_v27_2() admits, which runs the firmware-27 external processor path but is not marked dcp->external. DCPEXTs with their own sleep path (T6050's firmware-27 sleep, T8142's s2r_ext) return before this. Suspend-to-idle keeps the firmware running and is not affected. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
…processor without a stop The refusal for a firmware-27 external display processor that has no firmware stop picked its processors by two compatibles: the T6030 dcpext (dcp->external) and the T8132 DCPEXT on 27.2. Every other external processor on firmware 27 that no stop path takes, such as the T8122 DCPEXT on 27.2, a T6041 one with no stop of its own, or a T8142 DCPEXT whose untested s2r_ext stop is not enabled, still let a deep sleep stop its firmware cold and then hung in its resume. Mark every dcpext block's match data as an external processor and refuse the deep sleep for any of them on firmware 27 once none of the stops above returned: the T6050 firmware-27 sleep, the internal s2r stop and the external s2r_ext stop keep their machines' deep sleep because they return first, not because they are left off a list. Suspend-to-idle keeps the firmware running and is not affected. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
|
Host-test result at bdb97ea: |
DjDeveloperr
left a comment
There was a problem hiding this comment.
Adversarial review at bdb97ea67283f71a1f850d1653e7800cb5e9197f.
Block-selection check: Clean. All 10 *-dcpext apple_dcp_hw_data definitions set .external_processor = true, no internal DCP sets it, and dcp_platform_suspend() (drivers/gpu/drm/apple/dcp.c:9655-9659) refuses deep sleep (pm_suspend_via_firmware()) for any dcp->hw.external_processor && dcp->fw_compat == DCP_FIRMWARE_V_27_0 that fell through past every working stop (dcp_v27_sleep_selected, dcp_s2r_capable, dcp_s2r_ext_capable). No chip, board, or firmware-version gates are added, and s2idle is unaffected. Commits/DCO and clean-room rules are clean.
Blocker
- Breaks
apple-dcpresource-profilehost test (tools/testing/selftests/drivers/gpu/apple-dcp/lifecycle.py:1226-1233):
Adding.external_processor = truetoapple_dcp_hw_t8140_external(drivers/gpu/drm/apple/dcp.c:9875) breaks compilation of theresource-profilehost test, which extractsapple_dcp_hw_t8140_externalverbatim fromdcp.c(lifecycle.py:1178-1181) against its own stubstruct apple_dcp_hw_data(lifecycle.py:1226-1233) that does not declarebool external_processor;. Addexternal_processorto the stub and confirmtools/asahi/run-host-tests.py --only apple-dcppasses cleanly.
Cleanup & merge gates
- Squash commits: Commit 1 (
804dadd2) temporarily introduces the compatible-list check and!hw.s2r_extcondition that commit 2 (bdb97ea6) immediately replaces. Please squash into one clean commit so the history doesn't carry the rejected compatible-gated intermediate state. - CI & hardware evidence: No CI has run because the base branch is
j713-dcpext/air-dcpext-272rather thanintegration/aurora. Retarget tointegration/aurora(once base lands) for full CI, and post the open tip-based rows (J713 deep refusal x3 + s2idle x3, J615 + #2704, M2/M5 regression with 0 AVC, 0 failed units, 0 new kernel errors).
Assisted-by: LLM (Google:Gemini 4 Neon)
Problem. On the M4 MacBook Air (J713) running the macOS 27.2 firmware, a deep sleep with the 27.2 DCPEXTs bound (an external monitor on USB-C) wakes up and then stalls in device resume. After about 30 s the hardware watchdog resets the machine. The sleep engine stops the DCPEXT firmware cold, and the DCPEXT has no firmware stop or restart of its own on 27.2, so its resume ends up waiting on firmware that isn't running anymore. The same holds for any external display processor on firmware 27 that no stop path takes (for example the T8122 DCPEXT on 27.2, or a T8142 DCPEXT whose
s2r_extstop is not enabled).Change. Every dcpext block's match data is marked
external_processor.dcp_platform_suspend()refuses a deep (firmware) sleep with-EBUSYfor any firmware-27 external processor once none of the stops before it returned: the T6050 firmware-27 sleep, the internals2rstop and the externals2r_extstop keep their deep sleep because they return first, not because they are on a list. Suspend-to-idle is unchanged. When a DCPEXT gets a working firmware stop (for the J713, the 27.2 DCPEXT stop in #2721, which passed deep 3/3 with a monitor), it takes that path and this refusal no longer fires for it.Testing. J713, kernel 7.3.0-bj713b10+ (the J713 deep-sleep and s2idle series on top), stock command line, MSI monitor on DP-2:
dcp->externalhung a third time, because the J713 DCPEXT never sets it.Still to run.
Details for reviewers
.wake: back in Linux, before any device resumes), and per-display marker 0xc0 shows display 0 lowered fine. So the machine really did sleep and wake; the stall is in device resume.external_processoris set in the hw data of every*-dcpextentry (t6020, t6030, t6041, t6050, t8122, t8132 incl. its 27.2 variant, t8140, t8142, and the genericapple,dcpext). The firmware-27 condition is the firmware ABI that has no stop of its own. No board, SoC or firmware-version gate is added.!hw.s2r_ext, which would have let a DCPEXT withs2r_extset but its stop not enabled hang again; the second commit tests whether a stop actually ran.Assisted-by: LLM (Claude:Opus 5.5)