Repository navigation
drm/apple: retry a fixed HDMI link that did not come up - #3588
RyanTheTide wants to merge 1 commit into
Conversation
On the K114s (T6050) the built-in HDMI port's link to its DP-to-HDMI converter failed at boot: HPD high, but the firmware reported link faults (DEVICE_BUSY_TIMEOUT, DEVICE_NOT_STARTED) and dcp_dptx_connect() timed out twice within 5 s. Nothing tried again afterwards: the driver connects a fixed HDMI output when its DCP starts and on an HPD edge, and HPD stayed high, so the connector stayed disconnected for good. The retries that exist for this are tied to the T6030 external processor. Give every other fixed HDMI output its own: after a failed connect while HPD is high, connect again through dcp_fabric_hdmi_retry(), as an HPD edge would, up to four times, 2 s apart and then twice as long each time. A successful connect or an unplug resets the count; an HPD edge drops a pending retry, since it connects by itself. The work item follows the other HDMI work items through suspend and removal. Signed-off-by: Ryan Murray <[email protected]>
There was a problem hiding this comment.
Verdict: HOLD at 1f9f87b1 — code and KUnit coverage are clean; awaiting queued CI and the exact-head K114s HDMI/CEC hardware row.
Blockers:
- Exact-head K114s hardware row at
1f9f87b1(confirmingHDMI-A-1connect recovery and HDMI-CEC behavior, or recording retry behavior) and green queued CI checks (21checks queued).
Checked: Full 6-file diff (drivers/gpu/drm/apple/{dcp-fabric-effects.h,dcp-fabric-test.c,dcp-fabric.c,dcp-fabric.h,dcp-internal.h,dcp.c}), hdmi_retry_wq init/enable/disable/cancel lifecycle across probe/suspend/resume/HPD-edge, retry-count bounding and callers of dcp_hdmi_connect_failed(), T6030 external_native isolation, and commit Signed-off-by.
Evidence
- Retry policy and workqueue lifecycle:
dcp_fabric_hdmi_retry_delay()cleanly bounds retries to1..4(2/4/8/16 s) and returns0for0,-EAGAIN,-ESTALE,-ESHUTDOWN,0, or> 4(no UB shift). Covered byfabric_hdmi_retry_delay(118/118dcp-fabricKUnit,344/345apple-drmKUnit).dcp_hdmi_connect_failed()leavesdcp->external_native(T6030) unchanged, ignores Type-C outputs and ports withouthdmi_hpd, resetshdmi_retriesonret == 0, clampshdmi_retriestoDCP_HDMI_RETRIESonce exhausted (preventing counter wraparound on repeated HPD pulses), and scheduleshdmi_retry_wqonsystem_freezable_wq.hdmi_retry_wqis initialized disabled indcp_fabric_init(), enabled indcp_enable_typec_work()(called before bothdcp_enable_dp2hdmi_hpd()at probe anddcp_fixed_hdmi_reconnect()at resume), synced/disabled indcp_disable_typec_work(), and cancelled on HPD edges (dcp_dp2hdmi_record_edge()) without resettinghdmi_retries.- Checked all callers of
dcp_hdmi_connect_failed()(dcp.c:5402,dcp-fabric.c:5493,5689,5696): no double-counting on any connect or retry path.
- Non-blocking note: In
dcp_fixed_hdmi_reconnect()(dcp.c:5403-5408), theelse if (!connected)branch (e.g., if a monitor that exhausted all 4 retries is unplugged during suspend and the system resumes without an HPD IRQ) does not resetdcp->hdmi_retriesto0, so a different monitor plugged in later would start at the exhausted count until the next unplug/connect success. Also, the PR body listsRisk: one-way, though reverting a retry helper is two-way. - Remaining merge gate: Once queued CI passes and the exact-head K114s row lands at
1f9f87b1, this is ready to approve and merge.
|
Merge readiness at
Areas: Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
|
Hardware row on the K114s (T6050 built-in HDMI into the MSI MPG 325CQRXF), 2026-11-29, done by K114S-EXTDISP2 with this branch's appledrm module (bridge6 kernel 7.3.0-k114sstack5):
So this PR is not the fix for the K114s HDMI. The fix belongs in the T6050 DP PHY driver (K114S-EXTDISP2's PR). I'm moving this PR back to draft. It only makes sense as robustness against transient link failures once the PHY fix lands. If no transient failure turns up in rows with the PHY fix, I'll close it. |
There was a problem hiding this comment.
Verdict: MERGE at 1f9f87b16c0d
Converts this App's earlier review at the same head to an approval under the 12-01 merge bar (better than before and doesn't break; block only on a shown failure). No code blocker was found in it. The merge gate (a row on one Mac at this head + fast CI) is tracked by pr-readiness, not held here.
Checked: Full 6-file diff (drivers/gpu/drm/apple/{dcp-fabric-effects.h,dcp-fabric-test.c,dcp-fabric.c,dcp-fabric.h,dcp-internal.h,dcp.c}), hdmi_retry_wq init/enable/disable/cancel lifecycle across probe/suspend/resume/HPD-edge, retry-count bounding and callers of dcp_hdmi_connect_failed(), T6030 external_native isolation, and commit Signed-off-by.
Follow-ups (not blocking): queued CI, K114s HDMI/CEC row; reset hdmi_retries on resume-disconnected path; Risk is two-way
What
On the K114s (T6050), the built-in HDMI port reads
disconnectedwith a monitor plugged in, so no picture and no CEC (the CEC adapter has no physical address). HPD itself works: thehdmi-hpdGPIO reads high, and the driver logsdcp_fixed_hdmi_reconnect: DP2HDMI HPD connected:1. The DP link to the on-board DP-to-HDMI converter doesn't come up at boot. The firmware reportslink fault 22(DEVICE_BUSY_TIMEOUT) and24(DEVICE_NOT_STARTED) on target 0:3, thendcp_dptx_connect: timed out waiting for port 0 link configurationandHDMI DPTX connect failed: -110, twice within 5 s. After that nothing tries again: a fixed HDMI output is connected when its DCP starts and on an HPD edge, and HPD stays high.The retry that exists for this (
dcp_external_retry()->dcp_fabric_hdmi_retry()) only runs for the T6030 external processor. This gives every other fixed HDMI output its own bounded retry. After a failed connect while HPD is high, it connects again throughdcp_fabric_hdmi_retry(), as an HPD edge would: up to 4 times, 2 s apart, then twice as long each time (2/4/8/16 s). A successful connect or an unplug resets the count. An HPD edge drops a pending retry (it connects by itself) but keeps the count, so a converter that drops HPD on each failed link stays bounded. The work item follows the other HDMI work items through suspend and removal. The policy is a pure helper (dcp_fabric_hdmi_retry_delay()) with a KUnit case. T6030 behaviour is unchanged.Tested
Tested: KUnit at 1f9f87b (arm64 QEMU): dcp-fabric 118/118 including the new
fabric_hdmi_retry_delay, apple-drm 344/345 (1 unrelated skip). Hardware row pending.7.3.0-k114sstack5with K114S-EXTDISP2's HDMI Stage 2): HPD GPIO high, the two failed connects above,card1-HDMI-A-1disconnected with the MSI plugged into HDMI 2,/dev/cec0at physical address f.f.f.f.Risk: one-way · fixed HDMI outputs on non-T6030 SoCs (built-in HDMI of the T6050 K-boards; also M1/M2/M3 Pro/Max laptops and minis whose HDMI link fails to come up): up to 4 extra connect attempts over ~30 s while HPD is high. Outputs that connect first time are unchanged.
Not yet