Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp8373419pxb; Fri, 19 Feb 2021 14:49:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJyCz1jtxrmcT34P3oEKjavXF1py55F33KRfFS1CTYVLLBEuz3/ZMmc1bKmgSqoPQ12Bxu98 X-Received: by 2002:a05:6402:1152:: with SMTP id g18mr11634086edw.18.1613774959485; Fri, 19 Feb 2021 14:49:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613774959; cv=none; d=google.com; s=arc-20160816; b=RP+hOdI4OVXaPspro/C8KqHey+JWnZivJ2x65s1SI128Xk4ExW4D18hHrnI9td7vM2 k0A48jjml0PFxtDxI6oBuQmnMuuyfatyvEFPrFDaGE/p7rRYc4HMrtnpiZwSlbM3lGtA ppyfoKbC57XTo9lelAGFNBgcQnU2NX6JLD3efqkh1zrCjB60C71VNFUrKT2Z7oZ97FJM gF7N5/XL9mIZAMxk8lOAc0DH3STAuS5ICM3mQUUrg+ecKGAmpbxQuVsEwUQ216J58UTL QA0cSK3AcdKpASSFQw7Cy+SEPiVirT9/TMpdAsKJyO2wzvXM3L4uBviUttkXGZ7ee/TZ ymCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:message-id:date:to:cc:from:subject :references:in-reply-to:content-transfer-encoding:mime-version :dkim-signature; bh=77aFN3X3B8ZOa2LFV3nt5PPEdkKjE+anr2eIHArGBZI=; b=PATgKKyhasW3juwrpqhZc+36xMDQsSn9kCJssI0QNp346eKHSlIRIvlnIuibcY/qM1 aANvqvyxdmhtPBsBKr7TkQinUS6v4scwY/Iv7r0iNz7Ca36eOd7M9Shf+LZiOiTXL/lz MAgi44kKUMXwTDESy4SNJvad3frlWittOVXBkgpui6wefuEUh0+d5Ba/Y/ArlRfsFbp2 73X3sFZaAuvQwF9v96cjn+RL8KEvYmQ+owJG45dwe69CFYUlE+y5QiLRk10viWP/iwDA 9sHmY5EWfd58jKA+rAt6nXL0iP+6KBOuAmd/jD6RJsvbxhatZUZdpRohZr2tfaYFXmmV GknA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=mNayBvgQ; 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=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t15si6688645ejj.506.2021.02.19.14.48.54; Fri, 19 Feb 2021 14:49:19 -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=@chromium.org header.s=google header.b=mNayBvgQ; 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=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229745AbhBSWr0 (ORCPT + 99 others); Fri, 19 Feb 2021 17:47:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36736 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229652AbhBSWrY (ORCPT ); Fri, 19 Feb 2021 17:47:24 -0500 Received: from mail-pg1-x52d.google.com (mail-pg1-x52d.google.com [IPv6:2607:f8b0:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AFB64C061574 for ; Fri, 19 Feb 2021 14:46:44 -0800 (PST) Received: by mail-pg1-x52d.google.com with SMTP id 75so5994716pgf.13 for ; Fri, 19 Feb 2021 14:46:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:content-transfer-encoding:in-reply-to:references :subject:from:cc:to:date:message-id:user-agent; bh=77aFN3X3B8ZOa2LFV3nt5PPEdkKjE+anr2eIHArGBZI=; b=mNayBvgQSMayniwbb1d97dRJpctfMgOIorNOVhijMSM+SLYhY7+q7UyttewTf9a2Hp B3Jp3CFUjbYUJfipkc3GFgul0vtBVKZAasjqy/DQskZ8j9FkqI0Wvgx3wDdMzisNK43X YkWW/eknmby9epgU1tvmCJXUYmOHkCdklRSmE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:content-transfer-encoding :in-reply-to:references:subject:from:cc:to:date:message-id :user-agent; bh=77aFN3X3B8ZOa2LFV3nt5PPEdkKjE+anr2eIHArGBZI=; b=Q8GRZPpDzqri3L/AMs8xmT32wWr2SNXdcng0WXZndbsPzj7oPnvKT3Eoi79LlIDbEb s4scWQtz/wK2ng9zYqYS3/9sohGd1dlfNfe2NFk0WXIQNiShFwHUhC87U8cGOxlk+h3W GNGEC6+qDpoUJBhCezJbgjFIGx0sv5HRv46xScFWzKjk73qqZSfEjnOt41OcszHwSoq/ rMoAp4hsN4TxYbTT4xIFNdvsaJUC04DOvYaV0eN6IfWpdExsRr81mABB6rARjcspB5Ap aOzZPW4sVvWR1zluZR9FRmEbLikGwxcGGZTzkT6a5mh8bkWuUE8f5b9HLhCvvEkunNLy oxsQ== X-Gm-Message-State: AOAM533yqUsKXcMVXA54Erv7fjKfP+FbajMG0XP7siTf/O8i0A5374jm GbCX/iMIrqE7/x7mV41V0PMQtQ== X-Received: by 2002:a62:e703:0:b029:1ed:5a8b:4308 with SMTP id s3-20020a62e7030000b02901ed5a8b4308mr2846228pfh.67.1613774804277; Fri, 19 Feb 2021 14:46:44 -0800 (PST) Received: from chromium.org ([2620:15c:202:201:dd53:b29e:3c8:33ae]) by smtp.gmail.com with ESMTPSA id x9sm9342392pjp.29.2021.02.19.14.46.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Feb 2021 14:46:43 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <7af07dcacd5b68087cc61e467e9c57ea@codeaurora.org> References: <1613681704-12539-1-git-send-email-khsieh@codeaurora.org> <161368935031.1254594.14384765673800900954@swboyd.mtv.corp.google.com> <7af07dcacd5b68087cc61e467e9c57ea@codeaurora.org> Subject: Re: [PATCH v2 2/2] drm/msm/dp: add supported max link rate specified from dtsi From: Stephen Boyd Cc: robdclark@gmail.com, sean@poorly.run, tanmay@codeaurora.org, abhinavk@codeaurora.org, aravindh@codeaurora.org, airlied@linux.ie, daniel@ffwll.ch, linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org To: khsieh@codeaurora.org Date: Fri, 19 Feb 2021 14:46:41 -0800 Message-ID: <161377480166.1254594.16557636343276220817@swboyd.mtv.corp.google.com> User-Agent: alot/0.9.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting khsieh@codeaurora.org (2021-02-19 08:39:38) > On 2021-02-18 15:02, Stephen Boyd wrote: > > Quoting Kuogee Hsieh (2021-02-18 12:55:04) > >> Allow supported link rate to be limited to the value specified at > >> dtsi. If it is not specified, then link rate is derived from dpcd > >> directly. Below are examples, > >> link-rate =3D <162000> for max link rate limited at 1.62G > >> link-rate =3D <270000> for max link rate limited at 2.7G > >> link-rate =3D <540000> for max link rate limited at 5.4G > >> link-rate =3D <810000> for max link rate limited at 8.1G > >>=20 > >> Changes in V2: > >> -- allow supported max link rate specified from dtsi > >=20 > > Please don't roll this into the patch that removes the limit. The > > previous version of this patch was fine. The part that lowers the limit > > back down should be another patch. > >=20 > > We rejected link-rate in DT before and we should reject it upstream > > again. As far as I can tell, the maximum link rate should be determined > > based on the panel or the type-c port on the board. The dp controller > > can always achieve HBR3, so limiting it at the dp controller is > > incorrect. The driver should query the endpoints to figure out if they > > want to limit the link rate. Is that done automatically sometimes by > > intercepting the DPCD? >=20 > ok, i will roll back to original patch and add the second patch for max=20 > link rate limited purpose. > panel dpcd specified max link rate it supported. > At driver, link rate is derived from dpcd directly since driver will try = > to use the maximum supported link rate and less lane to save power. > Therefore it is not possible that limit link rate base on dpcd. > AS i understand we are going to do max link rate limitation is due to=20 > old redriver chip can not support HBR3. > How can I acquire which type-c port on the board so that I can trigger=20 > max link rate limitation? >=20 >=20 The driver already seems to support lowering the link rate during link training. Can't we try to train at the highest rate and then downgrade the link speed until it trains properly? I sort of fail to see why we need to introduce a bunch of complexity around limiting the link rate on certain boards if the driver can figure out that link training doesn't work at HBR3 so it should try to train at HBR2 instead.