All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/9] arm64: dts: qcom: msm8916/39: Reserve firmware memory dynamically
@ 2023-09-11 17:41 Stephan Gerhold
  2023-09-11 17:41 ` [PATCH 1/9] arm64: dts: qcom: msm8916: Disable venus by default Stephan Gerhold
                   ` (9 more replies)
  0 siblings, 10 replies; 29+ messages in thread
From: Stephan Gerhold @ 2023-09-11 17:41 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Andy Gross, Konrad Dybcio, linux-arm-msm, devicetree,
	linux-kernel, Bryan O'Donoghue, Stephan Gerhold

Refactor the MSM8916 and MSM8939 device trees to make use of dynamic 
memory reservations for the firmware regions, rather than hardcoding 
fixed addresses for each device. This allows to keep most of the 
definitions in the SoC.dtsi while defining the board-specific 
properties (such as firmware size) separately for each device.

The main motivation for this patch set is to simplify enabling the 
modem on the various MSM8916/39 devices. The modem firmware size 
differs on almost each device, which requires redefining *all* of
the firmware reservations with newly calculated addresses to make
room for the larger modem firmware. I've explained this in detail
in a previous RFC:
https://lore.kernel.org/linux-arm-msm/20230510-dt-resv-bottom-up-v1-4-3bf68873dbed@gerhold.net/

Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
---
Stephan Gerhold (9):
      arm64: dts: qcom: msm8916: Disable venus by default
      arm64: dts: qcom: msm8916/39: Disable GPU by default
      arm64: dts: qcom: msm8916-ufi: Drop gps_mem for now
      arm64: dts: qcom: msm8916: Reserve firmware memory dynamically
      arm64: dts: qcom: msm8916: Reserve MBA memory dynamically
      arm64: dts: qcom: msm8939: Reserve firmware memory dynamically
      arm64: dts: qcom: msm8916/39: Disable unneeded firmware reservations
      arm64: dts: qcom: msm8916/39: Move mpss_mem size to boards
      arm64: dts: qcom: msm8916/39: Fix venus memory size

 arch/arm64/boot/dts/qcom/apq8016-sbc.dts           | 25 ++++++++++++++
 arch/arm64/boot/dts/qcom/apq8039-t2.dts            |  8 +++++
 arch/arm64/boot/dts/qcom/msm8916-acer-a1-724.dts   | 12 +++++++
 .../boot/dts/qcom/msm8916-alcatel-idol347.dts      | 12 +++++++
 arch/arm64/boot/dts/qcom/msm8916-asus-z00l.dts     | 12 +++++++
 arch/arm64/boot/dts/qcom/msm8916-gplus-fl8005a.dts | 12 +++++++
 arch/arm64/boot/dts/qcom/msm8916-huawei-g7.dts     | 12 +++++++
 .../boot/dts/qcom/msm8916-longcheer-l8150.dts      | 21 ++++++++++--
 .../boot/dts/qcom/msm8916-longcheer-l8910.dts      | 12 +++++++
 .../dts/qcom/msm8916-samsung-a2015-common.dtsi     | 12 +++++++
 .../boot/dts/qcom/msm8916-samsung-a3u-eur.dts      |  4 +++
 .../boot/dts/qcom/msm8916-samsung-a5u-eur.dts      |  4 +++
 .../dts/qcom/msm8916-samsung-e2015-common.dtsi     |  4 +++
 .../boot/dts/qcom/msm8916-samsung-gt5-common.dtsi  | 12 +++++++
 .../boot/dts/qcom/msm8916-samsung-j5-common.dtsi   | 12 +++++++
 .../boot/dts/qcom/msm8916-samsung-serranove.dts    | 12 +++++++
 arch/arm64/boot/dts/qcom/msm8916-ufi.dtsi          | 33 +++++++++++-------
 .../boot/dts/qcom/msm8916-wingtech-wt88047.dts     | 12 +++++++
 arch/arm64/boot/dts/qcom/msm8916.dtsi              | 39 +++++++++++++++++-----
 arch/arm64/boot/dts/qcom/msm8939-samsung-a7.dts    |  4 +++
 .../dts/qcom/msm8939-sony-xperia-kanuti-tulip.dts  |  8 +++++
 arch/arm64/boot/dts/qcom/msm8939.dtsi              | 37 +++++++++++++++-----
 22 files changed, 288 insertions(+), 31 deletions(-)
---
base-commit: 0bb80ecc33a8fb5a682236443c1e740d5c917d1d
change-id: 20230720-msm8916-rmem-f88fff6bcded

Best regards,
-- 
Stephan Gerhold <stephan@gerhold.net>


^ permalink raw reply	[flat|nested] 29+ messages in thread

* [PATCH 1/9] arm64: dts: qcom: msm8916: Disable venus by default
  2023-09-11 17:41 [PATCH 0/9] arm64: dts: qcom: msm8916/39: Reserve firmware memory dynamically Stephan Gerhold
@ 2023-09-11 17:41 ` Stephan Gerhold
  2023-09-12  6:34   ` Bryan O'Donoghue
  2023-09-11 17:41 ` [PATCH 2/9] arm64: dts: qcom: msm8916/39: Disable GPU " Stephan Gerhold
                   ` (8 subsequent siblings)
  9 siblings, 1 reply; 29+ messages in thread
From: Stephan Gerhold @ 2023-09-11 17:41 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Andy Gross, Konrad Dybcio, linux-arm-msm, devicetree,
	linux-kernel, Bryan O'Donoghue, Stephan Gerhold

Venus needs firmware that is usually signed with a device-specific key.
There are also devices that might not need it (especially during
bring-up), so let's follow more recent SoCs and disable it by default.

Enable it explicitly for all current devices except msm8916-mtp. That
one has just UART enabled currently so it cannot really benefit from
Venus.

Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
---
 arch/arm64/boot/dts/qcom/apq8016-sbc.dts                   | 4 ++++
 arch/arm64/boot/dts/qcom/msm8916-acer-a1-724.dts           | 4 ++++
 arch/arm64/boot/dts/qcom/msm8916-alcatel-idol347.dts       | 4 ++++
 arch/arm64/boot/dts/qcom/msm8916-asus-z00l.dts             | 4 ++++
 arch/arm64/boot/dts/qcom/msm8916-gplus-fl8005a.dts         | 4 ++++
 arch/arm64/boot/dts/qcom/msm8916-huawei-g7.dts             | 4 ++++
 arch/arm64/boot/dts/qcom/msm8916-longcheer-l8150.dts       | 4 ++++
 arch/arm64/boot/dts/qcom/msm8916-longcheer-l8910.dts       | 4 ++++
 arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi | 4 ++++
 arch/arm64/boot/dts/qcom/msm8916-samsung-gt5-common.dtsi   | 4 ++++
 arch/arm64/boot/dts/qcom/msm8916-samsung-j5-common.dtsi    | 4 ++++
 arch/arm64/boot/dts/qcom/msm8916-samsung-serranove.dts     | 4 ++++
 arch/arm64/boot/dts/qcom/msm8916-ufi.dtsi                  | 4 ++++
 arch/arm64/boot/dts/qcom/msm8916-wingtech-wt88047.dts      | 4 ++++
 arch/arm64/boot/dts/qcom/msm8916.dtsi                      | 2 +-
 15 files changed, 57 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/apq8016-sbc.dts b/arch/arm64/boot/dts/qcom/apq8016-sbc.dts
index 4f5541e9be0e..c13230217c3c 100644
--- a/arch/arm64/boot/dts/qcom/apq8016-sbc.dts
+++ b/arch/arm64/boot/dts/qcom/apq8016-sbc.dts
@@ -364,6 +364,10 @@ &usb_hs_phy {
 	extcon = <&usb_id>;
 };
 
+&venus {
+	status = "okay";
+};
+
 &wcnss {
 	status = "okay";
 	firmware-name = "qcom/apq8016/wcnss.mbn";
diff --git a/arch/arm64/boot/dts/qcom/msm8916-acer-a1-724.dts b/arch/arm64/boot/dts/qcom/msm8916-acer-a1-724.dts
index 84723c9b73b4..1d1af1260938 100644
--- a/arch/arm64/boot/dts/qcom/msm8916-acer-a1-724.dts
+++ b/arch/arm64/boot/dts/qcom/msm8916-acer-a1-724.dts
@@ -155,6 +155,10 @@ &usb_hs_phy {
 	extcon = <&usb_id>;
 };
 
+&venus {
+	status = "okay";
+};
+
 &wcnss {
 	status = "okay";
 };
diff --git a/arch/arm64/boot/dts/qcom/msm8916-alcatel-idol347.dts b/arch/arm64/boot/dts/qcom/msm8916-alcatel-idol347.dts
index 47da738661bf..e130f19fdccf 100644
--- a/arch/arm64/boot/dts/qcom/msm8916-alcatel-idol347.dts
+++ b/arch/arm64/boot/dts/qcom/msm8916-alcatel-idol347.dts
@@ -192,6 +192,10 @@ &usb_hs_phy {
 	extcon = <&usb_id>;
 };
 
+&venus {
+	status = "okay";
+};
+
 &wcnss {
 	status = "okay";
 };
diff --git a/arch/arm64/boot/dts/qcom/msm8916-asus-z00l.dts b/arch/arm64/boot/dts/qcom/msm8916-asus-z00l.dts
index 92f695481769..6f38e765ed3c 100644
--- a/arch/arm64/boot/dts/qcom/msm8916-asus-z00l.dts
+++ b/arch/arm64/boot/dts/qcom/msm8916-asus-z00l.dts
@@ -160,6 +160,10 @@ &usb_hs_phy {
 	extcon = <&usb_id>;
 };
 
+&venus {
+	status = "okay";
+};
+
 &wcnss {
 	status = "okay";
 };
diff --git a/arch/arm64/boot/dts/qcom/msm8916-gplus-fl8005a.dts b/arch/arm64/boot/dts/qcom/msm8916-gplus-fl8005a.dts
index 4aeeee24cedc..1d1113958625 100644
--- a/arch/arm64/boot/dts/qcom/msm8916-gplus-fl8005a.dts
+++ b/arch/arm64/boot/dts/qcom/msm8916-gplus-fl8005a.dts
@@ -150,6 +150,10 @@ &usb_hs_phy {
 	extcon = <&usb_id>;
 };
 
+&venus {
+	status = "okay";
+};
+
 &wcnss {
 	status = "okay";
 };
diff --git a/arch/arm64/boot/dts/qcom/msm8916-huawei-g7.dts b/arch/arm64/boot/dts/qcom/msm8916-huawei-g7.dts
index 484e488a5eca..c46df67b4d10 100644
--- a/arch/arm64/boot/dts/qcom/msm8916-huawei-g7.dts
+++ b/arch/arm64/boot/dts/qcom/msm8916-huawei-g7.dts
@@ -328,6 +328,10 @@ &usb_hs_phy {
 	extcon = <&usb_id>;
 };
 
+&venus {
+	status = "okay";
+};
+
 &wcnss {
 	status = "okay";
 };
diff --git a/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8150.dts b/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8150.dts
index 3892ad4f639a..a0bb8de54fb6 100644
--- a/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8150.dts
+++ b/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8150.dts
@@ -259,6 +259,10 @@ &usb_hs_phy {
 	extcon = <&pm8916_usbin>;
 };
 
+&venus {
+	status = "okay";
+};
+
 &wcnss {
 	status = "okay";
 };
diff --git a/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8910.dts b/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8910.dts
index d73294af1a06..919677969b3e 100644
--- a/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8910.dts
+++ b/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8910.dts
@@ -146,6 +146,10 @@ &usb_hs_phy {
 	extcon = <&usb_id>;
 };
 
+&venus {
+	status = "okay";
+};
+
 &wcnss {
 	status = "okay";
 };
diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi b/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi
index 019bf73178fa..5f78004a24bd 100644
--- a/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi
@@ -284,6 +284,10 @@ &usb_hs_phy {
 	extcon = <&muic>;
 };
 
+&venus {
+	status = "okay";
+};
+
 &tlmm {
 	accel_int_default: accel-int-default-state {
 		pins = "gpio115";
diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-gt5-common.dtsi b/arch/arm64/boot/dts/qcom/msm8916-samsung-gt5-common.dtsi
index 54d648972d35..06602db25e5f 100644
--- a/arch/arm64/boot/dts/qcom/msm8916-samsung-gt5-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-gt5-common.dtsi
@@ -158,6 +158,10 @@ &usb_hs_phy {
 	extcon = <&pm8916_usbin>;
 };
 
+&venus {
+	status = "okay";
+};
+
 &wcnss {
 	status = "okay";
 };
diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-j5-common.dtsi b/arch/arm64/boot/dts/qcom/msm8916-samsung-j5-common.dtsi
index cb0e4a7faf91..9897089d2243 100644
--- a/arch/arm64/boot/dts/qcom/msm8916-samsung-j5-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-j5-common.dtsi
@@ -138,6 +138,10 @@ &usb_hs_phy {
 	extcon = <&muic>;
 };
 
+&venus {
+	status = "okay";
+};
+
 &wcnss {
 	status = "okay";
 };
diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-serranove.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-serranove.dts
index eaf877378937..286ba7bb2b5a 100644
--- a/arch/arm64/boot/dts/qcom/msm8916-samsung-serranove.dts
+++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-serranove.dts
@@ -359,6 +359,10 @@ &usb_hs_phy {
 	extcon = <&muic>;
 };
 
+&venus {
+	status = "okay";
+};
+
 &wcnss {
 	status = "okay";
 };
diff --git a/arch/arm64/boot/dts/qcom/msm8916-ufi.dtsi b/arch/arm64/boot/dts/qcom/msm8916-ufi.dtsi
index 004a129a2ee2..c759c0544dd9 100644
--- a/arch/arm64/boot/dts/qcom/msm8916-ufi.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8916-ufi.dtsi
@@ -115,6 +115,10 @@ &usb_hs_phy {
 	extcon = <&pm8916_usbin>;
 };
 
+&venus {
+	status = "okay";
+};
+
 &wcnss {
 	status = "okay";
 };
diff --git a/arch/arm64/boot/dts/qcom/msm8916-wingtech-wt88047.dts b/arch/arm64/boot/dts/qcom/msm8916-wingtech-wt88047.dts
index 8e238976ab1c..82ed50610b24 100644
--- a/arch/arm64/boot/dts/qcom/msm8916-wingtech-wt88047.dts
+++ b/arch/arm64/boot/dts/qcom/msm8916-wingtech-wt88047.dts
@@ -189,6 +189,10 @@ &usb_hs_phy {
 	extcon = <&usb_id>;
 };
 
+&venus {
+	status = "okay";
+};
+
 &wcnss {
 	status = "okay";
 };
diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi b/arch/arm64/boot/dts/qcom/msm8916.dtsi
index 33fb65d73104..f093ab83938d 100644
--- a/arch/arm64/boot/dts/qcom/msm8916.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8916.dtsi
@@ -1797,7 +1797,7 @@ venus: video-codec@1d00000 {
 			clock-names = "core", "iface", "bus";
 			iommus = <&apps_iommu 5>;
 			memory-region = <&venus_mem>;
-			status = "okay";
+			status = "disabled";
 
 			video-decoder {
 				compatible = "venus-decoder";

-- 
2.42.0


^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH 2/9] arm64: dts: qcom: msm8916/39: Disable GPU by default
  2023-09-11 17:41 [PATCH 0/9] arm64: dts: qcom: msm8916/39: Reserve firmware memory dynamically Stephan Gerhold
  2023-09-11 17:41 ` [PATCH 1/9] arm64: dts: qcom: msm8916: Disable venus by default Stephan Gerhold
@ 2023-09-11 17:41 ` Stephan Gerhold
  2023-09-12  6:35   ` Bryan O'Donoghue
  2023-09-12  7:45   ` Konrad Dybcio
  2023-09-11 17:41 ` [PATCH 3/9] arm64: dts: qcom: msm8916-ufi: Drop gps_mem for now Stephan Gerhold
                   ` (7 subsequent siblings)
  9 siblings, 2 replies; 29+ messages in thread
From: Stephan Gerhold @ 2023-09-11 17:41 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Andy Gross, Konrad Dybcio, linux-arm-msm, devicetree,
	linux-kernel, Bryan O'Donoghue, Stephan Gerhold

MSM8916/39 do not need signed GPU firmware so it is generally okay to
have it enabled by default. However, currently the GPU does not work
without also enabling MDSS and it's questionable if someone would
really need it without a display in practice.

For consistency let's follow newer SoCs and disable the GPU by default.
Enable it for all existing devices that already have &mdss enabled.

Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
---
 arch/arm64/boot/dts/qcom/apq8016-sbc.dts                      | 4 ++++
 arch/arm64/boot/dts/qcom/apq8039-t2.dts                       | 4 ++++
 arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi    | 4 ++++
 arch/arm64/boot/dts/qcom/msm8916.dtsi                         | 3 ++-
 arch/arm64/boot/dts/qcom/msm8939-sony-xperia-kanuti-tulip.dts | 4 ++++
 arch/arm64/boot/dts/qcom/msm8939.dtsi                         | 3 ++-
 6 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/apq8016-sbc.dts b/arch/arm64/boot/dts/qcom/apq8016-sbc.dts
index c13230217c3c..bd68f4793acd 100644
--- a/arch/arm64/boot/dts/qcom/apq8016-sbc.dts
+++ b/arch/arm64/boot/dts/qcom/apq8016-sbc.dts
@@ -230,6 +230,10 @@ &camss {
 	status = "okay";
 };
 
+&gpu {
+	status = "okay";
+};
+
 &lpass {
 	status = "okay";
 };
diff --git a/arch/arm64/boot/dts/qcom/apq8039-t2.dts b/arch/arm64/boot/dts/qcom/apq8039-t2.dts
index 027d1da7e81d..f591d6e78d6e 100644
--- a/arch/arm64/boot/dts/qcom/apq8039-t2.dts
+++ b/arch/arm64/boot/dts/qcom/apq8039-t2.dts
@@ -131,6 +131,10 @@ &blsp_uart2 {
 	status = "okay";
 };
 
+&gpu {
+	status = "okay";
+};
+
 &lpass {
 	status = "okay";
 };
diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi b/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi
index 5f78004a24bd..15d2486cdb45 100644
--- a/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi
@@ -239,6 +239,10 @@ &blsp_uart2 {
 	status = "okay";
 };
 
+&gpu {
+	status = "okay";
+};
+
 &mdss {
 	status = "okay";
 };
diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi b/arch/arm64/boot/dts/qcom/msm8916.dtsi
index f093ab83938d..0257cbbb4971 100644
--- a/arch/arm64/boot/dts/qcom/msm8916.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8916.dtsi
@@ -1750,7 +1750,7 @@ cci_i2c0: i2c-bus@0 {
 			};
 		};
 
-		gpu@1c00000 {
+		gpu: gpu@1c00000 {
 			compatible = "qcom,adreno-306.0", "qcom,adreno";
 			reg = <0x01c00000 0x20000>;
 			reg-names = "kgsl_3d0_reg_memory";
@@ -1773,6 +1773,7 @@ gpu@1c00000 {
 			power-domains = <&gcc OXILI_GDSC>;
 			operating-points-v2 = <&gpu_opp_table>;
 			iommus = <&gpu_iommu 1>, <&gpu_iommu 2>;
+			status = "disabled";
 
 			gpu_opp_table: opp-table {
 				compatible = "operating-points-v2";
diff --git a/arch/arm64/boot/dts/qcom/msm8939-sony-xperia-kanuti-tulip.dts b/arch/arm64/boot/dts/qcom/msm8939-sony-xperia-kanuti-tulip.dts
index 89b6aebba404..cb893345c44b 100644
--- a/arch/arm64/boot/dts/qcom/msm8939-sony-xperia-kanuti-tulip.dts
+++ b/arch/arm64/boot/dts/qcom/msm8939-sony-xperia-kanuti-tulip.dts
@@ -39,6 +39,10 @@ usb_id: usb-id {
 	};
 };
 
+&gpu {
+	status = "okay";
+};
+
 &mdss {
 	status = "okay";
 };
diff --git a/arch/arm64/boot/dts/qcom/msm8939.dtsi b/arch/arm64/boot/dts/qcom/msm8939.dtsi
index 6e24f0f2374f..b0a64e468629 100644
--- a/arch/arm64/boot/dts/qcom/msm8939.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8939.dtsi
@@ -1395,7 +1395,7 @@ mdss_dsi1_phy: phy@1aa0300 {
 			};
 		};
 
-		gpu@1c00000 {
+		gpu: gpu@1c00000 {
 			compatible = "qcom,adreno-405.0", "qcom,adreno";
 			reg = <0x01c00000 0x10000>;
 			reg-names = "kgsl_3d0_reg_memory";
@@ -1418,6 +1418,7 @@ gpu@1c00000 {
 			power-domains = <&gcc OXILI_GDSC>;
 			operating-points-v2 = <&opp_table>;
 			iommus = <&gpu_iommu 1>, <&gpu_iommu 2>;
+			status = "disabled";
 
 			opp_table: opp-table {
 				compatible = "operating-points-v2";

-- 
2.42.0


^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH 3/9] arm64: dts: qcom: msm8916-ufi: Drop gps_mem for now
  2023-09-11 17:41 [PATCH 0/9] arm64: dts: qcom: msm8916/39: Reserve firmware memory dynamically Stephan Gerhold
  2023-09-11 17:41 ` [PATCH 1/9] arm64: dts: qcom: msm8916: Disable venus by default Stephan Gerhold
  2023-09-11 17:41 ` [PATCH 2/9] arm64: dts: qcom: msm8916/39: Disable GPU " Stephan Gerhold
@ 2023-09-11 17:41 ` Stephan Gerhold
  2023-09-12  6:36   ` Bryan O'Donoghue
  2023-09-11 17:41 ` [PATCH 4/9] arm64: dts: qcom: msm8916: Reserve firmware memory dynamically Stephan Gerhold
                   ` (6 subsequent siblings)
  9 siblings, 1 reply; 29+ messages in thread
From: Stephan Gerhold @ 2023-09-11 17:41 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Andy Gross, Konrad Dybcio, linux-arm-msm, devicetree,
	linux-kernel, Bryan O'Donoghue, Stephan Gerhold

gps_mem is needed by the modem firmware for GPS to work. However, it is
accessed via QMI memshare [1] which is not available upstream yet.
Until it lands upstream reserving this does not provide any advantage.

[1]: https://lore.kernel.org/linux-arm-msm/20210319172321.22248-1-nikitos.tr@gmail.com/

Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
---
 arch/arm64/boot/dts/qcom/msm8916-ufi.dtsi | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/msm8916-ufi.dtsi b/arch/arm64/boot/dts/qcom/msm8916-ufi.dtsi
index c759c0544dd9..69f268db4df9 100644
--- a/arch/arm64/boot/dts/qcom/msm8916-ufi.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8916-ufi.dtsi
@@ -22,11 +22,6 @@ mpss_mem: mpss@86800000 {
 			reg = <0x0 0x86800000 0x0 0x5500000>;
 			no-map;
 		};
-
-		gps_mem: gps@8bd00000 {
-			reg = <0x0 0x8bd00000 0x0 0x200000>;
-			no-map;
-		};
 	};
 
 	gpio-keys {

-- 
2.42.0


^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH 4/9] arm64: dts: qcom: msm8916: Reserve firmware memory dynamically
  2023-09-11 17:41 [PATCH 0/9] arm64: dts: qcom: msm8916/39: Reserve firmware memory dynamically Stephan Gerhold
                   ` (2 preceding siblings ...)
  2023-09-11 17:41 ` [PATCH 3/9] arm64: dts: qcom: msm8916-ufi: Drop gps_mem for now Stephan Gerhold
@ 2023-09-11 17:41 ` Stephan Gerhold
  2023-09-13  9:06   ` Konrad Dybcio
  2023-09-11 17:41 ` [PATCH 5/9] arm64: dts: qcom: msm8916: Reserve MBA " Stephan Gerhold
                   ` (5 subsequent siblings)
  9 siblings, 1 reply; 29+ messages in thread
From: Stephan Gerhold @ 2023-09-11 17:41 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Andy Gross, Konrad Dybcio, linux-arm-msm, devicetree,
	linux-kernel, Bryan O'Donoghue, Stephan Gerhold

Most of the reserved firmware memory on MSM8916 can be relocated when
respecting the required alignment. To avoid having to precompute the
reserved memory regions in every board DT, describe the actual
requirements (size, alignment, alloc-ranges) using the dynamic reserved
memory allocation.

This approach has several advantages:

 1. We can define "templates" for the reserved memory regions in
    msm8916.dtsi and keep only device-specific details in the board DT.
    This is useful for the "mpss" region size for example, which varies
    from device to device. It is no longer necessary to redefine all
    firmware regions to shift their addresses.

 2. When some of the functionality (e.g. WCNSS, Modem, Venus) is not
    enabled or needed for a device, the reserved memory can stay
    disabled, freeing up the unused reservation for Linux.

 3. Devices with special requirements for one of the firmware regions
    are handled automatically. For example, msm8916-longcheer-l8150
    has non-relocatable "wcnss" firmware that must be loaded exactly
    at address 0x8b600000. When this is defined as a static region,
    the other dynamic allocations automatically adjust to a different
    place with suitable alignment.

All in all this approach significantly reduces the boilerplate necessary
to define the different firmware regions, and makes it easier to enable
functionality on the different devices.

Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
---
 .../boot/dts/qcom/msm8916-longcheer-l8150.dts      |  9 +++++++--
 arch/arm64/boot/dts/qcom/msm8916-ufi.dtsi          | 11 ++++-------
 arch/arm64/boot/dts/qcom/msm8916.dtsi              | 22 ++++++++++++++++++----
 3 files changed, 29 insertions(+), 13 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8150.dts b/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8150.dts
index a0bb8de54fb6..503155aefa55 100644
--- a/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8150.dts
+++ b/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8150.dts
@@ -23,9 +23,14 @@ chosen {
 		stdout-path = "serial0";
 	};
 
+	/*
+	 * For some reason, the signed wcnss firmware is not relocatable.
+	 * It must be loaded at 0x8b600000. All other firmware is relocatable,
+	 * so place wcnss at the fixed address and then all other firmware
+	 * regions will be automatically allocated at a fitting place.
+	 */
 	reserved-memory {
-		/* wcnss.mdt is not relocatable, so it must be loaded at 0x8b600000 */
-		/delete-node/ wcnss@89300000;
+		/delete-node/ wcnss;
 
 		wcnss_mem: wcnss@8b600000 {
 			reg = <0x0 0x8b600000 0x0 0x600000>;
diff --git a/arch/arm64/boot/dts/qcom/msm8916-ufi.dtsi b/arch/arm64/boot/dts/qcom/msm8916-ufi.dtsi
index 69f268db4df9..1d92c2e57216 100644
--- a/arch/arm64/boot/dts/qcom/msm8916-ufi.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8916-ufi.dtsi
@@ -17,13 +17,6 @@ chosen {
 		stdout-path = "serial0";
 	};
 
-	reserved-memory {
-		mpss_mem: mpss@86800000 {
-			reg = <0x0 0x86800000 0x0 0x5500000>;
-			no-map;
-		};
-	};
-
 	gpio-keys {
 		compatible = "gpio-keys";
 
@@ -91,6 +84,10 @@ &mpss {
 	status = "okay";
 };
 
+&mpss_mem {
+	reg = <0x0 0x86800000 0x0 0x5500000>;
+};
+
 &pm8916_usbin {
 	status = "okay";
 };
diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi b/arch/arm64/boot/dts/qcom/msm8916.dtsi
index 0257cbbb4971..c237f3e48c86 100644
--- a/arch/arm64/boot/dts/qcom/msm8916.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8916.dtsi
@@ -74,17 +74,31 @@ rfsa@867e0000 {
 		};
 
 		mpss_mem: mpss@86800000 {
+			/*
+			 * The memory region for the mpss firmware is generally
+			 * relocatable and could be allocated dynamically.
+			 * However, many firmware versions tend to fail when
+			 * loaded to some special addresses, so it is hard to
+			 * define reliable alloc-ranges.
+			 *
+			 * alignment = <0x0 0x400000>;
+			 * alloc-ranges = <0x0 0x86800000 0x0 0x8000000>;
+			 */
 			reg = <0x0 0x86800000 0x0 0x2b00000>;
 			no-map;
 		};
 
-		wcnss_mem: wcnss@89300000 {
-			reg = <0x0 0x89300000 0x0 0x600000>;
+		wcnss_mem: wcnss {
+			size = <0x0 0x600000>;
+			alignment = <0x0 0x100000>;
+			alloc-ranges = <0x0 0x86800000 0x0 0x8000000>;
 			no-map;
 		};
 
-		venus_mem: venus@89900000 {
-			reg = <0x0 0x89900000 0x0 0x600000>;
+		venus_mem: venus {
+			size = <0x0 0x600000>;
+			alignment = <0x0 0x100000>;
+			alloc-ranges = <0x0 0x86800000 0x0 0x8000000>;
 			no-map;
 		};
 

-- 
2.42.0


^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH 5/9] arm64: dts: qcom: msm8916: Reserve MBA memory dynamically
  2023-09-11 17:41 [PATCH 0/9] arm64: dts: qcom: msm8916/39: Reserve firmware memory dynamically Stephan Gerhold
                   ` (3 preceding siblings ...)
  2023-09-11 17:41 ` [PATCH 4/9] arm64: dts: qcom: msm8916: Reserve firmware memory dynamically Stephan Gerhold
@ 2023-09-11 17:41 ` Stephan Gerhold
  2023-09-13  8:59   ` Konrad Dybcio
  2023-09-11 17:41 ` [PATCH 6/9] arm64: dts: qcom: msm8939: Reserve firmware " Stephan Gerhold
                   ` (4 subsequent siblings)
  9 siblings, 1 reply; 29+ messages in thread
From: Stephan Gerhold @ 2023-09-11 17:41 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Andy Gross, Konrad Dybcio, linux-arm-msm, devicetree,
	linux-kernel, Bryan O'Donoghue, Stephan Gerhold

At a first glance the MBA memory region on MSM8916 looks intentionally
placed at the fixed address 0x8ea00000. This is what the ELF headers of
the firmware specify as base address, and the typical Qualcomm-specific
bits suggest the binary is not relocatable.

However, on a closer look this is pointless: Unlike other firmware
images the hardware expects to have the raw ELF image loaded to the MBA
region, including the ELF header (without parsing it at all). This
means that we actually just load the ELF header (not the code!) at
0x8ea00000. The real LOAD segments follow at arbitrary aligned
addresses depending on the structure of the ELF binary.

In practice it looks like we can use an arbitrary 1 MiB-aligned region
for MBA. The downstream/vendor kernel just allocates this dynamically
at an arbitrary (aligned) address.

Drop the pointless fixed address and use the new dynamic reserved
memory mechanism to allocate a region close to the others. This reduces
gaps in the memory map and provides Linux with more contiguous memory.

Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
---
 arch/arm64/boot/dts/qcom/msm8916.dtsi | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi b/arch/arm64/boot/dts/qcom/msm8916.dtsi
index c237f3e48c86..38f6c8ea605a 100644
--- a/arch/arm64/boot/dts/qcom/msm8916.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8916.dtsi
@@ -102,9 +102,11 @@ venus_mem: venus {
 			no-map;
 		};
 
-		mba_mem: mba@8ea00000 {
+		mba_mem: mba {
+			size = <0x0 0x100000>;
+			alignment = <0x0 0x100000>;
+			alloc-ranges = <0x0 0x86800000 0x0 0x8000000>;
 			no-map;
-			reg = <0 0x8ea00000 0 0x100000>;
 		};
 	};
 

-- 
2.42.0


^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH 6/9] arm64: dts: qcom: msm8939: Reserve firmware memory dynamically
  2023-09-11 17:41 [PATCH 0/9] arm64: dts: qcom: msm8916/39: Reserve firmware memory dynamically Stephan Gerhold
                   ` (4 preceding siblings ...)
  2023-09-11 17:41 ` [PATCH 5/9] arm64: dts: qcom: msm8916: Reserve MBA " Stephan Gerhold
@ 2023-09-11 17:41 ` Stephan Gerhold
  2023-09-11 17:41 ` [PATCH 7/9] arm64: dts: qcom: msm8916/39: Disable unneeded firmware reservations Stephan Gerhold
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 29+ messages in thread
From: Stephan Gerhold @ 2023-09-11 17:41 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Andy Gross, Konrad Dybcio, linux-arm-msm, devicetree,
	linux-kernel, Bryan O'Donoghue, Stephan Gerhold

Follow the example of MSM8916 and reserve the firmware memory regions
dynamically to allow boards to define only the device-specific parts.

Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
---
 arch/arm64/boot/dts/qcom/msm8939.dtsi | 28 ++++++++++++++++++++++------
 1 file changed, 22 insertions(+), 6 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/msm8939.dtsi b/arch/arm64/boot/dts/qcom/msm8939.dtsi
index b0a64e468629..ebea6de1177b 100644
--- a/arch/arm64/boot/dts/qcom/msm8939.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8939.dtsi
@@ -346,22 +346,38 @@ rfsa@867e0000 {
 		};
 
 		mpss_mem: mpss@86800000 {
+			/*
+			 * The memory region for the mpss firmware is generally
+			 * relocatable and could be allocated dynamically.
+			 * However, many firmware versions tend to fail when
+			 * loaded to some special addresses, so it is hard to
+			 * define reliable alloc-ranges.
+			 *
+			 * alignment = <0x0 0x400000>;
+			 * alloc-ranges = <0x0 0x86800000 0x0 0x8000000>;
+			 */
 			reg = <0x0 0x86800000 0x0 0x5500000>;
 			no-map;
 		};
 
-		wcnss_mem: wcnss@8bd00000 {
-			reg = <0x0 0x8bd00000 0x0 0x600000>;
+		wcnss_mem: wcnss {
+			size = <0x0 0x600000>;
+			alignment = <0x0 0x100000>;
+			alloc-ranges = <0x0 0x86800000 0x0 0x8000000>;
 			no-map;
 		};
 
-		venus_mem: venus@8c300000 {
-			reg = <0x0 0x8c300000 0x0 0x800000>;
+		venus_mem: venus {
+			size = <0x0 0x800000>;
+			alignment = <0x0 0x100000>;
+			alloc-ranges = <0x0 0x86800000 0x0 0x8000000>;
 			no-map;
 		};
 
-		mba_mem: mba@8cb00000 {
-			reg = <0x0 0x8cb00000 0x0 0x100000>;
+		mba_mem: mba {
+			size = <0x0 0x100000>;
+			alignment = <0x0 0x100000>;
+			alloc-ranges = <0x0 0x86800000 0x0 0x8000000>;
 			no-map;
 		};
 	};

-- 
2.42.0


^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH 7/9] arm64: dts: qcom: msm8916/39: Disable unneeded firmware reservations
  2023-09-11 17:41 [PATCH 0/9] arm64: dts: qcom: msm8916/39: Reserve firmware memory dynamically Stephan Gerhold
                   ` (5 preceding siblings ...)
  2023-09-11 17:41 ` [PATCH 6/9] arm64: dts: qcom: msm8939: Reserve firmware " Stephan Gerhold
@ 2023-09-11 17:41 ` Stephan Gerhold
  2023-09-15 13:51   ` Konrad Dybcio
  2023-09-11 17:41 ` [PATCH 8/9] arm64: dts: qcom: msm8916/39: Move mpss_mem size to boards Stephan Gerhold
                   ` (2 subsequent siblings)
  9 siblings, 1 reply; 29+ messages in thread
From: Stephan Gerhold @ 2023-09-11 17:41 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Andy Gross, Konrad Dybcio, linux-arm-msm, devicetree,
	linux-kernel, Bryan O'Donoghue, Stephan Gerhold

Now that we no longer have fixed addresses for the firmware memory
regions, disable them by default and only enable them together with
the actual user in the board DT.

This frees up unnecessary reserved memory for boards that do not use
some of the remoteprocs and allows moving selected device-specific
properties (such as firmware size) to the board-specific DT part in
the next step.

Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
---
 arch/arm64/boot/dts/qcom/apq8016-sbc.dts                 | 16 ++++++++++++++++
 arch/arm64/boot/dts/qcom/apq8039-t2.dts                  |  4 ++++
 arch/arm64/boot/dts/qcom/msm8916-acer-a1-724.dts         |  8 ++++++++
 arch/arm64/boot/dts/qcom/msm8916-alcatel-idol347.dts     |  8 ++++++++
 arch/arm64/boot/dts/qcom/msm8916-asus-z00l.dts           |  8 ++++++++
 arch/arm64/boot/dts/qcom/msm8916-gplus-fl8005a.dts       |  8 ++++++++
 arch/arm64/boot/dts/qcom/msm8916-huawei-g7.dts           |  8 ++++++++
 arch/arm64/boot/dts/qcom/msm8916-longcheer-l8150.dts     |  8 ++++++++
 arch/arm64/boot/dts/qcom/msm8916-longcheer-l8910.dts     |  8 ++++++++
 .../boot/dts/qcom/msm8916-samsung-a2015-common.dtsi      |  4 ++++
 arch/arm64/boot/dts/qcom/msm8916-samsung-a3u-eur.dts     |  4 ++++
 arch/arm64/boot/dts/qcom/msm8916-samsung-a5u-eur.dts     |  4 ++++
 .../boot/dts/qcom/msm8916-samsung-e2015-common.dtsi      |  4 ++++
 arch/arm64/boot/dts/qcom/msm8916-samsung-gt5-common.dtsi |  8 ++++++++
 arch/arm64/boot/dts/qcom/msm8916-samsung-j5-common.dtsi  |  8 ++++++++
 arch/arm64/boot/dts/qcom/msm8916-samsung-serranove.dts   |  8 ++++++++
 arch/arm64/boot/dts/qcom/msm8916-ufi.dtsi                | 13 +++++++++++++
 arch/arm64/boot/dts/qcom/msm8916-wingtech-wt88047.dts    |  8 ++++++++
 arch/arm64/boot/dts/qcom/msm8916.dtsi                    |  4 ++++
 arch/arm64/boot/dts/qcom/msm8939-samsung-a7.dts          |  4 ++++
 .../boot/dts/qcom/msm8939-sony-xperia-kanuti-tulip.dts   |  4 ++++
 arch/arm64/boot/dts/qcom/msm8939.dtsi                    |  4 ++++
 22 files changed, 153 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/apq8016-sbc.dts b/arch/arm64/boot/dts/qcom/apq8016-sbc.dts
index bd68f4793acd..ae510c5ec830 100644
--- a/arch/arm64/boot/dts/qcom/apq8016-sbc.dts
+++ b/arch/arm64/boot/dts/qcom/apq8016-sbc.dts
@@ -242,6 +242,10 @@ &lpass_codec {
 	status = "okay";
 };
 
+&mba_mem {
+	status = "okay";
+};
+
 &mdss {
 	status = "okay";
 };
@@ -257,6 +261,10 @@ &mpss {
 	firmware-name = "qcom/apq8016/mba.mbn", "qcom/apq8016/modem.mbn";
 };
 
+&mpss_mem {
+	status = "okay";
+};
+
 &pm8916_codec {
 	status = "okay";
 	clocks = <&gcc GCC_CODEC_DIGCODEC_CLK>;
@@ -372,6 +380,10 @@ &venus {
 	status = "okay";
 };
 
+&venus_mem {
+	status = "okay";
+};
+
 &wcnss {
 	status = "okay";
 	firmware-name = "qcom/apq8016/wcnss.mbn";
@@ -385,6 +397,10 @@ &wcnss_iris {
 	compatible = "qcom,wcn3620";
 };
 
+&wcnss_mem {
+	status = "okay";
+};
+
 /* Enable CoreSight */
 &cti0 { status = "okay"; };
 &cti1 { status = "okay"; };
diff --git a/arch/arm64/boot/dts/qcom/apq8039-t2.dts b/arch/arm64/boot/dts/qcom/apq8039-t2.dts
index f591d6e78d6e..4f82bb668616 100644
--- a/arch/arm64/boot/dts/qcom/apq8039-t2.dts
+++ b/arch/arm64/boot/dts/qcom/apq8039-t2.dts
@@ -395,3 +395,7 @@ &wcnss {
 &wcnss_iris {
 	compatible = "qcom,wcn3680";
 };
+
+&wcnss_mem {
+	status = "okay";
+};
diff --git a/arch/arm64/boot/dts/qcom/msm8916-acer-a1-724.dts b/arch/arm64/boot/dts/qcom/msm8916-acer-a1-724.dts
index 1d1af1260938..57a74eea1005 100644
--- a/arch/arm64/boot/dts/qcom/msm8916-acer-a1-724.dts
+++ b/arch/arm64/boot/dts/qcom/msm8916-acer-a1-724.dts
@@ -159,6 +159,10 @@ &venus {
 	status = "okay";
 };
 
+&venus_mem {
+	status = "okay";
+};
+
 &wcnss {
 	status = "okay";
 };
@@ -167,6 +171,10 @@ &wcnss_iris {
 	compatible = "qcom,wcn3620";
 };
 
+&wcnss_mem {
+	status = "okay";
+};
+
 &tlmm {
 	accel_int_default: accel-int-default-state {
 		pins = "gpio115";
diff --git a/arch/arm64/boot/dts/qcom/msm8916-alcatel-idol347.dts b/arch/arm64/boot/dts/qcom/msm8916-alcatel-idol347.dts
index e130f19fdccf..aa4c1ab1e673 100644
--- a/arch/arm64/boot/dts/qcom/msm8916-alcatel-idol347.dts
+++ b/arch/arm64/boot/dts/qcom/msm8916-alcatel-idol347.dts
@@ -196,6 +196,10 @@ &venus {
 	status = "okay";
 };
 
+&venus_mem {
+	status = "okay";
+};
+
 &wcnss {
 	status = "okay";
 };
@@ -204,6 +208,10 @@ &wcnss_iris {
 	compatible = "qcom,wcn3620";
 };
 
+&wcnss_mem {
+	status = "okay";
+};
+
 &tlmm {
 	accel_int_default: accel-int-default-state {
 		pins = "gpio31";
diff --git a/arch/arm64/boot/dts/qcom/msm8916-asus-z00l.dts b/arch/arm64/boot/dts/qcom/msm8916-asus-z00l.dts
index 6f38e765ed3c..a8be6ff66893 100644
--- a/arch/arm64/boot/dts/qcom/msm8916-asus-z00l.dts
+++ b/arch/arm64/boot/dts/qcom/msm8916-asus-z00l.dts
@@ -164,6 +164,10 @@ &venus {
 	status = "okay";
 };
 
+&venus_mem {
+	status = "okay";
+};
+
 &wcnss {
 	status = "okay";
 };
@@ -172,6 +176,10 @@ &wcnss_iris {
 	compatible = "qcom,wcn3620";
 };
 
+&wcnss_mem {
+	status = "okay";
+};
+
 &tlmm {
 	gpio_keys_default: gpio-keys-default-state {
 		pins = "gpio107", "gpio117";
diff --git a/arch/arm64/boot/dts/qcom/msm8916-gplus-fl8005a.dts b/arch/arm64/boot/dts/qcom/msm8916-gplus-fl8005a.dts
index 1d1113958625..b748d140b52e 100644
--- a/arch/arm64/boot/dts/qcom/msm8916-gplus-fl8005a.dts
+++ b/arch/arm64/boot/dts/qcom/msm8916-gplus-fl8005a.dts
@@ -154,6 +154,10 @@ &venus {
 	status = "okay";
 };
 
+&venus_mem {
+	status = "okay";
+};
+
 &wcnss {
 	status = "okay";
 };
@@ -162,6 +166,10 @@ &wcnss_iris {
 	compatible = "qcom,wcn3620";
 };
 
+&wcnss_mem {
+	status = "okay";
+};
+
 &tlmm {
 	camera_flash_default: camera-flash-default-state {
 		pins = "gpio31", "gpio32";
diff --git a/arch/arm64/boot/dts/qcom/msm8916-huawei-g7.dts b/arch/arm64/boot/dts/qcom/msm8916-huawei-g7.dts
index c46df67b4d10..bf7fc89dd106 100644
--- a/arch/arm64/boot/dts/qcom/msm8916-huawei-g7.dts
+++ b/arch/arm64/boot/dts/qcom/msm8916-huawei-g7.dts
@@ -332,6 +332,10 @@ &venus {
 	status = "okay";
 };
 
+&venus_mem {
+	status = "okay";
+};
+
 &wcnss {
 	status = "okay";
 };
@@ -340,6 +344,10 @@ &wcnss_iris {
 	compatible = "qcom,wcn3620";
 };
 
+&wcnss_mem {
+	status = "okay";
+};
+
 &tlmm {
 	accel_irq_default: accel-irq-default-state {
 		pins = "gpio115";
diff --git a/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8150.dts b/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8150.dts
index 503155aefa55..47d1c5cb13f4 100644
--- a/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8150.dts
+++ b/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8150.dts
@@ -268,6 +268,10 @@ &venus {
 	status = "okay";
 };
 
+&venus_mem {
+	status = "okay";
+};
+
 &wcnss {
 	status = "okay";
 };
@@ -276,6 +280,10 @@ &wcnss_iris {
 	compatible = "qcom,wcn3620";
 };
 
+&wcnss_mem {
+	status = "okay";
+};
+
 &tlmm {
 	accel_int_default: accel-int-default-state {
 		pins = "gpio116";
diff --git a/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8910.dts b/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8910.dts
index 919677969b3e..41cadb906b98 100644
--- a/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8910.dts
+++ b/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8910.dts
@@ -150,6 +150,10 @@ &venus {
 	status = "okay";
 };
 
+&venus_mem {
+	status = "okay";
+};
+
 &wcnss {
 	status = "okay";
 };
@@ -158,6 +162,10 @@ &wcnss_iris {
 	compatible = "qcom,wcn3620";
 };
 
+&wcnss_mem {
+	status = "okay";
+};
+
 &tlmm {
 	button_backlight_default: button-backlight-default-state {
 		pins = "gpio17";
diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi b/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi
index 15d2486cdb45..0b29132b74e1 100644
--- a/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi
@@ -292,6 +292,10 @@ &venus {
 	status = "okay";
 };
 
+&venus_mem {
+	status = "okay";
+};
+
 &tlmm {
 	accel_int_default: accel-int-default-state {
 		pins = "gpio115";
diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-a3u-eur.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-a3u-eur.dts
index e5a569698c4f..f5a808369518 100644
--- a/arch/arm64/boot/dts/qcom/msm8916-samsung-a3u-eur.dts
+++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-a3u-eur.dts
@@ -120,6 +120,10 @@ &wcnss_iris {
 	compatible = "qcom,wcn3620";
 };
 
+&wcnss_mem {
+	status = "okay";
+};
+
 &tlmm {
 	panel_vdd3_default: panel-vdd3-default-state {
 		pins = "gpio9";
diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-a5u-eur.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-a5u-eur.dts
index 388482a1e3d9..391befa22bb4 100644
--- a/arch/arm64/boot/dts/qcom/msm8916-samsung-a5u-eur.dts
+++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-a5u-eur.dts
@@ -71,6 +71,10 @@ &wcnss_iris {
 	compatible = "qcom,wcn3660b";
 };
 
+&wcnss_mem {
+	status = "okay";
+};
+
 &tlmm {
 	tkey_en_default: tkey-en-default-state {
 		pins = "gpio97";
diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-e2015-common.dtsi b/arch/arm64/boot/dts/qcom/msm8916-samsung-e2015-common.dtsi
index 6f65fd4b3ed3..0824ab041d80 100644
--- a/arch/arm64/boot/dts/qcom/msm8916-samsung-e2015-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-e2015-common.dtsi
@@ -83,6 +83,10 @@ &wcnss_iris {
 	compatible = "qcom,wcn3620";
 };
 
+&wcnss_mem {
+	status = "okay";
+};
+
 &tlmm {
 	tkey_en_default: tkey-en-default-state {
 		pins = "gpio97";
diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-gt5-common.dtsi b/arch/arm64/boot/dts/qcom/msm8916-samsung-gt5-common.dtsi
index 06602db25e5f..c19cf20d7427 100644
--- a/arch/arm64/boot/dts/qcom/msm8916-samsung-gt5-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-gt5-common.dtsi
@@ -162,6 +162,10 @@ &venus {
 	status = "okay";
 };
 
+&venus_mem {
+	status = "okay";
+};
+
 &wcnss {
 	status = "okay";
 };
@@ -170,6 +174,10 @@ &wcnss_iris {
 	compatible = "qcom,wcn3660b";
 };
 
+&wcnss_mem {
+	status = "okay";
+};
+
 &tlmm {
 	accel_int_default: accel-int-default-state {
 		pins = "gpio115";
diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-j5-common.dtsi b/arch/arm64/boot/dts/qcom/msm8916-samsung-j5-common.dtsi
index 9897089d2243..62692d2c32d5 100644
--- a/arch/arm64/boot/dts/qcom/msm8916-samsung-j5-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-j5-common.dtsi
@@ -142,6 +142,10 @@ &venus {
 	status = "okay";
 };
 
+&venus_mem {
+	status = "okay";
+};
+
 &wcnss {
 	status = "okay";
 };
@@ -150,6 +154,10 @@ &wcnss_iris {
 	compatible = "qcom,wcn3620";
 };
 
+&wcnss_mem {
+	status = "okay";
+};
+
 &tlmm {
 	gpio_hall_sensor_default: gpio-hall-sensor-default-state {
 		pins = "gpio52";
diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-serranove.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-serranove.dts
index 286ba7bb2b5a..68da2a2d3077 100644
--- a/arch/arm64/boot/dts/qcom/msm8916-samsung-serranove.dts
+++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-serranove.dts
@@ -363,6 +363,10 @@ &venus {
 	status = "okay";
 };
 
+&venus_mem {
+	status = "okay";
+};
+
 &wcnss {
 	status = "okay";
 };
@@ -371,6 +375,10 @@ &wcnss_iris {
 	compatible = "qcom,wcn3660b";
 };
 
+&wcnss_mem {
+	status = "okay";
+};
+
 &tlmm {
 	fg_alert_default: fg-alert-default-state {
 		pins = "gpio121";
diff --git a/arch/arm64/boot/dts/qcom/msm8916-ufi.dtsi b/arch/arm64/boot/dts/qcom/msm8916-ufi.dtsi
index 1d92c2e57216..c77ed04bb6c3 100644
--- a/arch/arm64/boot/dts/qcom/msm8916-ufi.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8916-ufi.dtsi
@@ -80,12 +80,17 @@ &gcc {
 	clocks = <&xo_board>, <&sleep_clk>, <0>, <0>, <0>, <0>, <0>;
 };
 
+&mba_mem {
+	status = "okay";
+};
+
 &mpss {
 	status = "okay";
 };
 
 &mpss_mem {
 	reg = <0x0 0x86800000 0x0 0x5500000>;
+	status = "okay";
 };
 
 &pm8916_usbin {
@@ -111,6 +116,10 @@ &venus {
 	status = "okay";
 };
 
+&venus_mem {
+	status = "okay";
+};
+
 &wcnss {
 	status = "okay";
 };
@@ -119,6 +128,10 @@ &wcnss_iris {
 	compatible = "qcom,wcn3620";
 };
 
+&wcnss_mem {
+	status = "okay";
+};
+
 &tlmm {
 	/* pins are board-specific */
 	button_default: button-default-state {
diff --git a/arch/arm64/boot/dts/qcom/msm8916-wingtech-wt88047.dts b/arch/arm64/boot/dts/qcom/msm8916-wingtech-wt88047.dts
index 82ed50610b24..419f35c1fc92 100644
--- a/arch/arm64/boot/dts/qcom/msm8916-wingtech-wt88047.dts
+++ b/arch/arm64/boot/dts/qcom/msm8916-wingtech-wt88047.dts
@@ -193,6 +193,10 @@ &venus {
 	status = "okay";
 };
 
+&venus_mem {
+	status = "okay";
+};
+
 &wcnss {
 	status = "okay";
 };
@@ -201,6 +205,10 @@ &wcnss_iris {
 	compatible = "qcom,wcn3620";
 };
 
+&wcnss_mem {
+	status = "okay";
+};
+
 &tlmm {
 	camera_flash_default: camera-flash-default-state {
 		pins = "gpio31", "gpio32";
diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi b/arch/arm64/boot/dts/qcom/msm8916.dtsi
index 38f6c8ea605a..8457472c9ad8 100644
--- a/arch/arm64/boot/dts/qcom/msm8916.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8916.dtsi
@@ -86,6 +86,7 @@ mpss_mem: mpss@86800000 {
 			 */
 			reg = <0x0 0x86800000 0x0 0x2b00000>;
 			no-map;
+			status = "disabled";
 		};
 
 		wcnss_mem: wcnss {
@@ -93,6 +94,7 @@ wcnss_mem: wcnss {
 			alignment = <0x0 0x100000>;
 			alloc-ranges = <0x0 0x86800000 0x0 0x8000000>;
 			no-map;
+			status = "disabled";
 		};
 
 		venus_mem: venus {
@@ -100,6 +102,7 @@ venus_mem: venus {
 			alignment = <0x0 0x100000>;
 			alloc-ranges = <0x0 0x86800000 0x0 0x8000000>;
 			no-map;
+			status = "disabled";
 		};
 
 		mba_mem: mba {
@@ -107,6 +110,7 @@ mba_mem: mba {
 			alignment = <0x0 0x100000>;
 			alloc-ranges = <0x0 0x86800000 0x0 0x8000000>;
 			no-map;
+			status = "disabled";
 		};
 	};
 
diff --git a/arch/arm64/boot/dts/qcom/msm8939-samsung-a7.dts b/arch/arm64/boot/dts/qcom/msm8939-samsung-a7.dts
index ba652909d162..fccd8fec8b8f 100644
--- a/arch/arm64/boot/dts/qcom/msm8939-samsung-a7.dts
+++ b/arch/arm64/boot/dts/qcom/msm8939-samsung-a7.dts
@@ -352,6 +352,10 @@ &wcnss_iris {
 	compatible = "qcom,wcn3660b";
 };
 
+&wcnss_mem {
+	status = "okay";
+};
+
 &tlmm {
 	accel_int_default: accel-int-default-state {
 		pins = "gpio115";
diff --git a/arch/arm64/boot/dts/qcom/msm8939-sony-xperia-kanuti-tulip.dts b/arch/arm64/boot/dts/qcom/msm8939-sony-xperia-kanuti-tulip.dts
index cb893345c44b..eeb4d578c6fa 100644
--- a/arch/arm64/boot/dts/qcom/msm8939-sony-xperia-kanuti-tulip.dts
+++ b/arch/arm64/boot/dts/qcom/msm8939-sony-xperia-kanuti-tulip.dts
@@ -91,3 +91,7 @@ &wcnss {
 &wcnss_iris {
 	compatible = "qcom,wcn3660";
 };
+
+&wcnss_mem {
+	status = "okay";
+};
diff --git a/arch/arm64/boot/dts/qcom/msm8939.dtsi b/arch/arm64/boot/dts/qcom/msm8939.dtsi
index ebea6de1177b..c50f6d828fed 100644
--- a/arch/arm64/boot/dts/qcom/msm8939.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8939.dtsi
@@ -358,6 +358,7 @@ mpss_mem: mpss@86800000 {
 			 */
 			reg = <0x0 0x86800000 0x0 0x5500000>;
 			no-map;
+			status = "disabled";
 		};
 
 		wcnss_mem: wcnss {
@@ -365,6 +366,7 @@ wcnss_mem: wcnss {
 			alignment = <0x0 0x100000>;
 			alloc-ranges = <0x0 0x86800000 0x0 0x8000000>;
 			no-map;
+			status = "disabled";
 		};
 
 		venus_mem: venus {
@@ -372,6 +374,7 @@ venus_mem: venus {
 			alignment = <0x0 0x100000>;
 			alloc-ranges = <0x0 0x86800000 0x0 0x8000000>;
 			no-map;
+			status = "disabled";
 		};
 
 		mba_mem: mba {
@@ -379,6 +382,7 @@ mba_mem: mba {
 			alignment = <0x0 0x100000>;
 			alloc-ranges = <0x0 0x86800000 0x0 0x8000000>;
 			no-map;
+			status = "disabled";
 		};
 	};
 

-- 
2.42.0


^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH 8/9] arm64: dts: qcom: msm8916/39: Move mpss_mem size to boards
  2023-09-11 17:41 [PATCH 0/9] arm64: dts: qcom: msm8916/39: Reserve firmware memory dynamically Stephan Gerhold
                   ` (6 preceding siblings ...)
  2023-09-11 17:41 ` [PATCH 7/9] arm64: dts: qcom: msm8916/39: Disable unneeded firmware reservations Stephan Gerhold
@ 2023-09-11 17:41 ` Stephan Gerhold
  2023-09-15 13:51   ` Konrad Dybcio
  2023-09-11 17:41 ` [PATCH 9/9] arm64: dts: qcom: msm8916/39: Fix venus memory size Stephan Gerhold
  2023-09-20 17:14 ` [PATCH 0/9] arm64: dts: qcom: msm8916/39: Reserve firmware memory dynamically Bjorn Andersson
  9 siblings, 1 reply; 29+ messages in thread
From: Stephan Gerhold @ 2023-09-11 17:41 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Andy Gross, Konrad Dybcio, linux-arm-msm, devicetree,
	linux-kernel, Bryan O'Donoghue, Stephan Gerhold

The modem firmware size is typically highly device-specific.
The current size of the mpss_mem region in msm8916.dtsi (0x2b00000)
only works for some APQ8016 devices without full-featured modem,
such as the DragonBoard 410c.

The full modem firmware is typically about twice as large (~45 MiB
-> ~90 MiB) but also varies by a few MiB from device to device. Since
these devices are quite memory-constrained nowadays it's important to
minimize the unnecessary memory reservations.

Make it clear that each board needs to specify the necessary mpss_mem
size by replacing the DB410c-specific size in msm8916.dtsi with a
simple comment. &mpss_mem is disabled by default so it's fine to leave
some properties up to the boards if they want to enable it.

Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
---
 arch/arm64/boot/dts/qcom/apq8016-sbc.dts | 1 +
 arch/arm64/boot/dts/qcom/msm8916.dtsi    | 2 +-
 arch/arm64/boot/dts/qcom/msm8939.dtsi    | 2 +-
 3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/apq8016-sbc.dts b/arch/arm64/boot/dts/qcom/apq8016-sbc.dts
index ae510c5ec830..3381550a5c9e 100644
--- a/arch/arm64/boot/dts/qcom/apq8016-sbc.dts
+++ b/arch/arm64/boot/dts/qcom/apq8016-sbc.dts
@@ -263,6 +263,7 @@ &mpss {
 
 &mpss_mem {
 	status = "okay";
+	reg = <0x0 0x86800000 0x0 0x2b00000>;
 };
 
 &pm8916_codec {
diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi b/arch/arm64/boot/dts/qcom/msm8916.dtsi
index 8457472c9ad8..4d867078388d 100644
--- a/arch/arm64/boot/dts/qcom/msm8916.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8916.dtsi
@@ -84,7 +84,7 @@ mpss_mem: mpss@86800000 {
 			 * alignment = <0x0 0x400000>;
 			 * alloc-ranges = <0x0 0x86800000 0x0 0x8000000>;
 			 */
-			reg = <0x0 0x86800000 0x0 0x2b00000>;
+			reg = <0x0 0x86800000 0x0 0>; /* size is device-specific */
 			no-map;
 			status = "disabled";
 		};
diff --git a/arch/arm64/boot/dts/qcom/msm8939.dtsi b/arch/arm64/boot/dts/qcom/msm8939.dtsi
index c50f6d828fed..ba177725f3d7 100644
--- a/arch/arm64/boot/dts/qcom/msm8939.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8939.dtsi
@@ -356,7 +356,7 @@ mpss_mem: mpss@86800000 {
 			 * alignment = <0x0 0x400000>;
 			 * alloc-ranges = <0x0 0x86800000 0x0 0x8000000>;
 			 */
-			reg = <0x0 0x86800000 0x0 0x5500000>;
+			reg = <0x0 0x86800000 0x0 0>; /* size is device-specific */
 			no-map;
 			status = "disabled";
 		};

-- 
2.42.0


^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH 9/9] arm64: dts: qcom: msm8916/39: Fix venus memory size
  2023-09-11 17:41 [PATCH 0/9] arm64: dts: qcom: msm8916/39: Reserve firmware memory dynamically Stephan Gerhold
                   ` (7 preceding siblings ...)
  2023-09-11 17:41 ` [PATCH 8/9] arm64: dts: qcom: msm8916/39: Move mpss_mem size to boards Stephan Gerhold
@ 2023-09-11 17:41 ` Stephan Gerhold
  2023-09-12  7:50   ` Konrad Dybcio
  2023-09-20 17:14 ` [PATCH 0/9] arm64: dts: qcom: msm8916/39: Reserve firmware memory dynamically Bjorn Andersson
  9 siblings, 1 reply; 29+ messages in thread
From: Stephan Gerhold @ 2023-09-11 17:41 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Andy Gross, Konrad Dybcio, linux-arm-msm, devicetree,
	linux-kernel, Bryan O'Donoghue, Stephan Gerhold

Both MSM8916 and MSM8939 have unnecessarily large reservations for the
venus firmware for some reason. According to the ELF headers and
downstream [1] 5 MiB is enough. Let's set the minimum size as default.

With the dynamic reserved memory allocations boards can easily override
this if needed, although in practice there does not seem to be any
device with a different venus firmware size.

[1]: https://git.codelinaro.org/clo/la/kernel/msm-3.10/-/blame/LA.BR.1.2.9.1-02310-8x16.0/arch/arm/boot/dts/qcom/msm8939-common.dtsi#L69

Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
---
 arch/arm64/boot/dts/qcom/msm8916.dtsi | 2 +-
 arch/arm64/boot/dts/qcom/msm8939.dtsi | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi b/arch/arm64/boot/dts/qcom/msm8916.dtsi
index 4d867078388d..1e94e26b8fb0 100644
--- a/arch/arm64/boot/dts/qcom/msm8916.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8916.dtsi
@@ -98,7 +98,7 @@ wcnss_mem: wcnss {
 		};
 
 		venus_mem: venus {
-			size = <0x0 0x600000>;
+			size = <0x0 0x500000>;
 			alignment = <0x0 0x100000>;
 			alloc-ranges = <0x0 0x86800000 0x0 0x8000000>;
 			no-map;
diff --git a/arch/arm64/boot/dts/qcom/msm8939.dtsi b/arch/arm64/boot/dts/qcom/msm8939.dtsi
index ba177725f3d7..715c86c217c5 100644
--- a/arch/arm64/boot/dts/qcom/msm8939.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8939.dtsi
@@ -370,7 +370,7 @@ wcnss_mem: wcnss {
 		};
 
 		venus_mem: venus {
-			size = <0x0 0x800000>;
+			size = <0x0 0x500000>;
 			alignment = <0x0 0x100000>;
 			alloc-ranges = <0x0 0x86800000 0x0 0x8000000>;
 			no-map;

-- 
2.42.0


^ permalink raw reply related	[flat|nested] 29+ messages in thread

* Re: [PATCH 1/9] arm64: dts: qcom: msm8916: Disable venus by default
  2023-09-11 17:41 ` [PATCH 1/9] arm64: dts: qcom: msm8916: Disable venus by default Stephan Gerhold
@ 2023-09-12  6:34   ` Bryan O'Donoghue
  0 siblings, 0 replies; 29+ messages in thread
From: Bryan O'Donoghue @ 2023-09-12  6:34 UTC (permalink / raw)
  To: Stephan Gerhold, Bjorn Andersson
  Cc: Andy Gross, Konrad Dybcio, linux-arm-msm, devicetree, linux-kernel

On 11/09/2023 18:41, Stephan Gerhold wrote:
> Venus needs firmware that is usually signed with a device-specific key.
> There are also devices that might not need it (especially during
> bring-up), so let's follow more recent SoCs and disable it by default.
> 
> Enable it explicitly for all current devices except msm8916-mtp. That
> one has just UART enabled currently so it cannot really benefit from
> Venus.
> 
> Signed-off-by: Stephan Gerhold <stephan@gerhold.net>

Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>


^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH 2/9] arm64: dts: qcom: msm8916/39: Disable GPU by default
  2023-09-11 17:41 ` [PATCH 2/9] arm64: dts: qcom: msm8916/39: Disable GPU " Stephan Gerhold
@ 2023-09-12  6:35   ` Bryan O'Donoghue
  2023-09-12  7:45   ` Konrad Dybcio
  1 sibling, 0 replies; 29+ messages in thread
From: Bryan O'Donoghue @ 2023-09-12  6:35 UTC (permalink / raw)
  To: Stephan Gerhold, Bjorn Andersson
  Cc: Andy Gross, Konrad Dybcio, linux-arm-msm, devicetree, linux-kernel

On 11/09/2023 18:41, Stephan Gerhold wrote:
> MSM8916/39 do not need signed GPU firmware so it is generally okay to
> have it enabled by default. However, currently the GPU does not work
> without also enabling MDSS and it's questionable if someone would
> really need it without a display in practice.
> 
> For consistency let's follow newer SoCs and disable the GPU by default.
> Enable it for all existing devices that already have &mdss enabled.
> 
> Signed-off-by: Stephan Gerhold <stephan@gerhold.net>

Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>


^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH 3/9] arm64: dts: qcom: msm8916-ufi: Drop gps_mem for now
  2023-09-11 17:41 ` [PATCH 3/9] arm64: dts: qcom: msm8916-ufi: Drop gps_mem for now Stephan Gerhold
@ 2023-09-12  6:36   ` Bryan O'Donoghue
  2023-09-12  7:42     ` Stephan Gerhold
  0 siblings, 1 reply; 29+ messages in thread
From: Bryan O'Donoghue @ 2023-09-12  6:36 UTC (permalink / raw)
  To: Stephan Gerhold, Bjorn Andersson
  Cc: Andy Gross, Konrad Dybcio, linux-arm-msm, devicetree, linux-kernel

On 11/09/2023 18:41, Stephan Gerhold wrote:
> gps_mem is needed by the modem firmware for GPS to work. However, it is
> accessed via QMI memshare [1] which is not available upstream yet.
> Until it lands upstream reserving this does not provide any advantage.
> 
> [1]: https://lore.kernel.org/linux-arm-msm/20210319172321.22248-1-nikitos.tr@gmail.com/
> 
> Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
> ---
>   arch/arm64/boot/dts/qcom/msm8916-ufi.dtsi | 5 -----
>   1 file changed, 5 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/qcom/msm8916-ufi.dtsi b/arch/arm64/boot/dts/qcom/msm8916-ufi.dtsi
> index c759c0544dd9..69f268db4df9 100644
> --- a/arch/arm64/boot/dts/qcom/msm8916-ufi.dtsi
> +++ b/arch/arm64/boot/dts/qcom/msm8916-ufi.dtsi
> @@ -22,11 +22,6 @@ mpss_mem: mpss@86800000 {
>   			reg = <0x0 0x86800000 0x0 0x5500000>;
>   			no-map;
>   		};
> -
> -		gps_mem: gps@8bd00000 {
> -			reg = <0x0 0x8bd00000 0x0 0x200000>;
> -			no-map;
> -		};
>   	};
>   
>   	gpio-keys {
> 

Should this have a Fixes tag, should probably be applied to stable.

Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH 3/9] arm64: dts: qcom: msm8916-ufi: Drop gps_mem for now
  2023-09-12  6:36   ` Bryan O'Donoghue
@ 2023-09-12  7:42     ` Stephan Gerhold
  0 siblings, 0 replies; 29+ messages in thread
From: Stephan Gerhold @ 2023-09-12  7:42 UTC (permalink / raw)
  To: Bryan O'Donoghue
  Cc: Bjorn Andersson, Andy Gross, Konrad Dybcio, linux-arm-msm,
	devicetree, linux-kernel

On Tue, Sep 12, 2023 at 07:36:43AM +0100, Bryan O'Donoghue wrote:
> On 11/09/2023 18:41, Stephan Gerhold wrote:
> > gps_mem is needed by the modem firmware for GPS to work. However, it is
> > accessed via QMI memshare [1] which is not available upstream yet.
> > Until it lands upstream reserving this does not provide any advantage.
> > 
> > [1]: https://lore.kernel.org/linux-arm-msm/20210319172321.22248-1-nikitos.tr@gmail.com/
> > 
> > Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
> > ---
> >   arch/arm64/boot/dts/qcom/msm8916-ufi.dtsi | 5 -----
> >   1 file changed, 5 deletions(-)
> > 
> > diff --git a/arch/arm64/boot/dts/qcom/msm8916-ufi.dtsi b/arch/arm64/boot/dts/qcom/msm8916-ufi.dtsi
> > index c759c0544dd9..69f268db4df9 100644
> > --- a/arch/arm64/boot/dts/qcom/msm8916-ufi.dtsi
> > +++ b/arch/arm64/boot/dts/qcom/msm8916-ufi.dtsi
> > @@ -22,11 +22,6 @@ mpss_mem: mpss@86800000 {
> >   			reg = <0x0 0x86800000 0x0 0x5500000>;
> >   			no-map;
> >   		};
> > -
> > -		gps_mem: gps@8bd00000 {
> > -			reg = <0x0 0x8bd00000 0x0 0x200000>;
> > -			no-map;
> > -		};
> >   	};
> >   	gpio-keys {
> > 
> 
> Should this have a Fixes tag, should probably be applied to stable.
> 

I'm probably a bit "overcautious" when it comes to stable backporting,
but I think this is not strictly a fix but more like cleanup. It doesn't
cause any trouble to reserve the extra memory, it just wastes some RAM.

Thanks,
Stephan

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH 2/9] arm64: dts: qcom: msm8916/39: Disable GPU by default
  2023-09-11 17:41 ` [PATCH 2/9] arm64: dts: qcom: msm8916/39: Disable GPU " Stephan Gerhold
  2023-09-12  6:35   ` Bryan O'Donoghue
@ 2023-09-12  7:45   ` Konrad Dybcio
  1 sibling, 0 replies; 29+ messages in thread
From: Konrad Dybcio @ 2023-09-12  7:45 UTC (permalink / raw)
  To: Stephan Gerhold, Bjorn Andersson
  Cc: Andy Gross, linux-arm-msm, devicetree, linux-kernel,
	Bryan O'Donoghue

On 11.09.2023 19:41, Stephan Gerhold wrote:
> MSM8916/39 do not need signed GPU firmware
As in, the only piece of GPU firmware that they require, does
not feature a vendor signature.

What you said may sound overly optimistic to some :P

Konrad

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH 9/9] arm64: dts: qcom: msm8916/39: Fix venus memory size
  2023-09-11 17:41 ` [PATCH 9/9] arm64: dts: qcom: msm8916/39: Fix venus memory size Stephan Gerhold
@ 2023-09-12  7:50   ` Konrad Dybcio
  0 siblings, 0 replies; 29+ messages in thread
From: Konrad Dybcio @ 2023-09-12  7:50 UTC (permalink / raw)
  To: Stephan Gerhold, Bjorn Andersson
  Cc: Andy Gross, linux-arm-msm, devicetree, linux-kernel,
	Bryan O'Donoghue

On 11.09.2023 19:41, Stephan Gerhold wrote:
> Both MSM8916 and MSM8939 have unnecessarily large reservations for the
> venus firmware for some reason. According to the ELF headers and
> downstream [1] 5 MiB is enough. Let's set the minimum size as default.
> 
> With the dynamic reserved memory allocations boards can easily override
> this if needed, although in practice there does not seem to be any
> device with a different venus firmware size.
> 
> [1]: https://git.codelinaro.org/clo/la/kernel/msm-3.10/-/blame/LA.BR.1.2.9.1-02310-8x16.0/arch/arm/boot/dts/qcom/msm8939-common.dtsi#L69
> 
> Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
> ---
Every meg counts when you only have a gig and change!

I'd prefer this to be separate patches for 16 and 39 though..


Konrad

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH 5/9] arm64: dts: qcom: msm8916: Reserve MBA memory dynamically
  2023-09-11 17:41 ` [PATCH 5/9] arm64: dts: qcom: msm8916: Reserve MBA " Stephan Gerhold
@ 2023-09-13  8:59   ` Konrad Dybcio
  0 siblings, 0 replies; 29+ messages in thread
From: Konrad Dybcio @ 2023-09-13  8:59 UTC (permalink / raw)
  To: Stephan Gerhold, Bjorn Andersson
  Cc: Andy Gross, linux-arm-msm, devicetree, linux-kernel,
	Bryan O'Donoghue

On 11.09.2023 19:41, Stephan Gerhold wrote:
> At a first glance the MBA memory region on MSM8916 looks intentionally
> placed at the fixed address 0x8ea00000. This is what the ELF headers of
> the firmware specify as base address, and the typical Qualcomm-specific
> bits suggest the binary is not relocatable.
> 
> However, on a closer look this is pointless: Unlike other firmware
> images the hardware expects to have the raw ELF image loaded to the MBA
> region, including the ELF header (without parsing it at all). This
> means that we actually just load the ELF header (not the code!) at
> 0x8ea00000. The real LOAD segments follow at arbitrary aligned
> addresses depending on the structure of the ELF binary.
> 
> In practice it looks like we can use an arbitrary 1 MiB-aligned region
> for MBA. The downstream/vendor kernel just allocates this dynamically
> at an arbitrary (aligned) address.
> 
> Drop the pointless fixed address and use the new dynamic reserved
> memory mechanism to allocate a region close to the others. This reduces
> gaps in the memory map and provides Linux with more contiguous memory.
> 
> Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>

Konrad

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH 4/9] arm64: dts: qcom: msm8916: Reserve firmware memory dynamically
  2023-09-11 17:41 ` [PATCH 4/9] arm64: dts: qcom: msm8916: Reserve firmware memory dynamically Stephan Gerhold
@ 2023-09-13  9:06   ` Konrad Dybcio
  2023-09-13  9:12     ` Bryan O'Donoghue
  0 siblings, 1 reply; 29+ messages in thread
From: Konrad Dybcio @ 2023-09-13  9:06 UTC (permalink / raw)
  To: Stephan Gerhold, Bjorn Andersson
  Cc: Andy Gross, linux-arm-msm, devicetree, linux-kernel,
	Bryan O'Donoghue

On 11.09.2023 19:41, Stephan Gerhold wrote:
> Most of the reserved firmware memory on MSM8916 can be relocated when
> respecting the required alignment. To avoid having to precompute the
> reserved memory regions in every board DT, describe the actual
> requirements (size, alignment, alloc-ranges) using the dynamic reserved
> memory allocation.
> 
> This approach has several advantages:
> 
>  1. We can define "templates" for the reserved memory regions in
>     msm8916.dtsi and keep only device-specific details in the board DT.
>     This is useful for the "mpss" region size for example, which varies
>     from device to device. It is no longer necessary to redefine all
>     firmware regions to shift their addresses.
> 
>  2. When some of the functionality (e.g. WCNSS, Modem, Venus) is not
>     enabled or needed for a device, the reserved memory can stay
>     disabled, freeing up the unused reservation for Linux.
> 
>  3. Devices with special requirements for one of the firmware regions
>     are handled automatically. For example, msm8916-longcheer-l8150
>     has non-relocatable "wcnss" firmware that must be loaded exactly
>     at address 0x8b600000. When this is defined as a static region,
>     the other dynamic allocations automatically adjust to a different
>     place with suitable alignment.
> 
> All in all this approach significantly reduces the boilerplate necessary
> to define the different firmware regions, and makes it easier to enable
> functionality on the different devices.
> 
> Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
> ---
[...]

>  
>  		mpss_mem: mpss@86800000 {
> +			/*
> +			 * The memory region for the mpss firmware is generally
> +			 * relocatable and could be allocated dynamically.
> +			 * However, many firmware versions tend to fail when
> +			 * loaded to some special addresses, so it is hard to
> +			 * define reliable alloc-ranges.
> +			 *
> +			 * alignment = <0x0 0x400000>;
> +			 * alloc-ranges = <0x0 0x86800000 0x0 0x8000000>;
> +			 */
Do we know of any devices that this would actually work on?

Konrad

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH 4/9] arm64: dts: qcom: msm8916: Reserve firmware memory dynamically
  2023-09-13  9:06   ` Konrad Dybcio
@ 2023-09-13  9:12     ` Bryan O'Donoghue
  2023-09-13 10:14       ` Stephan Gerhold
  0 siblings, 1 reply; 29+ messages in thread
From: Bryan O'Donoghue @ 2023-09-13  9:12 UTC (permalink / raw)
  To: Konrad Dybcio, Stephan Gerhold, Bjorn Andersson
  Cc: Andy Gross, linux-arm-msm, devicetree, linux-kernel,
	Bryan O'Donoghue

On 13/09/2023 10:06, Konrad Dybcio wrote:
> On 11.09.2023 19:41, Stephan Gerhold wrote:
>> Most of the reserved firmware memory on MSM8916 can be relocated when
>> respecting the required alignment. To avoid having to precompute the
>> reserved memory regions in every board DT, describe the actual
>> requirements (size, alignment, alloc-ranges) using the dynamic reserved
>> memory allocation.
>>
>> This approach has several advantages:
>>
>>   1. We can define "templates" for the reserved memory regions in
>>      msm8916.dtsi and keep only device-specific details in the board DT.
>>      This is useful for the "mpss" region size for example, which varies
>>      from device to device. It is no longer necessary to redefine all
>>      firmware regions to shift their addresses.
>>
>>   2. When some of the functionality (e.g. WCNSS, Modem, Venus) is not
>>      enabled or needed for a device, the reserved memory can stay
>>      disabled, freeing up the unused reservation for Linux.
>>
>>   3. Devices with special requirements for one of the firmware regions
>>      are handled automatically. For example, msm8916-longcheer-l8150
>>      has non-relocatable "wcnss" firmware that must be loaded exactly
>>      at address 0x8b600000. When this is defined as a static region,
>>      the other dynamic allocations automatically adjust to a different
>>      place with suitable alignment.
>>
>> All in all this approach significantly reduces the boilerplate necessary
>> to define the different firmware regions, and makes it easier to enable
>> functionality on the different devices.
>>
>> Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
>> ---
> [...]
> 
>>   
>>   		mpss_mem: mpss@86800000 {
>> +			/*
>> +			 * The memory region for the mpss firmware is generally
>> +			 * relocatable and could be allocated dynamically.
>> +			 * However, many firmware versions tend to fail when
>> +			 * loaded to some special addresses, so it is hard to
>> +			 * define reliable alloc-ranges.
>> +			 *
>> +			 * alignment = <0x0 0x400000>;
>> +			 * alloc-ranges = <0x0 0x86800000 0x0 0x8000000>;
>> +			 */
> Do we know of any devices that this would actually work on?
> 
> Konrad

I have the same question here.

How was this tested ?

---
bod

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH 4/9] arm64: dts: qcom: msm8916: Reserve firmware memory dynamically
  2023-09-13  9:12     ` Bryan O'Donoghue
@ 2023-09-13 10:14       ` Stephan Gerhold
  2023-09-13 19:39         ` Konrad Dybcio
  0 siblings, 1 reply; 29+ messages in thread
From: Stephan Gerhold @ 2023-09-13 10:14 UTC (permalink / raw)
  To: Konrad Dybcio, Bryan O'Donoghue
  Cc: Bjorn Andersson, Andy Gross, linux-arm-msm, devicetree, linux-kernel

On Wed, Sep 13, 2023 at 10:12:12AM +0100, Bryan O'Donoghue wrote:
> On 13/09/2023 10:06, Konrad Dybcio wrote:
> > On 11.09.2023 19:41, Stephan Gerhold wrote:
> > > Most of the reserved firmware memory on MSM8916 can be relocated when
> > > respecting the required alignment. To avoid having to precompute the
> > > reserved memory regions in every board DT, describe the actual
> > > requirements (size, alignment, alloc-ranges) using the dynamic reserved
> > > memory allocation.
> > > 
> > > This approach has several advantages:
> > > 
> > >   1. We can define "templates" for the reserved memory regions in
> > >      msm8916.dtsi and keep only device-specific details in the board DT.
> > >      This is useful for the "mpss" region size for example, which varies
> > >      from device to device. It is no longer necessary to redefine all
> > >      firmware regions to shift their addresses.
> > > 
> > >   2. When some of the functionality (e.g. WCNSS, Modem, Venus) is not
> > >      enabled or needed for a device, the reserved memory can stay
> > >      disabled, freeing up the unused reservation for Linux.
> > > 
> > >   3. Devices with special requirements for one of the firmware regions
> > >      are handled automatically. For example, msm8916-longcheer-l8150
> > >      has non-relocatable "wcnss" firmware that must be loaded exactly
> > >      at address 0x8b600000. When this is defined as a static region,
> > >      the other dynamic allocations automatically adjust to a different
> > >      place with suitable alignment.
> > > 
> > > All in all this approach significantly reduces the boilerplate necessary
> > > to define the different firmware regions, and makes it easier to enable
> > > functionality on the different devices.
> > > 
> > > Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
> > > ---
> > [...]
> > 
> > >   		mpss_mem: mpss@86800000 {
> > > +			/*
> > > +			 * The memory region for the mpss firmware is generally
> > > +			 * relocatable and could be allocated dynamically.
> > > +			 * However, many firmware versions tend to fail when
> > > +			 * loaded to some special addresses, so it is hard to
> > > +			 * define reliable alloc-ranges.
> > > +			 *
> > > +			 * alignment = <0x0 0x400000>;
> > > +			 * alloc-ranges = <0x0 0x86800000 0x0 0x8000000>;
> > > +			 */
> > Do we know of any devices that this would actually work on?

Yes, the "modem" firmware on DB410c seems to be fine with literally all
correctly aligned addresses I've tested so far. But when I manually
experimented with other addresses on actual smartphones it exploded on
certain addresses, specific to the firmware version / device.

> I have the same question here.
> 
> How was this tested ?
> 

Bryan, your question sounds more general, about the dynamic allocation
of the firmware regions in general (also for wcnss etc).

I'll just explain my tests for both with more detail :D

For wcnss/venus a different memory region has been used in postmarketOS
for years because I shifted it early on to make room for the larger
modem firmware. I've never heard of any problems with this on the 50+
different MSM8916-related devices we support there, with many different
firmware versions. When preparing this patch set I experimented some
more and noticed there is a limit (I think around 0x90000000) where TZ
refuses to load/verify the firmware. The alloc-ranges is chosen
conservatively to avoid potential trouble. Also because I didn't see
any use case to have a huge range specified there...

For mpss it's more tricky. First, if you'd comment out the alignment and
alloc-ranges it would most likely work correctly because Linux just
allocates it at the start of the range, on 0x86800000 like it was
before. However, the DT spec doesn't strictly specify where inside the
range the region is allocated, so I manually experimented with some
other addresses within the range:

 - On DB410c it works just fine. All addresses I tried work without any
   problems.

 - On longcheer-l8150 the modem firmare works fine when the memory
   region starts somewhere between 0x86800000 and 0x8a800000. It also
   works again after 0x8e800000. But on anything between 0x8a800000 and
   0x8e800000 it's broken for who knows what reason.

 - On some Samsung devices only 0x86800000 and maybe one or two other
   addresses worked, again for who knows what reason. Most other
   addresses were broken.

The symptom is usually some timeout while starting, the actual signature
verification seems to work fine. I believe that in theory it's supposed
to be relocatable, but in practice they hardcoded some addresses or did
some other funny stuff in some of the firmware versions.

To be safe my conclusion was to keep mpss at a fixed address and only
allocate the others dynamically. This is how the patch implements it.

Thanks,
Stephan

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH 4/9] arm64: dts: qcom: msm8916: Reserve firmware memory dynamically
  2023-09-13 10:14       ` Stephan Gerhold
@ 2023-09-13 19:39         ` Konrad Dybcio
  2023-09-14 14:09           ` Stephan Gerhold
  0 siblings, 1 reply; 29+ messages in thread
From: Konrad Dybcio @ 2023-09-13 19:39 UTC (permalink / raw)
  To: Stephan Gerhold, Bryan O'Donoghue
  Cc: Bjorn Andersson, Andy Gross, linux-arm-msm, devicetree, linux-kernel

On 13.09.2023 12:14, Stephan Gerhold wrote:
> On Wed, Sep 13, 2023 at 10:12:12AM +0100, Bryan O'Donoghue wrote:
>> On 13/09/2023 10:06, Konrad Dybcio wrote:
>>> On 11.09.2023 19:41, Stephan Gerhold wrote:
>>>> Most of the reserved firmware memory on MSM8916 can be relocated when
>>>> respecting the required alignment. To avoid having to precompute the
>>>> reserved memory regions in every board DT, describe the actual
>>>> requirements (size, alignment, alloc-ranges) using the dynamic reserved
>>>> memory allocation.
>>>>
>>>> This approach has several advantages:
>>>>
>>>>   1. We can define "templates" for the reserved memory regions in
>>>>      msm8916.dtsi and keep only device-specific details in the board DT.
>>>>      This is useful for the "mpss" region size for example, which varies
>>>>      from device to device. It is no longer necessary to redefine all
>>>>      firmware regions to shift their addresses.
>>>>
>>>>   2. When some of the functionality (e.g. WCNSS, Modem, Venus) is not
>>>>      enabled or needed for a device, the reserved memory can stay
>>>>      disabled, freeing up the unused reservation for Linux.
>>>>
>>>>   3. Devices with special requirements for one of the firmware regions
>>>>      are handled automatically. For example, msm8916-longcheer-l8150
>>>>      has non-relocatable "wcnss" firmware that must be loaded exactly
>>>>      at address 0x8b600000. When this is defined as a static region,
>>>>      the other dynamic allocations automatically adjust to a different
>>>>      place with suitable alignment.
>>>>
>>>> All in all this approach significantly reduces the boilerplate necessary
>>>> to define the different firmware regions, and makes it easier to enable
>>>> functionality on the different devices.
>>>>
>>>> Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
>>>> ---
>>> [...]
>>>
>>>>   		mpss_mem: mpss@86800000 {
>>>> +			/*
>>>> +			 * The memory region for the mpss firmware is generally
>>>> +			 * relocatable and could be allocated dynamically.
>>>> +			 * However, many firmware versions tend to fail when
>>>> +			 * loaded to some special addresses, so it is hard to
>>>> +			 * define reliable alloc-ranges.
>>>> +			 *
>>>> +			 * alignment = <0x0 0x400000>;
>>>> +			 * alloc-ranges = <0x0 0x86800000 0x0 0x8000000>;
>>>> +			 */
>>> Do we know of any devices that this would actually work on?
> 
> Yes, the "modem" firmware on DB410c seems to be fine with literally all
> correctly aligned addresses I've tested so far. But when I manually
> experimented with other addresses on actual smartphones it exploded on
> certain addresses, specific to the firmware version / device.
Moreover, the "modem" on DB410c would probably be fine with
*anything* you try to give it..

[...]

> 
>  - On DB410c it works just fine. All addresses I tried work without any
>    problems.
> 
>  - On longcheer-l8150 the modem firmare works fine when the memory
>    region starts somewhere between 0x86800000 and 0x8a800000. It also
>    works again after 0x8e800000. But on anything between 0x8a800000 and
>    0x8e800000 it's broken for who knows what reason.
> 
>  - On some Samsung devices only 0x86800000 and maybe one or two other
>    addresses worked, again for who knows what reason. Most other
>    addresses were broken.
Were you able to find a phone (likely a very reference-design-based
one) that this worked on, btw?

[...]

> To be safe my conclusion was to keep mpss at a fixed address and only
> allocate the others dynamically. This is how the patch implements it.
That sounds like the sane approach indeed.

Konrad

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH 4/9] arm64: dts: qcom: msm8916: Reserve firmware memory dynamically
  2023-09-13 19:39         ` Konrad Dybcio
@ 2023-09-14 14:09           ` Stephan Gerhold
  2023-09-15 13:52             ` Konrad Dybcio
  0 siblings, 1 reply; 29+ messages in thread
From: Stephan Gerhold @ 2023-09-14 14:09 UTC (permalink / raw)
  To: Konrad Dybcio
  Cc: Bryan O'Donoghue, Bjorn Andersson, Andy Gross, linux-arm-msm,
	devicetree, linux-kernel

On Wed, Sep 13, 2023 at 09:39:50PM +0200, Konrad Dybcio wrote:
> On 13.09.2023 12:14, Stephan Gerhold wrote:
> > On Wed, Sep 13, 2023 at 10:12:12AM +0100, Bryan O'Donoghue wrote:
> >> On 13/09/2023 10:06, Konrad Dybcio wrote:
> >>> On 11.09.2023 19:41, Stephan Gerhold wrote:
> >>>> Most of the reserved firmware memory on MSM8916 can be relocated when
> >>>> respecting the required alignment. To avoid having to precompute the
> >>>> reserved memory regions in every board DT, describe the actual
> >>>> requirements (size, alignment, alloc-ranges) using the dynamic reserved
> >>>> memory allocation.
> >>>>
> >>>> This approach has several advantages:
> >>>>
> >>>>   1. We can define "templates" for the reserved memory regions in
> >>>>      msm8916.dtsi and keep only device-specific details in the board DT.
> >>>>      This is useful for the "mpss" region size for example, which varies
> >>>>      from device to device. It is no longer necessary to redefine all
> >>>>      firmware regions to shift their addresses.
> >>>>
> >>>>   2. When some of the functionality (e.g. WCNSS, Modem, Venus) is not
> >>>>      enabled or needed for a device, the reserved memory can stay
> >>>>      disabled, freeing up the unused reservation for Linux.
> >>>>
> >>>>   3. Devices with special requirements for one of the firmware regions
> >>>>      are handled automatically. For example, msm8916-longcheer-l8150
> >>>>      has non-relocatable "wcnss" firmware that must be loaded exactly
> >>>>      at address 0x8b600000. When this is defined as a static region,
> >>>>      the other dynamic allocations automatically adjust to a different
> >>>>      place with suitable alignment.
> >>>>
> >>>> All in all this approach significantly reduces the boilerplate necessary
> >>>> to define the different firmware regions, and makes it easier to enable
> >>>> functionality on the different devices.
> >>>>
> >>>> Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
> >>>> ---
> >>> [...]
> >>>
> >>>>   		mpss_mem: mpss@86800000 {
> >>>> +			/*
> >>>> +			 * The memory region for the mpss firmware is generally
> >>>> +			 * relocatable and could be allocated dynamically.
> >>>> +			 * However, many firmware versions tend to fail when
> >>>> +			 * loaded to some special addresses, so it is hard to
> >>>> +			 * define reliable alloc-ranges.
> >>>> +			 *
> >>>> +			 * alignment = <0x0 0x400000>;
> >>>> +			 * alloc-ranges = <0x0 0x86800000 0x0 0x8000000>;
> >>>> +			 */
> >>> Do we know of any devices that this would actually work on?
> [...]
> >  - On DB410c it works just fine. All addresses I tried work without any
> >    problems.
> > 
> >  - On longcheer-l8150 the modem firmare works fine when the memory
> >    region starts somewhere between 0x86800000 and 0x8a800000. It also
> >    works again after 0x8e800000. But on anything between 0x8a800000 and
> >    0x8e800000 it's broken for who knows what reason.
> > [...]
> Were you able to find a phone (likely a very reference-design-based
> one) that this worked on, btw?

Actually I would count the Longcheer devices (l8150 = Wileyfox Swift and
l8910 = BQ Aquaris X5) to the category of close-to-QRD-based devices.
Based on quick tests both behave like described above (only
0x8a800000-0x8e800000 is broken). Same for wingtech-wt88047.

In other words, for those using the dynamic allocation would work fine,
because the alloc-ranges = <0x0 0x86800000 0x0 0x8000000>; only includes
working start addresses from 0x86800000 to ~0x89800000 (with a size of
0x5000000).

I guess I could use it for them and only make other devices use a fixed
address. But I also don't quite have the capacity to test every device
to see if relocating the region works or not.

I think it's still easiest to allocate mpss on a fixed address
everywhere. The only real disadvantage is that overriding "reg", e.g.

	&mpss_mem {
		reg = <0x0 0x86800000 0x0 0x5100000>;
	};

is a bit more ugly than overriding size:

	&mpss_mem {
		size = <0x0 0x5100000>;
	};

but well, this is a very minor disadvantage.

Thanks,
Stephan

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH 7/9] arm64: dts: qcom: msm8916/39: Disable unneeded firmware reservations
  2023-09-11 17:41 ` [PATCH 7/9] arm64: dts: qcom: msm8916/39: Disable unneeded firmware reservations Stephan Gerhold
@ 2023-09-15 13:51   ` Konrad Dybcio
  2023-09-15 14:02     ` Stephan Gerhold
  0 siblings, 1 reply; 29+ messages in thread
From: Konrad Dybcio @ 2023-09-15 13:51 UTC (permalink / raw)
  To: Stephan Gerhold, Bjorn Andersson
  Cc: Andy Gross, linux-arm-msm, devicetree, linux-kernel,
	Bryan O'Donoghue

On 11.09.2023 19:41, Stephan Gerhold wrote:
> Now that we no longer have fixed addresses for the firmware memory
> regions, disable them by default and only enable them together with
> the actual user in the board DT.
> 
> This frees up unnecessary reserved memory for boards that do not use
> some of the remoteprocs and allows moving selected device-specific
> properties (such as firmware size) to the board-specific DT part in
> the next step.
> 
> Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
> ---
Wouldn't delete-node on the outliers be more concise?

Konrad

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH 8/9] arm64: dts: qcom: msm8916/39: Move mpss_mem size to boards
  2023-09-11 17:41 ` [PATCH 8/9] arm64: dts: qcom: msm8916/39: Move mpss_mem size to boards Stephan Gerhold
@ 2023-09-15 13:51   ` Konrad Dybcio
  2023-09-15 14:03     ` Stephan Gerhold
  0 siblings, 1 reply; 29+ messages in thread
From: Konrad Dybcio @ 2023-09-15 13:51 UTC (permalink / raw)
  To: Stephan Gerhold, Bjorn Andersson
  Cc: Andy Gross, linux-arm-msm, devicetree, linux-kernel,
	Bryan O'Donoghue

On 11.09.2023 19:41, Stephan Gerhold wrote:
> The modem firmware size is typically highly device-specific.
> The current size of the mpss_mem region in msm8916.dtsi (0x2b00000)
> only works for some APQ8016 devices without full-featured modem,
> such as the DragonBoard 410c.
> 
> The full modem firmware is typically about twice as large (~45 MiB
> -> ~90 MiB) but also varies by a few MiB from device to device. Since
> these devices are quite memory-constrained nowadays it's important to
> minimize the unnecessary memory reservations.
> 
> Make it clear that each board needs to specify the necessary mpss_mem
> size by replacing the DB410c-specific size in msm8916.dtsi with a
> simple comment. &mpss_mem is disabled by default so it's fine to leave
> some properties up to the boards if they want to enable it.
> 
> Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
> ---
Any reason not to squash it with one of the earlier patches then?

Konrad

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH 4/9] arm64: dts: qcom: msm8916: Reserve firmware memory dynamically
  2023-09-14 14:09           ` Stephan Gerhold
@ 2023-09-15 13:52             ` Konrad Dybcio
  2023-09-15 14:00               ` Stephan Gerhold
  0 siblings, 1 reply; 29+ messages in thread
From: Konrad Dybcio @ 2023-09-15 13:52 UTC (permalink / raw)
  To: Stephan Gerhold
  Cc: Bryan O'Donoghue, Bjorn Andersson, Andy Gross, linux-arm-msm,
	devicetree, linux-kernel

On 14.09.2023 16:09, Stephan Gerhold wrote:
> On Wed, Sep 13, 2023 at 09:39:50PM +0200, Konrad Dybcio wrote:
>> On 13.09.2023 12:14, Stephan Gerhold wrote:
>>> On Wed, Sep 13, 2023 at 10:12:12AM +0100, Bryan O'Donoghue wrote:
>>>> On 13/09/2023 10:06, Konrad Dybcio wrote:
>>>>> On 11.09.2023 19:41, Stephan Gerhold wrote:
>>>>>> Most of the reserved firmware memory on MSM8916 can be relocated when
>>>>>> respecting the required alignment. To avoid having to precompute the
>>>>>> reserved memory regions in every board DT, describe the actual
>>>>>> requirements (size, alignment, alloc-ranges) using the dynamic reserved
>>>>>> memory allocation.
>>>>>>
>>>>>> This approach has several advantages:
>>>>>>
>>>>>>   1. We can define "templates" for the reserved memory regions in
>>>>>>      msm8916.dtsi and keep only device-specific details in the board DT.
>>>>>>      This is useful for the "mpss" region size for example, which varies
>>>>>>      from device to device. It is no longer necessary to redefine all
>>>>>>      firmware regions to shift their addresses.
>>>>>>
>>>>>>   2. When some of the functionality (e.g. WCNSS, Modem, Venus) is not
>>>>>>      enabled or needed for a device, the reserved memory can stay
>>>>>>      disabled, freeing up the unused reservation for Linux.
>>>>>>
>>>>>>   3. Devices with special requirements for one of the firmware regions
>>>>>>      are handled automatically. For example, msm8916-longcheer-l8150
>>>>>>      has non-relocatable "wcnss" firmware that must be loaded exactly
>>>>>>      at address 0x8b600000. When this is defined as a static region,
>>>>>>      the other dynamic allocations automatically adjust to a different
>>>>>>      place with suitable alignment.
>>>>>>
>>>>>> All in all this approach significantly reduces the boilerplate necessary
>>>>>> to define the different firmware regions, and makes it easier to enable
>>>>>> functionality on the different devices.
>>>>>>
>>>>>> Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
>>>>>> ---
>>>>> [...]
>>>>>
>>>>>>   		mpss_mem: mpss@86800000 {
>>>>>> +			/*
>>>>>> +			 * The memory region for the mpss firmware is generally
>>>>>> +			 * relocatable and could be allocated dynamically.
>>>>>> +			 * However, many firmware versions tend to fail when
>>>>>> +			 * loaded to some special addresses, so it is hard to
>>>>>> +			 * define reliable alloc-ranges.
>>>>>> +			 *
>>>>>> +			 * alignment = <0x0 0x400000>;
>>>>>> +			 * alloc-ranges = <0x0 0x86800000 0x0 0x8000000>;
>>>>>> +			 */
>>>>> Do we know of any devices that this would actually work on?
>> [...]
>>>  - On DB410c it works just fine. All addresses I tried work without any
>>>    problems.
>>>
>>>  - On longcheer-l8150 the modem firmare works fine when the memory
>>>    region starts somewhere between 0x86800000 and 0x8a800000. It also
>>>    works again after 0x8e800000. But on anything between 0x8a800000 and
>>>    0x8e800000 it's broken for who knows what reason.
>>> [...]
>> Were you able to find a phone (likely a very reference-design-based
>> one) that this worked on, btw?
> 
> Actually I would count the Longcheer devices (l8150 = Wileyfox Swift and
> l8910 = BQ Aquaris X5) to the category of close-to-QRD-based devices.
> Based on quick tests both behave like described above (only
> 0x8a800000-0x8e800000 is broken). Same for wingtech-wt88047.
> 
> In other words, for those using the dynamic allocation would work fine,
> because the alloc-ranges = <0x0 0x86800000 0x0 0x8000000>; only includes
> working start addresses from 0x86800000 to ~0x89800000 (with a size of
> 0x5000000).
> 
> I guess I could use it for them and only make other devices use a fixed
> address. But I also don't quite have the capacity to test every device
> to see if relocating the region works or not.
> 
> I think it's still easiest to allocate mpss on a fixed address
> everywhere. The only real disadvantage is that overriding "reg", e.g.
> 
> 	&mpss_mem {
> 		reg = <0x0 0x86800000 0x0 0x5100000>;
> 	};
> 
> is a bit more ugly than overriding size:
> 
> 	&mpss_mem {
> 		size = <0x0 0x5100000>;
> 	};
> 
> but well, this is a very minor disadvantage.
So in other words, this only *really* works on apq8016?

Konrad

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH 4/9] arm64: dts: qcom: msm8916: Reserve firmware memory dynamically
  2023-09-15 13:52             ` Konrad Dybcio
@ 2023-09-15 14:00               ` Stephan Gerhold
  0 siblings, 0 replies; 29+ messages in thread
From: Stephan Gerhold @ 2023-09-15 14:00 UTC (permalink / raw)
  To: Konrad Dybcio
  Cc: Bryan O'Donoghue, Bjorn Andersson, Andy Gross, linux-arm-msm,
	devicetree, linux-kernel

On Fri, Sep 15, 2023 at 03:52:36PM +0200, Konrad Dybcio wrote:
> On 14.09.2023 16:09, Stephan Gerhold wrote:
> > On Wed, Sep 13, 2023 at 09:39:50PM +0200, Konrad Dybcio wrote:
> >> On 13.09.2023 12:14, Stephan Gerhold wrote:
> >>> On Wed, Sep 13, 2023 at 10:12:12AM +0100, Bryan O'Donoghue wrote:
> >>>> On 13/09/2023 10:06, Konrad Dybcio wrote:
> >>>>> On 11.09.2023 19:41, Stephan Gerhold wrote:
> >>>>>> Most of the reserved firmware memory on MSM8916 can be relocated when
> >>>>>> respecting the required alignment. To avoid having to precompute the
> >>>>>> reserved memory regions in every board DT, describe the actual
> >>>>>> requirements (size, alignment, alloc-ranges) using the dynamic reserved
> >>>>>> memory allocation.
> >>>>>>
> >>>>>> This approach has several advantages:
> >>>>>>
> >>>>>>   1. We can define "templates" for the reserved memory regions in
> >>>>>>      msm8916.dtsi and keep only device-specific details in the board DT.
> >>>>>>      This is useful for the "mpss" region size for example, which varies
> >>>>>>      from device to device. It is no longer necessary to redefine all
> >>>>>>      firmware regions to shift their addresses.
> >>>>>>
> >>>>>>   2. When some of the functionality (e.g. WCNSS, Modem, Venus) is not
> >>>>>>      enabled or needed for a device, the reserved memory can stay
> >>>>>>      disabled, freeing up the unused reservation for Linux.
> >>>>>>
> >>>>>>   3. Devices with special requirements for one of the firmware regions
> >>>>>>      are handled automatically. For example, msm8916-longcheer-l8150
> >>>>>>      has non-relocatable "wcnss" firmware that must be loaded exactly
> >>>>>>      at address 0x8b600000. When this is defined as a static region,
> >>>>>>      the other dynamic allocations automatically adjust to a different
> >>>>>>      place with suitable alignment.
> >>>>>>
> >>>>>> All in all this approach significantly reduces the boilerplate necessary
> >>>>>> to define the different firmware regions, and makes it easier to enable
> >>>>>> functionality on the different devices.
> >>>>>>
> >>>>>> Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
> >>>>>> ---
> >>>>> [...]
> >>>>>
> >>>>>>   		mpss_mem: mpss@86800000 {
> >>>>>> +			/*
> >>>>>> +			 * The memory region for the mpss firmware is generally
> >>>>>> +			 * relocatable and could be allocated dynamically.
> >>>>>> +			 * However, many firmware versions tend to fail when
> >>>>>> +			 * loaded to some special addresses, so it is hard to
> >>>>>> +			 * define reliable alloc-ranges.
> >>>>>> +			 *
> >>>>>> +			 * alignment = <0x0 0x400000>;
> >>>>>> +			 * alloc-ranges = <0x0 0x86800000 0x0 0x8000000>;
> >>>>>> +			 */
> >>>>> Do we know of any devices that this would actually work on?
> >> [...]
> >>>  - On DB410c it works just fine. All addresses I tried work without any
> >>>    problems.
> >>>
> >>>  - On longcheer-l8150 the modem firmare works fine when the memory
> >>>    region starts somewhere between 0x86800000 and 0x8a800000. It also
> >>>    works again after 0x8e800000. But on anything between 0x8a800000 and
> >>>    0x8e800000 it's broken for who knows what reason.
> >>> [...]
> >> Were you able to find a phone (likely a very reference-design-based
> >> one) that this worked on, btw?
> > 
> > Actually I would count the Longcheer devices (l8150 = Wileyfox Swift and
> > l8910 = BQ Aquaris X5) to the category of close-to-QRD-based devices.
> > Based on quick tests both behave like described above (only
> > 0x8a800000-0x8e800000 is broken). Same for wingtech-wt88047.
> > 
> > In other words, for those using the dynamic allocation would work fine,
> > because the alloc-ranges = <0x0 0x86800000 0x0 0x8000000>; only includes
> > working start addresses from 0x86800000 to ~0x89800000 (with a size of
> > 0x5000000).
> > 
> > I guess I could use it for them and only make other devices use a fixed
> > address. But I also don't quite have the capacity to test every device
> > to see if relocating the region works or not.
> > 
> > I think it's still easiest to allocate mpss on a fixed address
> > everywhere. The only real disadvantage is that overriding "reg", e.g.
> > 
> > 	&mpss_mem {
> > 		reg = <0x0 0x86800000 0x0 0x5100000>;
> > 	};
> > 
> > is a bit more ugly than overriding size:
> > 
> > 	&mpss_mem {
> > 		size = <0x0 0x5100000>;
> > 	};
> > 
> > but well, this is a very minor disadvantage.
> So in other words, this only *really* works on apq8016?
> 

Hm no? As I wrote, with alloc-ranges = <0x0 0x86800000 0x0 0x8000000> it
also works on the close-to-QRD MSM8916 devices. There are some addresses
that don't work but those might also exist on APQ8016. I haven't tested
placing the firmware all over RAM on all sorts of obscure addresses (and
there is probably little advantage doing so).

With the limited alloc-ranges it would likely work on all devices that
are close to the reference design/firmware from Qualcomm.

Thanks,
Stephan

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH 7/9] arm64: dts: qcom: msm8916/39: Disable unneeded firmware reservations
  2023-09-15 13:51   ` Konrad Dybcio
@ 2023-09-15 14:02     ` Stephan Gerhold
  0 siblings, 0 replies; 29+ messages in thread
From: Stephan Gerhold @ 2023-09-15 14:02 UTC (permalink / raw)
  To: Konrad Dybcio
  Cc: Bjorn Andersson, Andy Gross, linux-arm-msm, devicetree,
	linux-kernel, Bryan O'Donoghue

On Fri, Sep 15, 2023 at 03:51:03PM +0200, Konrad Dybcio wrote:
> On 11.09.2023 19:41, Stephan Gerhold wrote:
> > Now that we no longer have fixed addresses for the firmware memory
> > regions, disable them by default and only enable them together with
> > the actual user in the board DT.
> > 
> > This frees up unnecessary reserved memory for boards that do not use
> > some of the remoteprocs and allows moving selected device-specific
> > properties (such as firmware size) to the board-specific DT part in
> > the next step.
> > 
> > Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
> > ---
> Wouldn't delete-node on the outliers be more concise?
> 

No, because you also need to delete the reference to it on the
remoteproc node, i.e.

	/delete-node/ &wcnss_mem;

	&wcnss {
		/delete-property/ memory-region;
	};

But IMO this would be inconsistent anyway. You already have to opt-in to
get WCNSS at all (i.e.

	&wcnss {
		status = "okay";
	};

), so it would be weird to have the memory region opt-out IMO.

Thanks,
Stephan

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH 8/9] arm64: dts: qcom: msm8916/39: Move mpss_mem size to boards
  2023-09-15 13:51   ` Konrad Dybcio
@ 2023-09-15 14:03     ` Stephan Gerhold
  0 siblings, 0 replies; 29+ messages in thread
From: Stephan Gerhold @ 2023-09-15 14:03 UTC (permalink / raw)
  To: Konrad Dybcio
  Cc: Bjorn Andersson, Andy Gross, linux-arm-msm, devicetree,
	linux-kernel, Bryan O'Donoghue

On Fri, Sep 15, 2023 at 03:51:52PM +0200, Konrad Dybcio wrote:
> On 11.09.2023 19:41, Stephan Gerhold wrote:
> > The modem firmware size is typically highly device-specific.
> > The current size of the mpss_mem region in msm8916.dtsi (0x2b00000)
> > only works for some APQ8016 devices without full-featured modem,
> > such as the DragonBoard 410c.
> > 
> > The full modem firmware is typically about twice as large (~45 MiB
> > -> ~90 MiB) but also varies by a few MiB from device to device. Since
> > these devices are quite memory-constrained nowadays it's important to
> > minimize the unnecessary memory reservations.
> > 
> > Make it clear that each board needs to specify the necessary mpss_mem
> > size by replacing the DB410c-specific size in msm8916.dtsi with a
> > simple comment. &mpss_mem is disabled by default so it's fine to leave
> > some properties up to the boards if they want to enable it.
> > 
> > Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
> > ---
> Any reason not to squash it with one of the earlier patches then?
> 

I'm not strictly opposed but these are really two independent changes.
One drops the fixed memory regions and makes the allocation dynamic,
in the SoC dtsi. This one moves board-specific information out of the
SoC dtsi (to the boards).

Thanks,
Stephan

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH 0/9] arm64: dts: qcom: msm8916/39: Reserve firmware memory dynamically
  2023-09-11 17:41 [PATCH 0/9] arm64: dts: qcom: msm8916/39: Reserve firmware memory dynamically Stephan Gerhold
                   ` (8 preceding siblings ...)
  2023-09-11 17:41 ` [PATCH 9/9] arm64: dts: qcom: msm8916/39: Fix venus memory size Stephan Gerhold
@ 2023-09-20 17:14 ` Bjorn Andersson
  9 siblings, 0 replies; 29+ messages in thread
From: Bjorn Andersson @ 2023-09-20 17:14 UTC (permalink / raw)
  To: Stephan Gerhold
  Cc: Andy Gross, Konrad Dybcio, linux-arm-msm, devicetree,
	linux-kernel, Bryan O'Donoghue


On Mon, 11 Sep 2023 19:41:42 +0200, Stephan Gerhold wrote:
> Refactor the MSM8916 and MSM8939 device trees to make use of dynamic
> memory reservations for the firmware regions, rather than hardcoding
> fixed addresses for each device. This allows to keep most of the
> definitions in the SoC.dtsi while defining the board-specific
> properties (such as firmware size) separately for each device.
> 
> The main motivation for this patch set is to simplify enabling the
> modem on the various MSM8916/39 devices. The modem firmware size
> differs on almost each device, which requires redefining *all* of
> the firmware reservations with newly calculated addresses to make
> room for the larger modem firmware. I've explained this in detail
> in a previous RFC:
> https://lore.kernel.org/linux-arm-msm/20230510-dt-resv-bottom-up-v1-4-3bf68873dbed@gerhold.net/
> 
> [...]

Applied, thanks!

[1/9] arm64: dts: qcom: msm8916: Disable venus by default
      commit: 29589248420766cd492e6db0632d6f59ec216e92
[2/9] arm64: dts: qcom: msm8916/39: Disable GPU by default
      commit: 0ce5bb825d54c904b217cc7f1131e084e02ed037
[3/9] arm64: dts: qcom: msm8916-ufi: Drop gps_mem for now
      commit: 40eb256e5fd1fd49813a27a252b7f45ccca89fde
[4/9] arm64: dts: qcom: msm8916: Reserve firmware memory dynamically
      commit: 0ed3d82862e8451cc2b14ddb1b064e72ba3e5a60
[5/9] arm64: dts: qcom: msm8916: Reserve MBA memory dynamically
      commit: b4f3a410061bf5a8cc148c9435479da580abf85b
[6/9] arm64: dts: qcom: msm8939: Reserve firmware memory dynamically
      commit: b22bef3dbc3a67a796f82f49a6df9e413211cb40
[7/9] arm64: dts: qcom: msm8916/39: Disable unneeded firmware reservations
      commit: 0ece6438a8c0492a7df036d57ac299500a25cb70
[8/9] arm64: dts: qcom: msm8916/39: Move mpss_mem size to boards
      commit: 35efa1be51bd6db067d7380b34538b17b9f250a8
[9/9] arm64: dts: qcom: msm8916/39: Fix venus memory size
      commit: e3c6386c6a5d0187f103fc9bf39850ac15c01690

Best regards,
-- 
Bjorn Andersson <andersson@kernel.org>

^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2023-09-20 17:11 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-11 17:41 [PATCH 0/9] arm64: dts: qcom: msm8916/39: Reserve firmware memory dynamically Stephan Gerhold
2023-09-11 17:41 ` [PATCH 1/9] arm64: dts: qcom: msm8916: Disable venus by default Stephan Gerhold
2023-09-12  6:34   ` Bryan O'Donoghue
2023-09-11 17:41 ` [PATCH 2/9] arm64: dts: qcom: msm8916/39: Disable GPU " Stephan Gerhold
2023-09-12  6:35   ` Bryan O'Donoghue
2023-09-12  7:45   ` Konrad Dybcio
2023-09-11 17:41 ` [PATCH 3/9] arm64: dts: qcom: msm8916-ufi: Drop gps_mem for now Stephan Gerhold
2023-09-12  6:36   ` Bryan O'Donoghue
2023-09-12  7:42     ` Stephan Gerhold
2023-09-11 17:41 ` [PATCH 4/9] arm64: dts: qcom: msm8916: Reserve firmware memory dynamically Stephan Gerhold
2023-09-13  9:06   ` Konrad Dybcio
2023-09-13  9:12     ` Bryan O'Donoghue
2023-09-13 10:14       ` Stephan Gerhold
2023-09-13 19:39         ` Konrad Dybcio
2023-09-14 14:09           ` Stephan Gerhold
2023-09-15 13:52             ` Konrad Dybcio
2023-09-15 14:00               ` Stephan Gerhold
2023-09-11 17:41 ` [PATCH 5/9] arm64: dts: qcom: msm8916: Reserve MBA " Stephan Gerhold
2023-09-13  8:59   ` Konrad Dybcio
2023-09-11 17:41 ` [PATCH 6/9] arm64: dts: qcom: msm8939: Reserve firmware " Stephan Gerhold
2023-09-11 17:41 ` [PATCH 7/9] arm64: dts: qcom: msm8916/39: Disable unneeded firmware reservations Stephan Gerhold
2023-09-15 13:51   ` Konrad Dybcio
2023-09-15 14:02     ` Stephan Gerhold
2023-09-11 17:41 ` [PATCH 8/9] arm64: dts: qcom: msm8916/39: Move mpss_mem size to boards Stephan Gerhold
2023-09-15 13:51   ` Konrad Dybcio
2023-09-15 14:03     ` Stephan Gerhold
2023-09-11 17:41 ` [PATCH 9/9] arm64: dts: qcom: msm8916/39: Fix venus memory size Stephan Gerhold
2023-09-12  7:50   ` Konrad Dybcio
2023-09-20 17:14 ` [PATCH 0/9] arm64: dts: qcom: msm8916/39: Reserve firmware memory dynamically Bjorn Andersson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.