Re: [PATCH v3 3/3] arm64: dts: qcom: sc8280xp: Enable GPU related nodes

2023-05-31 Thread Konrad Dybcio



On 31.05.2023 05:09, Bjorn Andersson wrote:
> From: Bjorn Andersson 
> 
> Add memory reservation for the zap-shader and enable the Adreno SMMU,
> GPU clock controller, GMU and the GPU nodes for the SC8280XP CRD and the
> Lenovo ThinkPad X13s.
> 
> Tested-by: Steev Klimaszewski 
> Signed-off-by: Bjorn Andersson 
> Signed-off-by: Bjorn Andersson 
> ---
> 
> Changes since v2:
> - None
> 
> Changes since v1:
> - None
> 
>  arch/arm64/boot/dts/qcom/sc8280xp-crd.dts | 26 +++
>  .../qcom/sc8280xp-lenovo-thinkpad-x13s.dts| 26 +++
>  2 files changed, 52 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts 
> b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts
> index cd7e0097d8bc..58b1d920ea9c 100644
> --- a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts
> +++ b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts
> @@ -210,6 +210,11 @@ vreg_wwan: regulator-wwan {
>   };
>  
>   reserved-memory {
> + gpu_mem: gpu-mem@8bf0 {
> + reg = <0 0x8bf0 0 0x2000>;
> + no-map;
> + };
> +
>   linux,cma {
>   compatible = "shared-dma-pool";
>   size = <0x0 0x800>;
> @@ -259,6 +264,10 @@ usb1_sbu_mux: endpoint {
>   };
>  };
>  
> +_smmu {
> + status = "okay";
> +};
> +
>  _rsc {
>   regulators-0 {
>   compatible = "qcom,pm8350-rpmh-regulators";
> @@ -390,6 +399,23 @@  {
>   status = "okay";
>  };
>  
> + {
> + status = "okay";
> +};
As I pointed out in v2:

You can keep the GMU enabled by default as well, it won't "probe" on
its own (the GPU's hw_init calls its registration)

same for the other dt

Konrad
> +
> + {
> + status = "okay";
> +
> + zap-shader {
> + memory-region = <_mem>;
> + firmware-name = "qcom/sc8280xp/qcdxkmsuc8280.mbn";
> + };
> +};
> +
> + {
> + status = "okay";
> +};
> +
>   {
>   status = "okay";
>  };
> diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts 
> b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> index 5ae057ad6438..382f27946468 100644
> --- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> +++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> @@ -264,6 +264,11 @@ vreg_wwan: regulator-wwan {
>   };
>  
>   reserved-memory {
> + gpu_mem: gpu-mem@8bf0 {
> + reg = <0 0x8bf0 0 0x2000>;
> + no-map;
> + };
> +
>   linux,cma {
>   compatible = "shared-dma-pool";
>   size = <0x0 0x800>;
> @@ -359,6 +364,10 @@ usb1_sbu_mux: endpoint {
>   };
>  };
>  
> +_smmu {
> + status = "okay";
> +};
> +
>  _rsc {
>   regulators-0 {
>   compatible = "qcom,pm8350-rpmh-regulators";
> @@ -518,6 +527,23 @@  {
>   status = "okay";
>  };
>  
> + {
> + status = "okay";
> +};
> +
> + {
> + status = "okay";
> +
> + zap-shader {
> + memory-region = <_mem>;
> + firmware-name = "qcom/sc8280xp/LENOVO/21BX/qcdxkmsuc8280.mbn";
> + };
> +};
> +
> + {
> + status = "okay";
> +};
> +
>   {
>   status = "okay";
>  };


[PATCH v3 3/3] arm64: dts: qcom: sc8280xp: Enable GPU related nodes

2023-05-30 Thread Bjorn Andersson
From: Bjorn Andersson 

Add memory reservation for the zap-shader and enable the Adreno SMMU,
GPU clock controller, GMU and the GPU nodes for the SC8280XP CRD and the
Lenovo ThinkPad X13s.

Tested-by: Steev Klimaszewski 
Signed-off-by: Bjorn Andersson 
Signed-off-by: Bjorn Andersson 
---

Changes since v2:
- None

Changes since v1:
- None

 arch/arm64/boot/dts/qcom/sc8280xp-crd.dts | 26 +++
 .../qcom/sc8280xp-lenovo-thinkpad-x13s.dts| 26 +++
 2 files changed, 52 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts 
b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts
index cd7e0097d8bc..58b1d920ea9c 100644
--- a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts
+++ b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts
@@ -210,6 +210,11 @@ vreg_wwan: regulator-wwan {
};
 
reserved-memory {
+   gpu_mem: gpu-mem@8bf0 {
+   reg = <0 0x8bf0 0 0x2000>;
+   no-map;
+   };
+
linux,cma {
compatible = "shared-dma-pool";
size = <0x0 0x800>;
@@ -259,6 +264,10 @@ usb1_sbu_mux: endpoint {
};
 };
 
+_smmu {
+   status = "okay";
+};
+
 _rsc {
regulators-0 {
compatible = "qcom,pm8350-rpmh-regulators";
@@ -390,6 +399,23 @@  {
status = "okay";
 };
 
+ {
+   status = "okay";
+};
+
+ {
+   status = "okay";
+
+   zap-shader {
+   memory-region = <_mem>;
+   firmware-name = "qcom/sc8280xp/qcdxkmsuc8280.mbn";
+   };
+};
+
+ {
+   status = "okay";
+};
+
  {
status = "okay";
 };
diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts 
b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
index 5ae057ad6438..382f27946468 100644
--- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
+++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
@@ -264,6 +264,11 @@ vreg_wwan: regulator-wwan {
};
 
reserved-memory {
+   gpu_mem: gpu-mem@8bf0 {
+   reg = <0 0x8bf0 0 0x2000>;
+   no-map;
+   };
+
linux,cma {
compatible = "shared-dma-pool";
size = <0x0 0x800>;
@@ -359,6 +364,10 @@ usb1_sbu_mux: endpoint {
};
 };
 
+_smmu {
+   status = "okay";
+};
+
 _rsc {
regulators-0 {
compatible = "qcom,pm8350-rpmh-regulators";
@@ -518,6 +527,23 @@  {
status = "okay";
 };
 
+ {
+   status = "okay";
+};
+
+ {
+   status = "okay";
+
+   zap-shader {
+   memory-region = <_mem>;
+   firmware-name = "qcom/sc8280xp/LENOVO/21BX/qcdxkmsuc8280.mbn";
+   };
+};
+
+ {
+   status = "okay";
+};
+
  {
status = "okay";
 };
-- 
2.39.2