FAILED: patch "[PATCH] usb: typec: altmodes/displayport: Fix configure initial pin" failed to apply to 4.19-stable tree
Subsystems (4)
[email protected]
maintainerThe patch below does not apply to the 4.19-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-4.19.y
git checkout FETCH_HEAD
git cherry-pick -x eddebe39602efe631b83ff8d03f26eba12cfd760
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2023041032-pasty-shifty-db8c@gregkh' --subject-prefix 'PATCH 4.19.y' HEAD^..
Possible dependencies:
eddebe39602e ("usb: typec: altmodes/displayport: Fix configure initial pin assignment") 09fed4d64d3f ("usb: typec: altmodes/displayport: Fall back to multi-func pins")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From eddebe39602efe631b83ff8d03f26eba12cfd760 Mon Sep 17 00:00:00 2001
From: RD Babiera <[email protected]>
Date: Wed, 29 Mar 2023 21:51:59 +0000
Subject: [PATCH] usb: typec: altmodes/displayport: Fix configure initial pin
assignment
While determining the initial pin assignment to be sent in the configure message, using the DP_PIN_ASSIGN_DP_ONLY_MASK mask causes the DFP_U to send both Pin Assignment C and E when both are supported by the DFP_U and UFP_U. The spec (Table 5-7 DFP_U Pin Assignment Selection Mandates, VESA DisplayPort Alt Mode Standard v2.0) indicates that the DFP_U never selects Pin Assignment E when Pin Assignment C is offered.
Update the DP_PIN_ASSIGN_DP_ONLY_MASK conditional to intially select only Pin Assignment C if it is available.
drivers/usb/typec/altmodes/displayport.c +5 -1
@@ -112,8 +112,12 @@ static int dp_altmode_configure(struct dp_altmode *dp, u8 con)if (dp->data.status &DP_STATUS_PREFER_MULTI_FUNC && pin_assign &DP_PIN_ASSIGN_MULTI_FUNC_MASK ) pin_assign &=DP_PIN_ASSIGN_MULTI_FUNC_MASK ; -else if (pin_assign &DP_PIN_ASSIGN_DP_ONLY_MASK ) +else if (pin_assign &DP_PIN_ASSIGN_DP_ONLY_MASK ) { pin_assign &=DP_PIN_ASSIGN_DP_ONLY_MASK ; +/* Default to pin assign C if available */ +if (pin_assign &BIT (DP_PIN_ASSIGN_C )) + pin_assign =BIT (DP_PIN_ASSIGN_C ); + }if (!pin_assign)return -EINVAL ;