[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPDyKFosi4dhf36iNaNgGN6RHLDunL1nEwD+A_aW2khxER59nQ@mail.gmail.com>
Date: Mon, 29 Jul 2024 22:30:31 +0200
From: Ulf Hansson <ulf.hansson@...aro.org>
To: Viresh Kumar <viresh.kumar@...aro.org>
Cc: Viresh Kumar <vireshk@...nel.org>, Nishanth Menon <nm@...com>, Stephen Boyd <sboyd@...nel.org>,
Nikunj Kela <nkela@...cinc.com>, Prasad Sodagudi <psodagud@...cinc.com>, linux-pm@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux-tegra@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [PATCH] OPP: Fix support for required OPPs for multiple PM domains
On Mon, 29 Jul 2024 at 08:05, Viresh Kumar <viresh.kumar@...aro.org> wrote:
>
> On 28-07-24, 22:05, Ulf Hansson wrote:
> > > > > I think that design is rather correct, just like other frameworks. Just that we
> > > > > need to do only set-level for genpds and nothing else. That will have exactly
> > > > > the same behavior that you want.
> > > >
> > > > I don't quite understand what you are proposing. Do you want to add a
> > > > separate path for opp-levels?
> > >
> > > Not separate paths, but ignore clk/regulator changes if the table belongs to a
> > > genpd.
> > >
> > > > The problem with that would be that platforms (Tegra at least) are
> > > > already using a combination of opp-level and clocks.
> > >
> > > If they are using both for a genpd's OPP table (and changes are made for both
> > > opp-level and clock by the OPP core), then it should already be wrong, isn't it?
> >
> > They are changing the clock through the device's OPP table and the
> > level (performance-state) via genpd's table (using required OPPs).
> > This works fine as of today.
>
> There is a problem here I guess then. Lets say there are two devices A and B,
> that depend on a genpd.
>
> A requests required OPP 5 (level 5, clk 1.4 GHz), followed by
> B requests required OPP 3 (level 3, clk 1 GHz).
>
> After this level will be configured to 5 and clk to 1 GHz I think.
The level would be 5, as the aggregated votes in genpd would be
correct in this case.
In regards to the clocks, I assume this is handled correctly too, as
the clocks are per device clocks that don't belong to the genpd.
>
> > It's working today for *opp-level* only, because of the commit above.
> > That's correct.
>
> Good.
>
> > My point is that calling dev_pm_opp_set_opp() recursively from
> > _set_required_opps() doesn't make sense for the single PM domain case,
> > as we can't assign a required-dev for it. This leads to an
> > inconsistent behaviour when managing the required-OPPs.
>
> We won't be calling that because of the above patch. In case of a single dev,
> the required device isn't set and so we will never end up calling
> dev_pm_opp_set_opp() for a single genpd case.
That's right, but why do we want to call dev_pm_opp_set_opp() for the
multiple PM domain case then? It makes the behaviour inconsistent.
Kind regards
Uffe
Powered by blists - more mailing lists