2021-10-02 00:19:37

by Konrad Dybcio

[permalink] [raw]
Subject: [PATCH 2/5] arm64: dts: qcom: sdm845: Disable Adreno, modem and Venus by default

Components that rely on proprietary (not to mention signed!) firmware should
not be enabled by default, as lack of the aforementioned firmware could cause
various issues, from random errors to straight-up failing to boot.

Re-enable these remote processors on boards that didn't previously explicitly
disable them.

Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
Signed-off-by: Konrad Dybcio <[email protected]>
---
arch/arm64/boot/dts/qcom/sdm845-cheza.dtsi | 12 ++++++++++++
arch/arm64/boot/dts/qcom/sdm845-mtp.dts | 10 ++++++++++
arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi | 10 ++++++++++
arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium.dts | 10 ++++++++++
arch/arm64/boot/dts/qcom/sdm845.dtsi | 8 ++++++++
5 files changed, 50 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sdm845-cheza.dtsi b/arch/arm64/boot/dts/qcom/sdm845-cheza.dtsi
index dfd1b42c07fd..1f8a26f36f2e 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-cheza.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845-cheza.dtsi
@@ -616,6 +616,14 @@ touchscreen@10 {
};
};

+&gmu {
+ status = "okay";
+};
+
+&gpu {
+ status = "okay";
+};
+
&ipa {
status = "okay";
modem-init;
@@ -643,6 +651,8 @@ &adreno_smmu {
};

&mss_pil {
+ status = "okay";
+
iommus = <&apps_smmu 0x781 0x0>,
<&apps_smmu 0x724 0x3>;
};
@@ -1317,6 +1327,8 @@ config {
};

&venus {
+ status = "okay";
+
video-firmware {
iommus = <&apps_smmu 0x10b2 0x0>;
};
diff --git a/arch/arm64/boot/dts/qcom/sdm845-mtp.dts b/arch/arm64/boot/dts/qcom/sdm845-mtp.dts
index 52dd7a858231..bccc90a469ab 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-mtp.dts
+++ b/arch/arm64/boot/dts/qcom/sdm845-mtp.dts
@@ -439,7 +439,13 @@ &gcc {
<GCC_LPASS_SWAY_CLK>;
};

+&gmu {
+ status = "okay";
+};
+
&gpu {
+ status = "okay";
+
zap-shader {
memory-region = <&gpu_mem>;
firmware-name = "qcom/sdm845/a630_zap.mbn";
@@ -566,6 +572,10 @@ &usb_2_qmpphy {
vdda-pll-supply = <&vdda_usb2_ss_core>;
};

+&venus {
+ status = "okay";
+};
+
&wifi {
status = "okay";
vdd-0.8-cx-mx-supply = <&vreg_l5a_0p8>;
diff --git a/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi b/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
index d4355522374a..2f8942542788 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
@@ -362,7 +362,13 @@ &gcc {
<GCC_LPASS_SWAY_CLK>;
};

+&gmu {
+ status = "okay";
+};
+
&gpu {
+ status = "okay";
+
zap-shader {
memory-region = <&gpu_mem>;
firmware-name = "qcom/sdm845/oneplus6/a630_zap.mbn";
@@ -641,6 +647,10 @@ mux {
};
};

+&venus {
+ status = "okay";
+};
+
&wifi {
status = "okay";
vdd-0.8-cx-mx-supply = <&vreg_l5a_0p8>;
diff --git a/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium.dts b/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium.dts
index c60c8c640e17..51cfe6f31bec 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium.dts
+++ b/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium.dts
@@ -256,7 +256,13 @@ &gcc {
<GCC_LPASS_SWAY_CLK>;
};

+&gmu {
+ status = "okay";
+};
+
&gpu {
+ status = "okay";
+
zap-shader {
memory-region = <&gpu_mem>;
firmware-name = "qcom/sdm845/a630_zap.mbn";
@@ -513,6 +519,10 @@ &usb_1_qmpphy {
vdda-pll-supply = <&vreg_l1a_0p875>;
};

+&venus {
+ status = "okay";
+};
+
&wcd9340{
pinctrl-0 = <&wcd_intr_default>;
pinctrl-names = "default";
diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi
index edfff955ca02..970e92188503 100644
--- a/arch/arm64/boot/dts/qcom/sdm845.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi
@@ -3004,6 +3004,8 @@ mss_pil: remoteproc@4080000 {
<&rpmhpd SDM845_MSS>;
power-domain-names = "cx", "mx", "mss";

+ status = "disabled";
+
mba {
memory-region = <&mba_region>;
};
@@ -3898,6 +3900,8 @@ venus: video-codec@aa00000 {
<&gladiator_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_VENUS_CFG 0>;
interconnect-names = "video-mem", "cpu-cfg";

+ status = "disabled";
+
video-core0 {
compatible = "venus-decoder";
};
@@ -4432,6 +4436,8 @@ gpu: gpu@5000000 {
interconnects = <&mem_noc MASTER_GFX3D 0 &mem_noc SLAVE_EBI1 0>;
interconnect-names = "gfx-mem";

+ status = "disabled";
+
gpu_opp_table: opp-table {
compatible = "operating-points-v2";

@@ -4527,6 +4533,8 @@ gmu: gmu@506a000 {

operating-points-v2 = <&gmu_opp_table>;

+ status = "disabled";
+
gmu_opp_table: opp-table {
compatible = "operating-points-v2";

--
2.33.0


2021-10-02 22:36:46

by Steev Klimaszewski

[permalink] [raw]
Subject: Re: [PATCH 2/5] arm64: dts: qcom: sdm845: Disable Adreno, modem and Venus by default


On 10/1/21 7:13 PM, Konrad Dybcio wrote:
> Components that rely on proprietary (not to mention signed!) firmware should
> not be enabled by default, as lack of the aforementioned firmware could cause
> various issues, from random errors to straight-up failing to boot.
>
> Re-enable these remote processors on boards that didn't previously explicitly
> disable them.
>
> Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
> Signed-off-by: Konrad Dybcio <[email protected]>
> ---
> arch/arm64/boot/dts/qcom/sdm845-cheza.dtsi | 12 ++++++++++++
> arch/arm64/boot/dts/qcom/sdm845-mtp.dts | 10 ++++++++++
> arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi | 10 ++++++++++
> arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium.dts | 10 ++++++++++
> arch/arm64/boot/dts/qcom/sdm845.dtsi | 8 ++++++++
> 5 files changed, 50 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/sdm845-cheza.dtsi b/arch/arm64/boot/dts/qcom/sdm845-cheza.dtsi
> index dfd1b42c07fd..1f8a26f36f2e 100644
> --- a/arch/arm64/boot/dts/qcom/sdm845-cheza.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sdm845-cheza.dtsi
> @@ -616,6 +616,14 @@ touchscreen@10 {
> };
> };
>
> +&gmu {
> + status = "okay";
> +};
> +
> +&gpu {
> + status = "okay";
> +};
> +
> &ipa {
> status = "okay";
> modem-init;
> @@ -643,6 +651,8 @@ &adreno_smmu {
> };
>
> &mss_pil {
> + status = "okay";
> +
> iommus = <&apps_smmu 0x781 0x0>,
> <&apps_smmu 0x724 0x3>;
> };
> @@ -1317,6 +1327,8 @@ config {
> };
>
> &venus {
> + status = "okay";
> +
> video-firmware {
> iommus = <&apps_smmu 0x10b2 0x0>;
> };
> diff --git a/arch/arm64/boot/dts/qcom/sdm845-mtp.dts b/arch/arm64/boot/dts/qcom/sdm845-mtp.dts
> index 52dd7a858231..bccc90a469ab 100644
> --- a/arch/arm64/boot/dts/qcom/sdm845-mtp.dts
> +++ b/arch/arm64/boot/dts/qcom/sdm845-mtp.dts
> @@ -439,7 +439,13 @@ &gcc {
> <GCC_LPASS_SWAY_CLK>;
> };
>
> +&gmu {
> + status = "okay";
> +};
> +
> &gpu {
> + status = "okay";
> +
> zap-shader {
> memory-region = <&gpu_mem>;
> firmware-name = "qcom/sdm845/a630_zap.mbn";
> @@ -566,6 +572,10 @@ &usb_2_qmpphy {
> vdda-pll-supply = <&vdda_usb2_ss_core>;
> };
>
> +&venus {
> + status = "okay";
> +};
> +
> &wifi {
> status = "okay";
> vdd-0.8-cx-mx-supply = <&vreg_l5a_0p8>;
> diff --git a/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi b/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
> index d4355522374a..2f8942542788 100644
> --- a/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
> @@ -362,7 +362,13 @@ &gcc {
> <GCC_LPASS_SWAY_CLK>;
> };
>
> +&gmu {
> + status = "okay";
> +};
> +
> &gpu {
> + status = "okay";
> +
> zap-shader {
> memory-region = <&gpu_mem>;
> firmware-name = "qcom/sdm845/oneplus6/a630_zap.mbn";
> @@ -641,6 +647,10 @@ mux {
> };
> };
>
> +&venus {
> + status = "okay";
> +};
> +
> &wifi {
> status = "okay";
> vdd-0.8-cx-mx-supply = <&vreg_l5a_0p8>;
> diff --git a/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium.dts b/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium.dts
> index c60c8c640e17..51cfe6f31bec 100644
> --- a/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium.dts
> +++ b/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium.dts
> @@ -256,7 +256,13 @@ &gcc {
> <GCC_LPASS_SWAY_CLK>;
> };
>
> +&gmu {
> + status = "okay";
> +};
> +
> &gpu {
> + status = "okay";
> +
> zap-shader {
> memory-region = <&gpu_mem>;
> firmware-name = "qcom/sdm845/a630_zap.mbn";
> @@ -513,6 +519,10 @@ &usb_1_qmpphy {
> vdda-pll-supply = <&vreg_l1a_0p875>;
> };
>
> +&venus {
> + status = "okay";
> +};
> +
> &wcd9340{
> pinctrl-0 = <&wcd_intr_default>;
> pinctrl-names = "default";
> diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi
> index edfff955ca02..970e92188503 100644
> --- a/arch/arm64/boot/dts/qcom/sdm845.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi
> @@ -3004,6 +3004,8 @@ mss_pil: remoteproc@4080000 {
> <&rpmhpd SDM845_MSS>;
> power-domain-names = "cx", "mx", "mss";
>
> + status = "disabled";
> +
> mba {
> memory-region = <&mba_region>;
> };
> @@ -3898,6 +3900,8 @@ venus: video-codec@aa00000 {
> <&gladiator_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_VENUS_CFG 0>;
> interconnect-names = "video-mem", "cpu-cfg";
>
> + status = "disabled";
> +
> video-core0 {
> compatible = "venus-decoder";
> };
> @@ -4432,6 +4436,8 @@ gpu: gpu@5000000 {
> interconnects = <&mem_noc MASTER_GFX3D 0 &mem_noc SLAVE_EBI1 0>;
> interconnect-names = "gfx-mem";
>
> + status = "disabled";
> +
> gpu_opp_table: opp-table {
> compatible = "operating-points-v2";
>
> @@ -4527,6 +4533,8 @@ gmu: gmu@506a000 {
>
> operating-points-v2 = <&gmu_opp_table>;
>
> + status = "disabled";
> +
> gmu_opp_table: opp-table {
> compatible = "operating-points-v2";
>
This missed the Lenovo Yoga C630 inherits from sdm845 and breaks it.

2021-10-02 23:21:19

by Konrad Dybcio

[permalink] [raw]
Subject: Re: [PATCH 2/5] arm64: dts: qcom: sdm845: Disable Adreno, modem and Venus by default


On 03.10.2021 00:25, Steev Klimaszewski wrote:
>
> This missed the Lenovo Yoga C630 inherits from sdm845 and breaks it.

Welp, qcom decided to give laptops +5 sdm points and that made me overlook it :P


If the rest of the patch looks good, could you add this diff Bjorn to fix that?:


diff --git a/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts b/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts
index a3b61cb3cfad..b96ecf537ff1 100644
--- a/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts
+++ b/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts
@@ -343,7 +343,12 @@ &gcc {
                           <GCC_LPASS_SWAY_CLK>;
 };
 
+&gmu {
+       status = "okay";
+};
+
 &gpu {
+       status = "okay";
        zap-shader {
                memory-region = <&gpu_mem>;
                firmware-name = "qcom/LENOVO/81JL/qcdxkmsuc850.mbn";
@@ -461,6 +466,7 @@ &mdss {
 };
 
 &mss_pil {
+       status = "okay";
        firmware-name = "qcom/LENOVO/81JL/qcdsp1v2850.mbn", "qcom/LENOVO/81JL/qcdsp2850.mbn";
 };
 
@@ -722,6 +728,10 @@ &usb_2_qmpphy {
        vdda-pll-supply = <&vdda_usb2_ss_core>;
 };
 
+&venus {
+       status = "okay";
+};
+
 &wcd9340{
        pinctrl-0 = <&wcd_intr_default>;
        pinctrl-names = "default";


Konrad

2021-10-05 13:31:06

by Steev Klimaszewski

[permalink] [raw]
Subject: Re: [PATCH 2/5] arm64: dts: qcom: sdm845: Disable Adreno, modem and Venus by default


On 10/2/21 5:51 PM, Konrad Dybcio wrote:
> On 03.10.2021 00:25, Steev Klimaszewski wrote:
>> This missed the Lenovo Yoga C630 inherits from sdm845 and breaks it.
> Welp, qcom decided to give laptops +5 sdm points and that made me overlook it :P
>
>
> If the rest of the patch looks good, could you add this diff Bjorn to fix that?:
>
>
> diff --git a/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts b/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts
> index a3b61cb3cfad..b96ecf537ff1 100644
> --- a/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts
> +++ b/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts
> @@ -343,7 +343,12 @@ &gcc {
>                            <GCC_LPASS_SWAY_CLK>;
>  };
>  
> +&gmu {
> +       status = "okay";
> +};
> +
>  &gpu {
> +       status = "okay";
>         zap-shader {
>                 memory-region = <&gpu_mem>;
>                 firmware-name = "qcom/LENOVO/81JL/qcdxkmsuc850.mbn";
> @@ -461,6 +466,7 @@ &mdss {
>  };
>  
>  &mss_pil {
> +       status = "okay";
>         firmware-name = "qcom/LENOVO/81JL/qcdsp1v2850.mbn", "qcom/LENOVO/81JL/qcdsp2850.mbn";
>  };
>  
> @@ -722,6 +728,10 @@ &usb_2_qmpphy {
>         vdda-pll-supply = <&vdda_usb2_ss_core>;
>  };
>  
> +&venus {
> +       status = "okay";
> +};
> +
>  &wcd9340{
>         pinctrl-0 = <&wcd_intr_default>;
>         pinctrl-names = "default";
>
>
> Konrad
>
With the above applied, all is well on the Lenovo Yoga C630.

Tested-By: Steev Klimaszewski <[email protected]>