From 5738484a97f80ed289fd657c025d85e545da5da2 Mon Sep 17 00:00:00 2001 From: twobip Date: Tue, 27 Oct 2026 22:38:36 +0000 Subject: [PATCH] drm/apple: keep a DP2HDMI connect when no link configuration arrives A DP2HDMI output asserts its own HPD in dcp_enable_dp2hdmi_hpd(), and its firmware does not send the link-configuration notification that dcp_dptx_connect() waits for, so on that path the wait can only time out and the display is withdrawn before it is ever lit. Continue as the late-HPD case already does instead of failing the connect. The existing `compact` case tolerates the same timeout, but it covers the 26.x firmware's compact endpoints, not a 13.x DP2HDMI output. Seen on a Mac mini (t8112, G14, DP2HDMI out): the DCP boots, reports "DP2HDMI HPD connected:1" and 32 modes, then dcp_dptx_connect: timed out waiting for port 0 link configuration display HPD removed ... set_device_enabled_gated: requested state: 0 and the machine registers a DRM device with no output. With this change the same machine sets the mode and stays up: set_digital_out_mode(...) "3440x1440": 100 ... 3440 ... 1440 ... set_digital_out_mode finished:7866 Tested on that machine only (M2 mini, t8112, firmware-compat 13.x); the T6030/T8122/H17P paths and the compact 26.x path are untouched, and dcp_is_typec_output() keeps Type-C connects where they are. Signed-off-by: twobip Assisted-by: LLM --- drivers/gpu/drm/apple/dcp.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/apple/dcp.c b/drivers/gpu/drm/apple/dcp.c index bc452a840da83..5d6cda39c832d 100644 --- a/drivers/gpu/drm/apple/dcp.c +++ b/drivers/gpu/drm/apple/dcp.c @@ -1824,6 +1824,14 @@ static int dcp_dptx_connect_raw(struct apple_dcp *dcp, u32 port, bool *retryable /* T8122 dcpext: HPD only after the link wait, see dcp_ext_dptx_607() */ bool late_hpd = dcp_ext_dptx_607(dcp); bool t8132 = dcp_is_t8132_ext(dcp); + /* + * A DP2HDMI output asserts its own HPD, in dcp_enable_dp2hdmi_hpd(), and + * that firmware never sends the link-configuration notification the wait + * below looks for, so on this path the wait can only time out. Treat it as + * non-fatal, as the late-HPD and compact cases do, instead of withdrawing + * the display. + */ + bool dp2hdmi = dcp->hdmi_hpd && !dcp_is_typec_output(dcp); bool compact; unsigned long timeout; u64 generation; @@ -1982,7 +1990,7 @@ static int dcp_dptx_connect_raw(struct apple_dcp *dcp, u32 port, bool *retryable dev_dbg(dcp->dev, "dcp_dptx_connect: no link configuration on port %u yet\n", port); ret = 0; - } else if (!ret && late_hpd) { + } else if (!ret && (late_hpd || dp2hdmi)) { /* Without HPD this firmware does not train: assert it now. */ dev_dbg(dcp->dev, "dcp_dptx_connect: no link configuration on port %u yet, asserting HPD\n",