arm64: dts: qcom: sdm845: correct dynamic power coefficients
authorDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Tue, 15 Mar 2022 14:11:04 +0000 (17:11 +0300)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Tue, 12 Apr 2022 14:21:16 +0000 (09:21 -0500)
Following sm8150/sm8250 update sdm845 capacity-dmips-mhz and
dynamic-power-coefficient based on the measurements [1], [2].

The energy model dynamic-power-coefficient values were calculated with
    DPC = µW / MHz / V^2
for each OPP, and averaged across all OPPs within each cluster for the
final coefficient. Voltages were obtained from the qcom-cpufreq-hw
driver that reads voltages from the OSM LUT programmed into the SoC.

Normalized DMIPS/MHz capacity scale values for each CPU were calculated
from CoreMarks/MHz (CoreMark iterations per second per MHz), which
serves the same purpose. For each CPU, the final capacity-dmips-mhz
value is the C/MHz value of its maximum frequency normalized to
SCHED_CAPACITY_SCALE (1024) for the fastest CPU in the system.

For more details on measurement process see the commit message for the
commit 6aabed5526ee ("arm64: dts: qcom: sm8250: Add CPU capacities and
energy model").

[1] https://github.com/kdrag0n/freqbench
[2] https://github.com/kdrag0n/freqbench/tree/master/results/sdm845/main

Cc: Danny Lin <danny@kdrag0n.dev>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220315141104.730235-1-dmitry.baryshkov@linaro.org
arch/arm64/boot/dts/qcom/sdm845.dtsi

index 85dfa0842003b989bc0c129db8bfc495068e4936..a49376d8ecbf3ba30c736ef574a3693e1ae28d63 100644 (file)
                        cpu-idle-states = <&LITTLE_CPU_SLEEP_0
                                           &LITTLE_CPU_SLEEP_1
                                           &CLUSTER_SLEEP_0>;
-                       capacity-dmips-mhz = <607>;
-                       dynamic-power-coefficient = <100>;
+                       capacity-dmips-mhz = <611>;
+                       dynamic-power-coefficient = <290>;
                        qcom,freq-domain = <&cpufreq_hw 0>;
                        operating-points-v2 = <&cpu0_opp_table>;
                        interconnects = <&gladiator_noc MASTER_APPSS_PROC 3 &mem_noc SLAVE_EBI1 3>,
                        cpu-idle-states = <&LITTLE_CPU_SLEEP_0
                                           &LITTLE_CPU_SLEEP_1
                                           &CLUSTER_SLEEP_0>;
-                       capacity-dmips-mhz = <607>;
-                       dynamic-power-coefficient = <100>;
+                       capacity-dmips-mhz = <611>;
+                       dynamic-power-coefficient = <290>;
                        qcom,freq-domain = <&cpufreq_hw 0>;
                        operating-points-v2 = <&cpu0_opp_table>;
                        interconnects = <&gladiator_noc MASTER_APPSS_PROC 3 &mem_noc SLAVE_EBI1 3>,
                        cpu-idle-states = <&LITTLE_CPU_SLEEP_0
                                           &LITTLE_CPU_SLEEP_1
                                           &CLUSTER_SLEEP_0>;
-                       capacity-dmips-mhz = <607>;
-                       dynamic-power-coefficient = <100>;
+                       capacity-dmips-mhz = <611>;
+                       dynamic-power-coefficient = <290>;
                        qcom,freq-domain = <&cpufreq_hw 0>;
                        operating-points-v2 = <&cpu0_opp_table>;
                        interconnects = <&gladiator_noc MASTER_APPSS_PROC 3 &mem_noc SLAVE_EBI1 3>,
                        cpu-idle-states = <&LITTLE_CPU_SLEEP_0
                                           &LITTLE_CPU_SLEEP_1
                                           &CLUSTER_SLEEP_0>;
-                       capacity-dmips-mhz = <607>;
-                       dynamic-power-coefficient = <100>;
+                       capacity-dmips-mhz = <611>;
+                       dynamic-power-coefficient = <290>;
                        qcom,freq-domain = <&cpufreq_hw 0>;
                        operating-points-v2 = <&cpu0_opp_table>;
                        interconnects = <&gladiator_noc MASTER_APPSS_PROC 3 &mem_noc SLAVE_EBI1 3>,
                        cpu-idle-states = <&BIG_CPU_SLEEP_0
                                           &BIG_CPU_SLEEP_1
                                           &CLUSTER_SLEEP_0>;
-                       dynamic-power-coefficient = <396>;
+                       dynamic-power-coefficient = <442>;
                        qcom,freq-domain = <&cpufreq_hw 1>;
                        operating-points-v2 = <&cpu4_opp_table>;
                        interconnects = <&gladiator_noc MASTER_APPSS_PROC 3 &mem_noc SLAVE_EBI1 3>,
                        cpu-idle-states = <&BIG_CPU_SLEEP_0
                                           &BIG_CPU_SLEEP_1
                                           &CLUSTER_SLEEP_0>;
-                       dynamic-power-coefficient = <396>;
+                       dynamic-power-coefficient = <442>;
                        qcom,freq-domain = <&cpufreq_hw 1>;
                        operating-points-v2 = <&cpu4_opp_table>;
                        interconnects = <&gladiator_noc MASTER_APPSS_PROC 3 &mem_noc SLAVE_EBI1 3>,
                        cpu-idle-states = <&BIG_CPU_SLEEP_0
                                           &BIG_CPU_SLEEP_1
                                           &CLUSTER_SLEEP_0>;
-                       dynamic-power-coefficient = <396>;
+                       dynamic-power-coefficient = <442>;
                        qcom,freq-domain = <&cpufreq_hw 1>;
                        operating-points-v2 = <&cpu4_opp_table>;
                        interconnects = <&gladiator_noc MASTER_APPSS_PROC 3 &mem_noc SLAVE_EBI1 3>,
                        cpu-idle-states = <&BIG_CPU_SLEEP_0
                                           &BIG_CPU_SLEEP_1
                                           &CLUSTER_SLEEP_0>;
-                       dynamic-power-coefficient = <396>;
+                       dynamic-power-coefficient = <442>;
                        qcom,freq-domain = <&cpufreq_hw 1>;
                        operating-points-v2 = <&cpu4_opp_table>;
                        interconnects = <&gladiator_noc MASTER_APPSS_PROC 3 &mem_noc SLAVE_EBI1 3>,