arm64: dts: qcom: sc7180: Bring back cpufreq-based DDR votes

Message ID 20230711-topic-7180ddr-v1-1-56e4f13afe9b@linaro.org
State New
Headers
Series arm64: dts: qcom: sc7180: Bring back cpufreq-based DDR votes |

Commit Message

Konrad Dybcio July 11, 2023, 11 a.m. UTC
  ChromeOS folks reported that bwmon is too slow and getting rid of
statically defined CPUFREQ-based votes (effectively floor votes because of
how opp-peak-kBps is interpreted), has a major performance impact in some
common applications. Bring them back until MEMLAT support is introduced.

This is a partial revert of the commit referenced in the fixes tag.

Fixes: adc16b84e1ea ("arm64: dts: qcom: sc7180: Hook up BWMONs")
Reported-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
 arch/arm64/boot/dts/qcom/sc7180-lite.dtsi | 10 ++--
 arch/arm64/boot/dts/qcom/sc7180.dtsi      | 76 +++++++++++++++++--------------
 2 files changed, 47 insertions(+), 39 deletions(-)


---
base-commit: 8e4b7f2f3d6071665b1dfd70786229c8a5d6c256
change-id: 20230711-topic-7180ddr-b71fe328425e

Best regards,
  

Comments

Bjorn Andersson July 14, 2023, 5:34 a.m. UTC | #1
On Tue, 11 Jul 2023 13:00:53 +0200, Konrad Dybcio wrote:
> ChromeOS folks reported that bwmon is too slow and getting rid of
> statically defined CPUFREQ-based votes (effectively floor votes because of
> how opp-peak-kBps is interpreted), has a major performance impact in some
> common applications. Bring them back until MEMLAT support is introduced.
> 
> This is a partial revert of the commit referenced in the fixes tag.
> 
> [...]

Applied, thanks!

[1/1] arm64: dts: qcom: sc7180: Bring back cpufreq-based DDR votes
      commit: 5e6d88815c2f8ec5e30101de7de5f6de72576a61

Best regards,
  

Patch

diff --git a/arch/arm64/boot/dts/qcom/sc7180-lite.dtsi b/arch/arm64/boot/dts/qcom/sc7180-lite.dtsi
index 975d4422f27b..4b306a59d9be 100644
--- a/arch/arm64/boot/dts/qcom/sc7180-lite.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7180-lite.dtsi
@@ -6,21 +6,21 @@ 
  */
 
 &cpu6_opp10 {
-	opp-peak-kBps = <22425600>;
+	opp-peak-kBps = <7216000 22425600>;
 };
 
 &cpu6_opp11 {
-	opp-peak-kBps = <22425600>;
+	opp-peak-kBps = <7216000 22425600>;
 };
 
 &cpu6_opp12 {
-	opp-peak-kBps = <23347200>;
+	opp-peak-kBps = <8532000 23347200>;
 };
 
 &cpu6_opp13 {
-	opp-peak-kBps = <23347200>;
+	opp-peak-kBps = <8532000 23347200>;
 };
 
 &cpu6_opp14 {
-	opp-peak-kBps = <23347200>;
+	opp-peak-kBps = <8532000 23347200>;
 };
diff --git a/arch/arm64/boot/dts/qcom/sc7180.dtsi b/arch/arm64/boot/dts/qcom/sc7180.dtsi
index 179544ba12db..9af94e267f84 100644
--- a/arch/arm64/boot/dts/qcom/sc7180.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7180.dtsi
@@ -85,7 +85,8 @@  &LITTLE_CPU_SLEEP_1
 			capacity-dmips-mhz = <415>;
 			dynamic-power-coefficient = <137>;
 			operating-points-v2 = <&cpu0_opp_table>;
-			interconnects = <&osm_l3 MASTER_OSM_L3_APPS &osm_l3 SLAVE_OSM_L3>;
+			interconnects = <&gem_noc MASTER_APPSS_PROC 3 &mc_virt SLAVE_EBI1 3>,
+					<&osm_l3 MASTER_OSM_L3_APPS &osm_l3 SLAVE_OSM_L3>;
 			next-level-cache = <&L2_0>;
 			#cooling-cells = <2>;
 			qcom,freq-domain = <&cpufreq_hw 0>;
@@ -115,7 +116,8 @@  &LITTLE_CPU_SLEEP_1
 			dynamic-power-coefficient = <137>;
 			next-level-cache = <&L2_100>;
 			operating-points-v2 = <&cpu0_opp_table>;
-			interconnects = <&osm_l3 MASTER_OSM_L3_APPS &osm_l3 SLAVE_OSM_L3>;
+			interconnects = <&gem_noc MASTER_APPSS_PROC 3 &mc_virt SLAVE_EBI1 3>,
+					<&osm_l3 MASTER_OSM_L3_APPS &osm_l3 SLAVE_OSM_L3>;
 			#cooling-cells = <2>;
 			qcom,freq-domain = <&cpufreq_hw 0>;
 			L2_100: l2-cache {
@@ -139,7 +141,8 @@  &LITTLE_CPU_SLEEP_1
 			dynamic-power-coefficient = <137>;
 			next-level-cache = <&L2_200>;
 			operating-points-v2 = <&cpu0_opp_table>;
-			interconnects = <&osm_l3 MASTER_OSM_L3_APPS &osm_l3 SLAVE_OSM_L3>;
+			interconnects = <&gem_noc MASTER_APPSS_PROC 3 &mc_virt SLAVE_EBI1 3>,
+					<&osm_l3 MASTER_OSM_L3_APPS &osm_l3 SLAVE_OSM_L3>;
 			#cooling-cells = <2>;
 			qcom,freq-domain = <&cpufreq_hw 0>;
 			L2_200: l2-cache {
@@ -163,7 +166,8 @@  &LITTLE_CPU_SLEEP_1
 			dynamic-power-coefficient = <137>;
 			next-level-cache = <&L2_300>;
 			operating-points-v2 = <&cpu0_opp_table>;
-			interconnects = <&osm_l3 MASTER_OSM_L3_APPS &osm_l3 SLAVE_OSM_L3>;
+			interconnects = <&gem_noc MASTER_APPSS_PROC 3 &mc_virt SLAVE_EBI1 3>,
+					<&osm_l3 MASTER_OSM_L3_APPS &osm_l3 SLAVE_OSM_L3>;
 			#cooling-cells = <2>;
 			qcom,freq-domain = <&cpufreq_hw 0>;
 			L2_300: l2-cache {
@@ -187,7 +191,8 @@  &LITTLE_CPU_SLEEP_1
 			dynamic-power-coefficient = <137>;
 			next-level-cache = <&L2_400>;
 			operating-points-v2 = <&cpu0_opp_table>;
-			interconnects = <&osm_l3 MASTER_OSM_L3_APPS &osm_l3 SLAVE_OSM_L3>;
+			interconnects = <&gem_noc MASTER_APPSS_PROC 3 &mc_virt SLAVE_EBI1 3>,
+					<&osm_l3 MASTER_OSM_L3_APPS &osm_l3 SLAVE_OSM_L3>;
 			#cooling-cells = <2>;
 			qcom,freq-domain = <&cpufreq_hw 0>;
 			L2_400: l2-cache {
@@ -211,7 +216,8 @@  &LITTLE_CPU_SLEEP_1
 			dynamic-power-coefficient = <137>;
 			next-level-cache = <&L2_500>;
 			operating-points-v2 = <&cpu0_opp_table>;
-			interconnects = <&osm_l3 MASTER_OSM_L3_APPS &osm_l3 SLAVE_OSM_L3>;
+			interconnects = <&gem_noc MASTER_APPSS_PROC 3 &mc_virt SLAVE_EBI1 3>,
+					<&osm_l3 MASTER_OSM_L3_APPS &osm_l3 SLAVE_OSM_L3>;
 			#cooling-cells = <2>;
 			qcom,freq-domain = <&cpufreq_hw 0>;
 			L2_500: l2-cache {
@@ -235,7 +241,8 @@  &BIG_CPU_SLEEP_1
 			dynamic-power-coefficient = <480>;
 			next-level-cache = <&L2_600>;
 			operating-points-v2 = <&cpu6_opp_table>;
-			interconnects = <&osm_l3 MASTER_OSM_L3_APPS &osm_l3 SLAVE_OSM_L3>;
+			interconnects = <&gem_noc MASTER_APPSS_PROC 3 &mc_virt SLAVE_EBI1 3>,
+					<&osm_l3 MASTER_OSM_L3_APPS &osm_l3 SLAVE_OSM_L3>;
 			#cooling-cells = <2>;
 			qcom,freq-domain = <&cpufreq_hw 1>;
 			L2_600: l2-cache {
@@ -259,7 +266,8 @@  &BIG_CPU_SLEEP_1
 			dynamic-power-coefficient = <480>;
 			next-level-cache = <&L2_700>;
 			operating-points-v2 = <&cpu6_opp_table>;
-			interconnects = <&osm_l3 MASTER_OSM_L3_APPS &osm_l3 SLAVE_OSM_L3>;
+			interconnects = <&gem_noc MASTER_APPSS_PROC 3 &mc_virt SLAVE_EBI1 3>,
+					<&osm_l3 MASTER_OSM_L3_APPS &osm_l3 SLAVE_OSM_L3>;
 			#cooling-cells = <2>;
 			qcom,freq-domain = <&cpufreq_hw 1>;
 			L2_700: l2-cache {
@@ -379,52 +387,52 @@  cpu0_opp_table: opp-table-cpu0 {
 
 		cpu0_opp1: opp-300000000 {
 			opp-hz = /bits/ 64 <300000000>;
-			opp-peak-kBps = <4800000>;
+			opp-peak-kBps = <1200000 4800000>;
 		};
 
 		cpu0_opp2: opp-576000000 {
 			opp-hz = /bits/ 64 <576000000>;
-			opp-peak-kBps = <4800000>;
+			opp-peak-kBps = <1200000 4800000>;
 		};
 
 		cpu0_opp3: opp-768000000 {
 			opp-hz = /bits/ 64 <768000000>;
-			opp-peak-kBps = <4800000>;
+			opp-peak-kBps = <1200000 4800000>;
 		};
 
 		cpu0_opp4: opp-1017600000 {
 			opp-hz = /bits/ 64 <1017600000>;
-			opp-peak-kBps = <8908800>;
+			opp-peak-kBps = <1804000 8908800>;
 		};
 
 		cpu0_opp5: opp-1248000000 {
 			opp-hz = /bits/ 64 <1248000000>;
-			opp-peak-kBps = <12902400>;
+			opp-peak-kBps = <2188000 12902400>;
 		};
 
 		cpu0_opp6: opp-1324800000 {
 			opp-hz = /bits/ 64 <1324800000>;
-			opp-peak-kBps = <12902400>;
+			opp-peak-kBps = <2188000 12902400>;
 		};
 
 		cpu0_opp7: opp-1516800000 {
 			opp-hz = /bits/ 64 <1516800000>;
-			opp-peak-kBps = <15052800>;
+			opp-peak-kBps = <3072000 15052800>;
 		};
 
 		cpu0_opp8: opp-1612800000 {
 			opp-hz = /bits/ 64 <1612800000>;
-			opp-peak-kBps = <15052800>;
+			opp-peak-kBps = <3072000 15052800>;
 		};
 
 		cpu0_opp9: opp-1708800000 {
 			opp-hz = /bits/ 64 <1708800000>;
-			opp-peak-kBps = <15052800>;
+			opp-peak-kBps = <3072000 15052800>;
 		};
 
 		cpu0_opp10: opp-1804800000 {
 			opp-hz = /bits/ 64 <1804800000>;
-			opp-peak-kBps = <22425600>;
+			opp-peak-kBps = <4068000 22425600>;
 		};
 	};
 
@@ -434,82 +442,82 @@  cpu6_opp_table: opp-table-cpu6 {
 
 		cpu6_opp1: opp-300000000 {
 			opp-hz = /bits/ 64 <300000000>;
-			opp-peak-kBps = <8908800>;
+			opp-peak-kBps = <2188000 8908800>;
 		};
 
 		cpu6_opp2: opp-652800000 {
 			opp-hz = /bits/ 64 <652800000>;
-			opp-peak-kBps = <8908800>;
+			opp-peak-kBps = <2188000 8908800>;
 		};
 
 		cpu6_opp3: opp-825600000 {
 			opp-hz = /bits/ 64 <825600000>;
-			opp-peak-kBps = <8908800>;
+			opp-peak-kBps = <2188000 8908800>;
 		};
 
 		cpu6_opp4: opp-979200000 {
 			opp-hz = /bits/ 64 <979200000>;
-			opp-peak-kBps = <8908800>;
+			opp-peak-kBps = <2188000 8908800>;
 		};
 
 		cpu6_opp5: opp-1113600000 {
 			opp-hz = /bits/ 64 <1113600000>;
-			opp-peak-kBps = <8908800>;
+			opp-peak-kBps = <2188000 8908800>;
 		};
 
 		cpu6_opp6: opp-1267200000 {
 			opp-hz = /bits/ 64 <1267200000>;
-			opp-peak-kBps = <12902400>;
+			opp-peak-kBps = <4068000 12902400>;
 		};
 
 		cpu6_opp7: opp-1555200000 {
 			opp-hz = /bits/ 64 <1555200000>;
-			opp-peak-kBps = <15052800>;
+			opp-peak-kBps = <4068000 15052800>;
 		};
 
 		cpu6_opp8: opp-1708800000 {
 			opp-hz = /bits/ 64 <1708800000>;
-			opp-peak-kBps = <19353600>;
+			opp-peak-kBps = <6220000 19353600>;
 		};
 
 		cpu6_opp9: opp-1843200000 {
 			opp-hz = /bits/ 64 <1843200000>;
-			opp-peak-kBps = <19353600>;
+			opp-peak-kBps = <6220000 19353600>;
 		};
 
 		cpu6_opp10: opp-1900800000 {
 			opp-hz = /bits/ 64 <1900800000>;
-			opp-peak-kBps = <22425600>;
+			opp-peak-kBps = <6220000 22425600>;
 		};
 
 		cpu6_opp11: opp-1996800000 {
 			opp-hz = /bits/ 64 <1996800000>;
-			opp-peak-kBps = <22425600>;
+			opp-peak-kBps = <6220000 22425600>;
 		};
 
 		cpu6_opp12: opp-2112000000 {
 			opp-hz = /bits/ 64 <2112000000>;
-			opp-peak-kBps = <22425600>;
+			opp-peak-kBps = <6220000 22425600>;
 		};
 
 		cpu6_opp13: opp-2208000000 {
 			opp-hz = /bits/ 64 <2208000000>;
-			opp-peak-kBps = <22425600>;
+			opp-peak-kBps = <7216000 22425600>;
 		};
 
 		cpu6_opp14: opp-2323200000 {
 			opp-hz = /bits/ 64 <2323200000>;
-			opp-peak-kBps = <22425600>;
+			opp-peak-kBps = <7216000 22425600>;
 		};
 
 		cpu6_opp15: opp-2400000000 {
 			opp-hz = /bits/ 64 <2400000000>;
-			opp-peak-kBps = <23347200>;
+			opp-peak-kBps = <8532000 23347200>;
 		};
 
 		cpu6_opp16: opp-2553600000 {
 			opp-hz = /bits/ 64 <2553600000>;
-			opp-peak-kBps = <23347200>;
+			opp-peak-kBps = <8532000 23347200>;
 		};
 	};