Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'pm-6.2-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull power management fix from Rafael Wysocki:
"Fix the incorrect value returned by cpufreq driver's ->get() callback
for Qualcomm platforms (Douglas Anderson)"

* tag 'pm-6.2-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
cpufreq: qcom-hw: Fix cpufreq_driver->get() for non-LMH systems

+17 -15
+17 -15
drivers/cpufreq/qcom-cpufreq-hw.c
··· 143 143 return lval * xo_rate; 144 144 } 145 145 146 - /* Get the current frequency of the CPU (after throttling) */ 147 - static unsigned int qcom_cpufreq_hw_get(unsigned int cpu) 148 - { 149 - struct qcom_cpufreq_data *data; 150 - struct cpufreq_policy *policy; 151 - 152 - policy = cpufreq_cpu_get_raw(cpu); 153 - if (!policy) 154 - return 0; 155 - 156 - data = policy->driver_data; 157 - 158 - return qcom_lmh_get_throttle_freq(data) / HZ_PER_KHZ; 159 - } 160 - 161 146 /* Get the frequency requested by the cpufreq core for the CPU */ 162 147 static unsigned int qcom_cpufreq_get_freq(unsigned int cpu) 163 148 { ··· 162 177 index = min(index, LUT_MAX_ENTRIES - 1); 163 178 164 179 return policy->freq_table[index].frequency; 180 + } 181 + 182 + static unsigned int qcom_cpufreq_hw_get(unsigned int cpu) 183 + { 184 + struct qcom_cpufreq_data *data; 185 + struct cpufreq_policy *policy; 186 + 187 + policy = cpufreq_cpu_get_raw(cpu); 188 + if (!policy) 189 + return 0; 190 + 191 + data = policy->driver_data; 192 + 193 + if (data->throttle_irq >= 0) 194 + return qcom_lmh_get_throttle_freq(data) / HZ_PER_KHZ; 195 + 196 + return qcom_cpufreq_get_freq(cpu); 165 197 } 166 198 167 199 static unsigned int qcom_cpufreq_hw_fast_switch(struct cpufreq_policy *policy,