* [PATCH] cpufreq: tegra: update comment for clarity
@ 2014-06-06 4:38 Viresh Kumar
2014-06-06 23:49 ` Doug Anderson
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Viresh Kumar @ 2014-06-06 4:38 UTC (permalink / raw)
To: rjw
Cc: linaro-kernel, linux-pm, linux-kernel, arvind.chauhan, swarren,
dianders, Viresh Kumar
Tegra's driver got updated a bit (00917dd cpufreq: Tegra: implement intermediate
frequency callbacks) and implements new 'intermediate freq' infrastructure of
core. Above commit updated comments about when to call
clk_prepare_enable(pll_x_clk) and Doug wasn't satisfied with those comments and
said this:
> The "Though when target-freq is intermediate freq, we don't need to
> take this reference." makes me think that this function is actually
> called when target-freq is intermediate freq. I don't think it is,
> right?
For better clarity just make that comment more explicit about when we call
tegra_target_intermediate(). Wasn't sure if we actually need a commit for this,
but anyway lets other decide if its worth enough :)
Reported-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/tegra-cpufreq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/cpufreq/tegra-cpufreq.c b/drivers/cpufreq/tegra-cpufreq.c
index a5fbc0a..48bc89b 100644
--- a/drivers/cpufreq/tegra-cpufreq.c
+++ b/drivers/cpufreq/tegra-cpufreq.c
@@ -73,7 +73,7 @@ static int tegra_target_intermediate(struct cpufreq_policy *policy,
* off when we move the cpu off of it as enabling it again while we
* switch to it from tegra_target() would take additional time. Though
* when target-freq is intermediate freq, we don't need to take this
- * reference.
+ * reference and so this routine isn't called at all.
*/
clk_prepare_enable(pll_x_clk);
--
2.0.0.rc2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] cpufreq: tegra: update comment for clarity
2014-06-06 4:38 [PATCH] cpufreq: tegra: update comment for clarity Viresh Kumar
@ 2014-06-06 23:49 ` Doug Anderson
2014-06-09 18:38 ` Stephen Warren
2014-06-10 4:57 ` [PATCH Resend] " Viresh Kumar
2 siblings, 0 replies; 5+ messages in thread
From: Doug Anderson @ 2014-06-06 23:49 UTC (permalink / raw)
To: Viresh Kumar
Cc: Rafael J. Wysocki, Lists linaro-kernel, linux-pm@vger.kernel.org,
linux-kernel@vger.kernel.org, Arvind Chauhan, Stephen Warren
Viresh,
On Thu, Jun 5, 2014 at 9:38 PM, Viresh Kumar <viresh.kumar@linaro.org> wrote:
> Tegra's driver got updated a bit (00917dd cpufreq: Tegra: implement intermediate
> frequency callbacks) and implements new 'intermediate freq' infrastructure of
> core. Above commit updated comments about when to call
> clk_prepare_enable(pll_x_clk) and Doug wasn't satisfied with those comments and
> said this:
>
>> The "Though when target-freq is intermediate freq, we don't need to
>> take this reference." makes me think that this function is actually
>> called when target-freq is intermediate freq. I don't think it is,
>> right?
>
> For better clarity just make that comment more explicit about when we call
> tegra_target_intermediate(). Wasn't sure if we actually need a commit for this,
> but anyway lets other decide if its worth enough :)
>
> Reported-by: Doug Anderson <dianders@chromium.org>
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> ---
> drivers/cpufreq/tegra-cpufreq.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/cpufreq/tegra-cpufreq.c b/drivers/cpufreq/tegra-cpufreq.c
> index a5fbc0a..48bc89b 100644
> --- a/drivers/cpufreq/tegra-cpufreq.c
> +++ b/drivers/cpufreq/tegra-cpufreq.c
> @@ -73,7 +73,7 @@ static int tegra_target_intermediate(struct cpufreq_policy *policy,
> * off when we move the cpu off of it as enabling it again while we
> * switch to it from tegra_target() would take additional time. Though
> * when target-freq is intermediate freq, we don't need to take this
> - * reference.
> + * reference and so this routine isn't called at all.
I'm OK either way, so up to others.
Reviewed-by: Doug Anderson <dianders@chromium.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] cpufreq: tegra: update comment for clarity
2014-06-06 4:38 [PATCH] cpufreq: tegra: update comment for clarity Viresh Kumar
2014-06-06 23:49 ` Doug Anderson
@ 2014-06-09 18:38 ` Stephen Warren
2014-06-10 4:57 ` [PATCH Resend] " Viresh Kumar
2 siblings, 0 replies; 5+ messages in thread
From: Stephen Warren @ 2014-06-09 18:38 UTC (permalink / raw)
To: Viresh Kumar, rjw
Cc: linaro-kernel, linux-pm, linux-kernel, arvind.chauhan, swarren,
dianders
On 06/05/2014 10:38 PM, Viresh Kumar wrote:
> Tegra's driver got updated a bit (00917dd cpufreq: Tegra: implement intermediate
> frequency callbacks) and implements new 'intermediate freq' infrastructure of
> core. Above commit updated comments about when to call
> clk_prepare_enable(pll_x_clk) and Doug wasn't satisfied with those comments and
> said this:
>
>> The "Though when target-freq is intermediate freq, we don't need to
>> take this reference." makes me think that this function is actually
>> called when target-freq is intermediate freq. I don't think it is,
>> right?
>
> For better clarity just make that comment more explicit about when we call
> tegra_target_intermediate(). Wasn't sure if we actually need a commit for this,
> but anyway lets other decide if its worth enough :)
> diff --git a/drivers/cpufreq/tegra-cpufreq.c b/drivers/cpufreq/tegra-cpufreq.c
> index a5fbc0a..48bc89b 100644
> --- a/drivers/cpufreq/tegra-cpufreq.c
> +++ b/drivers/cpufreq/tegra-cpufreq.c
> @@ -73,7 +73,7 @@ static int tegra_target_intermediate(struct cpufreq_policy *policy,
> * off when we move the cpu off of it as enabling it again while we
> * switch to it from tegra_target() would take additional time. Though
> * when target-freq is intermediate freq, we don't need to take this
> - * reference.
> + * reference and so this routine isn't called at all.
> */
> clk_prepare_enable(pll_x_clk);
I would remove the word "so" in the added line; the function is not
called because we don't need to use an intermediate frequency, not
because we don't need to take a reference to pll_x. With that change,
Reviewed-by: Stephen Warren <swarren@nvidia.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH Resend] cpufreq: tegra: update comment for clarity
2014-06-06 4:38 [PATCH] cpufreq: tegra: update comment for clarity Viresh Kumar
2014-06-06 23:49 ` Doug Anderson
2014-06-09 18:38 ` Stephen Warren
@ 2014-06-10 4:57 ` Viresh Kumar
2014-06-10 21:15 ` Rafael J. Wysocki
2 siblings, 1 reply; 5+ messages in thread
From: Viresh Kumar @ 2014-06-10 4:57 UTC (permalink / raw)
To: rjw
Cc: linaro-kernel, linux-pm, linux-kernel, arvind.chauhan, swarren,
dianders, Viresh Kumar
Tegra's driver got updated a bit (00917dd cpufreq: Tegra: implement intermediate
frequency callbacks) and implements new 'intermediate freq' infrastructure of
core. Above commit updated comments about when to call
clk_prepare_enable(pll_x_clk) and Doug wasn't satisfied with those comments and
said this:
> The "Though when target-freq is intermediate freq, we don't need to
> take this reference." makes me think that this function is actually
> called when target-freq is intermediate freq. I don't think it is,
> right?
For better clarity just make that comment more explicit about when we call
tegra_target_intermediate().
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Reported-and-reviewed-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
Resend: Improved comment as suggested by Stephen.
drivers/cpufreq/tegra-cpufreq.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/cpufreq/tegra-cpufreq.c b/drivers/cpufreq/tegra-cpufreq.c
index a5fbc0a..8084c7f 100644
--- a/drivers/cpufreq/tegra-cpufreq.c
+++ b/drivers/cpufreq/tegra-cpufreq.c
@@ -71,9 +71,12 @@ static int tegra_target_intermediate(struct cpufreq_policy *policy,
/*
* Take an extra reference to the main pll so it doesn't turn
* off when we move the cpu off of it as enabling it again while we
- * switch to it from tegra_target() would take additional time. Though
- * when target-freq is intermediate freq, we don't need to take this
- * reference.
+ * switch to it from tegra_target() would take additional time.
+ *
+ * When target-freq is equal to intermediate freq we don't need to
+ * switch to an intermediate freq and so this routine isn't called.
+ * Also, we wouldn't be using pll_x anymore and must not take extra
+ * reference to it, as it can be disabled now to save some power.
*/
clk_prepare_enable(pll_x_clk);
--
2.0.0.rc2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH Resend] cpufreq: tegra: update comment for clarity
2014-06-10 4:57 ` [PATCH Resend] " Viresh Kumar
@ 2014-06-10 21:15 ` Rafael J. Wysocki
0 siblings, 0 replies; 5+ messages in thread
From: Rafael J. Wysocki @ 2014-06-10 21:15 UTC (permalink / raw)
To: Viresh Kumar
Cc: linaro-kernel, linux-pm, linux-kernel, arvind.chauhan, swarren,
dianders
On Tuesday, June 10, 2014 10:27:12 AM Viresh Kumar wrote:
> Tegra's driver got updated a bit (00917dd cpufreq: Tegra: implement intermediate
> frequency callbacks) and implements new 'intermediate freq' infrastructure of
> core. Above commit updated comments about when to call
> clk_prepare_enable(pll_x_clk) and Doug wasn't satisfied with those comments and
> said this:
>
> > The "Though when target-freq is intermediate freq, we don't need to
> > take this reference." makes me think that this function is actually
> > called when target-freq is intermediate freq. I don't think it is,
> > right?
>
> For better clarity just make that comment more explicit about when we call
> tegra_target_intermediate().
>
> Reviewed-by: Stephen Warren <swarren@nvidia.com>
> Reported-and-reviewed-by: Doug Anderson <dianders@chromium.org>
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> ---
> Resend: Improved comment as suggested by Stephen.
Applied to bleeding-edge, thanks!
--
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-06-10 20:57 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-06 4:38 [PATCH] cpufreq: tegra: update comment for clarity Viresh Kumar
2014-06-06 23:49 ` Doug Anderson
2014-06-09 18:38 ` Stephen Warren
2014-06-10 4:57 ` [PATCH Resend] " Viresh Kumar
2014-06-10 21:15 ` Rafael J. Wysocki
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).