diff mbox series

[3/7] arm64: dts: qcom: sm8550: Fix up CPU idle states

Message ID 20230830-topic-8550_dmac2-v1-3-49bb25239fb1@linaro.org
State New
Headers show
Series 8550 dma coherent and more | expand

Commit Message

Konrad Dybcio Aug. 30, 2023, 12:48 p.m. UTC
The idle residency times are largely too low according to the vendor
kernel (maybe they came from an earlier release or something), especially
for the prime X2 core. Fix them.

Fixes: ffc50b2d3828 ("arm64: dts: qcom: Add base SM8550 dtsi")
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
 arch/arm64/boot/dts/qcom/sm8550.dtsi | 32 +++++++++++++++++++++-----------
 1 file changed, 21 insertions(+), 11 deletions(-)

Comments

Konrad Dybcio Aug. 30, 2023, 8:35 p.m. UTC | #1
On 30.08.2023 22:13, Dmitry Baryshkov wrote:
> On Wed, 30 Aug 2023 at 22:04, Konrad Dybcio <konrad.dybcio@linaro.org> wrote:
>>
>> The idle residency times are largely too low according to the vendor
>> kernel (maybe they came from an earlier release or something), especially
>> for the prime X2 core. Fix them.
>>
>> Fixes: ffc50b2d3828 ("arm64: dts: qcom: Add base SM8550 dtsi")
>> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
>> ---
>>  arch/arm64/boot/dts/qcom/sm8550.dtsi | 32 +++++++++++++++++++++-----------
>>  1 file changed, 21 insertions(+), 11 deletions(-)
>>
>> diff --git a/arch/arm64/boot/dts/qcom/sm8550.dtsi b/arch/arm64/boot/dts/qcom/sm8550.dtsi
>> index d115960bdeec..c21ba6afa752 100644
>> --- a/arch/arm64/boot/dts/qcom/sm8550.dtsi
>> +++ b/arch/arm64/boot/dts/qcom/sm8550.dtsi
>> @@ -283,9 +283,9 @@ LITTLE_CPU_SLEEP_0: cpu-sleep-0-0 {
>>                                 compatible = "arm,idle-state";
>>                                 idle-state-name = "silver-rail-power-collapse";
>>                                 arm,psci-suspend-param = <0x40000004>;
>> -                               entry-latency-us = <800>;
>> +                               entry-latency-us = <550>;
>>                                 exit-latency-us = <750>;
>> -                               min-residency-us = <4090>;
>> +                               min-residency-us = <6700>;
>>                                 local-timer-stop;
>>                         };
>>
>> @@ -294,8 +294,18 @@ BIG_CPU_SLEEP_0: cpu-sleep-1-0 {
>>                                 idle-state-name = "gold-rail-power-collapse";
>>                                 arm,psci-suspend-param = <0x40000004>;
>>                                 entry-latency-us = <600>;
>> -                               exit-latency-us = <1550>;
>> -                               min-residency-us = <4791>;
>> +                               exit-latency-us = <1300>;
>> +                               min-residency-us = <8136>;
>> +                               local-timer-stop;
>> +                       };
>> +
>> +                       PRIME_CPU_SLEEP_0: cpu-sleep-2-0 {
>> +                               compatible = "arm,idle-state";
>> +                               idle-state-name = "gold-plus-rail-power-collapse";
>> +                               arm,psci-suspend-param = <0x40000004>;
>> +                               entry-latency-us = <500>;
>> +                               exit-latency-us = <1350>;
>> +                               min-residency-us = <7480>;
>>                                 local-timer-stop;
> 
> This isn't only fixing the time properties, but also adds the whole
> new sleep state!
It does add a "new" sleep state with the exact same parameters,
the only thing being that it's exclusive to the prime core and
the only thing that differs is the residencies.

Konrad
Dmitry Baryshkov Aug. 30, 2023, 9:16 p.m. UTC | #2
On Wed, 30 Aug 2023 at 23:35, Konrad Dybcio <konrad.dybcio@linaro.org> wrote:
>
> On 30.08.2023 22:13, Dmitry Baryshkov wrote:
> > On Wed, 30 Aug 2023 at 22:04, Konrad Dybcio <konrad.dybcio@linaro.org> wrote:
> >>
> >> The idle residency times are largely too low according to the vendor
> >> kernel (maybe they came from an earlier release or something), especially
> >> for the prime X2 core. Fix them.
> >>
> >> Fixes: ffc50b2d3828 ("arm64: dts: qcom: Add base SM8550 dtsi")
> >> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
> >> ---
> >>  arch/arm64/boot/dts/qcom/sm8550.dtsi | 32 +++++++++++++++++++++-----------
> >>  1 file changed, 21 insertions(+), 11 deletions(-)
> >>
> >> diff --git a/arch/arm64/boot/dts/qcom/sm8550.dtsi b/arch/arm64/boot/dts/qcom/sm8550.dtsi
> >> index d115960bdeec..c21ba6afa752 100644
> >> --- a/arch/arm64/boot/dts/qcom/sm8550.dtsi
> >> +++ b/arch/arm64/boot/dts/qcom/sm8550.dtsi
> >> @@ -283,9 +283,9 @@ LITTLE_CPU_SLEEP_0: cpu-sleep-0-0 {
> >>                                 compatible = "arm,idle-state";
> >>                                 idle-state-name = "silver-rail-power-collapse";
> >>                                 arm,psci-suspend-param = <0x40000004>;
> >> -                               entry-latency-us = <800>;
> >> +                               entry-latency-us = <550>;
> >>                                 exit-latency-us = <750>;
> >> -                               min-residency-us = <4090>;
> >> +                               min-residency-us = <6700>;
> >>                                 local-timer-stop;
> >>                         };
> >>
> >> @@ -294,8 +294,18 @@ BIG_CPU_SLEEP_0: cpu-sleep-1-0 {
> >>                                 idle-state-name = "gold-rail-power-collapse";
> >>                                 arm,psci-suspend-param = <0x40000004>;
> >>                                 entry-latency-us = <600>;
> >> -                               exit-latency-us = <1550>;
> >> -                               min-residency-us = <4791>;
> >> +                               exit-latency-us = <1300>;
> >> +                               min-residency-us = <8136>;
> >> +                               local-timer-stop;
> >> +                       };
> >> +
> >> +                       PRIME_CPU_SLEEP_0: cpu-sleep-2-0 {
> >> +                               compatible = "arm,idle-state";
> >> +                               idle-state-name = "gold-plus-rail-power-collapse";
> >> +                               arm,psci-suspend-param = <0x40000004>;
> >> +                               entry-latency-us = <500>;
> >> +                               exit-latency-us = <1350>;
> >> +                               min-residency-us = <7480>;
> >>                                 local-timer-stop;
> >
> > This isn't only fixing the time properties, but also adds the whole
> > new sleep state!
> It does add a "new" sleep state with the exact same parameters,
> the only thing being that it's exclusive to the prime core and
> the only thing that differs is the residencies.

Then it should be stated in the commit message.

With that fixed,

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/qcom/sm8550.dtsi b/arch/arm64/boot/dts/qcom/sm8550.dtsi
index d115960bdeec..c21ba6afa752 100644
--- a/arch/arm64/boot/dts/qcom/sm8550.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8550.dtsi
@@ -283,9 +283,9 @@  LITTLE_CPU_SLEEP_0: cpu-sleep-0-0 {
 				compatible = "arm,idle-state";
 				idle-state-name = "silver-rail-power-collapse";
 				arm,psci-suspend-param = <0x40000004>;
-				entry-latency-us = <800>;
+				entry-latency-us = <550>;
 				exit-latency-us = <750>;
-				min-residency-us = <4090>;
+				min-residency-us = <6700>;
 				local-timer-stop;
 			};
 
@@ -294,8 +294,18 @@  BIG_CPU_SLEEP_0: cpu-sleep-1-0 {
 				idle-state-name = "gold-rail-power-collapse";
 				arm,psci-suspend-param = <0x40000004>;
 				entry-latency-us = <600>;
-				exit-latency-us = <1550>;
-				min-residency-us = <4791>;
+				exit-latency-us = <1300>;
+				min-residency-us = <8136>;
+				local-timer-stop;
+			};
+
+			PRIME_CPU_SLEEP_0: cpu-sleep-2-0 {
+				compatible = "arm,idle-state";
+				idle-state-name = "gold-plus-rail-power-collapse";
+				arm,psci-suspend-param = <0x40000004>;
+				entry-latency-us = <500>;
+				exit-latency-us = <1350>;
+				min-residency-us = <7480>;
 				local-timer-stop;
 			};
 		};
@@ -304,17 +314,17 @@  domain-idle-states {
 			CLUSTER_SLEEP_0: cluster-sleep-0 {
 				compatible = "domain-idle-state";
 				arm,psci-suspend-param = <0x41000044>;
-				entry-latency-us = <1050>;
-				exit-latency-us = <2500>;
-				min-residency-us = <5309>;
+				entry-latency-us = <750>;
+				exit-latency-us = <2350>;
+				min-residency-us = <9144>;
 			};
 
 			CLUSTER_SLEEP_1: cluster-sleep-1 {
 				compatible = "domain-idle-state";
 				arm,psci-suspend-param = <0x4100c344>;
-				entry-latency-us = <2700>;
-				exit-latency-us = <3500>;
-				min-residency-us = <13959>;
+				entry-latency-us = <2800>;
+				exit-latency-us = <4400>;
+				min-residency-us = <10150>;
 			};
 		};
 	};
@@ -398,7 +408,7 @@  CPU_PD6: power-domain-cpu6 {
 		CPU_PD7: power-domain-cpu7 {
 			#power-domain-cells = <0>;
 			power-domains = <&CLUSTER_PD>;
-			domain-idle-states = <&BIG_CPU_SLEEP_0>;
+			domain-idle-states = <&PRIME_CPU_SLEEP_0>;
 		};
 
 		CLUSTER_PD: power-domain-cluster {