Skip to content

drm/apple: release a stale DPTX link before borrowing a Type-C route - #2

Merged
DjDeveloperr merged 1 commit into
aurora-silicon:aurora-wipfrom
maralcbr:fix/drm-apple-stale-dptx-link
Sep 18, 2026
Merged

DjDeveloperr merged 1 commit into
aurora-silicon:aurora-wipfrom
maralcbr:fix/drm-apple-stale-dptx-link

Conversation

@maralcbr

Copy link
Copy Markdown
Contributor

The DP2HDMI HPD handler leaves disconnects to the firmware, so after the HDMI display on a hybrid pipeline is unplugged, dptxport[0].connected stays true. When the Type-C fabric later borrows that pipeline for a Type-C port, dcp_dptx_connect() sees the stale flag, logs connected=1, returns early and never trains the link — the Type-C display stays dark.

This releases the leftover link at the start of dcp_typec_route_activate(). It is a no-op when nothing is connected, and route availability already excludes a pipeline whose fixed output is live, so it cannot tear down an active HDMI display.

Tested on a MacBook Pro 16" M2 Max (J416c), internal panel plus four externals, on top of tb @ 38c14f6. After unplugging HDMI and routing a Type-C display onto that pipeline, the log now shows dcp_dptx_disconnect(port=0) followed by a real dcp_dptx_connect(... route=borrowed ... connected=0) instead of the early return, with no DPTX faults.

One related issue remains and is not addressed here: in some replug sequences the borrowed route connects cleanly but every atomic modeset on the port's CRTC is rejected with -EINVAL, so the sink deactivates after ~10 s and reconnects in a loop until reboot. Each Type-C encoder advertises a single fixed possible_crtcs bit, which may be related. Happy to share logs.

Independent of the companion crossbar patch (mux: apple-display-crossbar: replace the T602x selector fields instead of OR-ing them), which fixes the pipeline wedge seen in the same scenario.

DCP's DP2HDMI HPD handler leaves disconnects to the firmware, so after the
HDMI display on a hybrid pipeline is unplugged dptxport[0].connected stays
true. When the fabric then borrows that pipeline for a Type-C port,
dcp_dptx_connect() sees the stale flag, returns early and never trains the
link, leaving the Type-C display dark. Release the leftover link when a
route is activated; route availability already excludes a pipeline whose
fixed output is live.

Signed-off-by: Marcelo Alcantara <[email protected]>

@DjDeveloperr DjDeveloperr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@DjDeveloperr
DjDeveloperr merged commit 2439016 into aurora-silicon:aurora-wip Sep 18, 2026
cb2206 pushed a commit to cb2206/linux that referenced this pull request Oct 5, 2026
…inal-replug

drm/apple: let a dock replug restore a parked dcpext scanout
RyanTheTide added a commit that referenced this pull request Nov 25, 2026
make pacman-pkg rebuilds and relinks the kernel (the build number goes
from #1 to #2), so the standalone Image.gz and modules tarball were not
the binaries in the Arch package, and the QEMU smoke run booted the
former. When the Arch packages build, take Image.gz (decoded from the
package's EFI zboot vmlinuz), the modules tree (with depmod run against
the package's System.map), the DTBs, the config and System.map from
the runtime and headers packages, so every asset and the smoke run use
the binaries that ship. Without makepkg the previous direct path stays.

Checked against the Arch packages of run 45429366862: the staged Image
equals the zstd payload of the package's vmlinuz byte for byte; 5915
modules with modules.dep; 1629 DTBs.

Signed-off-by: Ryan Murray <[email protected]>
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.

2 participants