SM8750: restore dock DisplayPort output broken by the 7.1 bump - #3068
Merged
Conversation
Since the 7.0.11 -> 7.1.3 kernel bump, plugging a USB-C dock or KVM gives no video at all on the AYN Odin 3: the DP connector never leaves "disconnected" and the screen shows no sign of detection. The 7.1 merge window added a "skip duplicates" filter to typec_mux_match() and typec_switch_match() in drivers/usb/typec/mux.c, and started passing the output array in as the match data. struct device is the first member of struct typec_mux_dev and struct typec_switch_dev, so container_of() on a NULL device yields NULL. When class_find_device() finds nothing - the normal case while the mux driver has not probed yet, here the wcd939x-usbss retimer sitting on i2c - the dedup loop compares that NULL against an array slot that is also NULL, matches, and returns NULL. The caller reads that as "no such connection" instead of the -EPROBE_DEFER it used to get, so the connector is built without its mux, permanently, and the DP lanes and the AUX/SBU pair are never routed. The two dedup arrays are also uninitialised stack, yet every slot is read before fwnode_connection_find_matches() has filled them, so a valid mux can be dropped by a chance comparison against stack garbage. Add kernel patch 0517: bail out with -EPROBE_DEFER before the dedup loop when no device was found, and zero-initialise both arrays. This is not Odin 3 specific - any platform whose Type-C mux probes after the connector is affected. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
loki666
enabled auto-merge
July 27, 2026 15:56
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.
Summary
7.0.11 -> 7.1.3kernel bump (6166516). Plugging a dock gives no video at all — the connector never leavesdisconnectedand the display shows no sign of detection.The 7.1 merge window added a "skip duplicates" filter to
typec_mux_match()/typec_switch_match()indrivers/usb/typec/mux.cand started passing the output array in as the match data.struct deviceis the first member ofstruct typec_mux_dev/struct typec_switch_dev, socontainer_of()on a NULL device yields NULL. Whenclass_find_device()finds nothing — the normal case while the mux driver has not probed yet, here thewcd939x-usbssretimer on i2c — the dedup loop compares that NULL against an array slot that is also NULL, matches, and returnsNULLinstead ofERR_PTR(-EPROBE_DEFER). The connector is then built without its mux, permanently, and the DP lanes and the AUX/SBU pair are never routed.The two dedup arrays are also uninitialised stack, yet every slot is read before
fwnode_connection_find_matches()has filled them, so a valid mux can be dropped by a chance comparison against stack garbage.Kernel patch
0517bails out with-EPROBE_DEFERbefore the dedup loop when no device was found, and zero-initialises both arrays. This is not Odin 3 specific: any platform whose Type-C mux probes after the connector is affected.Testing
Before (7.1.3) — the firmware enters DP alt mode and raises HPD, the driver decodes it correctly and notifies DRM, then the very first DPCD read times out, so the link never trains:
After (same image + this patch):
Picture on the external display, confirmed on device.
Additional Context
AUX -> (ret=-110)timeout while every software layer reports success is the signature of the lanes never being routed — worth remembering for similar reports.dp_drm.c,dp_display.c,aux-hpd-bridge.c,pmic_glink_altmode.c,wcd939x-usbss.c,phy-qcom-qmp-combo.c,phy-core.c,dispcc-sm8750.c,drm_bridge.c,drm_bridge_connector.c), as is the live device tree, somux.cwas the only behavioural change left.bugfixlabel, which I do not have permission to set.AI Usage
Did you use AI tools to help write this code? YES