linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Quentin Perret <quentin.perret@arm.com>
To: Joel Fernandes <joelaf@google.com>
Cc: Linux PM <linux-pm@vger.kernel.org>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	vireshk@kernel.org, nm@ti.com, sboyd@codeaurora.org,
	sudeep.holla@arm.com, amit.kachhap@gmail.com,
	javi.merino@kernel.org, rui.zhang@intel.com, edubezval@gmail.com,
	matthias.bgg@gmail.com,
	Dietmar Eggemann <dietmar.eggemann@arm.com>,
	Morten Rasmussen <morten.rasmussen@arm.com>,
	Patrick Bellasi <patrick.bellasi@arm.com>,
	Ionela Voinescu <ionela.voinescu@arm.com>,
	Todd Kjos <tkjos@google.com>
Subject: Re: [PATCH v3 2/2] thermal: cpu_cooling: use power models from the OPP library
Date: Mon, 22 Jan 2018 11:03:08 +0000	[thread overview]
Message-ID: <20180122110307.GA31111@e108498-lin.cambridge.arm.com> (raw)
In-Reply-To: <CAJWu+orOoq3uKeaBnTjS+PytwXS3MwK+gasOCLNqj+QxXXZ7Ug@mail.gmail.com>

On Friday 19 Jan 2018 at 15:15:41 (-0800), Joel Fernandes wrote:
> > @@ -675,18 +668,15 @@ __cpufreq_cooling_register(struct device_node *np,
> >                         pr_debug("%s: freq:%u KHz\n", __func__, freq);
> >         }
> >
> > -       if (capacitance) {
> > -               ret = update_freq_table(cpufreq_cdev, capacitance);
> > -               if (ret) {
> > -                       cdev = ERR_PTR(ret);
> > -                       goto remove_ida;
> > -               }
> > -
> > -               cooling_ops = &cpufreq_power_cooling_ops;
> > -       } else {
> > -               cooling_ops = &cpufreq_cooling_ops;
> 
> Instead of this, is it better to add an API to OPP library to query it
> if it has power data for all OPPs? Then you don't need to have a
> 'found_power' variable and also don't unnecessarily call
> dev_pm_opp_find_freq_ceil in update_freq_table.

I had an API that looked like that in v1 and v2 (not used here though)
but we agreed with Viresh that it wasn't absolutely necessary so I got
rid of it. I'm not sure how I can avoid to call dev_pm_opp_find_freq_ceil
though. What did you mean by that ?

Thanks,
Quentin

  parent reply	other threads:[~2018-01-22 11:03 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-19  9:45 [PATCH v3 0/2] thermal, OPP: move the CPU power estimation to the OPP library Quentin Perret
2018-01-19  9:45 ` [PATCH v3 1/2] PM / OPP: introduce an OPP power estimation helper Quentin Perret
2018-01-19 23:36   ` Joel Fernandes
2018-01-22  5:12     ` Viresh Kumar
2018-01-22 10:00     ` Quentin Perret
2018-01-20  4:10   ` Joel Fernandes
2018-01-22  9:56     ` Quentin Perret
2018-01-22 21:33       ` Joel Fernandes
2018-01-19  9:45 ` [PATCH v3 2/2] thermal: cpu_cooling: use power models from the OPP library Quentin Perret
2018-01-19 23:15   ` Joel Fernandes
2018-01-22  5:11     ` Viresh Kumar
2018-01-22 21:30       ` Joel Fernandes
2018-01-23  2:47         ` Viresh Kumar
2018-01-22 11:03     ` Quentin Perret [this message]
2018-01-19 10:12 ` [PATCH v3 0/2] thermal, OPP: move the CPU power estimation to " Viresh Kumar

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=20180122110307.GA31111@e108498-lin.cambridge.arm.com \
    --to=quentin.perret@arm.com \
    --cc=amit.kachhap@gmail.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=edubezval@gmail.com \
    --cc=ionela.voinescu@arm.com \
    --cc=javi.merino@kernel.org \
    --cc=joelaf@google.com \
    --cc=linux-pm@vger.kernel.org \
    --cc=matthias.bgg@gmail.com \
    --cc=morten.rasmussen@arm.com \
    --cc=nm@ti.com \
    --cc=patrick.bellasi@arm.com \
    --cc=rjw@rjwysocki.net \
    --cc=rui.zhang@intel.com \
    --cc=sboyd@codeaurora.org \
    --cc=sudeep.holla@arm.com \
    --cc=tkjos@google.com \
    --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).