Skip to content

drm/apple: Release a CRTC whose Type-C route moved to another pipeline - #565

Merged
RyanTheTide merged 1 commit into
integration/aurorafrom
fix/typec-handover-release-crtc
Oct 29, 2026
Merged

RyanTheTide merged 1 commit into
integration/aurorafrom
fix/typec-handover-release-crtc

Conversation

@RyanTheTide

Copy link
Copy Markdown
Contributor

On the J616s, plugging an HDMI display into the built-in port while a USB-C display held the hybrid pipeline (dcpext0) left both external displays dark until the user re-applied a layout.

Sequence (stock fleet6, reproduced with an MSI MPG 325CQRXF on USB-C and an Acer QG270 S3 on HDMI):

  1. The fabric moves the Type-C display to dcpext1 so HDMI can have dcpext0: Type-C display moves to 602e00000.dcp, HDMI display connects.
  2. The moved display's hotplug retrains its active CRTC. That CRTC is still dcpext0's, and the Type-C encoder now only allows dcpext1, so the reset is refused: failed to retrain active CRTC after hotplug: -22, then link recovery.
  3. Mutter, still seeing the Type-C connector on dcpext0's CRTC, finds no CRTC for the HDMI display: Failed to use linear monitor configuration: No available CRTC for monitor 'ACR QG270 S3'. It falls back to the internal panel only.

Fix. When a Type-C connector's CRTC belongs to a pipeline its port is no longer routed to (only on pipelines whose routes don't follow their CRTC), release that CRTC with drm_atomic_helper_set_config() and no mode, instead of resetting it. The hotplug that follows lets the compositor pair each display with the pipeline that drives it. Mutter 51 re-reads possible_crtcs on every hotplug, so it sees the Type-C encoder narrowed to dcpext1.

Tested on the J616s (fleet6 + this commit as a test module, together with #561 and #562), with Ryan watching: unplug HDMI, replug the MSI (it takes dcpext0), then plug HDMI back in. The hand-over ran (moves to 602e00000.dcp) with no -22, no link recovery and no mutter CRTC failure, and both externals kept the desktop: MSI 2560x1440@280 and Acer 1080p180. Without this commit the same sequence leaves both dark (stock fleet6, same session).

Host selftests: 79/80. The one failure, ordered-rx, is a fixture compile error in RTKit PMP code (struct apple_rtkit has no pmp_registry_v2). It fails the same on the integration/aurora tip without this change.

🤖 Generated with Claude Code

On the J616s, plugging an HDMI display in while a Type-C display held
the hybrid pipeline (dcpext0) left both external displays dark. The
fabric moves the Type-C display to dcpext1 so that HDMI gets dcpext0,
and the hotplug of the moved display then tries to retrain its active
CRTC. That CRTC is still dcpext0's, which no longer drives the port,
so the reset is refused (-EINVAL) and link recovery starts. Meanwhile
the compositor, which still sees the Type-C connector on dcpext0's
CRTC, finds no CRTC for the HDMI display: mutter logs "No available
CRTC for monitor" and falls back to the internal panel alone.

When the connector's CRTC belongs to a pipeline its port is no longer
routed to, release that CRTC instead of resetting it. The hotplug that
follows lets the compositor pair the Type-C display with the pipeline
that now drives it and the HDMI display with dcpext0. Pipelines whose
routes follow their CRTC are unchanged.

Assisted-by: LLM
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
@RyanTheTide
RyanTheTide merged commit db339c4 into integration/aurora Oct 29, 2026
@RyanTheTide
RyanTheTide deleted the fix/typec-handover-release-crtc branch October 29, 2026 03:18
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