Skip to content

drm/apple: wire firmware-27 T6050 external DCPs into runtime idle off - #3398

Open
erikwb wants to merge 11 commits into
mainfrom
feat/dcp-v27-ext-idle-off-t6050
Open

erikwb wants to merge 11 commits into
mainfrom
feat/dcp-v27-ext-idle-off-t6050

Conversation

@erikwb

@erikwb erikwb commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

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 legacy s2r_ext (propagating the saved wake error when ext_idle_domains_off || ext_idle_power != DCP_EXT_POWER_ON without confirmed OFF, while a failed post-power-on DART restore with DCP_EXT_POWER_ON and !ext_idle_domains_off falls back to normal s2r_fw_down suspend).

Tested: Offline checks pass at current head e270795bddde (forward-merge 90cc7ea1cbca of #3410 9f33c3f95939 into 224cf52e3c33, followed by fix commit e270795bddde):

  • 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}): 0 errors, 0 warnings.
  • git diff --check 9f33c3f95939..HEAD clean; checkpatch.pl --strict --git 9f33c3f95939..HEAD: 0 errors, 0 warnings, 0 checks across all 5 PR commits (7531b5b33018, 7bf81725acc2, 1f59a74fb75d, 224cf52e3c33, e270795bddde).
  • arm64 QEMU KUnit: drivers/gpu/drm/apple/tests/display.kunitconfig with CONFIG_SOUND=y + CONFIG_SND=y (298 run: 295 passed, 3 skipped including dcp_ext_idle_failed_suspend, dcp_ext_idle_legacy_wake_failures, and dcp_ext_idle_legacy_domains_off passing and dcp_v27_ext_wake_transport_errors skipped with CONFIG_APPLE_SOC_SLEEP off), display.kunitconfig with CONFIG_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 (299 run: 297 passed, 2 skipped apple_g17_rx_util_min_test and dcpaud_no_sio_test; apple-dcp-firmware 11/11 passed including 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; apple-dcpaud-legacy 11/11), the same sleep-enabled config plus CONFIG_DMADEVICES=y (299 run: 298 passed, 1 skipped), drivers/gpu/drm/apple/tests/.kunitconfig (117/117 passed), and drivers/soc/apple/t6050-aop.kunitconfig (12 run: 11 passed, 1 skipped).
  • Host & selftests: 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), and selftests/drivers/gpu/apple-dcp/run.py --group audio (2/2 passed).
  • J716c (T6050, firmware 27.2) composite hardware pass at exact head e270795bddde (carrying #3410 9f33c3f95939, merged onto origin/main d3de772ac0c1 alongside #3717, #3409, #3273, #3289, #3359; composite 8d250d354c97, chained dead-man trial Stage 2, desktop up): 0 Oops/WARN/BUG/Call trace; 3x eDP-1 DPMS off/on cycles through Hyprland (sysfs dpms Off/On followed cleanly, 3456x2234 restored, enabled, 0 Oops/WARN; firmware syslog open_ioav_gated(): IOAVVideoInterface open failed appeared 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 expose dcpext domains), no external display was connected (DP-1..6 disconnected), rtcwake -d /dev/rtc1 -m freeze -s 10 (s2idle) did not wake without a local key press (matching main), and real deep suspend was not run.

J716c (T6050) one-shot trial boot at 79a2063f331c (pre-fix baseline before 224cf52e3c33, e270795bddde, and 9f33c3f95939; this branch alone, default command line, default Stage 2 b0a2f222b5a9, chained dead-man trial Stage 2): booted, 1 failed system unit (aurora-peripherals.service, as on the default boot), 0 LSM denials, 0 GPU fault / MMU fault / DeviceLost / Oops / WARN / SError lines, kernel err+ 44 lines (the systemd-gpt-auto-generator pair, avd missing-firmware probe, M5 bare-metal bootstrap failed at session: EPROBE_DEFER and 40 apple-dcp ... AFK ... unable to match service lines, none new from this PR). All four unattached external DCPs (2b2e00000, 302e00000, 306e00000, 392e00000) reached fControllerPowerState 0 at about 6.2 s after boot (idle-off engaged) and were back at 0 after 2x pm_test=devices suspend/resume (each PM: suspend entry / PM: suspend exit, 0 new err+ lines). dcp-dp-audio had no bound device with nothing attached, so no DP-audio PCM existed to open (aplay -l listed 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), so eDP-1 compositor DPMS off/on was not run; modetest DPMS writes on eDP-1 (2x) logged a DCP power off/on and left the connector connected / enabled. No external display was attached.

Earlier J716c hardware rows (87662fb2f093 with #3662 TS5 dock 2x 4K + 30 s deep sleep clean; b963090c1f2d batched 3545ebecb76f idle-off + pm_test + 3x DPMS; 1f59a74fb75d in c3da8eed6f72) also predate 224cf52e3c33, e270795bddde, and 9f33c3f95939.

Risk: two-way door · T6050 Macs with firmware-27 external DCPs (J716c, J714s/c, K114/K116) plus legacy s2r_ext external DCP power-state tracking.

Revert: git revert -m 1 <merge_commit> after merge (or revert e270795bddde, 224cf52e3c33, 1f59a74fb75d, 7bf81725acc2, and 7531b5b33018 in 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 head e270795bddde: 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), s2idle with local key-press wake after idle-off, real deep suspend and resume after idle-off, docked display recovery, and stock comparison for the open_ioav_gated() syslog message.
  • Second-family unaffected boot/display/DPMS smoke row (J713 T8132, currently off-network/unreachable, or J313 T8103).
  • A genpd/runtime-PM view of the dcpext power domains (none is exposed on J716c) and J714s/c or K114/K116 runs (external hardware not on site).
  • Retargeting #3398 to main before #3410 merges (per branch policy, deleting a merged base branch closes PRs still stacked on it) and running hosted CI on e270795bddde.
Details

Five PR commits (7531b5b33018, 7bf81725acc2, 1f59a74fb75d, 224cf52e3c33, e270795bddde) plus forward merge 90cc7ea1cbca stacked on #3410 (9f33c3f95939, carrying per-open managed_buffer_alloc DP audio buffer ownership + c7e82c6303b3 + origin/main fdad0c5804d8):

  1. 7531b5b33018 (soc: apple: sleep): serialize apple_sleep_m5_display_pmc() with t6050_disp_pmc_lock, validate the disp-4 resource before MMIO, and export apple_sleep_m5_dispext_power_ready().
  2. 7bf81725acc2 (drm/apple):
    • Wire T6050 firmware-27 external DCPs into dcp_ext_idle_*, with peer-reservation checks (peer_waking, DCP_EXT_IDLE_ON, sleep_v27_closed) and checked rollback on transient pre-idle refusals.
    • Close compact AFK command admission for new non-reply messages (category != 2 && offset == 0) on sleep_v27_closed under ep->lock while still allowing firmware-initiated replies and continuation fragments to finish.
    • Drain RX and settle while RTKit TX is live before strict idle; track dcp->tx_errors across dcp_send_message() and verify post-idle RX drain cleanly before clearing RUN and gating DART/PMC power domains.
    • Gate dcp_v27_sleep_resume() on dcp_v27_sleep_active() (phase != V27_LIVE) so a failed runtime idle-off never misroutes a later s2idle resume.
  3. 1f59a74fb75d (drm/apple): pin peer->dev with get_device()/put_device() and track peer->peer_idle_users under dcp_peer_lock across unlocked dcp_ext_idle_wake() / dcp_ext_idle_kick() windows, and drain callers via dcp_peer_idle_drain() in dcp_ext_idle_close() and dcp_comp_unbind().
  4. 864f2b188ac0 (forward merge of #3410 f39fdeec3e43): preserves both #3398's dcp_v27_ext_idle_* block and origin/main's dcp_v27_dpms_* block in dcp-v27-sleep.inc (both #ifdef and #else), inherits #3410's unplugged dcp-dp-audio ADMA deferral and void-buffer fallback (SNDRV_DMA_TYPE_VMALLOC + ext_idle_audio_users DCP pinning so probing/holding /dev/snd/pcm* never wakes or drops DISPEXT*_SYS while ADMAC is active, resolving J714s DP audio coordination), and checks ext_idle_initialized in dcp_ext_idle_wake_internal() and dcp_audio_dma_put() so pins stay balanced on non-idle-capable DCPs. Plugged DP-audio opens on a DCP whose idle state latched DCP_EXT_IDLE_FAILED return ext_idle_err (or -EIO if unset).
  5. 224cf52e3c33 (drm/apple / soc: apple: sleep):
    • In dcp_v27_ext_wake_calls() (drivers/gpu/drm/apple/dcp-v27-sleep.inc), bail out early when !allow_cycle && a500 fails, skip the trailing A500 round if a489 or a115 failed in strict mode, and propagate a489 and a115 errors inside if (!allow_cycle).
    • Allow system suspend and resume while leaving a failed external DCP dark across s2r_ext, v27 deep sleep, and PM_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).
  6. 90cc7ea1cbca (forward merge of #3410 9f33c3f95939 into 224cf52e3c33 with Signed-off-by): resolves conflicts in dcp-peer-v26_6.inc, dcp-peer-runtime-v27.inc, and dcp.c (dcp_comp_unbind()) to retain both dcp_peer_idle_drain()/peer_waking idle-state guards and main's dcp_peer_retire_sync()/unpause label, while inheriting #3410's per-open managed_buffer_alloc DP audio buffer selection (9f33c3f95939).
  7. e270795bddde (drm/apple): extract dcp_ext_idle_failed_dark_locked() requiring positive confirmation (dcp->ext_idle_power == DCP_EXT_POWER_OFF) so neither DCP_EXT_POWER_UNCERTAIN nor DCP_EXT_POWER_ON is treated as failed-dark even when ext_idle_domains_off is set; update dcp_ext_idle_suspend() to propagate dcp->ext_idle_err ?: -EIO whenever ext_idle_domains_off || ext_idle_power != DCP_EXT_POWER_ON; track ext_idle_power across legacy dcp_s2r_domains_off(), dcp_s2r_ext_domains_off(), dcp_s2r_domains_on(), and dcp_s2r_ext_domains_on(); in dcp_s2r_ext_start(), preserve the prior ext_idle_power / ext_idle_domains_off state across preflight checks (dcp_s2r_dart_gapf_ready()), leaving transition UNCERTAIN / ON updates in dcp_s2r_domains_on() and dcp_s2r_ext_domains_on() so a post-power-on DART restore failure takes normal s2r_fw_down suspend rather than failed-dark while a preflight failure preserves confirmed OFF; require off confirmation across CPU, FE, and SYS (when present) via dcp_s2r_poll_domain_off() in both dcp_s2r_domains_off_regs() and dcp_s2r_ext_domains_off_regs() before recording DCP_EXT_POWER_OFF (retaining DCP_EXT_POWER_UNCERTAIN on any required check failure); and cover s2r_ext and v27 failed-dark, legacy power-on timeouts, GAPF preflight failures, post-power-on DART restore failures, and CPU/FE/SYS power-off confirmations in dcp_ext_idle_failed_suspend, dcp_ext_idle_legacy_wake_failures, and dcp_ext_idle_legacy_domains_off.
Evidence
  • Current head e270795bddde (90cc7ea1cbca merge of #3410 9f33c3f95939 + e270795bddde fix):
    • 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): 0 errors, 0 warnings.
    • ./scripts/checkpatch.pl --strict --git 9f33c3f95939..HEAD: 0 errors, 0 warnings, 0 checks across all 5 PR commits (7531b5b33018, 7bf81725acc2, 1f59a74fb75d, 224cf52e3c33, e270795bddde); git diff --check 9f33c3f95939..HEAD clean.
    • arm64 QEMU KUnit:
      • drivers/gpu/drm/apple/tests/display.kunitconfig with CONFIG_SOUND=y + CONFIG_SND=y: 298 run: 295 passed, 3 skipped (apple_g17_rx_util_min_test, dcpaud_no_sio_test, and dcp_v27_ext_wake_transport_errors skipped with CONFIG_APPLE_SOC_SLEEP off; dcp_ext_idle_failed_suspend, dcp_ext_idle_legacy_wake_failures, and dcp_ext_idle_legacy_domains_off passed, apple-dcpaud-legacy 11/11).
      • drivers/gpu/drm/apple/tests/display.kunitconfig with CONFIG_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: 299 run: 297 passed, 2 skipped (apple_g17_rx_util_min_test, dcpaud_no_sio_test), including apple-dcp-firmware 11/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) and apple-dcpaud-legacy 11/11.
      • drivers/gpu/drm/apple/tests/display.kunitconfig with CONFIG_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: 299 run: 298 passed, 1 skipped (apple_g17_rx_util_min_test), including apple-dcp-firmware 11/11 and apple-dcpaud-legacy 11/11.
      • drivers/gpu/drm/apple/tests/.kunitconfig: 117/117 passed (apple-dcp-fabric).
      • drivers/soc/apple/t6050-aop.kunitconfig: 12 run: 11 passed, 1 skipped (apple_t6050_aop 8/8, apple_mbox_g17_stall 3 passed / 1 skipped).
    • Host & selftests:
      • python3 -I tools/asahi/run-host-tests.py --only dcpaud: 22/22 passed (dcpaud-open-fallback-tests + 12/12 mutants killed + dcpaud-sleep-hold-tests).
      • python3 -I tools/asahi/run-host-tests.py --only dart: 24/24 passed.
      • 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/2 passed (compact-audio-reply-bounds, cec-only-av-endpoint).
    • J716c (T6050, firmware 27.2) composite trial boot (origin/main d3de772ac0c1 + e270795bddde carrying #3410 9f33c3f95939, composite 8d250d354c97, chained dead-man trial Stage 2, desktop up): 0 Oops/WARN/BUG/Call trace; 3x eDP-1 DPMS off/on through Hyprland (sysfs dpms Off/On, 3456x2234 restored, enabled, 0 Oops/WARN; firmware syslog open_ioav_gated(): IOAVVideoInterface open failed on each DPMS-on with display recovery, not yet compared against stock). Dynamic debug was enabled after boot (idle-off dev_dbg not captured), no external display was connected (DP-1..6 disconnected), rtcwake -d /dev/rtc1 -m freeze -s 10 (s2idle) did not wake without a local key press (matching main), and real deep suspend was not run.
  • Prior J716c runs (predate 224cf52e3c33, e270795bddde, and 9f33c3f95939):
    • 79a2063f331c (trial boot, T6050, default Stage 2 b0a2f222b5a9): all 4 unattached external DCPs (2b2e00000, 302e00000, 306e00000, 392e00000) reached fControllerPowerState 0 at ~6.2 s and returned to 0 after 2x pm_test=devices, 0 GPU/MMU faults, 0 Oops/WARN, 2x modetest eDP-1 DPMS writes clean.
    • 87662fb2f093 (on #3410 c4797d399ba0, main 94104a69193b, with #3662): docked on TS5 with two 3840x2160 displays, 30 s deep sleep resumed with both back, 0 oopses.
    • b963090c1f2d in batched trial kernel 3545ebecb76f (origin/main b897ccb4e71c + 18 open PR heads): all 4 external DCPs (2b2e00000, 302e00000, 306e00000, 392e00000) reached fControllerPowerState 0 at 5.907–5.910 s after boot and returned to 0 after 4x pm_test=devices, 2x pm_test=platform, and 3x DPMS off/on cycles, 0 DCP panics.
    • 1f59a74fb75d in batched candidate c3da8eed6f72 (over main 9af21b007425): boot idle-off and 2x pm_test=devices suspend/resume clean.

…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>
@erikwb
erikwb requested review from a team as code owners November 27, 2026 14:40
@erikwb
erikwb requested review from LiamRay11 and maralcbr November 27, 2026 14:40

@aurora-silicon-review aurora-silicon-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@github-actions github-actions Bot added area:display Area from CODEOWNERS (bot) area:platform Area from CODEOWNERS (bot) blast:m5 Macs affected, from Merge risk (bot) door:two-way Revertible or not, from Merge risk (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) labels Nov 27, 2026
@github-actions

github-actions Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

Merge readiness at c2f5f486: not ready yet

Check Detail
CI at head no failing: host-tests
Review no approved by DjDeveloperr, but GitHub does not count it yet (code owner from Core or Omarchy Mac needed, or approval went stale)
Requested changes ok none
Hardware row at head ok comment at c2f5f486
Conflicts no merge conflicts with main: merge it in (no force push)
PR text ok Risk: two-way · T6050 Macs with firmware-27 external DCPs (J716c, J714s/c, K114/K116) plus legacy s2rext external DCP power-state tracking. Revert: git revert -m 1 <merge_commit> after merge (or revert e270795bddde, 224cf52e3c33, 1f59a74fb75d, 7bf81725acc2, and 7531b5b33018 in reverse order). Kernel driver and test changes only; no persistent on-disk, ESP, Stage 2, or DT state is modified.

Areas: area:display, area:platform

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>
@erikwb

erikwb commented Nov 27, 2026

Copy link
Copy Markdown
Contributor Author

Fixed in 1f59a74fb75d (drivers/gpu/drm/apple/dcp-internal.h, dcp-peer-v26_6.inc, dcp-peer-v27.inc, dcp.c).

  • Cross-device peer lifetime (dcp_peer_hints_v27()): dcp_peer_idle_get_locked() now takes get_device(peer->dev) and increments peer->peer_idle_users under dcp_peer_lock before dropping the lock for either dcp_ext_idle_wake(peer) or dcp_ext_idle_kick(released), returning the referenced struct device * so callers save it while the peer is protected. On the wake path, peer->peer_waking is also counted under dcp_peer_lock; after re-acquiring dcp_peer_lock, it decrements peer->peer_waking and calls dcp_peer_idle_put_locked(peer) (decrementing peer_idle_users and waking dcp_peer_idle_wq) before rechecking peer/ownership state, keeping dcp_peer_lock held through populating r->primary_id/r->peer_id on success with put_device(peer_dev) called before unlocking on the success path (and after unlocking on the error path and on the dcp_ext_idle_kick() release path).
  • Teardown synchronization (dcp_ext_idle_close(), dcp_comp_unbind()): both paths now call dcp_peer_idle_drain(dcp) (wait_event(dcp_peer_idle_wq, !dcp_peer_idle_busy(dcp))). dcp_ext_idle_close() drains after publishing DCP_EXT_IDLE_CLOSED and cancelling ext_idle_wq, and dcp_comp_unbind() drains right after dcp_peer_forget() sets peer_unbinding and clears peer_reserved/peer_owner so no new caller can enter and any in-flight cross-device wake or recheck completes before unbind/devres teardown proceeds.
  • Landing parent: feat/dcp-v27-ext-idle-off (#3410, head 944b0ba788d2, targeting main), which replaced closed #3308.

Verified at 1f59a74fb75d:

  • ./scripts/checkpatch.pl --strict --git 944b0ba788d2..HEAD: 0 errors, 0 warnings, 0 checks across all 3 commits.
  • make 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 (C build with CONFIG_RUST disabled): clean.
  • ./tools/testing/kunit/kunit.py run --arch=arm64 --make_options LLVM=1 --kunitconfig=drivers/gpu/drm/apple/tests/.kunitconfig: 117/117 passed (apple-dcp-fabric).
  • ./tools/testing/kunit/kunit.py run --arch=arm64 --make_options LLVM=1 --kunitconfig=drivers/gpu/drm/apple/tests/display.kunitconfig: 168 run, 167 passed, 1 skipped (apple_g17_rx_util_min_test requires CONFIG_UCLAMP_TASK).

J716c live hardware at 1f59a74fb75d (batched candidate c3da8eed6f72, default command line): all four dcpext instances reached fControllerPowerState 0 at 6.167-6.185 s after boot, and after each of 2x pm_test=devices suspend/resume cycles re-ran RTKit init and returned to state 0 ~5 s later. The evidence is the firmware power-state log (runtime-PM sysfs reports unsupported and pm_genpd_summary has no display domains). Real s2idle/deep suspend and external DP cable attach/detach were not run and remain open.

@github-actions github-actions Bot added the ci-failing A check failed at the PR head (bot) label Nov 27, 2026

@aurora-silicon-review aurora-silicon-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: HOLD at 1f59a74f

Blockers:

  1. Targets open non-default base branch feat/dcp-v27-ext-idle-off (#3410). Retarget to main once #3410 merges and re-run cancelled pr-text and readiness checks (plus live T6050 external-DCP idle-off/wake row if not yet recorded at the final head).

Checked:

  • 1f59a74fb75d cleanly resolves the prior cross-device apple_dcp peer-lifetime blocker by taking get_device(peer->dev) and incrementing peer->peer_idle_users under dcp_peer_lock in dcp_peer_idle_get_locked() before dropping the lock for cross-device idle wake/kick.
  • KUnit apple-dcp-fabric (117/117) and display.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/-95 across 9 files).

…ff-t6050

Signed-off-by: Erik Bourget <erik@ebourget.net>
Signed-off-by: Erik Bourget <erik@ebourget.net>
@erikwb

erikwb commented Nov 28, 2026

Copy link
Copy Markdown
Contributor Author

Merged updated feat/dcp-v27-ext-idle-off (38c26d8a6b57, carrying origin/main 18058ea228e2 and #3410's s2r_disp_dart_with_dcp safety guard) into feat/dcp-v27-ext-idle-off-t6050 at ba54710a1438 (clean merge).

On the lifetime question: the peer pin and teardown drain survive the forward merge intact. dcp_peer_idle_get_locked() pins peer->dev with get_device() and increments peer_idle_users under dcp_peer_lock across both unlocked dcp_ext_idle_kick() (drivers/gpu/drm/apple/dcp-peer-v27.inc:209) and dcp_ext_idle_wake() (drivers/gpu/drm/apple/dcp-peer-v27.inc:275), and component unbind at drivers/gpu/drm/apple/dcp.c:7738 calls dcp_peer_forget(dcp) before dcp_peer_idle_drain(dcp) at drivers/gpu/drm/apple/dcp.c:7739 to drain outstanding callers (alongside dcp_ext_idle_close()).

Verified at ba54710a1438:

  • make ARCH=arm64 LLVM=1 W=1 KCFLAGS="-Werror" (defconfig + asahi.config, CONFIG_RUST=n) for drivers/soc/apple/sleep.o and drivers/gpu/drm/apple/{dcp,dptxep,dcp-fabric,iomfb,afk}.o: 0 errors, 0 warnings.
  • ./scripts/checkpatch.pl --strict --git 38c26d8a6b57..HEAD: 0 errors, 0 warnings, 0 checks across 7531b5b33018, 7bf81725acc2, and 1f59a74fb75d; git diff --check 38c26d8a6b57..HEAD clean.
  • arm64 QEMU KUnit: drivers/gpu/drm/apple/tests/.kunitconfig (apple-dcp-fabric) 117/117 passed, drivers/gpu/drm/apple/tests/display.kunitconfig 168 passed (1 skipped: apple_g17_rx_util_min_test requires CONFIG_UCLAMP_TASK, including apple-dcp-firmware 6/6 with dcp_ext_idle_s2r_disp_dart_gate), and drivers/soc/apple/t6050-aop.kunitconfig 11 passed (1 skipped).
  • Host tests: tools/asahi/dcpext26-startup-tests.py PASS (including --mutants) and tools/asahi/backlight-coldboot-tests.py PASS.

Hardware status & open items:

  • Combined-stack idle-off and pm_test evidence on J716c (T6050, batched trial kernel 3545ebecb76f at b963090c1f2d, predating ba54710a1438): all four dcpext instances (2b2e00000, 302e00000, 306e00000, 392e00000) reached fControllerPowerState 0 at 5.907–5.910 s, returned to 0 after 4x pm_test=devices and 2x pm_test=platform (re-idle within 8 s), and 3x DPMS cycles (samples DCP state 0 during DPMS-off and records display re-enable during DPMS-on) passed, 0 DCP panics, smoke clean, and 0 new failed system units (aurora-peripherals.service fails on default Stage 2 after warm reboots on this Mac). Note 3545ebecb76f also carries #3289 (ba76eb6e18f7)'s dcp_v27_warm_restart() cache reset and #3294 (6aefc6058db0)'s dcp_v27_reopen_live() changes beyond adjacent helper additions; 18 files is the stack count relative to main, while 3 of the 9 files in #3398's own diff (dcp-internal.h, dcp.c, dcp-v27-sleep.inc) differ from 3545ebecb76f due to #3289/#3294.
  • Still under **Not yet:**: physical attach from idle-off (including docked hotplug) and real s2idle / deep suspend (rtcwake) on the landing head ba54710a1438 or a runtime-preserving candidate (apple-pmu-rtc cannot wake J716c unattended), a second-family unaffected smoke row (J313 Group F trial kernel at b963090c1f2d was built and parity-checked against main ee36fbdcd1c8, and never booted because J313 became unreachable after the second deep-sleep cycle on baseline main), hosted CI on the final diff, and retargeting #3398 to main before #3410 merges (per branch policy, deleting a merged base branch closes PRs still stacked on it).

@aurora-silicon-review aurora-silicon-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: HOLD at ba54710a

Blockers:

  1. Targets open non-default base branch feat/dcp-v27-ext-idle-off (#3410). Retarget to main once #3410 merges so full main CI 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@38c26d8a preserving dcp_peer_lock synchronization across dcp_ext_idle_kick()/dcp_ext_idle_wake() and dcp_peer_forget()/dcp_peer_idle_drain() teardown; W=1 -Werror, display.kunitconfig (168 passed / 1 skipped), apple-dcp-fabric (117/117), t6050-aop (11 passed / 1 skipped), and checkpatch --strict pass at ba54710a.

@github-actions github-actions Bot removed the ci-failing A check failed at the PR head (bot) label Nov 30, 2026
Signed-off-by: Erik Bourget <erik@ebourget.net>

@aurora-silicon-review aurora-silicon-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: HOLD at 87662fb2f093

Blockers:

  • Stacked on open non-default base branch feat/dcp-v27-ext-idle-off (#3410); retarget to main before #3410 merges and wait for full main-targeted hosted CI to complete green (currently 0 passed, 0 failed, 8 queued on the stacked base).
  • Exact-head hardware verification noted in Not yet is still pending: physical external Type-C display attach/hot-plug wake from idle-off and real s2idle/deep suspend 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 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 both dcp_comp_unbind() and dcp_ext_idle_close()).
  • Verified afk.c (sleep_v27_closed send gate), dcp-v27-sleep.inc (dcp_v27_ext_idle_* + rollback paths), dcp.c (DCP_EXT_IDLE_STOPPING + dcp_v27_ext_idle_capable() routing), and drivers/soc/apple/sleep.c + include/linux/soc/apple/sleep.h (t6050_disp_pmc_lock serialization, apple_sleep_m5_display_pmc(), apple_sleep_m5_dispext_power_ready(), and !CONFIG_APPLE_SOC_SLEEP stubs); 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.

@github-actions github-actions Bot added the needs-hw-row No hardware row at the PR head (bot) label Nov 30, 2026
@github-actions github-actions Bot added ci-failing A check failed at the PR head (bot) and removed needs-hw-row No hardware row at the PR head (bot) labels Nov 30, 2026

@aurora-silicon-review aurora-silicon-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 both dcp_comp_unbind() and dcp_ext_idle_close()).
  • Verified afk.c (sleep_v27_closed send gate), dcp-v27-sleep.inc (dcp_v27_ext_idle_* + rollback paths), dcp.c (DCP_EXT_IDLE_STOPPING + dcp_v27_ext_idle_capable() routing), and drivers/soc/apple/sleep.c + include/linux/soc/apple/sleep.h (t6050_disp_pmc_lock serialization, apple_sleep_m5_display_pmc(), apple_sleep_m5_dispext_power_ready(), and !CONFIG_APPLE_SOC_SLEEP stubs); 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

@github-actions github-actions Bot removed the ci-failing A check failed at the PR head (bot) label Dec 1, 2026

@DjDeveloperr DjDeveloperr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@erikwb

erikwb commented Dec 1, 2026

Copy link
Copy Markdown
Contributor Author

We carry this PR on top of #3410 in our J716c (M5 Max, T6050) daily kernel.

Without wiring T6050's external display processors (dcpext0..3) and serialized display PMC helpers into #3410's runtime idle-off state machine, unattached external DCPs on J716c remained powered continuously at idle even with no external monitor connected.

Running smoothly on our J716c daily kernel alongside #3410, powering down unattached external DCPs at idle and waking cleanly on display attach.

@github-actions github-actions Bot added changes-requested A reviewer requested changes (bot) merge-conflict Conflicts with the base branch (bot) labels Dec 1, 2026
…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>
@erikwb

erikwb commented Dec 2, 2026

Copy link
Copy Markdown
Contributor Author

@DjDeveloperr Forward-merged updated #3410 (9f33c3f95939, carrying per-open managed_buffer_alloc DP audio buffer ownership + c7e82c6303b3 + origin/main fdad0c5804d8) at 90cc7ea1cbca (with Signed-off-by, resolving the dcp-peer-v26_6.inc, dcp-peer-runtime-v27.inc, and dcp.c conflicts while keeping both dcp_peer_idle_drain() and dcp_peer_retire_sync()) and fixed the DCP_EXT_POWER_UNCERTAIN / DCP_EXT_POWER_ON failed-dark check, preflight power-state preservation, and legacy CPU/FE/SYS power-off confirmation in e270795bddde:

  • drivers/gpu/drm/apple/dcp.c:
    • dcp_ext_idle_failed_dark_locked() now requires positive confirmation (dcp->ext_idle_power == DCP_EXT_POWER_OFF) rather than only != DCP_EXT_POWER_UNCERTAIN, and dcp_ext_idle_suspend() propagates dcp->ext_idle_err ?: -EIO whenever ext_idle_domains_off || ext_idle_power != DCP_EXT_POWER_ON.
    • Track ext_idle_power across legacy dcp_s2r_domains_off_regs(), dcp_s2r_ext_domains_off_regs(), dcp_s2r_domains_on(), and dcp_s2r_ext_domains_on(), and require off confirmation via dcp_s2r_poll_domain_off() across CPU, FE, and SYS (when present) in both legacy power-off paths before recording DCP_EXT_POWER_OFF (retaining DCP_EXT_POWER_UNCERTAIN if any required check fails).
    • In dcp_s2r_ext_start(), preserve the prior ext_idle_power / ext_idle_domains_off state across preflight checks (dcp_s2r_dart_gapf_ready()), leaving transition UNCERTAIN / ON updates inside dcp_s2r_domains_on() and dcp_s2r_ext_domains_on() so a GAPF preflight failure preserves confirmed OFF while a domain power-on failure latches DCP_EXT_POWER_UNCERTAIN and a subsequent DART restore failure leaves ext_idle_power == DCP_EXT_POWER_ON to take the normal s2r_fw_down suspend path.
  • drivers/gpu/drm/apple/dcp-firmware-test.c: updated dcp_ext_idle_failed_suspend (covering DCP_EXT_POWER_ON rejection and DCP_EXT_POWER_UNCERTAIN propagation on both s2r_ext and v27), expanded dcp_ext_idle_legacy_wake_failures (adding GAPF preflight failure preservation of DCP_EXT_POWER_OFF and DCP_EXT_POWER_UNCERTAIN, alongside legacy domain power-on timeout and post-power-on DART restore failures), and added dcp_ext_idle_legacy_domains_off (covering CPU/FE/SYS confirmation on both layout and fixed-offset paths).
  • PR summary & J716c (T6050) hardware pass at e270795bddde: clarified **What:** so DCP_EXT_POWER_OFF is described accurately as the condition for leaving a failed external DCP dark through suspend (while DCP_EXT_POWER_ON with !ext_idle_domains_off falls back to normal s2r_fw_down suspend). Booted e270795bddde on J716c (T6050, firmware 27.2) in a composite trial kernel (origin/main d3de772ac0c1 + e270795bddde and companion PRs, desktop up, 0 Oops/WARN/BUG/Call trace): 3x eDP-1 DPMS off/on cycles through Hyprland restored 3456x2234 cleanly with 0 Oops/WARN (open_ioav_gated(): IOAVVideoInterface open failed appeared in firmware syslog on DPMS-on with display recovery, not yet compared against stock). J716c external-display idle-off / hotplug / DP audio / deep suspend and s2idle with local key-press wake (rtcwake did not wake s2idle without a key press, matching main), plus J713 smoke (J713 currently off-network/unreachable), remain tracked under **Not yet:**.

Verified offline at e270795bddde:

  • make O=_build ARCH=arm64 LLVM=1 W=1 KCFLAGS="-Werror" (sleep.o, dcp.o, dptxep.o, dcp-fabric.o, iomfb.o, afk.o, audio.o, av.o): 0 errors, 0 warnings.
  • ./scripts/checkpatch.pl --strict --git 9f33c3f95939..HEAD: 0 errors, 0 warnings, 0 checks across all 5 PR commits; git diff --check 9f33c3f95939..HEAD clean.
  • KUnit: display.kunitconfig + CONFIG_SOUND=y CONFIG_SND=y (295 passed / 3 skipped), display.kunitconfig + CONFIG_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 (297 passed / 2 skipped, apple-dcp-firmware 11/11 including dcp_v27_ext_wake_transport_errors, dcp_ext_idle_failed_suspend, dcp_ext_idle_legacy_wake_failures, and dcp_ext_idle_legacy_domains_off, apple-dcpaud-legacy 11/11), the sleep-enabled config + CONFIG_DMADEVICES=y (298 passed / 1 skipped), tests/.kunitconfig (117/117), t6050-aop.kunitconfig (11 passed / 1 skipped).
  • Host & selftests: dcpaud 22/22, dart 24/24, dcp-tunnel-prepare-tests.py, dcpext26-startup-tests.py --mutants, backlight-coldboot-tests.py, display-sleep-merge-tests.py (17/17), and apple-dcp --group audio (2/2).

Base automatically changed from feat/dcp-v27-ext-idle-off to main December 2, 2026 19:49
@github-actions github-actions Bot added merge-conflict Conflicts with the base branch (bot) and removed merge-conflict Conflicts with the base branch (bot) labels Dec 2, 2026
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>

@DjDeveloperr DjDeveloperr left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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() uses main's dcp_s2r_wake_darts().
  • dcp_s2r_test.c: main's stub expected dcp_s2r_ext_start() to clear ext_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_closed is a three-state gate on main, 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-1 DPMS 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_ext path (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.

@github-actions github-actions Bot added needs-hw-row No hardware row at the PR head (bot) and removed changes-requested A reviewer requested changes (bot) merge-conflict Conflicts with the base branch (bot) labels Dec 2, 2026
@RyanTheTide

Copy link
Copy Markdown
Contributor

J713 smoke at exact head c2f5f486: PASS (no regression on a non-T6050 Mac)

J713 (MacBook Air M4, T8132, firmware 27.2). A = saved 7.3.0-aurora-fleet94; B = one-shot kernel built from this exact head with the fleet config (only DRM_APPLE_DISPLAY_KUNIT_TEST off, for main's current snd_pcm_lib_preallocate_free modpost break with DRM_APPLE=m/SND=m), BLS one-shot entry, saved default unchanged.

A fleet94 B c2f5f486
boot + internal display eDP-1 connected, DPMS On, 2560x1664 same, desktop up at 47 s
external display none attached (DP-1..4 disconnected) none attached
backlight max / level 500 500 / works 500 / works
one s2idle (rtcwake -d rtc1 -m freeze -s 20) resumes, panel on resumes, panel on
DCP errors / DART faults / WARN / Oops 0 / 0 / 0 / 0 0 / 0 / 0 / 0

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 speakerguardd-v2-switchtest (non-fleet kernel), unrelated. Restored afterwards: saved fleet94, test kernel removed, SELinux Enforcing, 0 failed units.

@erikwb

erikwb commented Dec 3, 2026

Copy link
Copy Markdown
Contributor Author

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 dcpext instances stay powered on J716c instead of powering down cleanly when idle, wasting idle power and breaking external-DCP idle-off parity with earlier SoCs.

Running cleanly on our unified daily across J716c, J713, and J313 with zero DCP panics or display regressions.

@github-actions github-actions Bot added ci-failing A check failed at the PR head (bot) merge-conflict Conflicts with the base branch (bot) labels Dec 3, 2026
@DjDeveloperr

Copy link
Copy Markdown
Contributor

Erik, could you forward-merge main 664b5dbe4182 and reconcile the DART stop/wake paths in dcp.c? The two stop-stream calls in this branch go through the stubbed plain-stream helper, while main selects the saved-streams API for s2r_dart_save_restore profiles. The merge also brings in a second copy of the three DART test wrappers. Please keep one wrapper set and preserve the saved-streams selection alongside the T6050 dark-domain and unwind sequence. The J713 smoke remains useful as a control. The merged T6050 stop/wake path needs a fresh J716c result.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:display Area from CODEOWNERS (bot) area:platform Area from CODEOWNERS (bot) blast:m5 Macs affected, from Merge risk (bot) ci-failing A check failed at the PR head (bot) door:two-way Revertible or not, from Merge risk (bot) merge-conflict Conflicts with the base branch (bot) needs-review No approving review from Core or Omarchy Mac yet (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants