diff mbox series

[v2] cpufreq: qcom-hw: Set dvfs_possible_from_any_cpu cpufreq driver flag

Message ID 1628777955-7198-1-git-send-email-tdas@codeaurora.org
State New
Headers show
Series [v2] cpufreq: qcom-hw: Set dvfs_possible_from_any_cpu cpufreq driver flag | expand

Commit Message

Taniya Das Aug. 12, 2021, 2:19 p.m. UTC
As remote cpufreq updates are supported on QCOM platforms, set
dvfs_possible_from_any_cpu cpufreq driver flag.

Signed-off-by: Taniya Das <tdas@codeaurora.org>
---

[v2]
  * update the dvfs_possible_from_any_cpu always.

 drivers/cpufreq/qcom-cpufreq-hw.c | 2 ++
 1 file changed, 2 insertions(+)

--
Qualcomm INDIA, on behalf of Qualcomm Innovation Center, Inc.is a member
of the Code Aurora Forum, hosted by the  Linux Foundation.

Comments

Taniya Das Aug. 18, 2021, 10:03 a.m. UTC | #1
Hi Doug,

Thanks for your review.

On 8/13/2021 2:03 AM, Doug Anderson wrote:
> Hi,
> 
> On Thu, Aug 12, 2021 at 7:19 AM Taniya Das <tdas@codeaurora.org> wrote:
>>
>> As remote cpufreq updates are supported on QCOM platforms, set
>> dvfs_possible_from_any_cpu cpufreq driver flag.
>>
>> Signed-off-by: Taniya Das <tdas@codeaurora.org>
>> ---
>>
>> [v2]
>>    * update the dvfs_possible_from_any_cpu always.
>>
>>   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 f86859b..53d3898 100644
>> --- a/drivers/cpufreq/qcom-cpufreq-hw.c
>> +++ b/drivers/cpufreq/qcom-cpufreq-hw.c
>> @@ -223,6 +223,8 @@ static int qcom_cpufreq_hw_read_lut(struct device *cpu_dev,
>>
>>          table[i].frequency = CPUFREQ_TABLE_END;
>>          policy->freq_table = table;
>> +       policy->dvfs_possible_from_any_cpu = true;
>> +
> 
> Why is this in the qcom_cpufreq_hw_read_lut() function? Shouldn't it
> be straight in qcom_cpufreq_hw_cpu_init()?
> 
All CPU policy related data is updated here, thus wanted to keep it 
together.

> -Doug
>
Viresh Kumar Aug. 18, 2021, 10:26 a.m. UTC | #2
On 18-08-21, 15:33, Taniya Das wrote:
> Hi Doug,

> 

> Thanks for your review.

> 

> On 8/13/2021 2:03 AM, Doug Anderson wrote:

> > Hi,

> > 

> > On Thu, Aug 12, 2021 at 7:19 AM Taniya Das <tdas@codeaurora.org> wrote:

> > > 

> > > As remote cpufreq updates are supported on QCOM platforms, set

> > > dvfs_possible_from_any_cpu cpufreq driver flag.

> > > 

> > > Signed-off-by: Taniya Das <tdas@codeaurora.org>

> > > ---

> > > 

> > > [v2]

> > >    * update the dvfs_possible_from_any_cpu always.

> > > 

> > >   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 f86859b..53d3898 100644

> > > --- a/drivers/cpufreq/qcom-cpufreq-hw.c

> > > +++ b/drivers/cpufreq/qcom-cpufreq-hw.c

> > > @@ -223,6 +223,8 @@ static int qcom_cpufreq_hw_read_lut(struct device *cpu_dev,

> > > 

> > >          table[i].frequency = CPUFREQ_TABLE_END;

> > >          policy->freq_table = table;

> > > +       policy->dvfs_possible_from_any_cpu = true;

> > > +

> > 

> > Why is this in the qcom_cpufreq_hw_read_lut() function? Shouldn't it

> > be straight in qcom_cpufreq_hw_cpu_init()?

> > 

> All CPU policy related data is updated here, thus wanted to keep it

> together.


This function should only be updating freq table, please do it in
qcom_cpufreq_hw_cpu_init() itself, around where you set
policy->driver_data.

-- 
viresh
Taniya Das Aug. 23, 2021, 10:17 a.m. UTC | #3
Hi Viresh,

Thanks for the review.

On 8/18/2021 3:56 PM, Viresh Kumar wrote:
> On 18-08-21, 15:33, Taniya Das wrote:

>> Hi Doug,

>>

>> Thanks for your review.

>>

>> On 8/13/2021 2:03 AM, Doug Anderson wrote:

>>> Hi,

>>>

>>> On Thu, Aug 12, 2021 at 7:19 AM Taniya Das <tdas@codeaurora.org> wrote:

>>>>

>>>> As remote cpufreq updates are supported on QCOM platforms, set

>>>> dvfs_possible_from_any_cpu cpufreq driver flag.

>>>>

>>>> Signed-off-by: Taniya Das <tdas@codeaurora.org>

>>>> ---

>>>>

>>>> [v2]

>>>>     * update the dvfs_possible_from_any_cpu always.

>>>>

>>>>    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 f86859b..53d3898 100644

>>>> --- a/drivers/cpufreq/qcom-cpufreq-hw.c

>>>> +++ b/drivers/cpufreq/qcom-cpufreq-hw.c

>>>> @@ -223,6 +223,8 @@ static int qcom_cpufreq_hw_read_lut(struct device *cpu_dev,

>>>>

>>>>           table[i].frequency = CPUFREQ_TABLE_END;

>>>>           policy->freq_table = table;

>>>> +       policy->dvfs_possible_from_any_cpu = true;

>>>> +

>>>

>>> Why is this in the qcom_cpufreq_hw_read_lut() function? Shouldn't it

>>> be straight in qcom_cpufreq_hw_cpu_init()?

>>>

>> All CPU policy related data is updated here, thus wanted to keep it

>> together.

> 

> This function should only be updating freq table, please do it in

> qcom_cpufreq_hw_cpu_init() itself, around where you set

> policy->driver_data.

> 


Thanks Viresh, updated the same in the next patch.

-- 
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation.

--
diff mbox series

Patch

diff --git a/drivers/cpufreq/qcom-cpufreq-hw.c b/drivers/cpufreq/qcom-cpufreq-hw.c
index f86859b..53d3898 100644
--- a/drivers/cpufreq/qcom-cpufreq-hw.c
+++ b/drivers/cpufreq/qcom-cpufreq-hw.c
@@ -223,6 +223,8 @@  static int qcom_cpufreq_hw_read_lut(struct device *cpu_dev,

 	table[i].frequency = CPUFREQ_TABLE_END;
 	policy->freq_table = table;
+	policy->dvfs_possible_from_any_cpu = true;
+
 	dev_pm_opp_set_sharing_cpus(cpu_dev, policy->cpus);

 	return 0;