Skip to content

phy: apple: atc-t6050: keep active combo PHY domains powered across s2idle - #2664

Open
satchlj wants to merge 2 commits into
integration/aurorafrom
satchlj/t6050-combo-phy-s2idle-syscore-20261121
Open

satchlj wants to merge 2 commits into
integration/aurorafrom
satchlj/t6050-combo-phy-s2idle-syscore-20261121

Conversation

@satchlj

@satchlj satchlj commented Nov 21, 2026 •

Copy link
Copy Markdown
Member

Problem

On T6050, t6050_dp_suspend_late() only quiesces the combo PHY for firmware deep sleep (pm_suspend_no_platform() == false). During s2idle, an active combo PHY remains running, and drivers/thunderbolt/apple.c holds ACIO's virtual genpd devices out of system suspend with dev_pm_syscore_device(..., true).

However, combo_pm_notify() in drivers/phy/apple/atc-t6050-combo.h was gated on combo_sleep_board() (j714s/j716c) and only held domain[0] during firmware deep sleep. During s2idle, genpd_suspend_noirq() powered off active combo PHY virtual genpd devices (including atc1_phymxwrap) under the still-running PHY RTKit CPU. On resume, the first CIO-to-SAFE transition timed out with apple-t6050-dp-phy 2ab000000.phy: PHY firmware stop failed: -62 and marked the PHY faulted (dp->faulted = true), permanently wedging the port (-5) until reboot.

Fix

  • Register combo_pm_notify() for all apple,t6050-combo-phy instances (not gated on combo_sleep_board()).
  • In PM_SUSPEND_PREPARE when pm_suspend_no_platform() is true (set in enter_state() before suspend_prepare() invokes notifiers, merged in T6050: a "freeze" with mem_sleep at deep is a suspend-to-idle (no dock teardown, no -67) #2510), hold every active dp->domain[] and dp->dp_gate[] virtual genpd device out of system suspend with dev_pm_syscore_device(..., true) and record the held devices in bitmasks (s2idle_domain_syscore, s2idle_gate_syscore).
  • In PM_POST_SUSPEND, release every device recorded in those bitmasks unconditionally (covering both normal resume and suspend abort via pm_notifier_call_chain_robust, independent of whether active changed in the meantime).
  • Hardware-state-driven only; works on the default kernel command line with no runtime switches or module parameters.

Hardware verification (J775c / Mac Studio M5 Max, T6050, ATC1 XDomain, s2idle)

Tested on cand-11 (8f345b748824) on the default command line (s2idle_teardown=N) across rtcwake -d rtc0 -m freeze:

  • Without this patch (Exp B): Post-resume CIO teardown failed with apple-t6050-dp-phy 2ab000000.phy: PHY firmware stop failed: -62 (dp->faulted = true), leaving the PHY wedged (-5) even after a USB-C PD replug succeeded.
  • With this patch (Exp D & Exp E, sole PHY delta vs Exp B):
    • pmgr-pwrstate dynamic debug confirmed zero atc1_phymxwrap or atc1_* power-off transitions across s2idle (only idle atc0/2/3_phymxwrap cycled).
    • In Exp E (boot 10ee7606-bb95-48ac-aae9-022620fed01f), post-resume set cable state: 0 cleanly received PHY firmware ep20: 8000010000000001 (zero -62), cycled atc1_phymxwrap 0x0 -> 0xf, and restarted 2ab000000.phy to CIO mode up: UC_TNBL_DONE (0), reverse orientation, 11 ms.
  • Compile check: drivers/phy/apple/atc-t6050-dp.o builds cleanly on integration/aurora 107047f61826.

(Note: This PR fixes the combo PHY s2idle domain power-off and -62 stop wedge. On the J775c↔macOS XDomain pair, 2a9ac0000.acio still hits Training TO HL0 -> Dead End ~2 s into s2idle separately; that link-drop cause is being isolated independently.)

Review follow-up at 6fb5e78: the late snapshot and mutation fence now share the PHY mutex. Early resume releases the saved masks. Zero-rate requests during the fence are queued for stop after thaw, and a pending stop must complete before reuse. The deep-sleep board gate remains separate.

The final revision completed one RTC-backed XDomain s2idle cycle on a cand-11 J775c integration build with 1 success and 0 failures, no logged ATC1 PMGR power-off and no PHY stop -62. The HL0 timeout still dropped the link. An active DP tunnel, injected suspend abort and matched forced PHY restart were outside this run.

Assisted-by: LLM (Codex:GPT-6.2)

@RyanTheTide

Copy link
Copy Markdown
Contributor

The approach looks right: on s2idle, hold the active combo-PHY domains and DP tunnel gates out of genpd's system suspend, release exactly what was recorded at POST_SUSPEND (abort included), and select it all from what is active, with no switch. The J775c before/after, with no atc1_* power-off and no -62 stop failure, is a good row. Points:

  • PM_SUSPEND_PREPARE runs before tasks are frozen, and the loop reads dp->domain[i].active and dp->dp_gate[i].active without the PHY's lock. A tunnel or mode change that brings a domain up between this snapshot and genpd_suspend_noirq() would not be held, so the original fault could still happen in that window. A domain that goes down after it would just stay powered, which is harmless. Taking the same lock the PHY uses to change active, or re-checking from suspend_late/suspend_noirq where nothing can change any more, would close it.
  • s2idle_domain_syscore and s2idle_gate_syscore are u8 bitmasks indexed by ndomains and ATC_DP_TUNNELS. A BUILD_BUG_ON(ATC_DP_TUNNELS > 8) and a check of ndomains against the mask width at probe would catch a later PHY with more domains.
  • The deep-sleep branch still gates on combo_sleep_board() (J714s/J716c). Not this PR's job, but now that the s2idle path is keyed on hardware state, a note that the board gate is left for the deep-sleep pass would help.

Assisted-by: LLM (Claude:Opus 5.5)

…2idle

On T6050, t6050_dp_suspend_late() only quiesces the combo PHY for firmware
deep sleep (pm_suspend_no_platform() == false). During suspend-to-idle
(s2idle), an active combo PHY remains running, and drivers/thunderbolt/apple.c
holds ACIO's virtual genpd devices out of system suspend with
dev_pm_syscore_device(..., true).

However, combo_pm_notify() in atc-t6050-combo.h was gated on
combo_sleep_board() (j714s/j716c) and only held domain[0] during firmware
deep sleep. As a result, genpd_suspend_noirq() powered off active combo PHY
virtual genpd devices (including atc1_phymxwrap) during s2idle while the
PHY RTKit CPU was still running. On resume, the first CIO-to-SAFE transition
timed out with "PHY firmware stop failed: -62" and marked the PHY faulted,
wedging the port (-5) until reboot.

Register combo_pm_notify() for all T6050 combo PHYs and, when entering
s2idle (pm_suspend_no_platform(), set in enter_state() before
suspend_prepare() invokes PM_SUSPEND_PREPARE notifiers), hold every active
dp->domain[] and dp->dp_gate[] virtual genpd device with
dev_pm_syscore_device(..., true). Release every held device unconditionally
on PM_POST_SUSPEND (covering both normal resume and suspend abort) using
bitmasks so the hold cannot leak if active state changes.

Tested on J775c (Mac Studio M5 Max, T6050, ATC1 XDomain):
- Without this patch, post-s2idle CIO teardown fails with "PHY firmware stop
  failed: -62" and wedges 2ab000000.phy (-5).
- With this patch, pmgr-pwrstate dyndbg confirms zero atc1_phymxwrap/atc1_*
  power-off transitions across s2idle, and post-resume CIO teardown cleanly
  receives ep20: 8000010000000001 and restarts to "CIO mode up" in 11 ms.

Signed-off-by: Satya Benson <satya@benson.earth>
@satchlj

satchlj commented Nov 21, 2026

Copy link
Copy Markdown
Member Author

Codex GPT-6.2 Sol on @satchlj's behalf

The local revision moves the s2idle snapshot into the PHY's suspend_late callback under the PHY mutex and releases the recorded holds in resume_early, including the PM unwind after a successful late callback. It bounds both u8 masks and documents that the existing deep-sleep board gate is left for the deep-sleep work.

The local revision compiled and the cand-11 trial containing it booted. It returned to known-good Aura with direct Thunderbolt connectivity. That boot did not exercise s2idle, so it does not establish the late-to-noirq ordering under live tunnel activity or validate resume/abort release on hardware. The earlier domain-hold and PHY restart observations apply to the earlier implementation. The separate link-training drop remains open.

Take the active-domain snapshot under the PHY lock in late suspend.
Fence mode, tunnel-clock and CIO changes through noirq and release
the recorded holds in early resume, including on suspend unwind.

A zero-rate tunnel request during the fence records a stop so DCP can
release the route. Process the stop after thaw or before reusing the
clock. Clear pending state only after the clock is parked and its
gate is released. Bound the domain and tunnel masks, and leave the
existing firmware deep-sleep gate to separate work.

Signed-off-by: Satya Benson <satya@benson.earth>
@satchlj

satchlj commented Nov 21, 2026

Copy link
Copy Markdown
Member Author

Codex GPT-6.2 Sol on @satchlj's behalf

Updated to 6fb5e78f9b46. Late suspend snapshots active PHY domains and gates under the same mutex that fences mode and clock changes through noirq. Early resume releases the recorded masks on resume or unwind. Both masks are bounded. The firmware deep-sleep board gate is separate. A clock stop arriving under the fence is recorded and serviced after thaw, or before the clock is reused.

J775c cand-11 integration boot b2bfd495-b39c-48a4-9776-feda075092ba (Image SHA-256 f77cde6c7fdef4afdf9888c361314e401742b55c7228c53458b7dc49e2cef72b, DTB SHA-256 682476cf49f1f98852a8b2df9cb3d3cadf989b6d5cb4a21b0c9aba64d152d5c6) completed one RTC-backed XDomain s2idle cycle, 1 success / 0 failures. The journal showed late suspend and early resume in order, zero logged ATC1 power-offs and zero PHY stop -62. The separate Training TO HL0 event still took the peer link down. Active DP tunnel teardown, an injected suspend abort and a matched forced PHY restart remain untested on this revision. Warm return to default Aura passed.

@RyanTheTide

Copy link
Copy Markdown
Contributor

Re-review of 6fb5e78: Blockers: 1.

Earlier points:

  • Snapshot race: resolved. The hold now runs from t6050_dp_suspend_late() (drivers/phy/apple/atc-t6050-dp.c:1224) under dp->lock in combo_s2idle_hold() (drivers/phy/apple/atc-t6050-combo.h:389), and s2idle_frozen fences mode, orientation, configure, CIO and tunnel-clock changes until t6050_dp_resume_early() (atc-t6050-dp.c:1240), which the PM core also runs on a late/noirq unwind.
  • Mask width: resolved (atc-t6050-dp.c:1141-1143).
  • Deep-sleep board gate: resolved, noted at atc-t6050-combo.h:775.

New in 6fb5e78:

  1. drivers/phy/apple/atc-t6050-dp.c:626 / :806-815: a stop deferred during the fence can outlive USB4 mode. atc_dp_tunnels_stop() (called by combo_stop(), atc-t6050-combo.h:151, and by apple_t6050_phy_cio_off()) zeroes tunnel_rate[] but leaves s2idle_clock_stops set. If the port leaves CIO before the deferred work runs, for example the cable came out during s2idle and the type-C resume work sets SAFE first (both run on system_freezable_wq after thaw, in no fixed order), atc_s2idle_clock_work() then calls atc_dp_tunnel_apply() -> atc_dp_tunnel_switch(). That writes the DP switch/enable registers in banks[39] after the mode's shutdown and polls for 10 ms, though the comment at :618-620 says the switches are written only in USB4 mode. A later apple_t6050_dp_tunnel_clock() on that clock goes through the same stale bit at :872-873. Fix: clear dp->s2idle_clock_stops in atc_dp_tunnels_stop(), which already parks and gates every clock, and skip the deferred stop in atc_s2idle_clock_stop() when dp->faulted or dp->combo_mode != COMBO_CIO.
  2. Nit, atc-t6050-dp.c:812: the deferred stop calls atc_dp_tunnel_apply() for the one clock. An immediate stop goes through atc_dp_tunnels_apply() (:777), which the comment at :747-752 says every change does. Use atc_dp_tunnels_apply(dp, i + 1, NULL) so a deferred stop follows the same path as an immediate one.

Commits have a human Signed-off-by and no agent trailers. The PR body ends with the Assisted-by line.

HW row: J775c on 6fb5e78 plus fix 1, default command line. Run 5 RTC s2idle cycles with an active DP tunnel through the XDomain/dock port, one cycle with the cable pulled while asleep, and one suspend abort injected after the PHY's late suspend. Pass: no PHY stop -62, no SError, no "Deferred DP tunnel clock" warning, the display comes back, and 0 AVC, 0 failed units, 0 new kernel errors.

Assisted-by: LLM (Claude:Opus 5.5)

@DjDeveloperr

Copy link
Copy Markdown
Contributor

J714s (Apple M5 Pro / T6050) combined-stack s2idle + deep hardware row: PASS

  • Exact tested stack: base cc145705c592 + #2007 (36ef4f8b60cf, incl. #1743) + #2592 (a142752404ed) + #2557 (f90f377c8c5e) + #2664 (6fb5e78f9b46) + #2739 (075bd14d3dec, T6050 PCIe-C s2idle_hold_domain), rebuilt t6050-j714s.dtb (1fbcc4fe2c55, MTE enabled; no_console_suspend ignore_loglevel appended for serial capture; Dell Thunderbolt dock attached with active PCIe-C tunnel + USB3/DP).
  • s2idle (rtcwake -d rtc1 -m freeze -s 15): 3/3 PASS (asleep 14.5 s / 14.0 s / 14.6 s, rtc_delta=20 s each, macsmc-rtc IRQ 118 0 -> 1 -> 2 -> 3, pciec_ebusy=0, refusal=0, disp=3/3, usb=20, wifi=1, bt=1, nvme=1, aer=0, link_err=0, gpu_lost=0).
  • deep regression (rtcwake -d rtc0 -m mem -s 15): 1/1 PASS (asleep=13.1 s, rtc_delta=23 s, refusal=0, disp=3/3, usb=20, wifi=1, bt=1, nvme=1, aer=0, gpu_lost=0).
  • Regression line: suspend_stats success=0 -> 4, fail=0; GPU LIVE (vulkaninfo + compute dispatch) pre/post; 0 kernel oops/WARN, 0 DART faults, 0 SELinux AVCs, 0 new failed systemd units (only pre-existing offline tailscaled.service).
  • Scope note: Combined-stack J714s verification (not isolated from the other four s2idle PRs listed above).

Assisted-by: LLM (Gemini 4 Neon)

@satchlj

satchlj commented Nov 21, 2026

Copy link
Copy Markdown
Member Author

Claude Opus 5.5 on @satchlj's behalf

J775c (Mac Studio, M5 Max) rows for #2664 at head 6fb5e78f.

Stack. integration/aurora a84637dca209 plus #2102, #1743, #2488, #2557 and #2498, plus this PR. The DTB was that stack's own J775c DTB (no apple,sleep-retained or apple,always-on on the ATC USB domains, i.e. without #2592). One boot per row.

Row Cmdline Result
pm_test=platform, direct-peer NHI unbound, 3 cycles diagnostic serial console 3/3 returned; no SError; no failed to place Type-C mux in safe mode lines; atc1_usb never offered to genpd (usage 0, rejected 0)
real rtcwake -m freeze -s 10 ×3, peer bound, HDMI attached installed default plus arm64.nomte (our trial helper's) 3/3 returned; HDMI connected and enabled after each; end0 up, 3/3 pings; PCIe noirq 0/0; 0 setmode failures, 0 SELinux denials, 0 failed units

Without this PR, the same stack and DTB:

  • took an asynchronous SError at the PHY's first core-bank read after the platform timer (bank 2 +0xc, right after resume, with the PMGR word reading atc1_usb on);
  • returned from 0 of 1 real RTC cycles.

With apple,sleep-retained instead (#2592) the SError went away, but the PHY's firmware stop then failed with -62, followed by repeated safe-mode -5. This PR removed both.

Limits.

@satchlj

satchlj commented Nov 21, 2026

Copy link
Copy Markdown
Member Author

Claude Opus 5.5 on @satchlj's behalf

Current-tip J775c row for #2664 at 6fb5e78f. The stack is integration/aurora cacf35543b4d (which has #2692) plus #2102, #1743, #2488, #2557 and #2498, with the stock J775c DTB. One boot per row; the only difference between the two arms is this PR.

  • With this PR (Image 5a2b7d50):
    • pm_test=platform ×3 (diagnostic console cmdline, peer NHI unbound): 3/3 cycles, no SError, no mux safe-mode lines.
    • Real rtcwake -m freeze -s 10 ×3 (default cmdline plus our helper's arm64.nomte): 3/3 returned. HDMI was connected and enabled after each, end0 came back, PCIe noirq was 0/0, and there were 0 setmode failures, 0 SELinux denials and 0 failed units.
  • Without it (Image 8281ecb1): the platform arm took the SError at the first CIO-shutdown read (0x2ab000120), about 2 s after resume, as on the older base. thunderbolt: Apple native CIO deep sleep with a host-to-host peer or no PCIe tunnel (M4 MacBook Air) #2692 doesn't change this.

#2592 is closed in favour of this PR.

@satchlj

satchlj commented Nov 21, 2026

Copy link
Copy Markdown
Member Author

Claude Opus 5.5 on @satchlj's behalf

Follow-up to the current-tip row above (#2664): the same Image (5a2b7d50: cacf35543b4d plus the J775c stack plus this PR, stock DTB) on the exact installed default command line. /proc/cmdline was rdinit=/init nr_cpus=18 maxcpus=18 root=UUID=…, without the arm64.nomte our trial helper normally adds. One boot.

@RyanTheTide

Copy link
Copy Markdown
Contributor

Merge-train adversarial review (MERGETRAIN-LINUX2) at 6fb5e78: BLOCKERS.

Not merging until the blockers below are fixed or answered; the details give file:line and a failure case.

Full review

#2664 phy: apple: atc-t6050: keep active combo PHY domains powered across s2idle @6fb5e78f

VERDICT: BLOCKERS

The head is unchanged since Ryan's re-review of 6fb5e78. Its blocker 1 is still open, and I reproduced it from the code.

Blockers:

  1. drivers/phy/apple/atc-t6050-dp.c:622-635 and :806-835: a deferred clock stop can outlive USB4 mode and then write the tunnel-switch registers outside CIO.
    • While s2idle_frozen is set, a rate-0 request only sets s2idle_clock_stops and returns 0 (:865-870). dcp-fabric.c:477-479 then records route->tunnel_rate = 0.
    • atc_dp_tunnels_stop() (:622-635) zeroes tunnel_rate[] but does not clear s2idle_clock_stops. It runs from combo_stop() (atc-t6050-combo.h:151) on any mode change and from apple_t6050_phy_cio_off().
    • combo_s2idle_release() (combo.h:432-433) queues atc_s2idle_clock_work on system_freezable_wq. The cd321x mux work runs on the same freezable wq after thaw (tipd/core.c:1686), in no fixed order. If the cable came out while asleep and the mux work runs first, CIO is stopped to SAFE.
    • The deferred work then calls atc_s2idle_clock_stop() -> atc_dp_tunnel_apply(dp, k, NULL) with rate 0 -> atc_dp_tunnel_switch() (:521-546). That writes banks[39] DP_SWITCH/DP_ENABLE and polls for 10 ms after the mode's shutdown.
    • Before this PR, a rate-0 request on a clock already at rate 0 only dropped the gate (:762-766) and never touched the switch bank. The comment at :618-620 says the switches are written only in USB4 mode. A later rate request on that clock also takes the stale bit at :872-874 and does the same write.
    • With the mode's domains down, that MMIO is the same class of access as the SError this PR exists to fix.
    • Fix: clear s2idle_clock_stops in atc_dp_tunnels_stop(), and in atc_s2idle_clock_stop() skip the switch write when dp->faulted || dp->combo_mode != COMBO_CIO.

Nits:

  1. atc-t6050-dp.c:812: the deferred stop calls atc_dp_tunnel_apply() for one clock. An immediate stop goes through atc_dp_tunnels_apply() (:777), which the comment at :747-752 says every change uses. Use atc_dp_tunnels_apply(dp, i + 1, NULL) (same as Ryan's nit 2).

  2. Every guarded entry point now returns -EBUSY from suspend_late until resume_early:

    • the guarded entry points: set_mode, configure, orientation, mux, cio_prepare/off/on/usb;
    • consumers of those calls: tipd and DCP work on freezable workqueues (run after thaw), and the thunderbolt CIO hooks (gated on PM_SUSPEND_MEM, apple-cio-sleep.c:495);
    • not checked: whether a thunderbolt resume_noirq DP tunnel restart can reach dcp_route_clock_rate() with a non-zero rate before the PHY's resume_early. That would be a silent -EBUSY on the display path.

    A one-line dev_dbg when the fence refuses a call would make that visible.

  3. apple_t6050_phy_cio_finish() and apple_t6050_phy_cio_lost() are not fenced, though the other CIO calls are. They are deep-sleep only today, but the asymmetry is not commented.

  4. Commit 843c5f5 describes the PM_SUSPEND_PREPARE-notifier design that 6fb5e78 replaces. A bisect lands on a design the tree no longer has, so squash them or reword 843c5f5.

Hygiene: both commits have only Signed-off-by: Satya Benson, with no agent trailers. No new chip, board or firmware gates: combo_sleep_board() is pre-existing and documented as left for later (combo.h:775). No params, no delays.

Missing rows:

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

Adversarial review at 6fb5e78f9b46b3c69c6032303f17c07c2f25b81b: REQUEST_CHANGES (1 open code blocker reproduced from source; CI host-tests: pass; mergeable/clean).

Blockers

  1. Deferred DP tunnel clock stop can outlive USB4/CIO mode and write banks[39] MMIO after domains are powered off (drivers/phy/apple/atc-t6050-dp.c:622-634, :806-835, :864-876; drivers/phy/apple/atc-t6050-combo.h:431-434)
    • While dp->s2idle_frozen is set, a rate-0 call to apple_t6050_dp_tunnel_clock() sets dp->s2idle_clock_stops |= BIT(clock - 1) and returns 0 (atc-t6050-dp.c:865-870), causing dcp_route_clock_rate() (drivers/gpu/drm/apple/dcp-fabric.c:479-480) to set route->tunnel_rate = 0.
    • atc_dp_tunnels_stop() (atc-t6050-dp.c:622-634), invoked from combo_stop() (atc-t6050-combo.h:151) and apple_t6050_phy_cio_off() (atc-t6050-dp.c:1313), zeroes dp->tunnel_rate[] and drops the gates, but does not clear dp->s2idle_clock_stops.
    • On resume, combo_s2idle_release() (atc-t6050-combo.h:432-433) queues dp->s2idle_clock_work onto system_freezable_wq — the same workqueue used by tipd (drivers/usb/typec/tipd/core.c:1662, :2733), with no ordering guarantee. If the cable was unplugged while asleep and tipd's resume_work runs first, combo_mux(SAFE) -> combo_stop() tears down CIO to COMBO_SAFE and powers off the PHY domains.
    • atc_s2idle_clock_work() then runs atc_s2idle_clock_stop() -> atc_dp_tunnel_apply(dp, i + 1, NULL) -> atc_dp_tunnel_switch() (atc-t6050-dp.c:521-545), writing dp->banks[39] (ATC_CFG_DP_SWITCH / ATC_CFG_DP_ENABLE) and polling ATC_CFG_DP_STATUS for 10 ms outside COMBO_CIO with the PHY domains off — risking an asynchronous SError.
    • A subsequent apple_t6050_dp_tunnel_clock() call on that clock also hits the stale bit at atc-t6050-dp.c:872-875 and performs the same switch write.
    • Fix: Clear dp->s2idle_clock_stops = 0 in atc_dp_tunnels_stop(), and in atc_s2idle_clock_stop() skip banks[39] switch writes when dp->faulted || dp->combo_mode != COMBO_CIO (only releasing dp_gate[i] if still active, then clearing the bit).

Checklist audit (§1–§4, §6) & non-blocking nits

  • §1 / §2 / §3 / §4 / §6: Pass. No new chip/board/firmware gates (combo_sleep_board() is pre-existing and noted at atc-t6050-combo.h:775); default-cmdline safe; u8 bitmask widths are bounded at probe (atc-t6050-dp.c:1141-1143); both commits (843c5f5c, 6fb5e78f) carry human-only Signed-off-by: Satya Benson <satya@benson.earth> with no agent trailers; PR body ends with Assisted-by: LLM (Codex:GPT-6.2).
  • Nits:
    • atc-t6050-dp.c:812: atc_s2idle_clock_stop() calls single-clock atc_dp_tunnel_apply() instead of atc_dp_tunnels_apply(dp, i + 1, NULL), diverging from the comment at :751-752 and immediate stop at :777.
    • Adding a dev_dbg() when s2idle_frozen refuses a call with -EBUSY would make any unexpected late/noirq caller visible.
    • apple_t6050_phy_cio_finish() and apple_t6050_phy_cio_lost() are unfenced unlike the other CIO exports (deep-sleep only today; worth a brief comment).
    • Commit 843c5f5c describes the superseded PM_SUSPEND_PREPARE notifier design replaced by 6fb5e78f; squashing or rewording avoids a misleading bisect point.

§5 HW evidence needed after fixing the blocker

  • J775c (default cmdline, isolated PR on current tip with the fix):
    • 5 RTC s2idle cycles with an active DP tunnel through the XDomain/dock port;
    • 1 s2idle cycle with the cable pulled while asleep (exercises the s2idle_clock_work vs tipd SAFE ordering);
    • 1 suspend abort injected after t6050_dp_suspend_late().
    • Pass criteria: 0 PHY stop -62, 0 SError, 0 Deferred DP tunnel clock warnings, display recovery, and 0 SELinux denials / 0 failed units / 0 new kernel errors.
  • Additional T6050 combo-PHY board coverage (e.g. J716c or standalone J714s s2idle + deep regression; the existing J714s row is a combined stack with #2007/#2592/#2557/#2739).

Assisted-by: LLM (Gemini 4 Neon)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants