public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: MyungJoo Ham <myungjoo.ham-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
To: Tomeu Vizoso <tomeu.vizoso-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
Cc: "linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"Mikko Perttunen" <mikko.perttunen-/1wQRMveznE@public.gmane.org>,
	박경민 <kyungmin.park-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
	"Stephen Warren"
	<swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>,
	"Thierry Reding"
	<thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	"Alexandre Courbot"
	<gnurou-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	"linux-pm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-pm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: Re: [PATCH v6 5/8] PM / devfreq: tegra: remove operating-points
Date: Wed, 18 Mar 2015 07:43:57 +0000 (GMT)	[thread overview]
Message-ID: <1195991181.289821426664636507.JavaMail.weblogic@epmlwas07d> (raw)

> On 18 March 2015 at 06:23, MyungJoo Ham <myungjoo.ham@samsung.com> wrote:
> >> As the DT bindings don't have an operating-points property any more,
> >> build the OPP table from the frequencies supported by the EMC clock.
> >>
> >> Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
> >> ---
[]
> >>
> >> +     for (rate = 0; rate <= tegra->max_freq * KHZ; rate++) {
> >> +             rate = clk_round_rate(tegra->emc_clock, rate);
> >> +             dev_pm_opp_add(&pdev->dev, rate, 0);
> >> +     }
> >> +
> >
> > Although I am not going to NACK for the single-time performance of a
> > single device driver for a device that I do not have or fully understand,
> > please note that you may be wasting several billion cycles unless
> > your product is running at MHZ/kHZ level.
> >
> > What is going on with this loop? Do you really have such a virtually-continuous
> > frequency scaling in your product? (Wow.... but in such a case, I don't think
> > OPP is appropriate.)
> 
> Actually, that loop is expected to only execute as many times as
> frequencies are supported by the clock. This is using knowledge of the
> clock always rounding up when possible, which I think is fine in this
> case.

Ah. ok. you are using "clk_frac_div_round_rate" of
drivers/clk/tegra/clk-divider.c (DIV_ROUND_UP)

Great. Thanks for the clarification.


Cheers,
MyungJoo

> 
> Regards,
> 
> Tomeu
> 

                 reply	other threads:[~2015-03-18  7:43 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1195991181.289821426664636507.JavaMail.weblogic@epmlwas07d \
    --to=myungjoo.ham-sze3o3uu22jbdgjk7y7tuq@public.gmane.org \
    --cc=gnurou-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=kyungmin.park-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-pm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mikko.perttunen-/1wQRMveznE@public.gmane.org \
    --cc=swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org \
    --cc=thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=tomeu.vizoso-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.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