Skip to contentSkip to conversation

cpufreq: qcom-hw: Set dvfs_possible_from_any_cpu cpufreq driver flag

PATCH Superseded Taniya Das 4 participants 6 messages Aug 12, 2021 – Aug 23, 2021

Subsystems (2)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Taniya Das

author
#0 lore raw

PATCH v2 1/1 cpufreq: qcom-hw: Set dvfs_possible_from_any_cpu cpufreq driver flag

As remote cpufreq updates are supported on QCOM platforms, set dvfs_possible_from_any_cpu cpufreq driver flag.

---

[v2]
* update the dvfs_possible_from_any_cpu always.

 drivers/cpufreq/qcom-cpufreq-hw.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/cpufreq/qcom-cpufreq-hw.c +2 -0
index f86859b..53d3898 100644
@@ -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;

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

#2 lore raw
In reply to Taniya Das

Hi,

Quoted 18 lines · Taniya Das

As remote cpufreq updates are supported on QCOM platforms, set dvfs_possible_from_any_cpu cpufreq driver flag.

---

[v2]
* update the dvfs_possible_from_any_cpu always.

 drivers/cpufreq/qcom-cpufreq-hw.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/cpufreq/qcom-cpufreq-hw.c +0 -0
index f86859b..53d3898 100644

drivers/cpufreq/qcom-cpufreq-hw.c static int qcom_cpufreq_hw_read_lut(struct device *cpu_dev, · line 227

Quoted 5 lines
drivers/cpufreq/qcom-cpufreq-hw.c +2 -0
@@ -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()?

-Doug

author
#3 lore raw

Hi Doug,

Thanks for your review.

Quoted 22 lines · Doug Anderson

Hi,

Quoted 19 lines · Taniya Das

As remote cpufreq updates are supported on QCOM platforms, set dvfs_possible_from_any_cpu cpufreq driver flag.

---

[v2]
* update the dvfs_possible_from_any_cpu always.

  drivers/cpufreq/qcom-cpufreq-hw.c | 2 ++
  1 file changed, 2 insertions(+)
drivers/cpufreq/qcom-cpufreq-hw.c +0 -0
index f86859b..53d3898 100644
@@ -223,6 +223,8 @@ static int qcom_cpufreq_hw_read_lut(struct device *cpu_dev,
 
Quoted 8 lines

drivers/cpufreq/qcom-cpufreq-hw.c static int qcom_cpufreq_hw_read_lut(struct device *cpu_dev, · line 227

Quoted 4 lines
drivers/cpufreq/qcom-cpufreq-hw.c +2 -0
         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.

Quoted 2 lines

-Doug

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

--
maintainer
#4 lore raw
Quoted 35 lines · Taniya Das

Hi Doug,

Thanks for your review.

Quoted 22 lines · Doug Anderson

Hi,

Quoted 19 lines · Taniya Das

As remote cpufreq updates are supported on QCOM platforms, set dvfs_possible_from_any_cpu cpufreq driver flag.

---

[v2]
* update the dvfs_possible_from_any_cpu always.

  drivers/cpufreq/qcom-cpufreq-hw.c | 2 ++
  1 file changed, 2 insertions(+)
drivers/cpufreq/qcom-cpufreq-hw.c +0 -0
index f86859b..53d3898 100644
@@ -223,6 +223,8 @@ static int qcom_cpufreq_hw_read_lut(struct device *cpu_dev,
 
Quoted 8 lines

drivers/cpufreq/qcom-cpufreq-hw.c static int qcom_cpufreq_hw_read_lut(struct device *cpu_dev, · line 227

Quoted 4 lines
drivers/cpufreq/qcom-cpufreq-hw.c +2 -0
         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()?

Quoted 2 lines

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.

Signature · 1 line
viresh
author
#5 lore raw

Hi Viresh,

Thanks for the review.

Quoted 36 lines · Viresh Kumar
Quoted 35 lines · Taniya Das

Hi Doug,

Thanks for your review.

Quoted 30 lines · Doug Anderson

Hi,

Quoted 18 lines · Taniya Das

As remote cpufreq updates are supported on QCOM platforms, set dvfs_possible_from_any_cpu cpufreq driver flag.

---

[v2]
* update the dvfs_possible_from_any_cpu always.

   drivers/cpufreq/qcom-cpufreq-hw.c | 2 ++
   1 file changed, 2 insertions(+)
drivers/cpufreq/qcom-cpufreq-hw.c +0 -0
index f86859b..53d3898 100644

drivers/cpufreq/qcom-cpufreq-hw.c static int qcom_cpufreq_hw_read_lut(struct device *cpu_dev, · line 227

Quoted 5 lines
drivers/cpufreq/qcom-cpufreq-hw.c +2 -0
@@ -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()?

Quoted 7 lines
Quoted 2 lines

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.

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

--