Repository navigation
Conversation
…diness Runtime idle power-off for T6050 external display processors and async system resume for the internal display both read-modify-write the same T6050 display PMC boost and bandwidth registers (0x286808020 and 0x286808028). Unify the PMC mapping (0x286806000..0x286808030) under a single mutex in drivers/soc/apple/sleep.c, export apple_sleep_m5_display_pmc() for the internal display handshake alongside apple_sleep_m5_dispext_power(), and export apple_sleep_m5_dispext_power_ready() so callers can probe hardware capability without touching registers. Signed-off-by: Erik Bourget <erik@ebourget.net>
Extend the external DCP runtime idle power-off path to firmware-27 external display processors whose hardware exposes the DISPEXTN power domains, DT sleep arguments, display DART save/restore, and PMC boost helper. When an unattached external pipe settles: - Publish DCP_EXT_IDLE_STOPPING under dcp_peer_lock alongside the peer ownership check, mark waking peers with peer_waking, and gate paired modeset on !peer_waking && DCP_EXT_IDLE_ON && !sleep_v27_closed. - Record the V27 backend on the pipe and reset non-failed pipes on component rebind while leaving non-idle pipes untouched on close. - Close IOMFB admission and settle callbacks before A484; defer cleanly on live drain timeouts, opt out on unsupported endpoint inventories, and run checked rollback on pre-idle refusals (including AFK -EAGAIN). - Quiesce RTKit, verify ASC IDLE|STOPPED, detach and drain mailbox RX via apple_rtkit_mailbox_off() while powered, stop the ASC and dart-dcp, snapshot the display DART unconditionally, and lower DISPEXTN power domains while tracking exact power state (ON, OFF, UNCERTAIN) and routing the internal PMC handshake through the shared apple_sleep_m5_display_pmc() mutex. - On wake (Type-C attach, peer reservation, or system suspend), restore domains, display DART, and dart-dcp, restart firmware (re-acquiring both dark fences before any retry power cycle and skipping MMIO cleanup unless power is confirmed ON), reopen sessions, and validate V27 external wake calls without entering system-resume's RTKit cycle. Signed-off-by: Erik Bourget <erik@ebourget.net>
There was a problem hiding this comment.
The peer wake now uses a borrowed apple_dcp pointer after dropping dcp_peer_lock. peer_waking gates modeset, but the peer is devm-owned and I could not find a lifetime pin or teardown drain for this cross-device wake. dcp_ext_idle_close() drains its own delayed work, while the synchronous wake is running on the requesting DCP. Please show which existing teardown synchronization keeps the peer and its resources live through this call and the subsequent recheck, or add explicit lifetime synchronization. Also identify the landing parent now that #3308 is closed and post the exact-head docked hotplug/wake and full suspend/resume row. The unplugged pm_test=devices result covers a narrower path.
|
Merge readiness at
Areas: Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
dcp_peer_hints_v27() drops dcp_peer_lock before calling dcp_ext_idle_wake() on a peer DCP (and before calling dcp_ext_idle_kick() on a released peer). Take a device reference and track active cross-device idle users under dcp_peer_lock across those unlocked windows, and drain active callers in dcp_ext_idle_close() and dcp_comp_unbind() after dcp_peer_forget() so the peer and its resources stay live through the call and recheck. Signed-off-by: Erik Bourget <erik@ebourget.net>
|
Fixed in
Verified at
J716c live hardware at |
There was a problem hiding this comment.
Verdict: HOLD at 1f59a74f
Blockers:
- Targets open non-default base branch
feat/dcp-v27-ext-idle-off(#3410). Retarget tomainonce#3410merges and re-run cancelledpr-textandreadinesschecks (plus live T6050 external-DCP idle-off/wake row if not yet recorded at the final head).
Checked:
1f59a74fb75dcleanly resolves the prior cross-deviceapple_dcppeer-lifetime blocker by takingget_device(peer->dev)and incrementingpeer->peer_idle_usersunderdcp_peer_lockindcp_peer_idle_get_locked()before dropping the lock for cross-device idle wake/kick.- KUnit
apple-dcp-fabric(117/117) anddisplay.kunitconfig(167/168, 1 skip) pass; 8/8 build/KUnit CI checks green; no Apple material, tool attribution, or private serials.
Evidence
- Head:
1f59a74fb75d(base: feat/dcp-v27-ext-idle-off,mergeable: MERGEABLE,+871/-95across 9 files).
…ff-t6050 Signed-off-by: Erik Bourget <erik@ebourget.net>
Signed-off-by: Erik Bourget <erik@ebourget.net>
|
Merged updated On the lifetime question: the peer pin and teardown drain survive the forward merge intact. Verified at
Hardware status & open items:
|
There was a problem hiding this comment.
Verdict: HOLD at ba54710a
Blockers:
- Targets open non-default base branch
feat/dcp-v27-ext-idle-off(#3410). Retarget tomainonce#3410merges so fullmainCI runs on the final diff, and record exact-head J716c external Type-C display hot-plug wake after idle power-off.
Checked: Merge of updated feat/dcp-v27-ext-idle-off (38c26d8a6b57) in ba54710a14 and offline build/KUnit verification at ba54710a.
Evidence
- Delta since
1f59a74f(0 code blockers): Clean merge of#3410@38c26d8apreservingdcp_peer_locksynchronization acrossdcp_ext_idle_kick()/dcp_ext_idle_wake()anddcp_peer_forget()/dcp_peer_idle_drain()teardown;W=1 -Werror,display.kunitconfig(168passed /1skipped),apple-dcp-fabric(117/117),t6050-aop(11passed /1skipped), andcheckpatch --strictpass atba54710a.
Signed-off-by: Erik Bourget <erik@ebourget.net>
There was a problem hiding this comment.
Verdict: HOLD at 87662fb2f093
Blockers:
- Stacked on open non-default base branch
feat/dcp-v27-ext-idle-off(#3410); retarget tomainbefore#3410merges and wait for fullmain-targeted hosted CI to complete green (currently0passed,0failed,8queued on the stacked base). - Exact-head hardware verification noted in
Not yetis still pending: physical external Type-C display attach/hot-plug wake from idle-off and reals2idle/deepsuspend on T6050 (J716c), plus a second-family unaffected regression row.
Checked:
- Forward-merge
87662fb2f093(ba54710a+#3410@c4797d39): verified clean integration across all 9 PR files with humanSigned-off-byandMERGEABLEstatus onfeat/dcp-v27-ext-idle-off. - Verified cross-device peer lifetime pin and teardown drain remain intact (
dcp_peer_idle_get_locked(),peer_idle_users,dcp_peer_idle_put_locked(),dcp_peer_idle_drain()called in bothdcp_comp_unbind()anddcp_ext_idle_close()). - Verified
afk.c(sleep_v27_closedsend gate),dcp-v27-sleep.inc(dcp_v27_ext_idle_*+ rollback paths),dcp.c(DCP_EXT_IDLE_STOPPING+dcp_v27_ext_idle_capable()routing), anddrivers/soc/apple/sleep.c+include/linux/soc/apple/sleep.h(t6050_disp_pmc_lockserialization,apple_sleep_m5_display_pmc(),apple_sleep_m5_dispext_power_ready(), and!CONFIG_APPLE_SOC_SLEEPstubs); no Apple material or AI attribution.
Evidence
- Head:
87662fb2f093cd60acb223d4b9193ceab47386a0(base: feat/dcp-v27-ext-idle-off,MERGEABLE,+871/-95, 9 files, 6 commits). - Merge parents:
ba54710a+c4797d39.
There was a problem hiding this comment.
Verdict: MERGE at 87662fb2f093
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: - Forward-merge 87662fb2f093 (ba54710a + #3410@c4797d39): verified clean integration across all 9 PR files with human Signed-off-by and MERGEABLE status on feat/dcp-v27-ext-idle-off.
- Verified cross-device peer lifetime pin and teardown drain remain intact (
dcp_peer_idle_get_locked(),peer_idle_users,dcp_peer_idle_put_locked(),dcp_peer_idle_drain()called in bothdcp_comp_unbind()anddcp_ext_idle_close()). - Verified
afk.c(sleep_v27_closedsend gate),dcp-v27-sleep.inc(dcp_v27_ext_idle_*+ rollback paths),dcp.c(DCP_EXT_IDLE_STOPPING+dcp_v27_ext_idle_capable()routing), anddrivers/soc/apple/sleep.c+include/linux/soc/apple/sleep.h(t6050_disp_pmc_lockserialization,apple_sleep_m5_display_pmc(),apple_sleep_m5_dispext_power_ready(), and!CONFIG_APPLE_SOC_SLEEPstubs); no Apple material or AI attribution.
Follow-ups (not blocking): Merge parent #3410 first; follow-ups: retarget, main CI, J716c attach/hot-plug wake + suspend row
|
We carry this PR in our unified daily kernel across J716c (M5 Max, T6050), J713 (M4 Air, T8132), and J313 (M1 Air, T8103). Without wiring firmware-27 T6050 external DCPs into runtime idle-off, unused Running cleanly on our unified daily across J716c, J713, and J313 with zero DCP panics or display regressions. |
|
Erik, could you forward-merge |
Use the shared DART dispatch for stop and wake. Keep the saved streams path and the KUnit stubs for plain streams, with one wrapper definition each. Signed-off-by: DjDeveloperr <hey@djdev.me>
|
Forward-merged main |
DjDeveloperr
left a comment
There was a problem hiding this comment.
I pushed the forward merge at 14db7cab7d7c. The merged DART stop/wake dispatch retains the saved-stream path and the plain-stream KUnit stubs. The display checks passed 39/39, along with the extracted DART route, ordering and error checks. I found no issue in the resolution. A maintainer who did not push this head still needs to approve.
The remaining hardware run is T6050 on firmware 27.2, on J714s or erikwb's J716c. Start with external DP active, exercise DP audio holding the domain, then stop audio, unplug and confirm idle-off and wake on replug. Record the suspend outcome against the same baseline.
Conflict in drivers/gpu/drm/apple/dcp.c. Main added the PMC interface check, the stuck-start latch and the failed power-on rollback to dcp_s2r_domains_off() and dcp_s2r_domains_on(). This branch moved the register sequence of dcp_s2r_domains_off() into dcp_s2r_domains_off_regs() and tracks ext_idle_power. Keep both. dcp_s2r_domains_off() keeps the stuck-start check, maps the words and unmaps them with dcp_s2r_unmap_power(). Main's PMC check and PMC off run in dcp_s2r_domains_off_regs(). DISP_CPU polls go through dcp_s2r_poll_domain_off(). External power reads OFF only when every lowered domain is confirmed off: a DISP_FE timeout before the PMC off, or DISP_SYS kept up after a failed PMC off, leaves it UNCERTAIN, and dcp_s2r_domains_on() makes it UNCERTAIN once it raises a word, until DISP_CPU reads on. Main's tools/asahi/dcp-s2r-ext-idle-tests.py extracts dcp_s2r_ext_suspend(), which now calls dcp_ext_idle_failed_dark(): stub it there, next to the dcp_ext_idle_suspend() stub. Signed-off-by: DjDeveloperr <hey@djdev.me>
|
Merged main into this branch twice (merge commits only: no rebase, no force-push). Head now Conflict 1 (
Conflict 2 ( Otherwise Checks on
Still owed: the J714s external DP row (A main, B this head). |
Conflict in drivers/gpu/drm/apple/dcp.c, dcp_s2r_pm_notify(): main added !pm_suspend_no_platform() to the J714s crashed-processor sleep refusal, this branch added !dcp_ext_idle_failed_dark(). Keep both. Signed-off-by: DjDeveloperr <hey@djdev.me>
DjDeveloperr
left a comment
There was a problem hiding this comment.
Independent review at 74d032c2a254: 14db7cab plus two forward merges of main (89ec99a0, then cacc5d31). I found nothing that blocks it and pushed nothing. The T6050 hardware row is still owed (end of this comment).
The two merge resolutions, checked first
-
dcp_s2r_domains_off()split. The wrapper still refuses over a stuck start and maps the power words. Main's PMC interface check is the first step ofdcp_s2r_domains_off_regs(), and aDISP_CPUthat doesn't power off still callsdcp_s2r_start_stuck(). The wrapper is the only caller of_regs(), so main's check and latch run on every path.dcp_s2r_domains_on()keeps main's rollback and latch. The PR only adds the power-state writes around them. -
No OFF while something is still on.
DCP_EXT_POWER_OFFis set in only three places:- In
_regs(), only after CPU, FE and SYS all read off with the PMC interface off. A PMC failure keeps SYS up and records UNCERTAIN. - In the DISPEXT0 path, only when all three words gate.
- On T6050, only after
apple_sleep_m5_dispext_power(false)settles all three words. Both DARTs are dark and the DCP DART's streams are stopped before that.
Every power-on leaves OFF behind: ON once the CPU reads on, UNCERTAIN if it fails.
- In
-
dcp_s2r_pm_notify(). J714s still refuses a sleep over a crashed external DCP. Main's s2idle and no-platform exceptions are kept, and so is the PR's exception for a DCP that failed dark. -
The
dcp_ext_idle_failed_dark()stub indcp-s2r-ext-idle-tests.pymatches what that harness needs.
The PR's own logic
- Idle wake (
allow_cycle=false) returns the first error of A500, A489, A484, A115, the second A500, a session round, or a dead RTKit. The wake is then marked failed. - System wake works as before, except that a failed processor cycle now stops the wake calls instead of going on over a dead processor.
- A failed wake with the domains confirmed on and
ext_idle_domains_offclear falls back to the normals2r_fw_downsuspend, which drains and lowers what came up. With the power uncertain, suspend returns the saved error. - PMC helpers. The panel's PMC handshake and the dcpext boost/bandwidth bits now share one mapping and one mutex (
t6050_disp_pmc_lock). Before, two mappings changed the same registers with no lock. - Locking. The order is
ext_idle_lockbeforedcp_peer_lockort6050_disp_pmc_lock.dcp_peer_hints_v27()dropsdcp_peer_lockbefore it kicks the released peer, so the order is never reversed. - Idle-off happens only on an unattached DCP: no cable, route, lit connector, peer reservation, audio user or closed V27 gate. DP audio holds the DCP on through
dcp_audio_dma_get(). Attach and system suspend cancel the delayed work and wake the DCP underext_idle_lock. - No new module parameter, runtime switch or board gate.
dcp_v27_ext_idle_capable()reads two parameters that main already has (v27_cycle_power,v27_cycle_disp_rewrite). The T6050 PMC address moves from main's two hard-coded mappings into one. It is still a constant, checked against thedisp-4resource as on main.
Checks re-run at 74d032c2a254
W=1 KCFLAGS=-Werror(stockaurora_defconfig, LLVM) ondrivers/gpu/drm/apple/anddrivers/soc/apple/sleep.o: 76 objects, 0 warnings, 0 errors.- The 32 host tests that read the touched files, through
tools/asahi/run-host-tests.py: 32/32 pass. checkpatch.pl --stricton the PR's diff againstmain: 0 errors, 0 warnings, 1 check. That check is the alignment of one continuation line indcp_s2r_stop_streams()(dcp.c:10881), from an earlier merge; it isn't worth a new head. The two merge resolutions are clean.mainis now9b8e29fe. The head still merges cleanly into it, and main's new commits (watchdog handoff, T6030 PCIe wake) don't touch these paths.
Still owed before merge: the T6050 row at this head with an external DP display: DPMS, unplug, idle-off and replug, DP audio holding the domain, and deep sleep against main. Our J714s has no external display attached. There is an A/B peer kit for any M5 Pro or M5 Max with one: https://github.com/aurora-silicon/linux/releases/tag/peer-t6050-3398-74d032c2-20261204
|
K114s (MacBook Pro 14" M5 Pro,
Results tarball: https://github.com/aurora-silicon/hardware-validation/blob/main/evidence/k114s/20261204-peer-3398-results.tgz (VERDICT: https://github.com/aurora-silicon/hardware-validation/blob/main/evidence/k114s/20261204-peer-3398-VERDICT.txt). |
|
Ryan, the GNOME K114s kit is ready for the next peer run at Log into the GNOME Wayland desktop after each trial boot. Select the external Apple DP PCM from |
|
@erikwb, could your J716c on firmware 27.2 take the remaining #3398 hardware check? The K114s trial only offered
|
Keep the audio DMA power-off check and the DART sleep helpers together. Signed-off-by: DjDeveloperr <hey@djdev.me>
What: Stacked on
feat/dcp-v27-ext-idle-off(#3410). Serialize T6050 display PMC power helpers, wire unattached firmware-27 T6050 external DCPs (dcpext0..3) into runtime idle power-off and attach/DP-audio/suspend wake, propagate strict v27 wake transport errors (A500,A489,A115), and leave a failed idle-wake external DCP dark through system suspend only when its domains/DARTs are positively confirmed off (DCP_EXT_POWER_OFF) across both v27 and legacys2r_ext(propagating the saved wake error whenext_idle_domains_off || ext_idle_power != DCP_EXT_POWER_ONwithout confirmedOFF, while a failed post-power-on DART restore withDCP_EXT_POWER_ONand!ext_idle_domains_offfalls back to normals2r_fw_downsuspend).Tested: Offline checks pass at current head
e270795bddde(forward-merge90cc7ea1cbcaof#34109f33c3f95939into224cf52e3c33, followed by fix commite270795bddde):ARCH=arm64 LLVM=1 W=1 KCFLAGS="-Werror"(drivers/soc/apple/sleep.o,drivers/gpu/drm/apple/{dcp.o,dptxep.o,dcp-fabric.o,iomfb.o,afk.o,audio.o,av.o}):0errors,0warnings.git diff --check 9f33c3f95939..HEADclean;checkpatch.pl --strict --git 9f33c3f95939..HEAD:0errors,0warnings,0checks across all 5 PR commits (7531b5b33018,7bf81725acc2,1f59a74fb75d,224cf52e3c33,e270795bddde).drivers/gpu/drm/apple/tests/display.kunitconfigwithCONFIG_SOUND=y+CONFIG_SND=y(298run:295passed,3skipped includingdcp_ext_idle_failed_suspend,dcp_ext_idle_legacy_wake_failures, anddcp_ext_idle_legacy_domains_offpassing anddcp_v27_ext_wake_transport_errorsskipped withCONFIG_APPLE_SOC_SLEEPoff),display.kunitconfigwithCONFIG_SOUND=y+CONFIG_SND=y+CONFIG_IOMMU_SUPPORT=y+CONFIG_APPLE_DART=y+CONFIG_SUSPEND=y+CONFIG_HOTPLUG_CPU=y+CONFIG_APPLE_SOC_SLEEP=y(299run:297passed,2skippedapple_g17_rx_util_min_testanddcpaud_no_sio_test;apple-dcp-firmware11/11passed includingdcp_ext_idle_s2r_disp_dart_gate,dcp_ext_idle_audio_dma_pin,dcp_v27_ext_wake_transport_errors,dcp_ext_idle_failed_suspend,dcp_ext_idle_legacy_wake_failures,dcp_ext_idle_legacy_domains_off;apple-dcpaud-legacy11/11), the same sleep-enabled config plusCONFIG_DMADEVICES=y(299run:298passed,1skipped),drivers/gpu/drm/apple/tests/.kunitconfig(117/117passed), anddrivers/soc/apple/t6050-aop.kunitconfig(12run:11passed,1skipped).dcpaud(22/22),dart(24/24),dcp-tunnel-prepare-tests.py(PASS),dcpext26-startup-tests.py --mutants(PASS),backlight-coldboot-tests.py(PASS),display-sleep-merge-tests.py(17/17), andselftests/drivers/gpu/apple-dcp/run.py --group audio(2/2passed).J716c(T6050, firmware27.2) composite hardware pass at exact heade270795bddde(carrying#34109f33c3f95939, merged ontoorigin/maind3de772ac0c1alongside#3717,#3409,#3273,#3289,#3359; composite8d250d354c97, chained dead-man trial Stage 2, desktop up):0Oops/WARN/BUG/Call trace;3xeDP-1DPMS off/on cycles through Hyprland (sysfsdpmsOff/Onfollowed cleanly,3456x2234restored,enabled,0Oops/WARN; firmware syslogopen_ioav_gated(): IOAVVideoInterface open failedappeared on each DPMS-on with display recovery, not yet compared against stock). External DCP idle-off after boot was not captured (dynamic debug was enabled after boot and genpd debugfs does not exposedcpextdomains), no external display was connected (DP-1..6disconnected),rtcwake -d /dev/rtc1 -m freeze -s 10(s2idle) did not wake without a local key press (matchingmain), and realdeepsuspend was not run.J716c (T6050) one-shot trial boot at
79a2063f331c(pre-fix baseline before224cf52e3c33,e270795bddde, and9f33c3f95939; this branch alone, default command line, default Stage 2b0a2f222b5a9, chained dead-man trial Stage 2): booted, 1 failed system unit (aurora-peripherals.service, as on the default boot), 0 LSM denials, 0GPU fault/MMU fault/ DeviceLost / Oops / WARN / SError lines, kernelerr+44 lines (thesystemd-gpt-auto-generatorpair,avdmissing-firmware probe,M5 bare-metal bootstrap failed at session: EPROBE_DEFERand 40apple-dcp ... AFK ... unable to match servicelines, none new from this PR). All four unattached external DCPs (2b2e00000,302e00000,306e00000,392e00000) reachedfControllerPowerState 0at about 6.2 s after boot (idle-off engaged) and were back at0after 2xpm_test=devicessuspend/resume (eachPM: suspend entry/PM: suspend exit, 0 newerr+lines).dcp-dp-audiohad no bound device with nothing attached, so no DP-audio PCM existed to open (aplay -llisted only the speaker card). On that branch-only kernel the desktop did not start (Hyprland aborts: EGL / Vulkan find no valid GPU with the daily Mesa; the GPU driver registers its DRM node), soeDP-1compositor DPMS off/on was not run;modetestDPMS writes oneDP-1(2x) logged a DCP power off/on and left the connectorconnected/enabled. No external display was attached.Earlier J716c hardware rows (
87662fb2f093with#3662TS5 dock 2x 4K + 30 s deep sleep clean;b963090c1f2dbatched3545ebecb76fidle-off +pm_test+ 3x DPMS;1f59a74fb75dinc3da8eed6f72) also predate224cf52e3c33,e270795bddde, and9f33c3f95939.Risk: two-way door · T6050 Macs with firmware-27 external DCPs (J716c, J714s/c, K114/K116) plus legacy
s2r_extexternal DCP power-state tracking.Revert:
git revert -m 1 <merge_commit>after merge (or reverte270795bddde,224cf52e3c33,1f59a74fb75d,7bf81725acc2, and7531b5b33018in reverse order). Kernel driver and test changes only; no persistent on-disk, ESP, Stage 2, or DT state is modified.Not yet:
J716c(T6050) external-display and sleep follow-up at final heade270795bddde: external DCP idle-off domain/debug verification after boot, physical hotplug-from-idle (wake under the fabric lock), dual-pipe peer wake from hints, DP audio playback/unplug (playback -> close -> unplug -> idle-off -> reopen -> hw_params),s2idlewith local key-press wake after idle-off, realdeepsuspend and resume after idle-off, docked display recovery, and stock comparison for theopen_ioav_gated()syslog message.J713T8132, currently off-network/unreachable, orJ313T8103).dcpextpower domains (none is exposed onJ716c) andJ714s/corK114/K116runs (external hardware not on site).#3398tomainbefore#3410merges (per branch policy, deleting a merged base branch closes PRs still stacked on it) and running hosted CI one270795bddde.Details
Five PR commits (
7531b5b33018,7bf81725acc2,1f59a74fb75d,224cf52e3c33,e270795bddde) plus forward merge90cc7ea1cbcastacked on#3410(9f33c3f95939, carrying per-openmanaged_buffer_allocDP audio buffer ownership +c7e82c6303b3+origin/mainfdad0c5804d8):7531b5b33018(soc: apple: sleep): serializeapple_sleep_m5_display_pmc()witht6050_disp_pmc_lock, validate thedisp-4resource before MMIO, and exportapple_sleep_m5_dispext_power_ready().7bf81725acc2(drm/apple):dcp_ext_idle_*, with peer-reservation checks (peer_waking,DCP_EXT_IDLE_ON,sleep_v27_closed) and checked rollback on transient pre-idle refusals.category != 2 && offset == 0) onsleep_v27_closedunderep->lockwhile still allowing firmware-initiated replies and continuation fragments to finish.dcp->tx_errorsacrossdcp_send_message()and verify post-idle RX drain cleanly before clearing RUN and gating DART/PMC power domains.dcp_v27_sleep_resume()ondcp_v27_sleep_active()(phase != V27_LIVE) so a failed runtime idle-off never misroutes a laters2idleresume.1f59a74fb75d(drm/apple): pinpeer->devwithget_device()/put_device()and trackpeer->peer_idle_usersunderdcp_peer_lockacross unlockeddcp_ext_idle_wake()/dcp_ext_idle_kick()windows, and drain callers viadcp_peer_idle_drain()indcp_ext_idle_close()anddcp_comp_unbind().864f2b188ac0(forward merge of#3410f39fdeec3e43): preserves both#3398'sdcp_v27_ext_idle_*block andorigin/main'sdcp_v27_dpms_*block indcp-v27-sleep.inc(both#ifdefand#else), inherits#3410's unpluggeddcp-dp-audioADMA deferral and void-buffer fallback (SNDRV_DMA_TYPE_VMALLOC+ext_idle_audio_usersDCP pinning so probing/holding/dev/snd/pcm*never wakes or dropsDISPEXT*_SYSwhile ADMAC is active, resolving J714s DP audio coordination), and checksext_idle_initializedindcp_ext_idle_wake_internal()anddcp_audio_dma_put()so pins stay balanced on non-idle-capable DCPs. Plugged DP-audio opens on a DCP whose idle state latchedDCP_EXT_IDLE_FAILEDreturnext_idle_err(or-EIOif unset).224cf52e3c33(drm/apple/soc: apple: sleep):dcp_v27_ext_wake_calls()(drivers/gpu/drm/apple/dcp-v27-sleep.inc), bail out early when!allow_cycle && a500fails, skip the trailingA500round ifa489ora115failed in strict mode, and propagatea489anda115errors insideif (!allow_cycle).s2r_ext,v27deep sleep, andPM_SUSPEND_PREPARE(t6050_sleep_display_prepare()/sleep_region_replay()accept already-off external display words), with KUnit coverage (dcp_v27_ext_wake_transport_errors,dcp_ext_idle_failed_suspend).90cc7ea1cbca(forward merge of#34109f33c3f95939into224cf52e3c33withSigned-off-by): resolves conflicts indcp-peer-v26_6.inc,dcp-peer-runtime-v27.inc, anddcp.c(dcp_comp_unbind()) to retain bothdcp_peer_idle_drain()/peer_wakingidle-state guards andmain'sdcp_peer_retire_sync()/unpauselabel, while inheriting#3410's per-openmanaged_buffer_allocDP audio buffer selection (9f33c3f95939).e270795bddde(drm/apple): extractdcp_ext_idle_failed_dark_locked()requiring positive confirmation (dcp->ext_idle_power == DCP_EXT_POWER_OFF) so neitherDCP_EXT_POWER_UNCERTAINnorDCP_EXT_POWER_ONis treated as failed-dark even whenext_idle_domains_offis set; updatedcp_ext_idle_suspend()to propagatedcp->ext_idle_err ?: -EIOwheneverext_idle_domains_off || ext_idle_power != DCP_EXT_POWER_ON; trackext_idle_poweracross legacydcp_s2r_domains_off(),dcp_s2r_ext_domains_off(),dcp_s2r_domains_on(), anddcp_s2r_ext_domains_on(); indcp_s2r_ext_start(), preserve the priorext_idle_power/ext_idle_domains_offstate across preflight checks (dcp_s2r_dart_gapf_ready()), leaving transitionUNCERTAIN/ONupdates indcp_s2r_domains_on()anddcp_s2r_ext_domains_on()so a post-power-on DART restore failure takes normals2r_fw_downsuspend rather than failed-dark while a preflight failure preserves confirmedOFF; require off confirmation across CPU, FE, and SYS (when present) viadcp_s2r_poll_domain_off()in bothdcp_s2r_domains_off_regs()anddcp_s2r_ext_domains_off_regs()before recordingDCP_EXT_POWER_OFF(retainingDCP_EXT_POWER_UNCERTAINon any required check failure); and covers2r_extandv27failed-dark, legacy power-on timeouts, GAPF preflight failures, post-power-on DART restore failures, and CPU/FE/SYS power-off confirmations indcp_ext_idle_failed_suspend,dcp_ext_idle_legacy_wake_failures, anddcp_ext_idle_legacy_domains_off.Evidence
e270795bddde(90cc7ea1cbcamerge of#34109f33c3f95939+e270795bdddefix):make O=_build ARCH=arm64 LLVM=1 W=1 KCFLAGS="-Werror" drivers/soc/apple/sleep.o drivers/gpu/drm/apple/dcp.o drivers/gpu/drm/apple/dptxep.o drivers/gpu/drm/apple/dcp-fabric.o drivers/gpu/drm/apple/iomfb.o drivers/gpu/drm/apple/afk.o drivers/gpu/drm/apple/audio.o drivers/gpu/drm/apple/av.o(aurora_defconfig+asahi.config,CONFIG_RUST=n):0errors,0warnings../scripts/checkpatch.pl --strict --git 9f33c3f95939..HEAD:0errors,0warnings,0checks across all 5 PR commits (7531b5b33018,7bf81725acc2,1f59a74fb75d,224cf52e3c33,e270795bddde);git diff --check 9f33c3f95939..HEADclean.drivers/gpu/drm/apple/tests/display.kunitconfigwithCONFIG_SOUND=y+CONFIG_SND=y:298run:295passed,3skipped (apple_g17_rx_util_min_test,dcpaud_no_sio_test, anddcp_v27_ext_wake_transport_errorsskipped withCONFIG_APPLE_SOC_SLEEPoff;dcp_ext_idle_failed_suspend,dcp_ext_idle_legacy_wake_failures, anddcp_ext_idle_legacy_domains_offpassed,apple-dcpaud-legacy11/11).drivers/gpu/drm/apple/tests/display.kunitconfigwithCONFIG_SOUND=y+CONFIG_SND=y+CONFIG_IOMMU_SUPPORT=y+CONFIG_APPLE_DART=y+CONFIG_SUSPEND=y+CONFIG_HOTPLUG_CPU=y+CONFIG_APPLE_SOC_SLEEP=y:299run:297passed,2skipped (apple_g17_rx_util_min_test,dcpaud_no_sio_test), includingapple-dcp-firmware11/11(dcp_ext_idle_s2r_disp_dart_gate,dcp_ext_idle_audio_dma_pin,dcp_v27_ext_wake_transport_errors,dcp_ext_idle_failed_suspend,dcp_ext_idle_legacy_wake_failures,dcp_ext_idle_legacy_domains_off) andapple-dcpaud-legacy11/11.drivers/gpu/drm/apple/tests/display.kunitconfigwithCONFIG_SOUND=y+CONFIG_SND=y+CONFIG_DMADEVICES=y+CONFIG_IOMMU_SUPPORT=y+CONFIG_APPLE_DART=y+CONFIG_SUSPEND=y+CONFIG_HOTPLUG_CPU=y+CONFIG_APPLE_SOC_SLEEP=y:299run:298passed,1skipped (apple_g17_rx_util_min_test), includingapple-dcp-firmware11/11andapple-dcpaud-legacy11/11.drivers/gpu/drm/apple/tests/.kunitconfig:117/117passed (apple-dcp-fabric).drivers/soc/apple/t6050-aop.kunitconfig:12run:11passed,1skipped (apple_t6050_aop8/8,apple_mbox_g17_stall3passed /1skipped).python3 -I tools/asahi/run-host-tests.py --only dcpaud:22/22passed (dcpaud-open-fallback-tests+12/12mutants killed +dcpaud-sleep-hold-tests).python3 -I tools/asahi/run-host-tests.py --only dart:24/24passed.python3 -I tools/asahi/dcp-tunnel-prepare-tests.py: PASS.python3 -I tools/asahi/dcpext26-startup-tests.py --mutants: PASS.python3 -I tools/asahi/backlight-coldboot-tests.py: PASS.python3 -I tools/asahi/display-sleep-merge-tests.py: PASS (17/17).python3 tools/testing/selftests/drivers/gpu/apple-dcp/run.py --group audio:2/2passed (compact-audio-reply-bounds,cec-only-av-endpoint).J716c(T6050, firmware27.2) composite trial boot (origin/maind3de772ac0c1+e270795bdddecarrying#34109f33c3f95939, composite8d250d354c97, chained dead-man trial Stage 2, desktop up):0Oops/WARN/BUG/Call trace;3xeDP-1DPMS off/on through Hyprland (sysfsdpmsOff/On,3456x2234restored,enabled,0Oops/WARN; firmware syslogopen_ioav_gated(): IOAVVideoInterface open failedon each DPMS-on with display recovery, not yet compared against stock). Dynamic debug was enabled after boot (idle-offdev_dbgnot captured), no external display was connected (DP-1..6disconnected),rtcwake -d /dev/rtc1 -m freeze -s 10(s2idle) did not wake without a local key press (matchingmain), and realdeepsuspend was not run.224cf52e3c33,e270795bddde, and9f33c3f95939):79a2063f331c(trial boot,T6050, default Stage 2b0a2f222b5a9): all 4 unattached external DCPs (2b2e00000,302e00000,306e00000,392e00000) reachedfControllerPowerState 0at ~6.2 s and returned to0after 2xpm_test=devices, 0 GPU/MMU faults, 0 Oops/WARN, 2xmodetesteDP-1DPMS writes clean.87662fb2f093(on#3410c4797d399ba0,main94104a69193b, with#3662): docked on TS5 with two 3840x2160 displays, 30 s deep sleep resumed with both back,0oopses.b963090c1f2din batched trial kernel3545ebecb76f(origin/mainb897ccb4e71c+ 18 open PR heads): all 4 external DCPs (2b2e00000,302e00000,306e00000,392e00000) reachedfControllerPowerState 0at 5.907–5.910 s after boot and returned to0after 4xpm_test=devices, 2xpm_test=platform, and 3x DPMS off/on cycles,0DCP panics.1f59a74fb75din batched candidatec3da8eed6f72(overmain9af21b007425): boot idle-off and 2xpm_test=devicessuspend/resume clean.