@@ -15,8 +15,10 @@
#include <linux/usb/typec_dp.h>
#include "displayport.h"
-#define DP_HEADER(_dp, cmd) (VDO((_dp)->alt->svid, 1, cmd) | \
- VDO_OPOS(USB_TYPEC_DP_MODE))
+#define DP_HEADER(_dp, cmd) (VDO((_dp)->alt->svid, 1, \
+ typec_get_svdm_version((_dp)->typec), \
+ cmd) \
+ | VDO_OPOS(USB_TYPEC_DP_MODE))
enum {
DP_CONF_USB,
@@ -62,6 +64,7 @@ struct dp_altmode {
struct work_struct work;
struct typec_altmode *alt;
const struct typec_altmode *port;
+ struct typec_port *typec;
};
static int dp_altmode_notify(struct dp_altmode *dp)
@@ -536,6 +539,7 @@ int dp_altmode_probe(struct typec_altmode *alt)
mutex_init(&dp->lock);
dp->port = port;
dp->alt = alt;
+ dp->typec = typec_altmode2port(alt);
alt->desc = "DisplayPort";
alt->ops = &dp_altmode_ops;
VDM header now requires SVDM Version. Get it from typec_port. Signed-off-by: Kyle Tso <kyletso@google.com> --- drivers/usb/typec/altmodes/displayport.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)