Repository navigation
drm/apple: dcp: no startup link wait on an HDMI output without a sink - #3126
Conversation
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. Signed-off-by: Ryan Murray <[email protected]>
|
Merge readiness at
Areas: Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
satchlj
left a comment
There was a problem hiding this comment.
Verdict: FINISH, then merge at 898efd4ff4ac
Blockers:
- Exact-head hardware verification row at
898efd4ff4acon a DCP HDMI Mac (cold attach and hotplug) is still missing.
Checked: full diff in drivers/gpu/drm/apple/dcp.c, startup connect and HPD path, readiness status, and live CI
Evidence
- The code change in
dcp_start_desktop_external()is clean and minimal: when!dcp->active_typec_route && dcp->hdmi_hpd && !gpiod_get_value_cansleep(dcp->hdmi_hpd), it skips the startupdcp_dptx_connect(dcp, 0)wait so boot does not stall up toDPTX_CONNECT_TIMEOUTwith no HDMI sink attached, deferring link bring-up todcp_enable_dp2hdmi_hpd()and HPD interrupts. - Live CI is green (20/20 checks passed, 0 pending, 0 failed), leaving only the exact-head hardware verification row before approval.
Signed-off-by: Ryan Murray <[email protected]>
|
Forward-merged main into this branch, new head c21bec5. The merge was clean, with no force push. The PR's diff against main is still the 11 lines in `dcp_start_desktop_external()`. I checked the path it hands off to on current main: `dcp_enable_dp2hdmi_hpd()` -> `dcp_fixed_hdmi_reconnect()` still reads HPD and connects DPTX 0 when a sink appeared during the start, and the HPD interrupt still handles a later plug. |
There was a problem hiding this comment.
Verdict: MERGE at c21bec5 after remaining integration requirements.
Checked: The forward-merged source skips startup connect only when there is no active Type-C route and an available HDMI HPD GPIO reads low. GPIO errors still fall through to the existing connect path. The later HPD path retains ownership of hotplug.
Keep the exact-head HDMI cold attach and hotplug row and hosted checks.
|
Row (J616s, M4 Pro) at exact head c21bec5 in combined candidate cedaeff9ee2fe5396733351bb571d0a6049bd7fc on main aa76613: boot with no HDMI sink (HDMI-A-1 disconnected), together with #3127 -> PASS (0 dcp/dpav/dptx startup link/EDID wait or timeout lines; boot 392 ms kernel + 2.358 s initrd = 11.906 s total vs 416 ms + 4.452 s = 14.002 s on the saved production kernel). Evidence: traces/kernel/20261129-closeout-j616s-combo/. Saved boot restored. |
|
c21bec5 J473 (M2 Mac mini, T8112, fw 27.2) PASS: combined guarded one-shot |
Signed-off-by: Ryan Murray <[email protected]>
Signed-off-by: Ryan Murray <[email protected]>
|
I merged current |
|
@DjDeveloperr code-owner notice: the review app approved this head, which only merges |
|
Merging at |
What: On an HDMI output with nothing plugged in, the display processor's start connects DPTX port 0 and then waits up to 2 s for a link configuration the firmware never sends, delaying appledrm's registration. With HDMI HPD low and no Type-C route on the pipeline, the startup connect is skipped. The HPD-enable path and the HPD interrupt connect later, as they already do for a sink plugged in after boot. Keyed on the HPD line, no SoC/board/firmware checks. Replaces #1771: the same change rebased onto main 40d1e1a, with the commit trailer removed.
Tested: 898efd4 KUnit (drm/apple audio set, builds the whole driver) 224 passed, 1 skipped; checkpatch --strict clean. No hardware row at this head yet (see Not yet).
Risk: two-way · Macs with an HDMI port on a DCP (M1 Pro/Max, M2 Pro/Max, M2/M4 mini, M4 Pro J616s): HDMI cold attach and hotplug.
Not yet: rows at this head on two HDMI Macs of different generations: a boot with an HDMI sink attached at power-on, one HDMI hotplug after boot, and a sinkless boot with no startup link wait. Only the J473 has a monitor right now; the hotplug and the second Mac need someone at the bench.
Details
Earlier measurements (#1771, on older bases, not this head): J616s fleet69 A/B, HDMI empty:
[drm] Initialized apple5.64 s -> 3.25 s, gdm 10.98 s -> 10.04 s, every boot HDMI-A-1 disconnected, eDP + DP-2 connected, Enforcing, 0 failed, 0 AVC. Module-only A/B with #1812/#2337 on J616s fleet75 and J413 fleet74 in the old PR.