Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp17291768ybl; Thu, 2 Jan 2020 02:37:43 -0800 (PST) X-Google-Smtp-Source: APXvYqzZhY8Ow93KyjqLSC4hcEsMUF7rnugSjRk64hMKmOXXKVi/HKfUTCflq2J2cMKieKQG++y5 X-Received: by 2002:a9d:799a:: with SMTP id h26mr87781532otm.240.1577961463319; Thu, 02 Jan 2020 02:37:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577961463; cv=none; d=google.com; s=arc-20160816; b=zIe4A+DSoLdEC0QtZO6sN4HVAlAQhRSXf5ymJ8o9NtQ2Ohzk4l63dAxohrT6ekcUJz cuKeGSuogQHVg95T2NKge4WfR/k33Gf8BXhwtdG4PIa5/SEh4o2suVnI0mwMAnl2DBx3 /fWwq8MMAN0TUCVoDDJkxCeeQZwEpNTueFeaPobVq5gqhByMpydAiegaLzAeciRBA5H1 W1Y+rrXt7oshei7kFWtLdlPvDn7HqQg1pbEBWnqS9PbiQH5/hJ1dI4jYUGJaySq6O+7G tR9UedJpyTv1/u7FErybPqf3DNen6EdvPbTHT7ZYnPriZMuugtqCAH4GskJOmfzML1GY cgpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature:dkim-signature; bh=IM6AHSIeWAtjnEW25U4QauGRzjaq1KRpfm+mTmZyzK0=; b=h0oXruUtxfAToSSoZlY1EEjnH6PuxqCraauGN2Gz6ZzZFKIqJ27xdwypA4WebOqZ3h 7aEkcaKEmadUco88O6uN+Vo4VQR72jl2rraHuKTbTgp4VewaEXxAxWc4D/6w5gj+TZAM iOSx6ffDw1bfC9ZKYdC60uXdA/MueShu69gAsu4QaR6+yIgGLWUxaCCLU0McFo3Qx+51 NwLy/jsYoFA2wnSHs03gwk+yCZKsL70wcpvm8X9Sb9i5s8fkG16fvMDCQagZNzaQTOvh zKXKQYSpDAgra6J5eVosL8E4EufZBJKbld0+5Kmz+LYFdxK4n8q1lxKR3FFIpGP2LqzQ /KYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cerno.tech header.s=fm1 header.b=KXNY+8Mz; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b="w/gXD3F6"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cerno.tech Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n2si27187105otk.177.2020.01.02.02.37.31; Thu, 02 Jan 2020 02:37:43 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@cerno.tech header.s=fm1 header.b=KXNY+8Mz; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b="w/gXD3F6"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cerno.tech Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728079AbgABKgs (ORCPT + 99 others); Thu, 2 Jan 2020 05:36:48 -0500 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]:55025 "EHLO wout5-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728044AbgABKgs (ORCPT ); Thu, 2 Jan 2020 05:36:48 -0500 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 57A7349D; Thu, 2 Jan 2020 05:36:46 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Thu, 02 Jan 2020 05:36:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm1; bh=IM6AHSIeWAtjnEW25U4QauGRzja q1KRpfm+mTmZyzK0=; b=KXNY+8MzuUfm4/0hsfuJyxaDv0bTP6nk/RKwx5erooZ 7OomV6nNeA0vB93T8Vf12cQ9skdDfR9Iyw6pOm/3iCNstEx1NdCtzMt5iumDUZN1 BHGR2yzJiJ0w2+Uk7pY44BrbxzkoV8R3MrAR8K2SgZnIyP9e3yPbzvgfJlEMhT7f hqPlb3yaaoh8RbqsdEb1y3ANVjFtbndhcfI9VoZh8b/0Ste+cv0NqO/6tmL4/yLP 6nqJgNxTAvWapLS2WUfl5IfzTTgupt5hu/REzPndTzMCnFdtfERpnRNyRJg7Skbc Tqabxlmu++0ASv+M0oQ3DlL89whhQ24+WS8xIdxWeeA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=IM6AHS IeWAtjnEW25U4QauGRzjaq1KRpfm+mTmZyzK0=; b=w/gXD3F6POwjCmTO7qthWE WC2UJqPH7i5dVPx3rOQ6+JQfP6jRjx/F+nZya7CLYngSnD2Txdd6TIX+Ux0o9n2N LrxIo2jbAGoozzSrQB5dxuUz7rqfU9kx+7djlhzvRhSrdaXcLfTooWrdn+u6tgXI covQdhMdXa/MDQdN5G0WDkPCZ7Jp56mIicwAkN38zgLLuetNiBGocUoVFEjNJZkv QSaVpdD2Xc7zxkwMQ4WogYW0OIt+B4paNLEOcgCkiRQPZ1dZ9o1+dcfeyEBHZnom Cb8xDBdKFGeW51rIlUxSs+suKgWUmy2AtS+wYhRDyY/xMLxgFxsfyTvMezykN/rA == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrvdeguddgudekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpeforgigihhm vgcutfhiphgrrhguuceomhgrgihimhgvsegtvghrnhhordhtvggthheqnecuffhomhgrih hnpehlkhhmlhdrohhrghdpkhgvrhhnvghlrdhorhhgnecukfhppeeltddrkeelrdeikedr jeeinecurfgrrhgrmhepmhgrihhlfhhrohhmpehmrgigihhmvgestggvrhhnohdrthgvtg hhnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from localhost (lfbn-tou-1-1502-76.w90-89.abo.wanadoo.fr [90.89.68.76]) by mail.messagingengine.com (Postfix) with ESMTPA id 28E8780062; Thu, 2 Jan 2020 05:36:45 -0500 (EST) Date: Thu, 2 Jan 2020 11:36:43 +0100 From: Maxime Ripard To: Yuti Suresh Amonkar Cc: "linux-kernel@vger.kernel.org" , "dri-devel@lists.freedesktop.org" , "praneeth@ti.com" , "tomi.valkeinen@ti.com" , "jsarha@ti.com" , Milind Parab , Swapnil Kashinath Jakhade , "kishon@ti.com" Subject: Re: [PATCH v2] phy: Add DisplayPort configuration options Message-ID: <20200102103643.5nsumruo7ixenoii@gilmour.lan> References: <1577108473-29294-1-git-send-email-yamonkar@cadence.com> <20191223171849.yvofolswgvyfklry@hendrix.home> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="c2loaiw6cvzf4s7e" Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --c2loaiw6cvzf4s7e Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, On Tue, Dec 24, 2019 at 12:29:40PM +0000, Yuti Suresh Amonkar wrote: > > -----Original Message----- > > From: Maxime Ripard > > Sent: Monday, December 23, 2019 22:49 > > To: Yuti Suresh Amonkar > > Cc: linux-kernel@vger.kernel.org; dri-devel@lists.freedesktop.org; > > praneeth@ti.com; tomi.valkeinen@ti.com; jsarha@ti.com; Milind Parab > > ; Swapnil Kashinath Jakhade > > > > Subject: Re: [PATCH v2] phy: Add DisplayPort configuration options > > > > EXTERNAL MAIL > > > > > > Hi, > > > > Please note that I don't have access to the displayPort spec, so I'll only > > comment on the content of that patch, not whether it's complete or not. > > > > On Mon, Dec 23, 2019 at 02:41:13PM +0100, Yuti Amonkar wrote: > > > Allow DisplayPort PHYs to be configured through the generic functions > > > through a custom structure added to the generic union. > > > The configuration structure is used for reconfiguration of DisplayPort > > > PHYs during link training operation. > > > > > > The parameters added here are the ones defined in the DisplayPort spec > > > 1.4 which include link rate, number of lanes, voltage swing and > > > pre-emphasis. > > > > > > Signed-off-by: Yuti Amonkar > > > --- > > > > > > This patch was a part of [1] series earlier but we think that it needs > > > to have a separate attention of the reviewers. Also as both [1] & [2] > > > are dependent on this patch, our sincere request to reviewers to have > > > a faster review of this patch. > > > > > > [1] > > > > > > https://lkml.org/lkml/2019/12/11/455 > > > > > > [2] > > > > > > https://patchwork.kernel.org/cover/11271191/ > > > > > > include/linux/phy/phy-dp.h | 95 > > ++++++++++++++++++++++++++++++++++++++++++++++ > > > include/linux/phy/phy.h | 4 ++ > > > 2 files changed, 99 insertions(+) > > > create mode 100644 include/linux/phy/phy-dp.h > > > > > > diff --git a/include/linux/phy/phy-dp.h b/include/linux/phy/phy-dp.h > > > new file mode 100644 index 0000000..18cad23 > > > --- /dev/null > > > +++ b/include/linux/phy/phy-dp.h > > > @@ -0,0 +1,95 @@ > > > +/* SPDX-License-Identifier: GPL-2.0 */ > > > +/* > > > + * Copyright (C) 2019 Cadence Design Systems Inc. > > > + */ > > > + > > > +#ifndef __PHY_DP_H_ > > > +#define __PHY_DP_H_ > > > + > > > +#include > > > + > > > +/** > > > + * struct phy_configure_opts_dp - DisplayPort PHY configuration set > > > + * > > > + * This structure is used to represent the configuration state of a > > > + * DisplayPort phy. > > > + */ > > > +struct phy_configure_opts_dp { > > > + /** > > > + * @link_rate: > > > + * > > > + * Link Rate, in Mb/s, of the main link. > > > + * > > > + * Allowed values: 1620, 2160, 2430, 2700, 3240, 4320, 5400, 8100 > > Mb/s > > > + */ > > > + unsigned int link_rate; > > > + > > > + /** > > > + * @lanes: > > > + * > > > + * Number of active, consecutive, data lanes, starting from > > > + * lane 0, used for the transmissions on main link. > > > + * > > > + * Allowed values: 1, 2, 4 > > > + */ > > > + unsigned int lanes; > > > + > > > + /** > > > + * @voltage: > > > + * > > > + * Voltage swing levels, as specified by DisplayPort specification, > > > + * to be used by particular lanes. One value per lane. > > > + * voltage[0] is for lane 0, voltage[1] is for lane 1, etc. > > > + * > > > + * Maximum value: 3 > > > + */ > > > + unsigned int voltage[4]; > > > + > > > + /** > > > + * @pre: > > > + * > > > + * Pre-emphasis levels, as specified by DisplayPort specification, to be > > > + * used by particular lanes. One value per lane. > > > + * > > > + * Maximum value: 3 > > > + */ > > > + unsigned int pre[4]; > > > + > > > + /** > > > + * @ssc: > > > + * > > > + * Flag indicating, whether or not to enable spread-spectrum > > clocking. > > > + * > > > + */ > > > + u8 ssc : 1; > > > + > > > + /** > > > + * @set_rate: > > > + * > > > + * Flag indicating, whether or not reconfigure link rate and SSC to > > > + * requested values. > > > + * > > > + */ > > > + u8 set_rate : 1; > > > + > > > + /** > > > + * @set_lanes: > > > + * > > > + * Flag indicating, whether or not reconfigure lane count to > > > + * requested value. > > > + * > > > + */ > > > + u8 set_lanes : 1; > > > + > > > + /** > > > + * @set_voltages: > > > + * > > > + * Flag indicating, whether or not reconfigure voltage swing > > > + * and pre-emphasis to requested values. Only lanes specified > > > + * by "lanes" parameter will be affected. > > > + * > > > + */ > > > + u8 set_voltages : 1; > > > > I'm not quite sure what these flags are supposed to be doing, or what use- > > cases they cover. The current API is using validate to make sure that we can > > have a handshake between the caller and its PHY and must never apply the > > configuration, and configure must always apply the configuration. These > > flags look redundant. > > > > Maxime > > These flags are used to reconfigure the link during the link > training procedure as described in DisplayPort spec. In this > procedure , we may need to configure only subset of parameters (VS, > Pre-emphasis, link rate and num of lanes) depending on different > phases. e.g. At one stage, we may need to configure only Voltage > swing and Pre-emphasis keeping number of lanes and link rate > intact(set_voltages=true), while at other stage, we may need to > configure all parameters. We use the flags to determine which > parameter is updated during link training. Using separate flags for > this provides control to upper layer. Ok, it makes sense then :) > I am not sure how to use validate to achieve this. As per my > understanding validate is used to verify if set of parameters can be > handled by PHY. That's correct :) Maxime --c2loaiw6cvzf4s7e Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCXg3HuwAKCRDj7w1vZxhR xe3qAP9Gt30ilzQgxVlPHA+hb21dDpFwiel5DoSQR1O1uRxeRgEA4g+bnox1e5ku FSt8Uy+PHTvPRJYnJXgkZPz0+dRDSQw= =PtY4 -----END PGP SIGNATURE----- --c2loaiw6cvzf4s7e--