Repository navigation
drm/apple: reinit fixed HDMI PHY and crossbar after deep sleep - #3867
Conversation
In dcp_s2r_restart_done(), dcp_fabric_hdmi_reinit() was gated on dcp->external_native (apple,t6030-dcpext). On fixed-HDMI external pipelines that are not external_native (such as T8142 J704 dcpext1 driving atcphy2 and dpxbar2), deep sleep drops the PHY common power domain and crossbar state behind genpd's back, causing atcphy_resume_noirq() to mark pd_was_off so the next mux update restores the PHY. Because dcp_s2r_restart_done() only re-asserted the converter power GPIOs without calling dcp_fabric_hdmi_reinit(), atcphy2 and dpxbar2 stayed unconfigured after deep sleep and dcp_fixed_hdmi_reconnect() timed out with firmware link fault 22/24 (-110). Allow dcp_fixed_hdmi_reinit_locked() whenever dcp->fixed_phy and dcp->hdmi_hpd are present, and call dcp_fabric_hdmi_reinit() from dcp_s2r_restart_done() for any fixed-PHY HDMI pipeline. Leave the non-S2R dcp_resume() caller gated on dcp->external_native so s2idle behavior on other platforms is unchanged. Tested on MacBook Pro (14-inch, M5, 24 GB, apple,j704) running macOS 27.2 stub with aurora-silicon#1847 + aurora-silicon#3782 + aurora-silicon#3791 + aurora-silicon#3823: - Before: HDMI (3aae00000.dcp, 3840x2160@60) worked on cold boot, but failed after deep sleep with DPTXPort link fault 22/24 and 'HDMI DPTX connect failed: -110'. - After: 'HDMI: setting up the output again (after deep sleep)' runs on wake; 3aae00000.dcp reconnects immediately with 0 link faults and restores 3840x2160@60 alongside eDP-1. Signed-off-by: WJW <rjianwei@gmail.com>
|
Merge readiness at
Areas: Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
DjDeveloperr
left a comment
There was a problem hiding this comment.
Reviewed df35e00. Dropping the external_native gate is right: the reinit only does work when the pipe has a fixed PHY and an HDMI HPD line, and the PHY and crossbar steps are still guarded by typec_mux/phy_managed_by_typec and fixed_xbar.
Two things to fix in the text, not blockers:
- The change also reaches dcp_fabric_hdmi_retry() (dcp-fabric.c), which runs this reinit on every fixed-PHY HDMI pipe whose link did not come up, not only after deep sleep. The Risk line should say so.
- The comment above dcp_fixed_hdmi_reinit_locked() still starts with "T6030 HDMI output"; it now covers any fixed-PHY HDMI pipe.
Because this is shared DCP code, merge needs the exact-head J704 row plus a row on another generation with a non-native fixed HDMI port (HDMI hotplug and s2idle/deep-sleep wake).
|
One scope note before merge. Removing |
|
J714s (M5 Pro, T6050) exact-head row at
|
|
Merging at |
What: Allow
dcp_fixed_hdmi_reinit_locked()anddcp_s2r_restart_done()to re-initialize the fixed HDMI PHY (typec_muxSAFE -> DP) and crossbar (fixed_xbar) after deep sleep on non-external_nativedcpextpipelines (such as T8142 J704dcpext1).Tested: J704 MacBook Pro 14-inch M5 at
df35e00a(equivalent 2-line patch tested live inappledrm.koon7.3.0-j704-s2r+with #1847 + #3782 + #3791 + #3823): PASS — HDMI3aae00000.dcplogsHDMI: setting up the output again (after deep sleep)on wake, reconnects immediately with 0DPTXPortlink faults or-110timeouts, and restores3840x2160@60alongsideeDP-1;scripts/checkpatch.pl --strict0 errors / 0 warnings / 0 checks.Risk: two-way · affects deep-sleep restart (
dcp_s2r_restart_done()) and failed-link retry (dcp_fabric_hdmi_retry()) of fixed-PHY HDMIdcpextoutputs (dcp->fixed_phy && dcp->hdmi_hpd); non-S2Rdcp_resume()stays gated ondcp->external_nativesos2idleon other Macs is unchanged.Not yet: HDMI post-S2R testing on other non-
external_nativefixed-HDMI SoCs besides T8142 J704.Details
dcp_s2r_restart_done(),dcp_fabric_hdmi_reinit()was only called whendcp->external_native(apple,t6030-dcpext) was true; other fixed-HDMIdcpextpipelines (such asapple,t8142-dcpexton J704) only re-assertedhdmi_pwren/dp2hdmi_pwren.atcphy_resume_noirq()markspd_was_off = trueviaatcphy_sleep_lost_common()), so withouttypec_mux_set(SAFE -> DP_STATE_C)andmux_control_deselect()/dcp_fixed_output_select(),dcp_fixed_hdmi_reconnect()timed out withDPTXPort: firmware reports link fault 22/24 on target 0:2andHDMI DPTX connect failed: -110.!dcp->external_nativefromdcp_fixed_hdmi_reinit_locked()and invokedcp_fabric_hdmi_reinit()indcp_s2r_restart_done()wheneverdcp->external_native || dcp->fixed_phy.Evidence
Tested on MacBook Pro (14-inch, M5, 24 GB,
apple,j704) running macOS 27.2 stub, Aura Stage 2 (1.0.0b17-g378497cf), and Arch Linux ARM (7.3.0-j704-s2r+):apple-dcp 3aae00000.dcp: dcp_fixed_hdmi_reconnect: DP2HDMI HPD connected:1apple-dcp 3aae00000.dcp: DPTXPort: firmware reports link fault 22 on target 0:2apple-dcp 3aae00000.dcp: dcp_dptx_connect: timed out waiting for port 0 link configurationapple-dcp 3aae00000.dcp: HDMI DPTX connect failed: -110apple-dcp 3aae00000.dcp: HDMI: setting up the output again (after deep sleep)apple-dcp 3aae00000.dcp: dcp_fixed_hdmi_reconnect: DP2HDMI HPD connected:1apple-dcp 3aae00000.dcp: dcp_hotplug() connected:1 valid_mode:0 nr_modes:26apple-dcp 3aae00000.dcp: set_digital_out_mode(color:96 timing:58) "3840x2160": 60 ...card1-HDMI-A-1: connected [enabled=enabled]