Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp156175pxb; Tue, 2 Feb 2021 01:38:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJy2jgr74P1vH6k/pqq6Tm/KsvVYBb558yFqj5b9a5tSiGMQXjt/HBNC3GL1bTzIsxX9Qgkp X-Received: by 2002:a05:6402:40c4:: with SMTP id z4mr22644074edb.233.1612258704248; Tue, 02 Feb 2021 01:38:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612258704; cv=none; d=google.com; s=arc-20160816; b=Wo7EHlMN7qZD/g0N6n/VvtoC8mzlKbTCZ6r+P95mxMpmwWYsb9Q/UHdZWm8IcLHQK9 MZVGg0ErXngoet18F9MJ/rZptzht83QJDtJtJuyFCODAuGhV2D+gkhN0xjW/Aq5WGC4j 8UC6DEZAYwvij8bsMjhtEpFa1bnPvx+ktbVkmXE/wrzGpVeh6rGhQ6ZOtLLsecJVNzR4 WSQm0YrSLvQStHmfuqHCCKjDp/5fR2h6Ec6iACx5P8gDyF2yEWkNnZ7UVdp+b6nlOTWm mv9Qkwv90vThncDx84M4dcHnxMyKekEhtvE+j0QR6v7zNsSpG4XbtgsaWS6q5HVKKNDN 3rMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:references:mime-version :message-id:in-reply-to:date:sender:dkim-signature; bh=n+HIDm5l4jQRPPtNBc/UNsUvzf1d4KY5BZBGTQEQIq8=; b=Jzv5HrLxDz+mNuBEcDNsZknhhGPZj8vfQn06RY8tE7SN+wYuSDOk5lYVEl9iLxzn4q C4awjOyEGXyxRAa4jUlFc7PmCkM7P7cuOHu0lqRGf/92jLf6ojNsB8FqhfzaUG0UPO8U dR7C7tGJBa5CoDAT5VH5+k4klkKIQpLPh+qw8oqrApIJDR8ol56YP17TS5bfilJUOXc6 7FJwf3ByH52/P2GvnQqXmXof788PgI+JQqkVxzxl471JDAvQ48++byj3bCFbE8IIZjfR lW9+7fAxhkOEqGQBZqAtNRXW2zW9xDhRZyyFNdSxAhKB5gfLSvmIdy1+NAI66oLsY+MY E7fw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=fyJZYtIO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g1si12487087ejc.697.2021.02.02.01.38.00; Tue, 02 Feb 2021 01:38:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=fyJZYtIO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233076AbhBBJgh (ORCPT + 99 others); Tue, 2 Feb 2021 04:36:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48732 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233009AbhBBJfW (ORCPT ); Tue, 2 Feb 2021 04:35:22 -0500 Received: from mail-yb1-xb4a.google.com (mail-yb1-xb4a.google.com [IPv6:2607:f8b0:4864:20::b4a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D94D2C06121E for ; Tue, 2 Feb 2021 01:34:12 -0800 (PST) Received: by mail-yb1-xb4a.google.com with SMTP id c13so22989308ybg.8 for ; Tue, 02 Feb 2021 01:34:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:date:in-reply-to:message-id:mime-version:references:subject :from:to:cc; bh=n+HIDm5l4jQRPPtNBc/UNsUvzf1d4KY5BZBGTQEQIq8=; b=fyJZYtIOnNGXE3WJ6HGneefUyCbgC57EOFdBFPZD3uPqdNEVD6obsGjb6FmaG/5Y5u lYuqLYlmGCQWgk5uaFHF34hja5oDgc3hcQCMlLlpZ9xZIMV3yy3Jc6i4N2ISFZeu6pwb Dj0Ji574t008WKCCSyY+4izoHjBobobcmL+iZxyIgtS9yw0kzg2y+GK8W7lkeVNAO3Xk Un6yeGPIN/pnzoNMllsM/ZGQapSzKVJUaF/gvetfYICCwQ8OTFvhuON+yRT9W71len/e CSB48Kefl+d8qcFuXuZp5g/A9J0HatWbS8LfSu6xo9Hr1P/74YFIs0JKn+FNsS6QtQwv xubQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=n+HIDm5l4jQRPPtNBc/UNsUvzf1d4KY5BZBGTQEQIq8=; b=tFcZlZZuQfwDPMwV+PNoXNWvcWSRi8R+i2r2NcP0gs/a26MZB+fmUOJRD/0g7QilcI d0l9X3UFdlAByOqZmA8aj8wMv8TW8elLLEn8ScuGWjJ/KHHxRA8rnJssnuU0fLgaOCIY ofbwuiOpsZcnoZVmN4aswryk/mjWC5LGdot5YfJ/pMis+4agXnFkRJy72bBauOrCY85t vE88f66/o2cevpcnSh1Nwa0MzcXp72t6ndGD4xYS6B0HWcpQvp+wlCvTE3Zcne+o5W4I Xi8S+XSknoZy+wsiPAdVkF55DF7ZSookE4cMWFUCZdS4REqEi+3YtW10HCAJBteszy+v 8eiw== X-Gm-Message-State: AOAM531Xn1utxKGMD35OMwJX4srX67Qfo1Z46HPnobDhWfaLTO86pLW8 kkOcqe20xhyr2OzogxK4Uu8K4wrsHBSI Sender: "kyletso via sendgmr" X-Received: from kyletso.ntc.corp.google.com ([2401:fa00:fc:202:dd94:c753:a81d:c855]) (user=kyletso job=sendgmr) by 2002:a25:df48:: with SMTP id w69mr31861428ybg.85.1612258452148; Tue, 02 Feb 2021 01:34:12 -0800 (PST) Date: Tue, 2 Feb 2021 17:33:40 +0800 In-Reply-To: <20210202093342.738691-1-kyletso@google.com> Message-Id: <20210202093342.738691-7-kyletso@google.com> Mime-Version: 1.0 References: <20210202093342.738691-1-kyletso@google.com> X-Mailer: git-send-email 2.30.0.365.g02bc693789-goog Subject: [PATCH v4 6/8] usb: typec: displayport: Fill the negotiated SVDM Version in the header From: Kyle Tso To: linux@roeck-us.net, heikki.krogerus@linux.intel.com, gregkh@linuxfoundation.org, hdegoede@redhat.com, robh+dt@kernel.org Cc: badhri@google.com, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Kyle Tso Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org VDM header now requires SVDM Version. Get it from typec_port. Signed-off-by: Kyle Tso --- drivers/usb/typec/altmodes/displayport.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/usb/typec/altmodes/displayport.c b/drivers/usb/typec/altmodes/displayport.c index e62e5e3da01e..7b47dd4ea531 100644 --- a/drivers/usb/typec/altmodes/displayport.c +++ b/drivers/usb/typec/altmodes/displayport.c @@ -15,8 +15,10 @@ #include #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; -- 2.30.0.365.g02bc693789-goog