Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4499725pxj; Tue, 8 Jun 2021 16:12:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz7caFKmEujSv1D0JrFibWesX/hxQugejMMwdmUkCDyNKFnZxkCBnwvymoZjGYKKCiIuxEU X-Received: by 2002:a17:907:9607:: with SMTP id gb7mr25662906ejc.208.1623193935160; Tue, 08 Jun 2021 16:12:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623193935; cv=none; d=google.com; s=arc-20160816; b=fB814To6PeLNPEQrjnSK/4aWKCefm0uT44AlxnfKpDZDFuc6Z0QKwZTW70W9R6iGYW l6uyyWES9XLpGisDpyu2S7DYD+einhMQDX58yf7eNs/nz3hpSAUwHLNgItfI+wk5J39v +hIXA2zVONkE1/trVmiWBWSjf5msrMBRCxhdA8ZaUOfPqyiKwCWLD6Yhfzu52Acv7oqQ sa0KJbYIh3pBvwbO5EpX9JnwUWIn2Wk/Ym5dwTj+gaUXGWCKeHt/J3bs5w+ZgUdbRtUc xNBPtxObfcUrXKb4XGUKrcy+UG5QmobI4FO/amEqI/1LtoeGgzS28cMiKOqEHe/7sDat R4bg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=8Fd2UnKqRp3r57f4CDJXwSiaZtMqRHFyBh9cIrJCLHc=; b=IjcLxv8DjooAB3PZnnU93eTLN4p+bkSMg2Kx9ritffyE8VgfKzdZ44ffHx782UhimV 84DucZKEveBRamRLSnSBd0ct8oDLzvn433v4xooaqgEYXSm9tBhYnpFwyK0SNGL/pM3W lzK1cJwLqqg42sDXnUCgmxoa1wY1M0ZjJhsb8D3z71nRr4Pq1hZ4ITptOntP/unOrdud Gy0mir3AEzzNZLFm/y0zqMFx9YkhlIRGsVURF02Kpe8FCC5r8MR/BkhOIxTBwcpQMQXw bzoA/byWwDzwonjC07RupNj65dQaSrkfQ2gVXGi7R18J4/zUdxLuMUCqDe8g3bzV78N1 GzEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YVQxIh4D; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c14si973913edr.15.2021.06.08.16.11.51; Tue, 08 Jun 2021 16:12:15 -0700 (PDT) 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=@linaro.org header.s=google header.b=YVQxIh4D; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234060AbhFHXMM (ORCPT + 99 others); Tue, 8 Jun 2021 19:12:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33810 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234206AbhFHXML (ORCPT ); Tue, 8 Jun 2021 19:12:11 -0400 Received: from mail-oo1-xc2d.google.com (mail-oo1-xc2d.google.com [IPv6:2607:f8b0:4864:20::c2d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3EC74C061789 for ; Tue, 8 Jun 2021 16:10:18 -0700 (PDT) Received: by mail-oo1-xc2d.google.com with SMTP id k21-20020a4a2a150000b029024955603642so3269144oof.8 for ; Tue, 08 Jun 2021 16:10:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=8Fd2UnKqRp3r57f4CDJXwSiaZtMqRHFyBh9cIrJCLHc=; b=YVQxIh4DVDYDVOSMez79iluTdib8wNEGnSurhGWV5Sx1Yt2DoKdkChJeEswUoeSsGw 0K00d68k/hSD0WCstFm065QnDK9rywsVn9kQw/4Kj0jMQJu8ZRDpHZMz4K4FPQnn10E4 N08rvCo6ABfBzZhrVuzfRfm3qkKNuPPRPLa+kZFaYoNlgWkvp3nUvMsE0CxBchjX/GIB vXnYe965oMdOEKaqGviedRqmdY0N1l8CECcUioeXQ7O3Itu5he0GWhI7CLxMzbVsPVmj r+K+/JevqaG+yMYcwmhqA6BJ63t8i+MsqNQnyxgtKgYLrEkMPPCpydxSpF+pD3aDS0MU UgDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=8Fd2UnKqRp3r57f4CDJXwSiaZtMqRHFyBh9cIrJCLHc=; b=HpG+PZ73csXEBwbjXYcbWwcRZq496kUj6I8XzLaKKSyQko1q4vdWp95HFfG8KZ0ZF0 IwOv98M5JmXe8+hI29IsbVZPJJXD7luGTbIh73yXEKPxr0f331w1jA0phPCKD1hOsZ0w x54qvkSzCDs2f2mz/XLSUZfvtRZPNZcw3Pb7strL3sBAoO+d6TEgecWrjbMqlafoKv6V pSPpnSf4fPe3SYrPDpqpaW+bCtd1VmwfcvTgX++7GlPDxXBUFG3Qs/mIL5QJm5xK2Oa1 qJN4gylDK4dvtga+m1ck7SzQh6zmG/2iL6V0/Qof3d80Vqm9CZDLpMdNaxG65IIJ3VhG KGgg== X-Gm-Message-State: AOAM531eRYNiTLJuddT8jIUoniPtHP2TWo6eey8BclxCGj63gt2AejWS mx8qslRzLX8Sx6k44Q7Pa5EzpA== X-Received: by 2002:a4a:b789:: with SMTP id a9mr19171527oop.45.1623193817402; Tue, 08 Jun 2021 16:10:17 -0700 (PDT) Received: from yoga (104-57-184-186.lightspeed.austtx.sbcglobal.net. [104.57.184.186]) by smtp.gmail.com with ESMTPSA id c205sm3092501oob.38.2021.06.08.16.10.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Jun 2021 16:10:16 -0700 (PDT) Date: Tue, 8 Jun 2021 18:10:14 -0500 From: Bjorn Andersson To: Stephen Boyd Cc: khsieh@codeaurora.org, robdclark@gmail.com, sean@poorly.run, vkoul@kernel.org, agross@kernel.org, robh+dt@kernel.org, devicetree@vger.kernel.org, abhinavk@codeaurora.org, aravindh@codeaurora.org, freedreno@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] arm64/dts/qcom/sc7180: Add Display Port dt node Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 08 Jun 17:44 CDT 2021, Stephen Boyd wrote: > Quoting Bjorn Andersson (2021-06-08 15:34:01) > > On Tue 08 Jun 17:29 CDT 2021, Stephen Boyd wrote: > > > > > Quoting Bjorn Andersson (2021-06-08 15:26:23) > > > > On Tue 08 Jun 17:15 CDT 2021, Stephen Boyd wrote: > > > > > > > > > Quoting Bjorn Andersson (2021-06-07 16:31:47) > > > > > > On Mon 07 Jun 12:48 CDT 2021, khsieh@codeaurora.org wrote: > > > > > > > > > > > > > Sorry about the confusion. What I meant is that even though DP controller is > > > > > > > in the MDSS_GDSC > > > > > > > power domain, DP PHY/PLL sources out of CX. The DP link clocks have a direct > > > > > > > impact > > > > > > > on the CX voltage corners. Therefore, we need to mention the CX power domain > > > > > > > here. And, since > > > > > > > we can associate only one OPP table with one device, we picked the DP link > > > > > > > clock over other > > > > > > > clocks. > > > > > > > > > > > > Thank you, that's a much more useful answer. > > > > > > > > > > > > Naturally I would think it would make more sense for the PHY/PLL driver > > > > > > to ensure that CX is appropriately voted for then, but I think that > > > > > > would result in it being the clock driver performing such vote and I'm > > > > > > unsure how the opp table for that would look. > > > > > > > > > > > > @Stephen, what do you say? > > > > > > > > > > > > > > > > Wouldn't the PHY be the one that sets some vote? So it wouldn't be the > > > > > clk driver, and probably not from the clk ops, but instead come from the > > > > > phy ops via phy_enable() and phy_configure(). > > > > > > > > > > > > > If I understand the logic correctly *_configure_dp_phy() will both > > > > configure the vco clock and "request" the clock framework to change the > > > > rate. > > > > > > > > So I presume what you're suggesting is that that would be the place to > > > > cast the CX corner vote? > > > > > > Yes that would be a place to make the CX vote. The problem is then I > > > don't know where to drop the vote. Is that when the phy is disabled? > > > > We do pass qcom_qmp_phy_power_off() and power down the DP part as DP > > output is being disabled. So that sounds like a reasonable place to drop > > the vote for the lowest performance state. > > > > So then will the corner vote be in place when the PHY isn't actually > powered up? That will be bad for power. The phy configure code will need > to know if the phy is enabled and then only put in the vote when the phy > is enabled, otherwise wait for enable to make the corner vote. > If we vote for a corner based on the link rate in *_configure_dp_phy() and put the vote for lowest corner we'd get the corner part sorted out afaict. We'd still have to make sure that the PHY doesn't hang on to the cx vote beyond that though - and implicitly in the non-DP cases... > Honestly I suspect the DP PHY is _not_ in the CX domain as CX is for > digital logic. Probably the PLL is the hardware that has some minimum CX > requirement, and that flows down into the various display clks like the > link clk that actually clock the DP controller hardware. The mdss_gdsc > probably gates CX for the display subsystem (mdss) so if we had proper > corner aggregation logic we could indicate that mdss_gdsc is a child of > the CX domain and then make requests from the DP driver for particular > link frequencies on the mdss_gdsc and then have that bubble up to CX > appropriately. I don't think any of that sort of code is in place > though, right? I haven't checked sc7180, but I'm guessing that it's following the other modern platforms, where all the MDSS related pieces (including e.g. dispcc) lives in the MMCX domain, which is separate from CX. So the parent of MDSS_GDSC should be MMCX, while Kuogee's answer (and the dp-opp-table) tells us that the PLL lives in the CX domain. PS. While this goes for the QMPs the DSI and eDP/DP PHYs (and PLLs) seems to live in MMCX. Regards, Bjorn