linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] cpufreq: qcom-hw: Register an Energy Model
@ 2019-02-05 17:52 Matthias Kaehlcke
  2019-02-05 17:52 ` [PATCH 2/2] cpufreq: mediatek: " Matthias Kaehlcke
  2019-02-06  4:52 ` [PATCH 1/2] cpufreq: qcom-hw: " Viresh Kumar
  0 siblings, 2 replies; 6+ messages in thread
From: Matthias Kaehlcke @ 2019-02-05 17:52 UTC (permalink / raw)
  To: Rafael J . Wysocki, Viresh Kumar, Matthias Brugger
  Cc: linux-pm, linux-kernel, linux-arm-kernel, linux-mediatek,
	Quentin Perret, Taniya Das, CK Hu, Eddie Huang, Nicolas Boichat,
	Douglas Anderson, Matthias Kaehlcke

Try and register an Energy Model from qcom-cpufreq-hw to allow
interested sub-systems like the task scheduler to use the provided
information.

Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
---
 drivers/cpufreq/qcom-cpufreq-hw.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/cpufreq/qcom-cpufreq-hw.c b/drivers/cpufreq/qcom-cpufreq-hw.c
index d83939a1b3d4c..a16b9dca7ea3b 100644
--- a/drivers/cpufreq/qcom-cpufreq-hw.c
+++ b/drivers/cpufreq/qcom-cpufreq-hw.c
@@ -205,6 +205,8 @@ static int qcom_cpufreq_hw_cpu_init(struct cpufreq_policy *policy)
 		goto error;
 	}
 
+	dev_pm_opp_of_register_em(policy->cpus);
+
 	policy->fast_switch_possible = true;
 
 	return 0;
-- 
2.20.1.611.gfbb209baf1-goog


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/2] cpufreq: mediatek: Register an Energy Model
  2019-02-05 17:52 [PATCH 1/2] cpufreq: qcom-hw: Register an Energy Model Matthias Kaehlcke
@ 2019-02-05 17:52 ` Matthias Kaehlcke
  2019-02-06 10:13   ` Quentin Perret
  2019-02-06  4:52 ` [PATCH 1/2] cpufreq: qcom-hw: " Viresh Kumar
  1 sibling, 1 reply; 6+ messages in thread
From: Matthias Kaehlcke @ 2019-02-05 17:52 UTC (permalink / raw)
  To: Rafael J . Wysocki, Viresh Kumar, Matthias Brugger
  Cc: linux-pm, linux-kernel, linux-arm-kernel, linux-mediatek,
	Quentin Perret, Taniya Das, CK Hu, Eddie Huang, Nicolas Boichat,
	Douglas Anderson, Matthias Kaehlcke

Try and register an Energy Model from mediatek-cpufreq to allow
interested subsystems like the task scheduler to use the provided
information.

Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
---
 drivers/cpufreq/mediatek-cpufreq.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/cpufreq/mediatek-cpufreq.c b/drivers/cpufreq/mediatek-cpufreq.c
index eb8920d398181..e6168ee582783 100644
--- a/drivers/cpufreq/mediatek-cpufreq.c
+++ b/drivers/cpufreq/mediatek-cpufreq.c
@@ -460,6 +460,8 @@ static int mtk_cpufreq_init(struct cpufreq_policy *policy)
 		return ret;
 	}
 
+	dev_pm_opp_of_register_em(policy->cpus);
+
 	cpumask_copy(policy->cpus, &info->cpus);
 	policy->freq_table = freq_table;
 	policy->driver_data = info;
-- 
2.20.1.611.gfbb209baf1-goog


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] cpufreq: qcom-hw: Register an Energy Model
  2019-02-05 17:52 [PATCH 1/2] cpufreq: qcom-hw: Register an Energy Model Matthias Kaehlcke
  2019-02-05 17:52 ` [PATCH 2/2] cpufreq: mediatek: " Matthias Kaehlcke
@ 2019-02-06  4:52 ` Viresh Kumar
  1 sibling, 0 replies; 6+ messages in thread
From: Viresh Kumar @ 2019-02-06  4:52 UTC (permalink / raw)
  To: Matthias Kaehlcke
  Cc: Rafael J . Wysocki, Matthias Brugger, linux-pm, linux-kernel,
	linux-arm-kernel, linux-mediatek, Quentin Perret, Taniya Das,
	CK Hu, Eddie Huang, Nicolas Boichat, Douglas Anderson

On 05-02-19, 09:52, Matthias Kaehlcke wrote:
> Try and register an Energy Model from qcom-cpufreq-hw to allow
> interested sub-systems like the task scheduler to use the provided
> information.
> 
> Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
> ---
>  drivers/cpufreq/qcom-cpufreq-hw.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/cpufreq/qcom-cpufreq-hw.c b/drivers/cpufreq/qcom-cpufreq-hw.c
> index d83939a1b3d4c..a16b9dca7ea3b 100644
> --- a/drivers/cpufreq/qcom-cpufreq-hw.c
> +++ b/drivers/cpufreq/qcom-cpufreq-hw.c
> @@ -205,6 +205,8 @@ static int qcom_cpufreq_hw_cpu_init(struct cpufreq_policy *policy)
>  		goto error;
>  	}
>  
> +	dev_pm_opp_of_register_em(policy->cpus);
> +
>  	policy->fast_switch_possible = true;
>  
>  	return 0;

Applied both. Thanks.

-- 
viresh

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/2] cpufreq: mediatek: Register an Energy Model
  2019-02-05 17:52 ` [PATCH 2/2] cpufreq: mediatek: " Matthias Kaehlcke
@ 2019-02-06 10:13   ` Quentin Perret
  2019-02-06 18:16     ` Matthias Kaehlcke
  0 siblings, 1 reply; 6+ messages in thread
From: Quentin Perret @ 2019-02-06 10:13 UTC (permalink / raw)
  To: Matthias Kaehlcke
  Cc: Rafael J . Wysocki, Viresh Kumar, Matthias Brugger, linux-pm,
	linux-kernel, linux-arm-kernel, linux-mediatek, Taniya Das,
	CK Hu, Eddie Huang, Nicolas Boichat, Douglas Anderson

Hi Matthias,

On Tuesday 05 Feb 2019 at 09:52:25 (-0800), Matthias Kaehlcke wrote:
> Try and register an Energy Model from mediatek-cpufreq to allow
> interested subsystems like the task scheduler to use the provided
> information.
> 
> Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
> ---
>  drivers/cpufreq/mediatek-cpufreq.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/cpufreq/mediatek-cpufreq.c b/drivers/cpufreq/mediatek-cpufreq.c
> index eb8920d398181..e6168ee582783 100644
> --- a/drivers/cpufreq/mediatek-cpufreq.c
> +++ b/drivers/cpufreq/mediatek-cpufreq.c
> @@ -460,6 +460,8 @@ static int mtk_cpufreq_init(struct cpufreq_policy *policy)
>  		return ret;
>  	}
>  
> +	dev_pm_opp_of_register_em(policy->cpus);

I'm not familiar with the mediatek-cpufreq driver so bear with me, but
the code sets policy->cpus just below here. Is there any particular
reason for not using that in PM_EM ?

>  	cpumask_copy(policy->cpus, &info->cpus);
>  	policy->freq_table = freq_table;
>  	policy->driver_data = info;
> -- 
> 2.20.1.611.gfbb209baf1-goog
> 

Thanks,
Quentin

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/2] cpufreq: mediatek: Register an Energy Model
  2019-02-06 10:13   ` Quentin Perret
@ 2019-02-06 18:16     ` Matthias Kaehlcke
  2019-02-07  4:08       ` Viresh Kumar
  0 siblings, 1 reply; 6+ messages in thread
From: Matthias Kaehlcke @ 2019-02-06 18:16 UTC (permalink / raw)
  To: Quentin Perret
  Cc: Rafael J . Wysocki, Viresh Kumar, Matthias Brugger, linux-pm,
	linux-kernel, linux-arm-kernel, linux-mediatek, Taniya Das,
	CK Hu, Eddie Huang, Nicolas Boichat, Douglas Anderson

Hi Quentin,

On Wed, Feb 06, 2019 at 10:13:18AM +0000, Quentin Perret wrote:
> Hi Matthias,
> 
> On Tuesday 05 Feb 2019 at 09:52:25 (-0800), Matthias Kaehlcke wrote:
> > Try and register an Energy Model from mediatek-cpufreq to allow
> > interested subsystems like the task scheduler to use the provided
> > information.
> > 
> > Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
> > ---
> >  drivers/cpufreq/mediatek-cpufreq.c | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/drivers/cpufreq/mediatek-cpufreq.c b/drivers/cpufreq/mediatek-cpufreq.c
> > index eb8920d398181..e6168ee582783 100644
> > --- a/drivers/cpufreq/mediatek-cpufreq.c
> > +++ b/drivers/cpufreq/mediatek-cpufreq.c
> > @@ -460,6 +460,8 @@ static int mtk_cpufreq_init(struct cpufreq_policy *policy)
> >  		return ret;
> >  	}
> >  
> > +	dev_pm_opp_of_register_em(policy->cpus);
> 
> I'm not familiar with the mediatek-cpufreq driver so bear with me, but
> the code sets policy->cpus just below here. Is there any particular
> reason for not using that in PM_EM ?

You are prefectly right, I missed the obvious and didn't get my hands
on hardware yet for testing.

So much for screwing up a one-liner ... I'll send a fix.

I thought Viresh already applied the patch, however in opp/linux-next
I currently only see the other one of this series for qcom-hw, so it
seems sending a new version rather than a fix-up patch is the way to
go.

Thanks for the review!

> >  	cpumask_copy(policy->cpus, &info->cpus);
> >  	policy->freq_table = freq_table;
> >  	policy->driver_data = info;
> 
> Thanks,
> Quentin

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/2] cpufreq: mediatek: Register an Energy Model
  2019-02-06 18:16     ` Matthias Kaehlcke
@ 2019-02-07  4:08       ` Viresh Kumar
  0 siblings, 0 replies; 6+ messages in thread
From: Viresh Kumar @ 2019-02-07  4:08 UTC (permalink / raw)
  To: Matthias Kaehlcke
  Cc: Quentin Perret, Rafael J . Wysocki, Matthias Brugger, linux-pm,
	linux-kernel, linux-arm-kernel, linux-mediatek, Taniya Das,
	CK Hu, Eddie Huang, Nicolas Boichat, Douglas Anderson

On 06-02-19, 10:16, Matthias Kaehlcke wrote:
> You are prefectly right, I missed the obvious and didn't get my hands
> on hardware yet for testing.
> 
> So much for screwing up a one-liner ... I'll send a fix.
> 
> I thought Viresh already applied the patch, however in opp/linux-next
> I currently only see the other one of this series for qcom-hw, so it
> seems sending a new version rather than a fix-up patch is the way to
> go.

Yeah, I dropped it after Quentin reported the issue.

-- 
viresh

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-02-07  4:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-05 17:52 [PATCH 1/2] cpufreq: qcom-hw: Register an Energy Model Matthias Kaehlcke
2019-02-05 17:52 ` [PATCH 2/2] cpufreq: mediatek: " Matthias Kaehlcke
2019-02-06 10:13   ` Quentin Perret
2019-02-06 18:16     ` Matthias Kaehlcke
2019-02-07  4:08       ` Viresh Kumar
2019-02-06  4:52 ` [PATCH 1/2] cpufreq: qcom-hw: " Viresh Kumar

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).