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
DjDeveloperr
left a comment
There was a problem hiding this comment.
The failed-dark exception also accepts a partially completed power transition. At drivers/gpu/drm/apple/dcp-v27-sleep.inc:2155–2161 and 2320–2325, a PMGR timeout sets both DCP_EXT_POWER_UNCERTAIN and ext_idle_domains_off. Both dcp_ext_idle_failed_dark() and dcp_ext_idle_suspend() then treat that flag as confirmed off. I replayed the two functions with the timeout state and got failed_dark=1, suspend=0. On a failed power-on, the T6050 final check can also accept an auto-enabled word with a nonzero actual state, so it does not establish that all domains stayed off. Keep the failed-dark path for confirmed-off domains, propagate the saved error on uncertain power, and add that case to dcp_ext_idle_failed_suspend.
|
We carry this PR on top of #3410 in our J716c (M5 Max, T6050) daily kernel. Without wiring T6050's external display processors ( Running smoothly on our J716c daily kernel alongside #3410, powering down unattached external DCPs at idle and waking cleanly on display attach. |
…t-idle-off-t6050 Signed-off-by: Erik Bourget <erik@ebourget.net>
…dark Exclude DCP_EXT_POWER_UNCERTAIN and require DCP_EXT_POWER_OFF in dcp_ext_idle_failed_dark() and dcp_ext_idle_suspend() so neither an incomplete power transition nor a legacy s2r_ext power-on or DART restore failure is treated as confirmed off. Track ext_idle_power across legacy s2r_ext domain power-off/on helpers, preserve prior power state across preflight checks in dcp_s2r_ext_start() (such as GAPF readiness), and require off confirmation across CPU, FE, and SYS (when present) in both dcp_s2r_domains_off() and dcp_s2r_ext_domains_off() before recording DCP_EXT_POWER_OFF. Update dcp_ext_idle_failed_suspend, expand dcp_ext_idle_legacy_wake_failures, and add dcp_ext_idle_legacy_domains_off KUnit coverage. Signed-off-by: Erik Bourget <erik@ebourget.net>
|
@DjDeveloperr Forward-merged updated
Verified offline at
|
Conflicts and semantic conflicts resolved: - afk.c: the compact command admission keeps main's pause check (-EBUSY) next to this branch's refusal while the session is closed (-ESHUTDOWN). sleep_v27_closed is a gate state on main, so the branch's uses compare and set DCP_V27_TX_* values. - dcp.c: dcp_send_message_ret() counts failed sends; dcp_s2r_ext_start() follows main's dcp_s2r_wake_darts() and leaves the power state to the domain helpers; the DART wrappers both sides added are defined once. - dcp_s2r_test.c: its power-on stub clears ext_idle_domains_off, as the real power-on now does. Signed-off-by: DjDeveloperr <hey@djdev.me>
There was a problem hiding this comment.
Approving at c2f5f486bcd4. I merged current main (2c667a4be5a6) into the branch and read the whole diff, not only the merge. This replaces my 12-01 change request.
The 12-01 request is fixed. dcp_ext_idle_failed_dark() now needs DCP_EXT_POWER_OFF. A PMGR timeout, on the way off or on, leaves DCP_EXT_POWER_UNCERTAIN, so suspend returns the saved error and never reaches the T6050 final check that accepts an auto-enabled word. OFF is only recorded after CPU, FE and SYS have all read off. The case is in dcp_ext_idle_failed_suspend.
The wider scope (power state tracked on every hw.s2r_ext DCP) is fine. main already sets ext_idle_domains_off for all of them. What is new for T8103, T8112, T8132, T8140 and T8142:
- A power-off also waits for FE and SYS, up to 50 ms each. It only reads, and only warns on a timeout.
- If a dcpext fails to power on, later sleeps are refused until a reboot, also on DCPs that never idle off. Before, they went on to touch the DART behind that domain.
The register writes on a working path don't change.
Merge notes. Git merged two of these without a conflict:
dcp.c: both sides had added the same three DART wrappers; they are defined once now.dcp_s2r_ext_start()usesmain'sdcp_s2r_wake_darts().dcp_s2r_test.c:main's stub expecteddcp_s2r_ext_start()to clearext_idle_domains_off; the stub does that now, as the real power-on does.afk.c: the paused check (-EBUSY) and the closed check (-ESHUTDOWN) are both kept.sleep_v27_closedis a three-state gate onmain, so the branch uses its names.
Checked on the merged tree: asahi profile with KUnit, W=1 on drivers/gpu/drm/apple and drivers/soc/apple: no warning that main does not have. Host tests 1026/1026. checkpatch --strict on the PR's diff: 0/0/0. KUnit: built, not run.
Hardware rows owed at this head:
- J714s: boot; the unattached dcpexts idle off (5 s delay) and stay idle;
eDP-1DPMS off/on; two deep (mem) sleeps from idle-off, where each dcpext wakes, sleeps, resumes and idles off again; clean log. It has no external Type-C display, so it can't show attach from idle-off, the paired-pipe wake or DP audio, and its s2idle hangs, so it can't show that either. - J773g on 27.2: the shared
s2r_extpath (USB-C dcpext off and on with no FE or SYS warning, HDMI unaffected). - J716c: docked hotplug from idle-off, paired-pipe wake, DP audio across idle-off, s2idle and deep sleep. J713: unaffected smoke.
Landing order: #3273 conflicts with this in afk.c (the first compact fragment), so the second to land needs a small merge. #3289 merges cleanly with it as text.
|
J713 smoke at exact head J713 (MacBook Air M4, T8132, firmware 27.2). A = saved
No external display is attached to this J713, so only the bystander path was covered: the T6050 dcpext change doesn't affect the M4 Air's boot, display or s2idle. The one failed unit on B is |
|
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 |
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.