Repository navigation
Conversation
|
Thanks, the runtime-PM wiring is small and the J775c genpd table shows the domain following DPMS. A few points:
Assisted-by: LLM (Claude:Opus 5.5) |
|
Claude Opus 5.5 on @satchlj's behalf. Repeated on this PR's own base. The lobata candidate cand-13 is
DPMS off → s2idle → DPMS on still leaves HDMI dark, as before this change. Assisted-by: LLM (Anthropic:Claude Opus 5.5) |
DjDeveloperr
left a comment
There was a problem hiding this comment.
Adversarial review at 04454c901781 against pre-pr-checklist.md:
Blockers
-
§3 (Runtime-PM reference leak on
t6050_deactivate()failure —drivers/phy/apple/dptx.c:893-909, 961-965):t6050_deactivate()unconditionally powers down AUX, clearsphy->active = falseandphy->rate = 0, and callst6050_device_power(phy, false)even whent6050_pll_power_down()returns a negative error.dptx_phy_set_mode()guards the put withelse if (mode == PHY_MODE_INVALID && was_active && !ret). After any PLL power-down error,dptx_phy->activeisfalsewhile the runtime-PM reference is leaked permanently; the nextPHY_MODE_DPtakes another reference andps_dptx_phycan never suspend again until reboot. Drop the reference wheneverwas_active(sincet6050_deactivate()always clearsactive).
-
§3 (Returning
pm_retafter completed deactivation corruptsphy->attrs.mode—dptx.c:962-965,drivers/phy/phy-core.c:389-390):- Returning a negative
phy_pm_runtime_put_sync()error aftert6050_deactivate()has already powered down the PHY and clearedactive = falsereports a failed mode switch to DCP and causesphy_set_mode_ext()to skipphy->attrs.mode = mode, leavingphy->attrs.modestale asPHY_MODE_DPwhile the PHY is off. Log the runtime-PM put failure (dev_warn) rather than overridingretafter teardown.
- Returning a negative
-
§3 (Early-boot runtime-PM state mismatch —
dptx.c:1102-1106):dptx_phy_probe()callsdevm_pm_runtime_enable(dev)withoutpm_runtime_set_active()(or preserving a live bootloader link). Becausedcp_desktop_external()does not run on firmware 27.0 fixed HDMI, nothing holds a runtime-PM reference betweendptx_phy_probe()and DCP's firstphy_set_mode_ext(PHY_MODE_DP). During that windowdevisRPM_SUSPENDEDwithusage_count == 0, allowinggenpd_power_off_unused()(or a sibling suspend) to power offps_dptx_phyunder an active bootloader HDMI display / simplefb if DCP probes late, defers, or fails.
-
§3 (Minor locking hygiene —
dptx.c:941):if (dptx_phy->active) return 0;readsdptx_phy->activeoutsidedptx_phy->lock. Althoughphy_set_mode_ext()serializes calls withphy->mutex, keeping all reads/writes ofdptx_phy->activeunderdptx_phy->lockkeeps the locking invariant consistent withdptx_phy_configure().
-
§5 (Evidence gaps):
- Report the SELinux denial count explicitly (0 required by §5) and show
dptx-phygenpd state across early boot before DCP activates the link. - Note that
apple,t6050-dptx-phyis also the fallback compatible for T6041 J575c HDMI (t6041-j575c-hdmi.dtsi:52) and die-1 (t6050-ultra.dtsi:265); please either add DPMS off/on coverage or list them explicitly under "Not covered".
- Report the SELinux denial count explicitly (0 required by §5) and show
Checks Passing
- §1 / §2 / §4 / §6: Uses existing
DPTX_PHY_T6050HW block variant, default cmdline, human author/committer and humanSigned-off-by:only,Assisted-by:present in PR body, clean naming, CIhost-testsgreen.
Assisted-by: LLM (Gemini 4 Neon)
DjDeveloperr
left a comment
There was a problem hiding this comment.
Adversarial re-review at fdd99f79142e87f5518de07433379c8aff1a4df4 against pre-pr-checklist.md:
Prior Blockers Resolved
- §3 (PLL power-down error refcount leak): Resolved —
dptx_phy_set_mode()now drops the link's runtime-PM reference whenevermode == PHY_MODE_INVALID && was_activeregardless oft6050_deactivate()'s return code. - §3 (Stale
phy->attrs.modeonpm_retfailure): Resolved —pm_ret < 0is logged withdev_warn()instead of overridingret. - §3 (Unlocked
dptx_phy->activeread): Resolved — now checked underdptx_phy->lock.
Blockers
-
§3 (New regression —
boot_holdruntime-PM refcount leak on probe error paths and driver unbind —drivers/phy/apple/dptx.c:1129-1158):dptx_phy_probe()callspm_runtime_get_noresume(dev)at line 1130 and only unwinds it ifpm_runtime_set_active()(line 1133) ordevm_pm_runtime_enable()(line 1138) fails.- If
devm_phy_create()(line 1146 — which can return-EPROBE_DEFERviaregulator_get_optional()),devm_of_phy_provider_register()(line 1152), ort6050_probe()(line 1156 — returns-EINVALifapple,ufp-endpointis missing) fails,dptx_phy_probe()returns without callingpm_runtime_put_noidle(dev), leakingdev->power.usage_count(and compounding on every-EPROBE_DEFERretry). - Likewise, if the driver is unbound before the first
dptx_phy_set_mode()call (e.g. if DCP fails to probe or the module is unloaded), nothing releasesboot_hold, leavingusage_countunbalanced on unbind. - Register a
devm_add_action_or_reset()cleanup right afterpm_runtime_get_noresume(dev)(checking and clearingdptx_phy->boot_holdunderdptx_phy->lockand callingpm_runtime_put_noidle(dev)) so both probe failures and unbind before first mode switch always balance the reference.
-
§3 (New regression — unsupported
modedropsboot_holddespite returning-EINVAL—drivers/phy/apple/dptx.c:955-965, 982-983):- If the first
dptx_phy_set_mode()call passes a mode other thanPHY_MODE_DPorPHY_MODE_INVALID,retstays-EINVALand neither activate nor deactivate runs, yet lines 963–964 unconditionally cleardptx_phy->boot_hold = falseand line 983 callspm_runtime_put(dev), dropping the bootloader display power-domain hold on a rejected call. Reject unsupported modes (if (mode != PHY_MODE_DP && mode != PHY_MODE_INVALID) return -EINVAL;) before touchingboot_hold.
- If the first
-
§5 (Hardware verification gaps on live head):
fdd99f79(withboot_hold/pm_runtime_set_active()) has not been booted on hardware yet (all test results are from04454c90).- Please add on the fixed head: early-boot
dptx-phygenpd state before DCP's first mode switch, explicit SELinux denial count (0required by §5), and either test coverage or explicit "Not covered" entries for T6041 J575c (t6041-j575c-hdmi.dtsi:52) and die-1 (t6050-ultra.dtsi:265), which also bind toapple,t6050-dptx-phy. Also update the PR description's "dropped after a successfult6050_deactivate()" wording.
Checks Passing
- §1 / §2 / §4 / §6 / CI: Uses existing
DPTX_PHY_T6050match variant, default cmdline, both commits (04454c90,fdd99f79) carry human author/committer and humanSigned-off-by:only,Assisted-by:present in PR body, clean naming,host-testsgreen atfdd99f79.
Assisted-by: LLM (Gemini 4 Neon)
|
Claude Opus 5.5 on @satchlj's behalf. Reply to @DjDeveloperr's review of
Compile: J775c row
Not covered: Assisted-by: LLM (Anthropic:Claude Opus 5.5) |
|
Nothing on integration/aurora replaces this: drivers/phy/apple/dptx.c is unchanged on the tip since this branch's base, and the two commits apply cleanly on daa9e2d. The J775c row at fdd99f7 (early-boot genpd state, DPMS off/on, s2idle) covers the hardware side of the last review. Two code points from the re-review at fdd99f7 are still open: the probe-time boot_hold reference is not dropped when probe fails after devm_pm_runtime_enable() (for example a deferred devm_phy_create()) or on unbind before the first mode switch, and a rejected mode (-EINVAL) still clears boot_hold and drops that reference. @satchlj, could you add a devm action for the boot_hold put and reject unsupported modes before touching it? #2764 edits the same file; the two apply together without conflict. |
The T6050 DPTX PHY powers its blocks up and down with the display link in t6050_activate() and t6050_deactivate(), but previously never enabled runtime PM so its power domain stayed on whenever the link was parked. Enable runtime PM on T6050 DPTX PHYs and hold a runtime-PM reference for each active DP link: - Take an initial probe-time reference (boot_hold) with a devm release action so a live bootloader simplefb link is protected from genpd unused power-off until DCP's first mode switch, without leaking the reference if probe fails later or the driver unbinds first. - Reject unsupported PHY modes with -EINVAL before touching boot_hold or taking the mutex. - Drop the active link's reference on deactivation (even if PLL power-down reports an error, since t6050_deactivate() always clears active and powers down the blocks) and log runtime-PM put errors instead of overriding a completed deactivation. Signed-off-by: Satya Benson <satya@benson.earth>
fdd99f7 to
2667b1b
Compare
|
Gemini 4 Neon on @satchlj's behalf. Rebased onto
Verification on
|
DjDeveloperr
left a comment
There was a problem hiding this comment.
Re-review at 2667b1b9b3b3 against pre-pr-checklist.md (§1–§6):
0 code/policy/attribution/CI blockers at 2667b1b9; ready to flip to APPROVE once the exact-head §5 hardware row lands.
Prior Blockers Cleared
- §3 (
boot_holdruntime-PM refcount leak on probe failure/defer or early unbind): Cleared —dptx_phy_probe()registersdevm_add_action_or_reset(dev, dptx_phy_drop_boot_hold, dptx_phy)immediately afterdevm_pm_runtime_enable(dev), so devres LIFO unwinding balancesboot_holdunderdptx_phy->lockviapm_runtime_put_noidle(dev)beforepm_runtime_disable(dev)ondevm_phy_create()(-EPROBE_DEFER),devm_of_phy_provider_register(),t6050_probe()failure, or early unbind. - §3 (Unsupported
modedroppingboot_hold): Cleared —dptx_phy_set_mode()now rejects modes other thanPHY_MODE_DP/PHY_MODE_INVALIDwith-EINVALbefore takingdptx_phy->lockor clearingboot_hold.
Checks Passing
- §1 / §2 / §3 / §6: Uses existing
DPTX_PHY_T6050variant match data, default cmdline, balanced runtime-PM references across all activate/deactivate/error paths, andt6050_reconfigure()guards MMIO access behindphy->active. - §4 Attribution: Single squashed commit
2667b1b9b3b3with human author/committer and humanSigned-off-by:only; zero AI commit trailers;Assisted-by:present in PR body. - CI:
host-testsgreen on2667b1b9b3b3.
Remaining Before APPROVE
- §5 Evidence: Exact-head J775c hardware verification row on
2667b1b9(early-bootdptx-phygenpd state, DPMS off/onoff-0/oncycles, s2idle, and 0 SELinux denials / 0 failed units / 0 new kernel errors). (Non-blocking hygiene: updating the PR body's "after a successfult6050_deactivate()" phrasing and adding J575c / J775d die-1 under "Not covered" as noted in comments would keep the description aligned with the code.)
Assisted-by: LLM (Gemini 4 Neon)
Claude Opus 5.5 on @satchlj's behalf.
phy: apple: dptx: enable runtime PM for the T6050 DPTX PHY, so its power domain follows the link.PHY_MODE_INVALID, but the domain stayed on.t6050_activate()and dropped after a successfult6050_deactivate(), and genpd powers the domain off while the display is off.This is the PHY half of what #2503 does for DPMS off. #2503 releases the fixed HDMI port's DPTX link on firmware 27, and this lets the PHY's domain follow.
Selection: the driver's existing per-variant branch (
hw.type == DPTX_PHY_T6050, from theapple,t6050-dptx-phymatch data), the same branchset_modealready takes for this PHY. The T6020 path has its own power handling and is unchanged.Testing
J775c (Mac Studio, M5 Max, DCP firmware 27.0), HDMI monitor attached, default cmdline, one-shot trial boot.
integration/auroracacf3554, lobata's open PRs including drm/apple: release a fixed HDMI link on DPMS off with DCP firmware 27 #2503, and soc: apple: clpc: count I/O wait as busy #2754) plus this commit (3eba044bthere, the same change as04454c90here). Boot75cb4804.hl.dsp.dpms).5552a4c6): the link is released (dcp_dptx_disconnect), butdptx-phystayson.on→off-0→on.dptx-phy(genpd)rtcwake -m freeze -s 10, display onsetmode failed.fab3-socat each resume, which is tracked separately.--strict: clean.Assisted-by: LLM (Anthropic:Claude Opus 5.5)