Skip to content

drm/apple: dcp: let a Type-C port with HPD take over a pipeline held without it - #302

Closed
Ante042 wants to merge 1 commit into
aurora-silicon:aurora-wipfrom
Ante042:dcp-typec-hpd-takeover
Closed

Ante042 wants to merge 1 commit into
aurora-silicon:aurora-wipfrom
Ante042:dcp-typec-hpd-takeover

Conversation

@Ante042

@Ante042 Ante042 commented Oct 14, 2026

Copy link
Copy Markdown

On the M1 Pro the PD controllers report a DP alt mode state at probe even for ports with no display behind them, like an empty port or one that only has the charger in it. Once the crossbar driver is in the initramfs, appledrm binds about a second into boot, and whichever port gets routed first takes the only Type-C pipeline. When that is the wrong port, the one with the monitor gets -EBUSY ("failed to configure Type-C mux: -16") and stays dark for the rest of the boot. In clamshell mode that puts the LUKS prompt on a panel you can't see. It happened in about half of my boots. The logs are in omacom/omarchy-pkgs#1037.

With this patch, a port whose sink asserts HPD and finds no free pipeline can take one over from a port whose sink never asserted HPD. Tunnels, ports with a pending safe state and pipelines whose fixed HDMI output is live are left alone. The port that loses its pipeline clears its applied state, so its next update gets routed again once a pipeline frees up. On t602x the keep_order path already handles this once a compositor is up, so this mostly matters for t600x and for early boot.

I've been running the fe6d813 version of this on a J314s since 2026-10-13. Boots where the display port wins the race on its own are unchanged, and in 3 of the last 12 boots the takeover kicked in ("released Type-C DPTX PHY 2 held without HPD") and the monitor behind it came up normally. The aurora-wip version is the same logic moved into a helper, because dcp_typec_route_set() has changed since then.

Happy to adjust it if you'd rather solve this somewhere else, and I can test any changes on the J314s.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-14T20:27:10.594565Z 51481d1 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

…without it

The PD controllers on the M1 Pro/Max laptops report a DP alt mode state
at probe for ports that have no display behind them, for example an
empty port or one with only a charger.  With the crossbar driver in the
initramfs appledrm binds about a second into boot, and whichever port
is routed first gets the Type-C pipeline.  If that is the wrong one,
the port with the display finds every pipeline taken (-ENOSPC, which
the CD321x driver does not retry) and stays dark for the whole boot,
which puts the LUKS prompt on the internal panel of a closed laptop.

When a port whose sink asserts HPD finds no free pipeline, release one
held by a port whose sink never asserted HPD and take it.  Tunnels,
ports with a pending safe state and pipelines whose fixed output is in
use are left alone.  The released port drops its applied state so its
next update is routed again once a pipeline is free.

Link: omacom/omarchy-pkgs#1037
Signed-off-by: Andreas Fernandez <[email protected]>
@Ante042

Ante042 commented Oct 23, 2026

Copy link
Copy Markdown
Author

Closing in favour of omacom/linux-aurora#186, which carries the same takeover on top of the 7.2 fabric together with two follow-ups.

@Ante042 Ante042 closed this Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant