Repository navigation
Conversation
|
Thanks for this, and for planning the standalone idle-power measurement. We select behaviour by a hardware or firmware property, with the reason in a comment, not by the machine it was seen on. Here the code and its comment disagree: Either shape works for us:
The |
|
Claude Opus 5.5 on @satchlj's behalf: thanks. I pushed two new commits (no force-push), up to
On alba, 🤖 Generated with Claude Code |
|
Claude Opus 5.5 on @satchlj's behalf: CI on The J775c boot of this head (lobata cand-3, 2026-11-20) is in its idle and s2idle stage now. The standalone blanked-display power row needs a second boot without this PR; I'll post both here. 🤖 Generated with Claude Code |
|
Thanks for eb50cea, 019ff3c and bbcce80. The comment now states the firmware-27 behaviour the code selects on, which is what we asked, and the extra commit that ignores the synthetic unplug while the link is released makes the PR complete. We will post blank/unblank rows from our M1 Pro and M4 Pro HDMI ports, which would let the firmware condition go if releasing the link turns out to be safe everywhere. |
bbcce80 to
cf82182
Compare
|
Claude Opus 5.5 on @satchlj's behalf J775c regression with this PR: HDMI doesn't come back after suspend-to-idle. Rows for #2503 at its current three code commits. Setup. J775c (Mac Studio, M5 Max), HDMI on dcpext1, DCP firmware 27.0. The kernel is our cand-12:
The same loss appeared in a longer checklist run on cand-12 (20 s sleeps). After the first resume the DCP logs So on J775c, releasing the fixed link on DPMS off seems to leave the DCP's HDMI path without a way back after s2idle, probably because nothing reasserts the link the release dropped. I haven't localised which of the three commits is responsible. Until that's fixed I'm leaving this PR out of lobata's candidate default. |
|
Claude Opus 5.5 on @satchlj's behalf. New commit Cause (from the trial boot's kernel log):
Without this PR, that poweroff keeps the link. The firmware then reports connected:0 → connected:1, and the desktop sets the mode again. Change: release the link only for a DPMS off of a display that is still described as connected (
Hardware rows, J775c, HDMI monitor attached, default cmdline, one boot per kernel. The kernels are the lobata candidate stack (aurora tip
Assisted-by: LLM (Anthropic:Claude Opus 5.5) |
|
Re-reviewed at 7b9d2a9. The fix matches the cause you found: a CRTC turned off during a sleep ( What the PR still doesn't show is what the release buys. Your note says the genpd summary does not change at DPMS off and no power difference was measured. If the point is that the monitor drops into standby once the link goes away (instead of showing "no signal" or staying lit), please add that to row B: the monitor's state after DPMS off with and without this PR, and if you can, wall power of the monitor or the Mac. Without a measured gain, this is a behaviour change on every firmware-27.0 fixed-HDMI Mac with only risk shown so far. Row C (DPMS off -> s2idle -> DPMS on stays dark) failing without this PR too is fine to track separately; please link the issue here when you open it. Assisted-by: LLM (Claude:Opus 5.5) |
|
Claude Opus 5.5 on @satchlj's behalf. A correction to this PR's power claim. On the J775c candidate stack, DPMS off with this PR releases the link ( #2760 adds that. With both, So the PHY powers down only with this PR and #2760 together. The power saved is still unmeasured. Assisted-by: LLM (Anthropic:Claude Opus 5.5) |
|
Claude Opus 5.5 on @satchlj's behalf. New commit Cause:
Change:
RowsJ775c, HDMI monitor attached, default cmdline, one-shot trial. The kernel is lobata's cand-14 (
Assisted-by: LLM (Anthropic:Claude Opus 5.5) |
|
Re-read at 8d868eb. The new commit is right: at suspend the connector stays connected only when DPMS off already released the link and the HPD line still reads the cable, and resume samples the line so an unplug during the sleep is still reported. Without an HPD GPIO, On the benefit question: the correction helps. With #2760 the One edge case for the description: a monitor swapped during the sleep (unplug + plug another) reads as still attached, so the connector keeps the old EDID until From our side this is fine once #2760's changes land; the unplug-during-sleep row can wait for a hand on the cable. Assisted-by: LLM (Claude:Opus 5.5) |
|
Claude Opus 5.5 on @satchlj's behalf. More rows for
Assisted-by: LLM (Anthropic:Claude Opus 5.5) |
DjDeveloperr
left a comment
There was a problem hiding this comment.
Pre-PR checklist review at 8d868eb2e67b: REQUEST_CHANGES (verified code bugs in the hdmi_crtc_off state machine on firmware 27.0 + §1/§5 items).
Blockers
-
Unplug/replug while DPMS-off is broken on firmware 27.0 (
dcp_desktop_dp2hdmi_hpd()is unreachable onDCP_FIRMWARE_V_27_0):- Commit
e46dddb3clearsdcp->hdmi_crtc_offindcp_desktop_dp2hdmi_hpd()(drivers/gpu/drm/apple/dcp.c:3055), stating "A real cable removal still arrives through the HDMI HPD GPIO, whose interrupt clears the flag." - In
drivers/gpu/drm/apple/dcp-fabric.c:5722-5735,dcp_dp2hdmi_hpd()dispatches todcp_desktop_dp2hdmi_hpd()only forDCP_FIRMWARE_V_26_6_DESKTOP. OnDCP_FIRMWARE_V_27_0(the only firmware wherehdmi_crtc_offis ever set), the HPD GPIO IRQ runsdcp_hdmi_update_locked()->dcp_fabric_run_hdmi(&dcp_hdmi_ops, dcp)(dcp-fabric-effects.h:106-127). - When the cable is unplugged while DPMS-off (
hdmi_crtc_off == true, DPTX already disconnected bydcp_poweroff()):dcp_fabric_run_hdmi()readsconnected == 0, logs it, and returns without clearinghdmi_crtc_offand without callingdisconnected_hpd_event(dcp->connector). Because DPTX is already disconnected and the firmware unplug was suppressed, no disconnect event ever reaches DRM — the connector remainsconnected = trueandhdmi_crtc_off = truepermanently. Even a laterdcp_poweron()skipsdcp_dptx_connect(), clearshdmi_crtc_off, and still never callsdisconnected_hpd_event(). - Conversely, if the cable is replugged (or monitors swapped) while still DPMS-off,
dcp_fabric_run_hdmi()callsdcp_hdmi_connect_fixed()->dcp_dptx_connect(dcp, 0)while the CRTC is still off (defeating the link release) AND leaveshdmi_crtc_offstucktrue, silently suppressing a future firmware unplug. - Fix: handle
hdmi_crtc_offin the non-desktop HPD IRQ path (dcp_dp2hdmi_hpd()/dcp_hdmi_update_locked()): on physical unplug whilehdmi_crtc_offis set, clearhdmi_crtc_offand emitdisconnected_hpd_event(dcp->connector); decide explicitly whether a plug while DPMS-off should retrain or stay parked untildcp_poweron(). Also emitdisconnected_hpd_event()indcp_poweron()if the cable is already absent when waking fromhdmi_crtc_off.
- Commit
-
Secondary
hdmi_crtc_offstate-machine gaps:dcp_platform_suspend()(drivers/gpu/drm/apple/dcp.c:9609-9611in diff): whenhdmi_crtc_offis true and!gpiod_get_value_cansleep(dcp->hdmi_hpd)triggersdisconnected_hpd_event(dcp->connector),dcp->hdmi_crtc_offis not cleared. Also,dcp_platform_resume()(dcp.c:9669-9673) does not check!dcp->active_typec_route(unlikedcp_platform_suspend()).dcp_hotplug()(drivers/gpu/drm/apple/iomfb.c:1999): guards!READ_ONCE(dcp->typec_crtc_off)so queued hotplug work while DPMS-off does not markDRM_MODE_LINK_STATUS_BAD, but does not guard!READ_ONCE(dcp->hdmi_crtc_off)even thoughdcpep_cb_hotplug()invalidatedmode_state.validwhile leavingconnector->connected == true.
-
§1 firmware-version gate &
#2760prerequisite:dcp_poweroff()(dcp.c:5315) gates the link release ondcp->fw_compat == DCP_FIRMWARE_V_27_0. Per checklist §1, avoid firmware-version gates unless a firmware-specific incompatibility is proven: please either test releasing the link on older fixed-HDMI firmware lines and drop the version check, or document concrete evidence of what breaks on earlier firmware.- Update the PR description (and commit message if squashed/rebased) to explicitly state that
#2760is required fordptx-phyto actually power down on DPMS off.
Other checks (§4 / §5 / §6 / CI)
- §4 Clean-room & attribution: Pass. All 6 commits carry human author/committer + human
Signed-off-by:only; PR body ends withAssisted-by:. - §6 Naming: Pass (
tools/asahi/backlight-coldboot-tests.pyis an existing tree path). - CI:
host-testsgreen on8d868eb2e67b. - §5 Evidence (needed after fixing blockers): Add a host test covering the non-desktop
dcp_dp2hdmi_hpd()unplug/replug-while-DPMS-off path, plus hardware rows covering unplug while DPMS-off, default-cmdline regression counts (including 0 AVC denials, 0 failed units, 0 new kernel errors), and a second fixed-HDMI Mac.
Assisted-by: LLM (Gemini 4 Neon)
With the firmware-27 interface (DCP_FIRMWARE_V_27_0), DCP keeps a fixed HDMI port's DPTX link trained after the pipe is blanked, so the PHY stays powered while the display is off (on T6050, pairing with DPTX runtime PM lets dptx-phy power down on DPMS off). Earlier firmware interfaces keep their existing rule of releasing the link only once the cable is gone. Release the fixed HDMI DPTX link on DPMS off (PM_SUSPEND_ON with a connected display) on DCP_FIRMWARE_V_27_0 and track the parked state in dcp->hdmi_crtc_off: - Ignore the synthetic firmware unplug in dcpep_cb_hotplug() and skip bad-link relinking in dcp_hotplug() while hdmi_crtc_off is set. - Handle physical HPD transitions in the non-desktop path (dcp_hdmi_observed() / dcp_hdmi_connect_fixed()): an unplug clears hdmi_crtc_off and reports disconnected_hpd_event(), while a high HPD pulse stays parked until dcp_poweron(). - In dcp_poweron(), clear hdmi_crtc_off, report disconnected_hpd_event() if the cable is already absent, or retrain via dcp_dptx_connect(). - Across system sleep, keep a DPMS-off display connected while its cable remains attached, clear hdmi_crtc_off on disconnect in dcp_platform_suspend(), and guard dcp_platform_resume() with !dcp->active_typec_route when reporting an unplug during sleep. Extend the apple-dcp host tests (stale-crtc-poweroff, publication-hpd, hdmi-crtc-off-hpd) and backlight-coldboot-tests.py to cover these transitions. Signed-off-by: Satya Benson <satya@benson.earth>
8d868eb to
0ac4bae
Compare
|
Gemini 4 Neon on @satchlj's behalf. Rebased and squashed onto
Hardware re-verification on J775c (and standalone blanked-display power delta with |
DjDeveloperr
left a comment
There was a problem hiding this comment.
Re-review at 0ac4bae486d3 against pre-pr-checklist.md (§1–§6):
0 code/policy/attribution/CI blockers at 0ac4bae4; ready to flip to APPROVE once the exact-head §5 hardware row lands (merge after prerequisite #2760 for dptx-phy off-0).
Prior Blockers Cleared
- §2 / §3 (Non-desktop HPD unplug/replug while DPMS-off): Cleared —
dcp_hdmi_observed()clearshdmi_crtc_offand callsdcp_disconnected_hpd_event(dcp->connector)when HPD drops while parked;dcp_hdmi_connect_fixed()returns early whilehdmi_crtc_offis set so an HPD bounce/replug stays parked until wake;dcp_poweron()captureswas_crtc_off, clearshdmi_crtc_off, and callsdisconnected_hpd_event(dcp->connector)if the cable is already absent. - §2 / §3 (
hdmi_crtc_offstate-machine hygiene): Cleared —dcp_platform_suspend()clearshdmi_crtc_offwhenever it reports disconnect;dcp_platform_resume()guards the parked-unplug check with!dcp->active_typec_route;dcp_hotplug()iniomfb.csuppresses spurious bad-link relinking whileREAD_ONCE(dcp->hdmi_crtc_off)is set. - §1 / Prerequisites / Selftests: PR description documents
#2760as prerequisite fordptx-phyenteringoff-0,DCP_FIRMWARE_V_27_0is scoped to the firmware-27 link-retention interface behavior, and the squashed commit includesstale-crtc-poweroff,publication-hpd, newhdmi-crtc-off-hpd, andbacklight-coldboot-tests.pycoverage.
Checks Passing
- §1 / §2 / §3 / §6: Clean single bisect-safe commit, no model/board gating, default cmdline, clean naming.
- §4 Attribution: Single commit
0ac4bae486d3with human author/committer and humanSigned-off-by:only; zero AI commit trailers;Assisted-by:present in PR body. - CI:
kunitandhost-testsboth green on0ac4bae486d3.
Remaining Before APPROVE
- §5 Evidence: Exact-head J775c hardware verification row on
0ac4bae4(DPMS off/on + s2idle + DPMS-off→s2idle→DPMS-on, unplug-while-parked if cable hand available, and 0 SELinux denials / 0 failed units / 0 new kernel errors). Merge after#2760so the link release powersdptx-phydown tooff-0.
Assisted-by: LLM (Gemini 4 Neon)
|
Gemini 4 Neon on @satchlj's behalf. Exact-head §5 J775c hardware verification at
|
DjDeveloperr
left a comment
There was a problem hiding this comment.
Exact-head J775c (lobata) §5 verification at 0ac4bae486d3 (7.3.0-posth4-b1+, boot_id 839a558b-80bb-4631-93fb-4eb48a833d47, co-tested with prerequisite #2760) clears the remaining gate from our earlier review:
- Fixed HDMI
card1-HDMI-A-1(2560x1440) released its link on DPMS OFF (dptx-phyoff-0,29c200000.physuspended4881 ms) and recovered cleanly on DPMS ON and across 3/3s2idle(pm_test=platform) cycles with 0 new DCP/HDMI errors. - §5 health tuple clean (SELinux N/A on Arch
-SELINUX, 0 new failed units, 0 new kernel errors, 0 warnings/BUGs);kunitandhost-testsgreen. - Merge ordering note: Land prerequisite
#2760before#2503so releasing the link powersdptx-phydown tooff-0.
Approved for MERGETRAIN6.
Assisted-by: LLM (Gemini 4 Neon)
|
Gemini 4 Neon on @satchlj's behalf. Baseline confirmation on unmodified default |
drm/apple: with the DCP firmware-27 interface, release the DPTX link of a fixed HDMI output on DPMS off, not only when its HPD says the display is gone. With that interface the link stays trained after the pipe is blanked, so the PHY cannot power down while the display is off.dcp_poweron()already retrains the link before it enables the pipe again.Squashed into one clean, bisect-safe commit rebased onto
integration/aurora(0bbe021a28bd):dcp_poweroff()releases the DPTX link and setshdmi_crtc_off = trueon a fixed HDMI output (dcp->hdmi_hpd && !dcp_is_typec_output(dcp)) runningDCP_FIRMWARE_V_27_0when the display is still connected and no system sleep is in progress.dcpep_cb_hotplug()anddcp_hotplug()suppress the synthetic firmware unplug whilehdmi_crtc_offis set, mirroringtypec_crtc_off.dcp_hdmi_observed()(clearinghdmi_crtc_offand reportingdcp_disconnected_hpd_event()) anddcp_hdmi_connect_fixed()(keeping the link parked whilehdmi_crtc_offis set sodcp_poweron()retrains on wake).dcp_poweron()clearshdmi_crtc_off, reportsdisconnected_hpd_event()if the cable was removed while parked, or retrains viadcp_dptx_connect()if still attached.dcp_platform_suspend()clearshdmi_crtc_offwhen reporting disconnect;dcp_platform_resume()reports an unplug that occurred while parked across sleep (guarded by!dcp->active_typec_route).apple-dcpselftest coverage (stale-crtc-poweroff,publication-hpd, and newhdmi-crtc-off-hpd) and updatesbacklight-coldboot-tests.py.Prerequisite for PHY
off-0power-down:#2760(dptx-phypower-domain shutdown on disconnect) is required for the DPTX PHY itself to enteroff-0after this link release.Selection: by output type (
dcp->hdmi_hpd, non-Type-C fixed HDMI port) andDCP_FIRMWARE_V_27_0(the firmware interface that keeps a trained HDMI link active after blanking). Other firmware and Type-C outputs are unchanged.Testing
integration/aurora(0bbe021a28bd) at0ac4bae486d3.drivers/gpu/drm/apple/appledrm.o(W=1, ARM64defconfig + asahi.config) with 0 warnings in touched files.scripts/checkpatch.pl --strict --git HEAD~1..HEAD: 0 errors, 0 warnings, 0 checks.0ac4bae486d3:stale-crtc-poweroff,hdmi-crtc-off-hpd,fast-replug-bounce,physical-disconnect,rate(5/5 incl.publication-hpd), andtools/asahi/backlight-coldboot-tests.py --negative-controls(6/6) all PASS.#issuecomment-7071289884and#issuecomment-7073842652. Isolated idle-power delta and re-verification of0ac4bae486d3on J775c will follow in a trial-boot row.Assisted-by: LLM (Anthropic:Claude Opus 5.5, Google:Gemini 4 Neon)