Repository navigation
drm/apple: dcp: reconnect fixed HDMI DPTX link after deep sleep - #2771
Open
DjDeveloperr wants to merge 1 commit into
Open
DjDeveloperr wants to merge 1 commit into
DjDeveloperr wants to merge 1 commit into
Conversation
Contributor
|
Review at 2bc65f4. The Type-C dcpext path is unaffected. On a Type-C DCPEXT
Testing: the J773g table covers a display that stays connected. Missing are rows for the HDMI cable unplugged during sleep, the display DPMS off before sleep, and a refused sleep followed by a hotplug. A J713 Type-C external display row through deep sleep at this head would show the dcpext path unchanged. Assisted-by: LLM (Claude:Opus 5.5) |
dcp_s2r_ext_suspend() disconnects external displays via dcp_external_disconnect(), dropping dptxport[0].connected and deactivating the LPDPTX PHY, and stops DCPEXT firmware. On resume, dcp_s2r_restart_done() re-enables Type-C reconnect work, which only reattaches Type-C routes and leaves fixed HDMI outputs (such as J773g dcpext0 with hdmi-hpd-gpios and no Type-C route) permanently disconnected because the HPD IRQ is edge-triggered. Factor fixed-HDMI HPD sampling and DPTX port 0 reconnection into dcp_fixed_hdmi_reconnect() (shared with dcp_enable_dp2hdmi_hpd(), logging any dcp_dptx_connect() error). Across dcp_s2r_ext_suspend(), disable hdmi_hpd_irq while firmware is stopping (re-enabling it on pre-stop refusals and leaving it disabled while firmware is crashed or stopped so HPD edges cannot race a stopped coprocessor). In dcp_s2r_restart_done(), re-initialize fixed HDMI rails/fabric (dcp_fabric_hdmi_reinit() on native outputs, or hdmi_pwren/dp2hdmi_pwren GPIOs otherwise), reconnect via dcp_fixed_hdmi_reconnect(), and re-enable hdmi_hpd_irq via dcp_fabric_run_resume(). Signed-off-by: Diljit Singh <hey@djdev.me>
DjDeveloperr
force-pushed
the
djdev/dcp-fixed-hdmi-s2r
branch
from
November 22, 2026 09:52
2bc65f4 to
266cdb8
Compare
Contributor
Author
|
@RyanTheTide Thanks for the review! Rebased onto
Assisted-by: LLM (Gemini:4 Neon) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
dcp_s2r_ext_suspend()disconnects external displays viadcp_external_disconnect()(clearingdptxport[0].connectedand deactivating the LPDPTX PHY) and stops DCPEXT firmware. On resume,dcp_s2r_restart_done()re-enables Type-C reconnect work, which only reattaches Type-C routes and leaves fixed HDMI outputs (such as J773gdcpext0withhdmi-hpd-gpiosand no Type-C route) permanently disconnected because the HPD IRQ is edge-triggered.Fix (
2bc65f4a537dc)hdmi_hpd_irqacrossdcp_s2r_ext_suspend()so HPD edges cannot race firmware teardown.dcp_s2r_restart_done(), re-assert the fixed HDMI power-enable GPIOs, samplehdmi_hpd, reconnect DPTX port 0 when present, and re-enablehdmi_hpd_irq.Independent of
#2764(git merge-tree --write-treeis clean with zero overlap).Live Verification — 3/3 Real Deep Sleep (
dcp66-m4prod5-deepsleep)Tested on live M4 Mac mini (
J773g/T8132, macOS 27.226B123,7.3.0-ARCH-m4prod5):boot object resumes0 -> 1UnifiedPipeline::mode_set_gated: 3840x2160@120 Hz DSC=YES VRR=NO link: 1connected/enabled/On1 -> 2UnifiedPipeline::mode_set_gated: 3840x2160@120 Hz DSC=YES VRR=NO link: 1connected/enabled/On2 -> 3UnifiedPipeline::mode_set_gated: 3840x2160@120 Hz DSC=YES VRR=NO link: 1connected/enabled/Onscripts/checkpatch.pl --strict: 0 errors, 0 warnings, 0 checks. 0 oops/warnings/SErrors across all 3 wakes.Assisted-by: LLM (Gemini:4 Neon)