From 12bf2b3dbe36f20dc20a213da98d4b3d5d872605 Mon Sep 17 00:00:00 2001 From: Ryan Murray Date: Fri, 13 Nov 2026 17:13:40 +1100 Subject: [PATCH] drm/apple: dcp: no startup link wait on an HDMI output without a sink On the T6041 dcpext that drives the HDMI port (desktop 26.x firmware), dcp_start_desktop_external() connects DPTX port 0 at startup and dcp_desktop_dptx_connect() then waits up to DPTX_CONNECT_TIMEOUT (2 s) for a link configuration. Without a sink the firmware never sends one, so the processor's start, and with it appledrm's registration, is held back by the whole timeout. On the J616s the HDMI processor finishes its start about 1.8 s after its last endpoint comes up, and the DRM device appears at 5.6 s after kernel start with nothing on the HDMI port. Read the HDMI HPD line first. With HPD low and no Type-C route on the pipeline, skip the startup connect: dcp_enable_dp2hdmi_hpd() connects once the processor is up if a sink appeared meanwhile, and the HPD interrupt connects a sink plugged in later, as it already does after a start with no sink. With HPD high the startup connect is unchanged. Assisted-by: LLM Signed-off-by: Ryan Murray --- drivers/gpu/drm/apple/dcp.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/gpu/drm/apple/dcp.c b/drivers/gpu/drm/apple/dcp.c index e819a3565b5f3..2708a4a0d76f6 100644 --- a/drivers/gpu/drm/apple/dcp.c +++ b/drivers/gpu/drm/apple/dcp.c @@ -4071,9 +4071,20 @@ static int dcp_start_desktop_external(struct apple_dcp *dcp, u32 map) /* * A Type-C route powers the PHY and selects the crossbar when it is * claimed; until then there is no link to bring up. + * + * The HDMI output's connect waits up to DPTX_CONNECT_TIMEOUT for a link + * configuration, which without a sink never comes: with HPD low, leave + * the connect to dcp_enable_dp2hdmi_hpd() once the processor is up and + * to the HPD interrupt, so the start does not hold the display driver + * back by that wait. */ if (!dptx_ret && dptx_service_available(&dcp->dptxport[0]) && (dcp->fixed_phy || dcp->active_typec_route)) { + if (!dcp->active_typec_route && dcp->hdmi_hpd && + !gpiod_get_value_cansleep(dcp->hdmi_hpd)) { + dev_dbg(dcp->dev, "no HDMI sink at startup: no DPTX link yet\n"); + return 0; + } ret = dcp_dptx_connect(dcp, 0); if (ret) dev_info(dcp->dev, "no DPTX link at startup: %d\n", ret);