]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.10-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 8 May 2023 09:06:36 +0000 (11:06 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 8 May 2023 09:06:36 +0000 (11:06 +0200)
added patches:
arm64-dts-qcom-sdm845-correct-dynamic-power-coefficients.patch
sound-oss-dmasound-fix-dmasound_setup-defined-but-not-used.patch

queue-5.10/arm64-dts-qcom-sdm845-correct-dynamic-power-coefficients.patch [new file with mode: 0644]
queue-5.10/series
queue-5.10/sound-oss-dmasound-fix-dmasound_setup-defined-but-not-used.patch [new file with mode: 0644]

diff --git a/queue-5.10/arm64-dts-qcom-sdm845-correct-dynamic-power-coefficients.patch b/queue-5.10/arm64-dts-qcom-sdm845-correct-dynamic-power-coefficients.patch
new file mode 100644 (file)
index 0000000..80687d0
--- /dev/null
@@ -0,0 +1,86 @@
+From 44750f153699b6e4f851a399287e5c8df208d696 Mon Sep 17 00:00:00 2001
+From: Vincent Guittot <vincent.guittot@linaro.org>
+Date: Fri, 6 Jan 2023 17:46:18 +0100
+Subject: arm64: dts: qcom: sdm845: correct dynamic power coefficients
+
+From: Vincent Guittot <vincent.guittot@linaro.org>
+
+commit 44750f153699b6e4f851a399287e5c8df208d696 upstream.
+
+While stressing EAS on my dragonboard RB3, I have noticed that LITTLE cores
+where never selected as the most energy efficient CPU whatever the
+utilization level of waking task.
+
+energy model framework uses its cost field to estimate the energy with
+the formula:
+
+  nrg = cost of the selected OPP * utilization / CPU's max capacity
+
+which ends up selecting the CPU with lowest cost / max capacity ration
+as long as the utilization fits in the OPP's capacity.
+
+If we compare the cost of a little OPP with similar capacity of a big OPP
+like :
+       OPP(kHz)   OPP capacity    cost     max capacity   cost/max capacity
+LITTLE 1766400    407             351114   407            863
+big    1056000    408             520267   1024           508
+
+This can be interpreted as the LITTLE core consumes 70% more than big core
+for the same compute capacity.
+
+According to [1], LITTLE consumes 10% less than big core for Coremark
+benchmark at those OPPs. If we consider that everything else stays
+unchanged, the dynamic-power-coefficient of LITTLE core should be
+only 53% of the current value: 290 * 53% = 154
+
+Set the dynamic-power-coefficient of CPU0-3 to 154 to fix the energy model.
+
+[1] https://github.com/kdrag0n/freqbench/tree/master/results/sdm845/main
+
+Fixes: 0e0a8e35d725 ("arm64: dts: qcom: sdm845: correct dynamic power coefficients")
+Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
+Signed-off-by: Bjorn Andersson <andersson@kernel.org>
+Link: https://lore.kernel.org/r/20230106164618.1845281-1-vincent.guittot@linaro.org
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/arm64/boot/dts/qcom/sdm845.dtsi |    8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+--- a/arch/arm64/boot/dts/qcom/sdm845.dtsi
++++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi
+@@ -197,7 +197,7 @@
+                                          &LITTLE_CPU_SLEEP_1
+                                          &CLUSTER_SLEEP_0>;
+                       capacity-dmips-mhz = <611>;
+-                      dynamic-power-coefficient = <290>;
++                      dynamic-power-coefficient = <154>;
+                       qcom,freq-domain = <&cpufreq_hw 0>;
+                       operating-points-v2 = <&cpu0_opp_table>;
+                       interconnects = <&gladiator_noc MASTER_APPSS_PROC 3 &mem_noc SLAVE_EBI1 3>,
+@@ -222,7 +222,7 @@
+                                          &LITTLE_CPU_SLEEP_1
+                                          &CLUSTER_SLEEP_0>;
+                       capacity-dmips-mhz = <611>;
+-                      dynamic-power-coefficient = <290>;
++                      dynamic-power-coefficient = <154>;
+                       qcom,freq-domain = <&cpufreq_hw 0>;
+                       operating-points-v2 = <&cpu0_opp_table>;
+                       interconnects = <&gladiator_noc MASTER_APPSS_PROC 3 &mem_noc SLAVE_EBI1 3>,
+@@ -244,7 +244,7 @@
+                                          &LITTLE_CPU_SLEEP_1
+                                          &CLUSTER_SLEEP_0>;
+                       capacity-dmips-mhz = <611>;
+-                      dynamic-power-coefficient = <290>;
++                      dynamic-power-coefficient = <154>;
+                       qcom,freq-domain = <&cpufreq_hw 0>;
+                       operating-points-v2 = <&cpu0_opp_table>;
+                       interconnects = <&gladiator_noc MASTER_APPSS_PROC 3 &mem_noc SLAVE_EBI1 3>,
+@@ -266,7 +266,7 @@
+                                          &LITTLE_CPU_SLEEP_1
+                                          &CLUSTER_SLEEP_0>;
+                       capacity-dmips-mhz = <611>;
+-                      dynamic-power-coefficient = <290>;
++                      dynamic-power-coefficient = <154>;
+                       qcom,freq-domain = <&cpufreq_hw 0>;
+                       operating-points-v2 = <&cpu0_opp_table>;
+                       interconnects = <&gladiator_noc MASTER_APPSS_PROC 3 &mem_noc SLAVE_EBI1 3>,
index b372e28cbf14b2b4af5cc773595a1bd444f5f412..49f09188d93af136c9802a27ec29df40a8dfc128 100644 (file)
@@ -290,3 +290,5 @@ perf-intel-pt-fix-cyc-timestamps-after-standalone-cbr.patch
 arm64-always-load-shadow-stack-pointer-directly-from-the-task-struct.patch
 arm64-stash-shadow-stack-pointer-in-the-task-struct-on-interrupt.patch
 debugobject-ensure-pool-refill-again.patch
+sound-oss-dmasound-fix-dmasound_setup-defined-but-not-used.patch
+arm64-dts-qcom-sdm845-correct-dynamic-power-coefficients.patch
diff --git a/queue-5.10/sound-oss-dmasound-fix-dmasound_setup-defined-but-not-used.patch b/queue-5.10/sound-oss-dmasound-fix-dmasound_setup-defined-but-not-used.patch
new file mode 100644 (file)
index 0000000..c04ce3f
--- /dev/null
@@ -0,0 +1,38 @@
+From 357ad4d898286b94aaae0cb7e3f573459e5b98b9 Mon Sep 17 00:00:00 2001
+From: Miles Chen <miles.chen@mediatek.com>
+Date: Thu, 14 Apr 2022 17:19:38 +0800
+Subject: sound/oss/dmasound: fix 'dmasound_setup' defined but not used
+
+From: Miles Chen <miles.chen@mediatek.com>
+
+commit 357ad4d898286b94aaae0cb7e3f573459e5b98b9 upstream.
+
+We observed: 'dmasound_setup' defined but not used error with
+COMPILER=gcc ARCH=m68k DEFCONFIG=allmodconfig build.
+
+Fix it by adding __maybe_unused to dmasound_setup.
+
+Error(s):
+sound/oss/dmasound/dmasound_core.c:1431:12: error: 'dmasound_setup' defined but not used [-Werror=unused-function]
+
+Fixes: 9dd7c46346ca ("sound/oss/dmasound: fix build when drivers are mixed =y/=m")
+Signed-off-by: Miles Chen <miles.chen@mediatek.com>
+Acked-by: Randy Dunlap <rdunlap@infradead.org>
+Link: https://lore.kernel.org/r/20220414091940.2216-1-miles.chen@mediatek.com
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ sound/oss/dmasound/dmasound_core.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/sound/oss/dmasound/dmasound_core.c
++++ b/sound/oss/dmasound/dmasound_core.c
+@@ -1442,7 +1442,7 @@ void dmasound_deinit(void)
+               unregister_sound_dsp(sq_unit);
+ }
+-static int dmasound_setup(char *str)
++static int __maybe_unused dmasound_setup(char *str)
+ {
+       int ints[6], size;