Repository navigation
drm/apple: Release a CRTC whose Type-C route moved to another pipeline - #565
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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):
Type-C display moves to 602e00000.dcp, HDMI display connects.failed to retrain active CRTC after hotplug: -22, then link recovery.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-readspossible_crtcson 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_rtkithas nopmp_registry_v2). It fails the same on the integration/aurora tip without this change.🤖 Generated with Claude Code