linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Cc: Rajendra Nayak <rnayak@codeaurora.org>,
	Stephen Boyd <swboyd@chromium.org>,
	ulf.hansson@linaro.org, viresh.kumar@linaro.org,
	linux-pm@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	rojay@codeaurora.org, stephan@gerhold.net
Subject: Re: [PATCH v4 2/2] arm64: dts: sc7180: Add required-opps for i2c
Date: Wed, 28 Jul 2021 11:47:45 -0700	[thread overview]
Message-ID: <YQGmUWE8quTVMV6+@ripper> (raw)
In-Reply-To: <f73f1c31-dc31-32f9-d7d8-1aa3233b0040@linaro.org>

On Wed 28 Jul 07:01 PDT 2021, Dmitry Baryshkov wrote:

> On 28/07/2021 06:46, Bjorn Andersson wrote:
> > On Tue 27 Jul 02:35 CDT 2021, Rajendra Nayak wrote:
> > 
> > > 
> > > On 7/25/2021 10:31 PM, Bjorn Andersson wrote:
> > > > On Mon 19 Jul 23:29 CDT 2021, Rajendra Nayak wrote:
> > > > 
> > > > > 
> > > > > 
> > > > > On 7/20/2021 12:49 AM, Bjorn Andersson wrote:
> > > > > > On Mon 19 Jul 04:37 CDT 2021, Rajendra Nayak wrote:
> > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > On 7/17/2021 3:29 AM, Bjorn Andersson wrote:
> > > > > > > > On Fri 16 Jul 16:49 CDT 2021, Stephen Boyd wrote:
> > > > > > > > 
> > > > > > > > > Quoting Bjorn Andersson (2021-07-16 13:52:12)
> > > > > > > > > > On Fri 16 Jul 15:21 CDT 2021, Stephen Boyd wrote:
> > > > > > > > > > 
> > > > > > > > > > > Quoting Bjorn Andersson (2021-07-16 13:18:56)
> > > > > > > > > > > > On Fri 16 Jul 05:00 CDT 2021, Rajendra Nayak wrote:
> > > > > > > > > > > > 
> > > > > > > > > > > > > qup-i2c devices on sc7180 are clocked with a fixed clock (19.2 MHz)
> > > > > > > > > > > > > Though qup-i2c does not support DVFS, it still needs to vote for a
> > > > > > > > > > > > > performance state on 'CX' to satisfy the 19.2 Mhz clock frequency
> > > > > > > > > > > > > requirement.
> > > > > > > > > > > > > 
> > > > > > > > > > > > 
> > > > > > > > > > > > Sounds good, but...
> > > > > > > > > > > > 
> > > > > > > > > > > > > Use 'required-opps' to pass this information from
> > > > > > > > > > > > > device tree, and also add the power-domains property to specify
> > > > > > > > > > > > > the CX power-domain.
> > > > > > > > > > > > > 
> > > > > > > > > > > > 
> > > > > > > > > > > > ..is the required-opps really needed with my rpmhpd patch in place?
> > > > > > > > > > > > 
> > > > > > > > > > > 
> > > > > > > > > > > Yes? Because rpmhpd_opp_low_svs is not the lowest performance state for
> > > > > > > > > > > CX.
> > > > > > > > > > 
> > > > > > > > > > On e.g. sm8250 the first available non-zero corner presented in cmd-db
> > > > > > > > > > is low_svs.
> > > > > > > 
> > > > > > > what rail is this? the mmcx? Perhaps it does not support RET.
> > > > > > > cx usually supports both collapse state and RET.
> > > > > > > 
> > > > > > 
> > > > > > That was the one I was specifically looking at for the MDSS_GDSC->MMCX
> > > > > > issue, so it's likely I didn't look elsewhere.
> > > > > > 
> > > > > > > > > 
> > > > > > > > > Indeed. On sc7180 it's not the first non-zero corner. I suppose
> > > > > > > > > retention for CX isn't actually used when the SoC is awake so your
> > > > > > > > > rpmhpd patch is putting in a vote for something that doesn't do anything
> > > > > > > > > at runtime for CX? I imagine that rpmh only sets the aggregate corner to
> > > > > > > > > retention when the whole SoC is suspended/sleeping, otherwise things
> > > > > > > > > wouldn't go very well. Similarly, min_svs may be VDD minimization? If
> > > > > > > > > so, those first two states are basically states that shouldn't be used
> > > > > > > > > at runtime, almost like sleep states.
> > > > > > > > > 
> > > > > > > > 
> > > > > > > > But if that's the case, I don't think it's appropriate for the "enabled
> > > > > > > > state" of the domain to use any of those corners.
> > > > > > > 
> > > > > > > I rechecked the downstream kernels where all this voting happens from within
> > > > > > > the clock drivers, and I do see votes to min_svs for some clocks, but Stephen is
> > > > > > > right that RET is not something that's voted on while in active state.
> > > > > > > 
> > > > > > > But always going with something just above the ret level while active will also
> > > > > > > not work for all devices, for instance for i2c on 7180, it needs a cx vote of
> > > > > > > low svs while the rail (cx) does support something lower than that which is min svs.
> > > > > > > (why can't it just work with min svs?, I don't know, these values and recommendations
> > > > > > > come in from the voltage plans published by HW teams for every SoC and we just end up
> > > > > > > using them in SW, perhaps something to dig further and understand which I will try and
> > > > > > > do but these are the values in voltage plans and downstream kernels which work for now)
> > > > > > > 
> > > > > > 
> > > > > > So to some degree this invalidates my argumentation about the
> > > > > > enabled_corner in rpmhpd, given that "enabled" means a different corner
> > > > > > for each rail - not just the one with lowest non-zero value.
> > > > > 
> > > > > Right, it might work in some cases but might not work for all.
> > > > > 
> > > > 
> > > > Which makes it way less desirable.
> > > > 
> > > > The enable state for rpmhpd power domains doesn't meet my expectations
> > > > for how a power domain should behave,
> > > 
> > > Right and that's perhaps because these are not the usual power-domains,
> > > which have one "on/active" state and one or more "off/inactive" states (off/ret/clock-stop)
> > > Rpmhpd has multiple "on/active" states, and whats "on/active" for one consumer
> > > might not be "on/active" for another, so this information is hard to be managed
> > > at a generic level and these requests in some way or the other need to come
> > > in explicitly from the resp. consumers.
> > > 
> > 
> > I think it's fine if we just acknowledge that this is how the rpmhpd
> > domains works.
> > 
> > But I am worried about how we're going to handle the case where the
> > consumer is indirectly referencing one of these power-domains using a
> > subdomain (gdsc).
> 
> With the proper subdomain relationship in place and with Ulf's patches, this
> seems to be handled correctly. gdsc sets proper level for the parent power
> domain, which gets voted and unvoted by the core pm code when gdsc's power
> domain is powered on or off.
> 

Right, but this works only in our case because "on" for MMCX happens to
be the first non-zero corner.

What this patch points out is that for some of the other power domains
my patch in the rpmhpd driver isn't sufficient - and presumably wouldn't
work for other gdsc's (that are parented by CX or MX).

Regards,
Bjorn

> > And the open question is if a solution to that problem will solve this
> > problem as well, or if we need to have this and some mechanism to
> > describe the "on state" for the parent of a subdomain.
> 
> 
> -- 
> With best wishes
> Dmitry

      reply	other threads:[~2021-07-28 18:49 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-16 10:00 [PATCH v4 0/2] PM / Domains: Add support for 'required-opps' to set default perf state Rajendra Nayak
2021-07-16 10:00 ` [PATCH v4 1/2] " Rajendra Nayak
2021-07-16 20:19   ` Stephen Boyd
2021-07-19 11:50     ` Rajendra Nayak
2021-07-16 10:00 ` [PATCH v4 2/2] arm64: dts: sc7180: Add required-opps for i2c Rajendra Nayak
2021-07-16 19:39   ` Stephen Boyd
2021-07-16 20:18   ` Bjorn Andersson
2021-07-16 20:21     ` Stephen Boyd
2021-07-16 20:52       ` Bjorn Andersson
2021-07-16 21:49         ` Stephen Boyd
2021-07-16 21:59           ` Bjorn Andersson
2021-07-19  9:37             ` Rajendra Nayak
2021-07-19 19:19               ` Bjorn Andersson
2021-07-20  4:29                 ` Rajendra Nayak
2021-07-25 17:01                   ` Bjorn Andersson
2021-07-27  7:35                     ` Rajendra Nayak
2021-07-28  3:46                       ` Bjorn Andersson
2021-07-28 14:01                         ` Dmitry Baryshkov
2021-07-28 18:47                           ` Bjorn Andersson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YQGmUWE8quTVMV6+@ripper \
    --to=bjorn.andersson@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rnayak@codeaurora.org \
    --cc=rojay@codeaurora.org \
    --cc=stephan@gerhold.net \
    --cc=swboyd@chromium.org \
    --cc=ulf.hansson@linaro.org \
    --cc=viresh.kumar@linaro.org \
    --subject='Re: [PATCH v4 2/2] arm64: dts: sc7180: Add required-opps for i2c' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).