Re: [PATCH 3/3] thermal: cpu_cooling: Migrate to using the EM framework

2019-04-10 Thread Quentin Perret
On Wednesday 10 Apr 2019 at 15:44:23 (+0530), Viresh Kumar wrote: > On 10-04-19, 09:57, Quentin Perret wrote: > > Hmm, indeed... I thought cpufreq_table_validate_and_sort() was actively > > sorting the table but it seems I was wrong. > > > > But I _think_ in practice the freq table actually happen

Re: [PATCH 3/3] thermal: cpu_cooling: Migrate to using the EM framework

2019-04-10 Thread Viresh Kumar
On 10-04-19, 09:57, Quentin Perret wrote: > Hmm, indeed... I thought cpufreq_table_validate_and_sort() was actively > sorting the table but it seems I was wrong. > > But I _think_ in practice the freq table actually happens to be sorted > for the upstream cpufreq drivers with the CPUFREQ_IS_COOLIN

Re: [PATCH 3/3] thermal: cpu_cooling: Migrate to using the EM framework

2019-04-10 Thread Quentin Perret
On Wednesday 10 Apr 2019 at 11:14:49 (+0530), Viresh Kumar wrote: > On 28-03-19, 10:13, Quentin Perret wrote: > > +static unsigned int get_state_freq(struct cpufreq_cooling_device > > *cpufreq_cdev, > > + unsigned long state) > > +{ > > + struct cpufreq_policy *policy; >

Re: [PATCH 3/3] thermal: cpu_cooling: Migrate to using the EM framework

2019-04-09 Thread Viresh Kumar
On 28-03-19, 10:13, Quentin Perret wrote: > +static unsigned int get_state_freq(struct cpufreq_cooling_device > *cpufreq_cdev, > + unsigned long state) > +{ > + struct cpufreq_policy *policy; > + unsigned long idx; > + > + /* Use the Energy Model table if avai

Re: [PATCH 3/3] thermal: cpu_cooling: Migrate to using the EM framework

2019-03-29 Thread Daniel Lezcano
On 29/03/2019 10:16, Quentin Perret wrote: > Hi Daniel, > > On Thursday 28 Mar 2019 at 21:23:35 (+0100), Daniel Lezcano wrote: >>> /** >>> * struct time_in_idle - Idle time stats >>> * @time: previous reading of the absolute time that this cpu was idle >>> @@ -82,7 +70,7 @@ struct time_in_idl

Re: [PATCH 3/3] thermal: cpu_cooling: Migrate to using the EM framework

2019-03-29 Thread Quentin Perret
Hi Daniel, On Thursday 28 Mar 2019 at 21:23:35 (+0100), Daniel Lezcano wrote: > > /** > > * struct time_in_idle - Idle time stats > > * @time: previous reading of the absolute time that this cpu was idle > > @@ -82,7 +70,7 @@ struct time_in_idle { > > * frequency. > > * @max_level: maximu

Re: [PATCH 3/3] thermal: cpu_cooling: Migrate to using the EM framework

2019-03-28 Thread Daniel Lezcano
On 28/03/2019 11:13, Quentin Perret wrote: > The newly introduced Energy Model framework manages power cost tables in > a generic way. Moreover, it supports a several types of models since the > tables can come from DT or firmware (through SCMI) for example. On the > other hand, the cpu_cooling sub

[PATCH 3/3] thermal: cpu_cooling: Migrate to using the EM framework

2019-03-28 Thread Quentin Perret
The newly introduced Energy Model framework manages power cost tables in a generic way. Moreover, it supports a several types of models since the tables can come from DT or firmware (through SCMI) for example. On the other hand, the cpu_cooling subsystem manages its own power cost tables using only