Skip to content

Commit 640324e

Browse files
committed
Merge branch 'pm-cpufreq'
Merge cpufreq updates for 6.4-rc1: - Fix the frequency unit in cpufreq_verify_current_freq checks() (Sanjay Chandrashekara). - Make mode_state_machine in amd-pstate static (Tom Rix). - Make the cpufreq core require drivers with target_index() to set freq_table (Viresh Kumar). - Fix typo in the ARM_BRCMSTB_AVS_CPUFREQ Kconfig entry (Jingyu Wang). - Use of_property_read_bool() for boolean properties in the pmac32 cpufreq driver (Rob Herring). - Make the cpufreq sysfs interface return proper error codes on obviously invalid input (qinyu). - Add guided autonomous mode support to the AMD P-state driver (Wyes Karny). - Make the Intel P-state driver enable HWP IO boost on all server platforms (Srinivas Pandruvada). - Add opp and bandwidth support to tegra194 cpufreq driver (Sumit Gupta). - Use of_property_present() for testing DT property presence (Rob Herring). - Remove MODULE_LICENSE in non-modules (Nick Alcock). - Add SM7225 to cpufreq-dt-platdev blocklist (Luca Weiss). - Optimizations and fixes for qcom-cpufreq-hw driver (Krzysztof Kozlowski, Konrad Dybcio, and Bjorn Andersson). - DT binding updates for qcom-cpufreq-hw driver (Konrad Dybcio and Bartosz Golaszewski). - Updates and fixes for mediatek driver (Jia-Wei Chang and AngeloGioacchino Del Regno). * pm-cpufreq: (29 commits) cpufreq: use correct unit when verify cur freq cpufreq: tegra194: add OPP support and set bandwidth cpufreq: amd-pstate: Make varaiable mode_state_machine static cpufreq: drivers with target_index() must set freq_table cpufreq: qcom-cpufreq-hw: Revert adding cpufreq qos dt-bindings: cpufreq: cpufreq-qcom-hw: Add QCM2290 dt-bindings: cpufreq: cpufreq-qcom-hw: Sanitize data per compatible dt-bindings: cpufreq: cpufreq-qcom-hw: Allow just 1 frequency domain cpufreq: Add SM7225 to cpufreq-dt-platdev blocklist cpufreq: qcom-cpufreq-hw: fix double IO unmap and resource release on exit cpufreq: mediatek: Raise proc and sram max voltage for MT7622/7623 cpufreq: mediatek: raise proc/sram max voltage for MT8516 cpufreq: mediatek: fix KP caused by handler usage after regulator_put/clk_put cpufreq: mediatek: fix passing zero to 'PTR_ERR' cpufreq: pmac32: Use of_property_read_bool() for boolean properties cpufreq: Fix typo in the ARM_BRCMSTB_AVS_CPUFREQ Kconfig entry cpufreq: warn about invalid vals to scaling_max/min_freq interfaces Documentation: cpufreq: amd-pstate: Update amd_pstate status sysfs for guided cpufreq: amd-pstate: Add guided mode control support via sysfs cpufreq: amd-pstate: Add guided autonomous mode ...
2 parents 8271f38 + 0bdd95c commit 640324e

22 files changed

Lines changed: 652 additions & 207 deletions

Documentation/admin-guide/kernel-parameters.txt

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,29 @@
339339
This mode requires kvm-amd.avic=1.
340340
(Default when IOMMU HW support is present.)
341341

342+
amd_pstate= [X86]
343+
disable
344+
Do not enable amd_pstate as the default
345+
scaling driver for the supported processors
346+
passive
347+
Use amd_pstate with passive mode as a scaling driver.
348+
In this mode autonomous selection is disabled.
349+
Driver requests a desired performance level and platform
350+
tries to match the same performance level if it is
351+
satisfied by guaranteed performance level.
352+
active
353+
Use amd_pstate_epp driver instance as the scaling driver,
354+
driver provides a hint to the hardware if software wants
355+
to bias toward performance (0x0) or energy efficiency (0xff)
356+
to the CPPC firmware. then CPPC power algorithm will
357+
calculate the runtime workload and adjust the realtime cores
358+
frequency.
359+
guided
360+
Activate guided autonomous mode. Driver requests minimum and
361+
maximum performance level and the platform autonomously
362+
selects a performance level in this range and appropriate
363+
to the current workload.
364+
342365
amijoy.map= [HW,JOY] Amiga joystick support
343366
Map of devices attached to JOY0DAT and JOY1DAT
344367
Format: <a>,<b>
@@ -7059,20 +7082,3 @@
70597082
xmon commands.
70607083
off xmon is disabled.
70617084

7062-
amd_pstate= [X86]
7063-
disable
7064-
Do not enable amd_pstate as the default
7065-
scaling driver for the supported processors
7066-
passive
7067-
Use amd_pstate as a scaling driver, driver requests a
7068-
desired performance on this abstract scale and the power
7069-
management firmware translates the requests into actual
7070-
hardware states (core frequency, data fabric and memory
7071-
clocks etc.)
7072-
active
7073-
Use amd_pstate_epp driver instance as the scaling driver,
7074-
driver provides a hint to the hardware if software wants
7075-
to bias toward performance (0x0) or energy efficiency (0xff)
7076-
to the CPPC firmware. then CPPC power algorithm will
7077-
calculate the runtime workload and adjust the realtime cores
7078-
frequency.

Documentation/admin-guide/pm/amd-pstate.rst

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -303,13 +303,18 @@ efficiency frequency management method on AMD processors.
303303
AMD Pstate Driver Operation Modes
304304
=================================
305305

306-
``amd_pstate`` CPPC has two operation modes: CPPC Autonomous(active) mode and
307-
CPPC non-autonomous(passive) mode.
308-
active mode and passive mode can be chosen by different kernel parameters.
309-
When in Autonomous mode, CPPC ignores requests done in the Desired Performance
310-
Target register and takes into account only the values set to the Minimum requested
311-
performance, Maximum requested performance, and Energy Performance Preference
312-
registers. When Autonomous is disabled, it only considers the Desired Performance Target.
306+
``amd_pstate`` CPPC has 3 operation modes: autonomous (active) mode,
307+
non-autonomous (passive) mode and guided autonomous (guided) mode.
308+
Active/passive/guided mode can be chosen by different kernel parameters.
309+
310+
- In autonomous mode, platform ignores the desired performance level request
311+
and takes into account only the values set to the minimum, maximum and energy
312+
performance preference registers.
313+
- In non-autonomous mode, platform gets desired performance level
314+
from OS directly through Desired Performance Register.
315+
- In guided-autonomous mode, platform sets operating performance level
316+
autonomously according to the current workload and within the limits set by
317+
OS through min and max performance registers.
313318

314319
Active Mode
315320
------------
@@ -338,6 +343,15 @@ to the Performance Reduction Tolerance register. Above the nominal performance l
338343
processor must provide at least nominal performance requested and go higher if current
339344
operating conditions allow.
340345

346+
Guided Mode
347+
-----------
348+
349+
``amd_pstate=guided``
350+
351+
If ``amd_pstate=guided`` is passed to kernel command line option then this mode
352+
is activated. In this mode, driver requests minimum and maximum performance
353+
level and the platform autonomously selects a performance level in this range
354+
and appropriate to the current workload.
341355

342356
User Space Interface in ``sysfs`` - General
343357
===========================================
@@ -358,6 +372,9 @@ control its functionality at the system level. They are located in the
358372
"passive"
359373
The driver is functional and in the ``passive mode``
360374

375+
"guided"
376+
The driver is functional and in the ``guided mode``
377+
361378
"disable"
362379
The driver is unregistered and not functional now.
363380

Documentation/devicetree/bindings/cpufreq/cpufreq-qcom-hw.yaml

Lines changed: 116 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,20 @@ properties:
2020
oneOf:
2121
- description: v1 of CPUFREQ HW
2222
items:
23+
- enum:
24+
- qcom,qcm2290-cpufreq-hw
25+
- qcom,sc7180-cpufreq-hw
26+
- qcom,sdm845-cpufreq-hw
27+
- qcom,sm6115-cpufreq-hw
28+
- qcom,sm6350-cpufreq-hw
29+
- qcom,sm8150-cpufreq-hw
2330
- const: qcom,cpufreq-hw
2431

2532
- description: v2 of CPUFREQ HW (EPSS)
2633
items:
2734
- enum:
2835
- qcom,qdu1000-cpufreq-epss
36+
- qcom,sa8775p-cpufreq-epss
2937
- qcom,sc7280-cpufreq-epss
3038
- qcom,sc8280xp-cpufreq-epss
3139
- qcom,sm6375-cpufreq-epss
@@ -36,14 +44,14 @@ properties:
3644
- const: qcom,cpufreq-epss
3745

3846
reg:
39-
minItems: 2
47+
minItems: 1
4048
items:
4149
- description: Frequency domain 0 register region
4250
- description: Frequency domain 1 register region
4351
- description: Frequency domain 2 register region
4452

4553
reg-names:
46-
minItems: 2
54+
minItems: 1
4755
items:
4856
- const: freq-domain0
4957
- const: freq-domain1
@@ -85,6 +93,111 @@ required:
8593

8694
additionalProperties: false
8795

96+
allOf:
97+
- if:
98+
properties:
99+
compatible:
100+
contains:
101+
enum:
102+
- qcom,qcm2290-cpufreq-hw
103+
then:
104+
properties:
105+
reg:
106+
minItems: 1
107+
maxItems: 1
108+
109+
reg-names:
110+
minItems: 1
111+
maxItems: 1
112+
113+
interrupts:
114+
minItems: 1
115+
maxItems: 1
116+
117+
interrupt-names:
118+
minItems: 1
119+
120+
- if:
121+
properties:
122+
compatible:
123+
contains:
124+
enum:
125+
- qcom,qdu1000-cpufreq-epss
126+
- qcom,sc7180-cpufreq-hw
127+
- qcom,sc8280xp-cpufreq-epss
128+
- qcom,sdm845-cpufreq-hw
129+
- qcom,sm6115-cpufreq-hw
130+
- qcom,sm6350-cpufreq-hw
131+
- qcom,sm6375-cpufreq-epss
132+
then:
133+
properties:
134+
reg:
135+
minItems: 2
136+
maxItems: 2
137+
138+
reg-names:
139+
minItems: 2
140+
maxItems: 2
141+
142+
interrupts:
143+
minItems: 2
144+
maxItems: 2
145+
146+
interrupt-names:
147+
minItems: 2
148+
149+
- if:
150+
properties:
151+
compatible:
152+
contains:
153+
enum:
154+
- qcom,sc7280-cpufreq-epss
155+
- qcom,sm8250-cpufreq-epss
156+
- qcom,sm8350-cpufreq-epss
157+
- qcom,sm8450-cpufreq-epss
158+
- qcom,sm8550-cpufreq-epss
159+
then:
160+
properties:
161+
reg:
162+
minItems: 3
163+
maxItems: 3
164+
165+
reg-names:
166+
minItems: 3
167+
maxItems: 3
168+
169+
interrupts:
170+
minItems: 3
171+
maxItems: 3
172+
173+
interrupt-names:
174+
minItems: 3
175+
176+
- if:
177+
properties:
178+
compatible:
179+
contains:
180+
enum:
181+
- qcom,sm8150-cpufreq-hw
182+
then:
183+
properties:
184+
reg:
185+
minItems: 3
186+
maxItems: 3
187+
188+
reg-names:
189+
minItems: 3
190+
maxItems: 3
191+
192+
# On some SoCs the Prime core shares the LMH irq with Big cores
193+
interrupts:
194+
minItems: 2
195+
maxItems: 2
196+
197+
interrupt-names:
198+
minItems: 2
199+
200+
88201
examples:
89202
- |
90203
#include <dt-bindings/clock/qcom,gcc-sdm845.h>
@@ -235,7 +348,7 @@ examples:
235348
#size-cells = <1>;
236349
237350
cpufreq@17d43000 {
238-
compatible = "qcom,cpufreq-hw";
351+
compatible = "qcom,sdm845-cpufreq-hw", "qcom,cpufreq-hw";
239352
reg = <0x17d43000 0x1400>, <0x17d45800 0x1400>;
240353
reg-names = "freq-domain0", "freq-domain1";
241354

0 commit comments

Comments
 (0)