From: Saravana Kannan <saravanak@google.com>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: MyungJoo Ham <myungjoo.ham@samsung.com>,
Kyungmin Park <kyungmin.park@samsung.com>,
Chanwoo Choi <cw00.choi@samsung.com>,
Viresh Kumar <vireshk@kernel.org>, Nishanth Menon <nm@ti.com>,
Stephen Boyd <sboyd@kernel.org>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
Sibi Sankar <sibis@codeaurora.org>,
Android Kernel Team <kernel-team@android.com>,
Linux PM <linux-pm@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 5/5] PM / devfreq: Add required OPPs support to passive governor
Date: Wed, 24 Jul 2019 20:58:34 -0700 [thread overview]
Message-ID: <CAGETcx_b96teeKoYpJoi8=jhMVrNCKCw9Ef10AU8=mVXGXVPHg@mail.gmail.com> (raw)
In-Reply-To: <20190725030137.uz22iwvdv37fsw56@vireshk-i7>
On Wed, Jul 24, 2019 at 8:01 PM Viresh Kumar <viresh.kumar@linaro.org> wrote:
>
> On 23-07-19, 17:26, Saravana Kannan wrote:
> > On Tue, Jul 23, 2019 at 3:04 AM Viresh Kumar <viresh.kumar@linaro.org> wrote:
> > > On 17-07-19, 15:23, Saravana Kannan wrote:
> > > > /*
> > > > @@ -56,13 +56,20 @@ static int devfreq_passive_get_target_freq(struct devfreq *devfreq,
> > > > * list of parent device. Because in this case, *freq is temporary
> > > > * value which is decided by ondemand governor.
> > > > */
> > > > - opp = devfreq_recommended_opp(parent_devfreq->dev.parent, freq, 0);
> > > > - if (IS_ERR(opp)) {
> > > > - ret = PTR_ERR(opp);
> > > > + p_opp = devfreq_recommended_opp(parent_devfreq->dev.parent, freq, 0);
> > > > + if (IS_ERR(p_opp)) {
> > > > + ret = PTR_ERR(p_opp);
> > > > goto out;
> > > > }
> > > >
> > > > - dev_pm_opp_put(opp);
> > > > + if (devfreq->opp_table && parent_devfreq->opp_table)
> > > > + opp = dev_pm_opp_xlate_opp(parent_devfreq->opp_table,
> > > > + devfreq->opp_table, p_opp);
> > >
> > > you put p_opp right here.
>
> What about this comment ?
Sorry, mixed this up with the other comment. Good point. Fixed. This
unintentionally fixed a copy-pasta bug I had in the "out" path.
-Saravana
>
> > >
> > > Also shouldn't you try to get p_opp under the above if block only? As
> > > that is the only user of it ?
> >
> > No, p_opp (used to be called opp) was used even before my changes. If
> > there's no required-opps mapping this falls back to assuming the slave
> > device OPP to pick should be the same index as the master device's
> > opp.
> >
> > So I believe this patch is correct as-is.
>
> Right.
>
> --
> viresh
prev parent reply other threads:[~2019-07-25 3:59 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-17 22:23 [PATCH v3 0/5] Add required-opps support to devfreq passive gov Saravana Kannan
2019-07-17 22:23 ` [PATCH v3 1/5] OPP: Allow required-opps even if the device doesn't have power-domains Saravana Kannan
2019-07-17 22:23 ` [PATCH v3 2/5] OPP: Add function to look up required OPP's for a given OPP Saravana Kannan
2019-07-23 9:53 ` Viresh Kumar
2019-07-24 0:23 ` Saravana Kannan
2019-07-25 2:58 ` Viresh Kumar
2019-07-25 3:46 ` Saravana Kannan
2019-07-25 5:38 ` Viresh Kumar
2019-07-26 1:41 ` Saravana Kannan
2019-07-17 22:23 ` [PATCH v3 3/5] OPP: Improve require-opps linking Saravana Kannan
2019-07-23 10:28 ` Viresh Kumar
2019-07-23 20:36 ` Saravana Kannan
[not found] ` <CAGETcx-6M9Ts8tfMf6aA8GjMyzK5sOLr069ZCxTG7RHMFPLzHw@mail.gmail.com>
2019-07-25 3:07 ` Viresh Kumar
2019-07-25 4:09 ` Saravana Kannan
2019-07-25 5:17 ` Viresh Kumar
2019-07-26 1:52 ` Saravana Kannan
2019-07-26 21:23 ` Saravana Kannan
2019-07-29 7:26 ` Viresh Kumar
2019-07-30 23:02 ` Hsin-Yi Wang
2019-07-30 23:05 ` Saravana Kannan
2019-11-25 11:28 ` Viresh Kumar
2019-11-25 11:29 ` Viresh Kumar
2019-12-05 19:11 ` Saravana Kannan
2019-12-10 5:21 ` Viresh Kumar
2020-01-27 6:11 ` Viresh Kumar
2020-01-29 13:34 ` Sibi Sankar
2020-01-30 4:21 ` Viresh Kumar
2021-01-18 7:21 ` Hsin-Yi Wang
2021-01-18 7:34 ` Viresh Kumar
2021-01-18 7:39 ` Hsin-Yi Wang
2021-01-20 0:05 ` Saravana Kannan
2021-01-27 11:54 ` Viresh Kumar
2021-01-27 14:40 ` Hsin-Yi Wang
2021-01-28 4:13 ` Viresh Kumar
2021-01-28 5:05 ` Hsin-Yi Wang
2019-07-17 22:23 ` [PATCH v3 4/5] PM / devfreq: Cache OPP table reference in devfreq Saravana Kannan
2019-07-17 22:23 ` [PATCH v3 5/5] PM / devfreq: Add required OPPs support to passive governor Saravana Kannan
2019-07-23 10:04 ` Viresh Kumar
2019-07-24 0:26 ` Saravana Kannan
2019-07-25 3:01 ` Viresh Kumar
2019-07-25 3:58 ` Saravana Kannan [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='CAGETcx_b96teeKoYpJoi8=jhMVrNCKCw9Ef10AU8=mVXGXVPHg@mail.gmail.com' \
--to=saravanak@google.com \
--cc=cw00.choi@samsung.com \
--cc=kernel-team@android.com \
--cc=kyungmin.park@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=myungjoo.ham@samsung.com \
--cc=nm@ti.com \
--cc=rjw@rjwysocki.net \
--cc=sboyd@kernel.org \
--cc=sibis@codeaurora.org \
--cc=viresh.kumar@linaro.org \
--cc=vireshk@kernel.org \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).