Skip to content

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

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

erikwb wants to merge 14 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 74d032c2: not ready yet

Check Detail
CI at head ok 9 checks passed
Review no needs one approving review from Core, Omarchy Mac or Aurora Maintainers (not the author)
Requested changes ok none
Hardware row at head ok comment at 74d032c2
Conflicts ok none
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:gpu, 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

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

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>
@github-actions github-actions Bot added needs-hw-row No hardware row at the PR head (bot) and removed 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

Forward-merged main 2533c76f02e3 as 14db7cab7d7c. The stop and wake calls share one DART dispatch: saved-stream profiles keep the saved API, and plain-stream profiles keep the KUnit stub. The extracted stop/wake host test passed for both routes, ordering and error propagation, and the five affected display fixtures passed 39/39 including their negative controls. The J713 smoke covers a different SoC. The next row is J716c or J714s on firmware 27.2 at this head, with an external display attached and then unplugged: confirm idle-off, replug recovery, DP audio holding the domain while active, and the expected suspend outcome alongside the same base.

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

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.

@github-actions github-actions Bot added the merge-conflict Conflicts with the base branch (bot) label Dec 3, 2026
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>
@github-actions github-actions Bot added area:gpu Area from CODEOWNERS (bot) and removed merge-conflict Conflicts with the base branch (bot) labels Dec 3, 2026
@DjDeveloperr

DjDeveloperr commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

Merged main into this branch twice (merge commits only: no rebase, no force-push). Head now 74d032c2a254 = 81e8bf2e4d28 (main 89ec99a075c7 merged) + main cacc5d311a9e.

Conflict 1 (81e8bf2e4d28): 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() / dcp_s2r_domains_on() (6a84c1d95460, b43e08447acd, f29b4f2d9f48, a37ced381725 and their follow-ups). This branch had moved the register part of dcp_s2r_domains_off() into dcp_s2r_domains_off_regs() and tracks ext_idle_power. Both kept:

  • dcp_s2r_domains_off() keeps the stuck-start check and the map/unmap (now dcp_s2r_unmap_power()). Main's PMC check and PMC off run inside dcp_s2r_domains_off_regs(), and the DISP_CPU poll goes through dcp_s2r_poll_domain_off().
  • ext_idle_power reads OFF only when every lowered domain is confirmed off. Main's new DISP_FE timeout before the PMC off, or DISP_SYS kept up after a failed PMC off, leave it UNCERTAIN. dcp_s2r_domains_on() sets UNCERTAIN once it raises a word, until DISP_CPU reads on, since main's new early exits there leave before the CPU poll.
  • Main's new tools/asahi/dcp-s2r-ext-idle-tests.py extracts dcp_s2r_ext_suspend(), which now calls dcp_ext_idle_failed_dark(). It gets a one-line stub next to the dcp_ext_idle_suspend() one.

Conflict 2 (74d032c2a254): dcp_s2r_pm_notify() in dcp.c. Main (30eef1aaf6a8) added !pm_suspend_no_platform() to the J714s crashed-processor sleep refusal, this branch added !dcp_ext_idle_failed_dark(dcp). Both kept.

Otherwise git diff main...HEAD is the old PR diff.

Checks on 74d032c2a254 (main cacc5d311a9e for comparison):

  • W=1 with CONFIG_WERROR, clang: drivers/gpu/drm/apple/ (DCP display and fabric KUnit compiled in) and drivers/soc/apple/sleep.o: 0 warnings, same as main.
  • Host tests that read the touched files (137 jobs, pinned ubuntu2404 container): 137/137; main 137/137.
  • UML KUnit apple-dcp-fabric + apple-iomfb-mode-state (at 81e8bf2e4d28): 133/133, same as main.
  • checkpatch --strict on dcp.c: 1 CHECK, the same one the old PR diff had; nothing from the resolutions.
  • Hosted CI on 81e8bf2e4d28: apple-build and host-tests pass; KUnit dcp-fabric 122/122, dcp-topology 241 + 1 skipped, dcp-display 345 + 2 skipped, asahi 635 + 1 skipped. Hosted CI on 74d032c2a254: apple-build and host-tests pass; KUnit dcp-fabric 122/122, dcp-topology 242 + 1 skipped, dcp-display 345 + 2 skipped, asahi 635 + 1 skipped.

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 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.

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 of dcp_s2r_domains_off_regs(), and a DISP_CPU that doesn't power off still calls dcp_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_OFF is 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.

  • 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 in dcp-s2r-ext-idle-tests.py matches 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_off clear falls back to the normal s2r_fw_down suspend, 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_lock before dcp_peer_lock or t6050_disp_pmc_lock. dcp_peer_hints_v27() drops dcp_peer_lock before 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 under ext_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 the disp-4 resource as on main.

Checks re-run at 74d032c2a254

  • W=1 KCFLAGS=-Werror (stock aurora_defconfig, LLVM) on drivers/gpu/drm/apple/ and drivers/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 --strict on the PR's diff against main: 0 errors, 0 warnings, 1 check. That check is the alignment of one continuation line in dcp_s2r_stop_streams() (dcp.c:10881), from an earlier merge; it isn't worth a new head. The two merge resolutions are clean.
  • main is now 9b8e29fe. 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

@RyanTheTide

Copy link
Copy Markdown
Contributor

K114s (MacBook Pro 14" M5 Pro, apple,k114s, T6050), firmware 27.2 — sealed kit peer-t6050-3398-74d032c2-20261204 (sha256 61b6ceef, seal 1e2524aa, kit.sh --check 10/10). VERDICT: NOT DECIDED.

  • Arm A = 7.3.0-main-cacc5d31 (boot b2063d46), Arm B = 7.3.0-pr3398-74d032c2 (boot c5b6f38e). Both were one-shot aura-try trials from the kit; the stock boot.bin (aedc5a8b) was untouched, and the rollback is OK (saved entry and next_entry clean). The external display is an Acer on DP-2 through a USB-C dock (Plugable).
VERDICT #3398 T6050 apple,k114s: NOT DECIDED
BOOT+LOG  PASS         7.3.0-pr3398-74d032c2 fw 27.2, no new kernel-line class
SINK      PASS         external DP lit on head: DP-2
DPMS      NOT DECIDED  DP-2: no Hyprland or KDE Plasma session answered: nothing can switch DPMS (base too); eDP-1: no Hyprland or KDE Plasma session answered: nothing can switch DPMS (base too)
REPLUG    NOT DECIDED  display back after the unplug, but no idle-off line in the 10 s disconnect
DP AUDIO  NOT DECIDED  no apple_dcp ALSA card played 2 s of silence: [[8, 1, 'aplay: set_params:1393: Sample format non available\nAvailable formats:\n- S24_LE\n- S32_LE'], [9, 1, 'aplay: set_params:1393: Sample format non available\nAvailable formats:\n- S24_LE'], [10, 1, 'aplay: set_params:1393: Sample format non available\nAvailable formats:\n- S24_LE\n- S32_LE']]
SUSPEND   NOT DECIDED  no deep sleep offered: mem_sleep '[s2idle]'
info base: 7.3.0-main-cacc5d31 fw 27.2 desktop None externals ['DP-2'] controller power {'2b2e00000': 1, '302e00000': 1, '392e00000': 0, '306e00000': 1}
info head: 7.3.0-pr3398-74d032c2 fw 27.2 desktop None externals ['DP-2'] controller power {'2b2e00000': 1, '392e00000': 0, '306e00000': 1, '302e00000': 1}
  • DPMS not decided: K114s is GNOME-only. There is no Hyprland or KDE Plasma session (the Mac sat at the GDM greeter), so neither arm could switch DPMS.
  • REPLUG: the tipd replug node exists, using the board-key fallback. Arm B handled the 10 s unplug cleanly (dcp_hotplug connected:0 → dcp_dptx_disconnect → relocked → connected:1, display back), and its kernel log was clean, whereas Arm A logged 5 DCP lines around the same replug. However, no dcpext idle: powered off line appeared in the 10 s window, so the PR's idle-off isn't shown here. The display is driven by 392e00000.dcp.
  • DP AUDIO: not decided in either arm. The kit's aplay asks for a format the T6050 DP-audio cards don't offer (Sample format non available; Available formats: S24_LE, S32_LE), on both cards 8 and 9. This looks like a kit issue: it needs -f S24_LE or S32_LE.
  • SUSPEND: skipped, because mem_sleep offers only [s2idle] on both kernels. Separately, the kit's t6050-k114s.dtb gives the PMU RTC wakeup-source but no interrupt, so an RTC wake from deep sleep wouldn't work on this Mac anyway.
  • To make room on /boot (the kit needs 500 MB), I removed three old lab kernels after backing them up. The saved default and the fallback stayed.

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).

@DjDeveloperr

Copy link
Copy Markdown
Contributor

Ryan, the GNOME K114s kit is ready for the next peer run at 74d032c2a254. Archive SHA-256 is 46dab603999bce2f19a459f022fa69ccc767715d5a1ca3b29b12a0f70721b556. Run bash kit.sh --check after extraction (10/10 offline), then follow the README for both one-shot arms.

Log into the GNOME Wayland desktop after each trial boot. Select the external Apple DP PCM from aplay -l and pass it as AUDIO_CARD, with DCP_DEV=392e00000 for the same DP-2 route. Mutter drives DPMS and the PCM format probe tries S24_LE and S32_LE. Set MANUAL_REPLUG=1 only if you can physically unplug and reconnect when prompted. Otherwise REPLUG stays NOT DECIDED and DP AUDIO tests the live PCM across DPMS. If these boot images still only offer [s2idle], deep sleep stays NOT DECIDED too. Please post the new VERDICT.txt and results when you have them.

@DjDeveloperr

Copy link
Copy Markdown
Contributor

@erikwb, could your J716c on firmware 27.2 take the remaining #3398 hardware check? The K114s trial only offered [s2idle] on either arm. Ryan’s existing GNOME retest can still cover DPMS, external-DCP idle-off/replug and DP audio. Could you confirm a native external DP sink and a viable deep-wake path on J716c before we stage a matched pair? One J716c run with the sink attached and unplugged would cover confirmed idle-off, replug, audio hold and recovery after deep sleep on a single board.

74d032c2a254 merges cleanly onto main a944d533a79c as tree 564013327760b35a05ee808ff2df0c5c820831c8. The integration adds changes in shared display files, so the earlier sealed kernel pair is useful for the existing K114s retest. For J716c I would use main and the exact merge tree, including the newer IOMFB queue code. Eight targeted host suites passed on that tree, including the 17 display/sleep boundary cases, the 128 DP-audio late-suspend cases, and the M4 peer-display controls. Hosted Apple build, DCP KUnit and host tests are green at the PR head.

@github-actions github-actions Bot removed the needs-hw-row No hardware row at the PR head (bot) label Dec 5, 2026

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:gpu 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)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants