* [PATCH RFC 0/2] Add GPU support to MSM8953 SoC
@ 2024-01-25 21:56 Luca Weiss
2024-01-25 21:56 ` [PATCH RFC 1/2] arm64: dts: qcom: msm8953: Add GPU IOMMU Luca Weiss
` (2 more replies)
0 siblings, 3 replies; 12+ messages in thread
From: Luca Weiss @ 2024-01-25 21:56 UTC (permalink / raw)
To: ~postmarketos/upstreaming, phone-devel, Bjorn Andersson,
Konrad Dybcio, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Vladimir Lypak
Cc: linux-arm-msm, devicetree, linux-kernel, Luca Weiss
Add the GPU IOMMU and GPU nodes to the msm8953 dtsi so GPU can work.
First of all, functionally this series looks fine, tested on
sdm632-fairphone-fp3.
Secondly and the reason this is marked RFC for now is basically just dt
bindings check fail, and some questions regarding IOMMU compatible.
Basically I'm unsure what compatible (or even driver) IOMMU should use.
qcom,msm-iommu-v2 is now in the patchset which seems to be okay, and
also should handle the gfx3d_secure secure context correctly. Apart from
some special handling there qcom,msm-iommu-v1 compatible is equivalent
on the driver side.
Currently the dt bindings say qcom,msm8953-iommu should be followed by
qcom,msm-iommu-v1 which is the case for apps_iommu. But if we use
qcom,msm-iommu-v2 for gpu_iommu then we can't re-use the same
qcom,msm8953-iommu I think.
Possible solutions:
1. Switch apps_iommu to use qcom,msm-iommu-v2 in dts & bindings? Since
there's basically no special handling for either in the driver I
don't forsee any problems. Then we can also use -v2 for gpu_iommu no
problem.
2. Use qcom,msm-iommu-v1 for gpu_iommu? From some testing it also seems
to work, I guess because the secure context is never used?
3. Use arm_smmu driver for gpu_iommu? Vladimir Lypak has suggested that,
but that would at least need some more patching to work on msm8953.
I probably don't have the motivation to take this on myself. Also
what benefit would it bring?
Hope I haven't rambled too long here and it's somewhat understandable.
Please let me know what you think, which direction we can take to
resolve this.
(Also GPU clock-names dt-schema check fails but that seems to be the
case on more a5xx GPUs also)
Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
---
Vladimir Lypak (2):
arm64: dts: qcom: msm8953: Add GPU IOMMU
arm64: dts: qcom: msm8953: Add GPU
arch/arm64/boot/dts/qcom/msm8953.dtsi | 146 +++++++++++++++++++++++
arch/arm64/boot/dts/qcom/sdm450-motorola-ali.dts | 2 +-
arch/arm64/boot/dts/qcom/sdm450.dtsi | 14 +++
arch/arm64/boot/dts/qcom/sdm632.dtsi | 8 ++
4 files changed, 169 insertions(+), 1 deletion(-)
---
base-commit: 0e21aa976976d5fba8cd1f8f64bcce49beb5f895
change-id: 20231212-msm8953-gpu-4c085365f594
Best regards,
--
Luca Weiss <luca@z3ntu.xyz>
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH RFC 1/2] arm64: dts: qcom: msm8953: Add GPU IOMMU
2024-01-25 21:56 [PATCH RFC 0/2] Add GPU support to MSM8953 SoC Luca Weiss
@ 2024-01-25 21:56 ` Luca Weiss
2024-01-25 22:24 ` Dmitry Baryshkov
2024-01-25 21:56 ` [PATCH RFC 2/2] arm64: dts: qcom: msm8953: Add GPU Luca Weiss
2024-02-07 4:46 ` [PATCH RFC 0/2] Add GPU support to MSM8953 SoC Bjorn Andersson
2 siblings, 1 reply; 12+ messages in thread
From: Luca Weiss @ 2024-01-25 21:56 UTC (permalink / raw)
To: ~postmarketos/upstreaming, phone-devel, Bjorn Andersson,
Konrad Dybcio, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Vladimir Lypak
Cc: linux-arm-msm, devicetree, linux-kernel, Luca Weiss
From: Vladimir Lypak <vladimir.lypak@gmail.com>
Add the IOMMU used for the GPU on MSM8953.
Signed-off-by: Vladimir Lypak <vladimir.lypak@gmail.com>
---
arch/arm64/boot/dts/qcom/msm8953.dtsi | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/msm8953.dtsi b/arch/arm64/boot/dts/qcom/msm8953.dtsi
index dcb5c98b793c..91d083871ab0 100644
--- a/arch/arm64/boot/dts/qcom/msm8953.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8953.dtsi
@@ -1046,6 +1046,37 @@ mdss_dsi1_phy: phy@1a96400 {
};
};
+ gpu_iommu: iommu@1c48000 {
+ compatible = "qcom,msm8953-iommu", "qcom,msm-iommu-v2";
+ ranges = <0 0x01c48000 0x8000>;
+
+ clocks = <&gcc GCC_OXILI_AHB_CLK>,
+ <&gcc GCC_BIMC_GFX_CLK>;
+ clock-names = "iface", "bus";
+
+ power-domains = <&gcc OXILI_CX_GDSC>;
+
+ qcom,iommu-secure-id = <18>;
+
+ #address-cells = <1>;
+ #iommu-cells = <1>;
+ #size-cells = <1>;
+
+ /* gfx3d_user */
+ iommu-ctx@0 {
+ compatible = "qcom,msm-iommu-v2-ns";
+ reg = <0x0000 0x1000>;
+ interrupts = <GIC_SPI 225 IRQ_TYPE_LEVEL_HIGH>;
+ };
+
+ /* gfx3d_secure */
+ iommu-ctx@2000 {
+ compatible = "qcom,msm-iommu-v2-sec";
+ reg = <0x2000 0x1000>;
+ interrupts = <GIC_SPI 233 IRQ_TYPE_LEVEL_HIGH>;
+ };
+ };
+
apps_iommu: iommu@1e20000 {
compatible = "qcom,msm8953-iommu", "qcom,msm-iommu-v1";
ranges = <0 0x01e20000 0x20000>;
--
2.43.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH RFC 2/2] arm64: dts: qcom: msm8953: Add GPU
2024-01-25 21:56 [PATCH RFC 0/2] Add GPU support to MSM8953 SoC Luca Weiss
2024-01-25 21:56 ` [PATCH RFC 1/2] arm64: dts: qcom: msm8953: Add GPU IOMMU Luca Weiss
@ 2024-01-25 21:56 ` Luca Weiss
2024-01-25 22:25 ` Dmitry Baryshkov
2024-01-25 23:50 ` Konrad Dybcio
2024-02-07 4:46 ` [PATCH RFC 0/2] Add GPU support to MSM8953 SoC Bjorn Andersson
2 siblings, 2 replies; 12+ messages in thread
From: Luca Weiss @ 2024-01-25 21:56 UTC (permalink / raw)
To: ~postmarketos/upstreaming, phone-devel, Bjorn Andersson,
Konrad Dybcio, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Vladimir Lypak
Cc: linux-arm-msm, devicetree, linux-kernel, Luca Weiss
From: Vladimir Lypak <vladimir.lypak@gmail.com>
Add the GPU node for the Adreno 506 found on this family of SoCs. The
clock speeds are a bit different per SoC variant, SDM450 maxes out at
600MHz while MSM8953 (= SDM625) goes up to 650MHz and SDM632 goes up to
725MHz.
To achieve this, create a new sdm450.dtsi to hold the 600MHz OPP and
use the new dtsi for sdm450-motorola-ali.
Signed-off-by: Vladimir Lypak <vladimir.lypak@gmail.com>
Co-developed-by: Luca Weiss <luca@z3ntu.xyz>
Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
---
arch/arm64/boot/dts/qcom/msm8953.dtsi | 115 +++++++++++++++++++++++
arch/arm64/boot/dts/qcom/sdm450-motorola-ali.dts | 2 +-
arch/arm64/boot/dts/qcom/sdm450.dtsi | 14 +++
arch/arm64/boot/dts/qcom/sdm632.dtsi | 8 ++
4 files changed, 138 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/qcom/msm8953.dtsi b/arch/arm64/boot/dts/qcom/msm8953.dtsi
index 91d083871ab0..1fe0c0c4fd15 100644
--- a/arch/arm64/boot/dts/qcom/msm8953.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8953.dtsi
@@ -1046,6 +1046,94 @@ mdss_dsi1_phy: phy@1a96400 {
};
};
+ gpu: gpu@1c00000 {
+ compatible = "qcom,adreno-506.0", "qcom,adreno";
+ reg = <0x01c00000 0x40000>;
+ reg-names = "kgsl_3d0_reg_memory";
+ interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_OXILI_GFX3D_CLK>,
+ <&gcc GCC_OXILI_AHB_CLK>,
+ <&gcc GCC_BIMC_GFX_CLK>,
+ <&gcc GCC_BIMC_GPU_CLK>,
+ <&gcc GCC_OXILI_TIMER_CLK>,
+ <&gcc GCC_OXILI_AON_CLK>;
+ clock-names = "core",
+ "iface",
+ "mem_iface",
+ "alt_mem_iface",
+ "rbbmtimer",
+ "alwayson";
+ power-domains = <&gcc OXILI_GX_GDSC>;
+
+ iommus = <&gpu_iommu 0>;
+ operating-points-v2 = <&gpu_opp_table>;
+
+ #cooling-cells = <2>;
+
+ status = "disabled";
+
+ zap-shader {
+ memory-region = <&zap_shader_region>;
+ };
+
+ gpu_opp_table: opp-table {
+ compatible = "operating-points-v2";
+
+ opp-19200000 {
+ opp-hz = /bits/ 64 <19200000>;
+ opp-supported-hw = <0xff>;
+ required-opps = <&rpmpd_opp_min_svs>;
+ };
+
+ opp-133300000 {
+ opp-hz = /bits/ 64 <133300000>;
+ opp-supported-hw = <0xff>;
+ required-opps = <&rpmpd_opp_min_svs>;
+ };
+
+ opp-216000000 {
+ opp-hz = /bits/ 64 <216000000>;
+ opp-supported-hw = <0xff>;
+ required-opps = <&rpmpd_opp_low_svs>;
+ };
+
+ opp-320000000 {
+ opp-hz = /bits/ 64 <320000000>;
+ opp-supported-hw = <0xff>;
+ required-opps = <&rpmpd_opp_svs>;
+ };
+
+ opp-400000000 {
+ opp-hz = /bits/ 64 <400000000>;
+ opp-supported-hw = <0xff>;
+ required-opps = <&rpmpd_opp_svs_plus>;
+ };
+
+ opp-510000000 {
+ opp-hz = /bits/ 64 <510000000>;
+ opp-supported-hw = <0xff>;
+ required-opps = <&rpmpd_opp_nom>;
+ };
+
+ opp-560000000 {
+ opp-hz = /bits/ 64 <560000000>;
+ opp-supported-hw = <0xff>;
+ required-opps = <&rpmpd_opp_nom_plus>;
+ };
+
+ /*
+ * This opp is only available on msm8953 and
+ * sdm632, the max for sdm450 is 600MHz.
+ */
+ opp-650000000 {
+ opp-hz = /bits/ 64 <650000000>;
+ opp-supported-hw = <0xff>;
+ required-opps = <&rpmpd_opp_turbo>;
+ };
+ };
+ };
+
gpu_iommu: iommu@1c48000 {
compatible = "qcom,msm8953-iommu", "qcom,msm-iommu-v2";
ranges = <0 0x01c48000 0x8000>;
@@ -2045,6 +2133,33 @@ map0 {
};
};
};
+
+ gpu-thermal {
+ polling-delay-passive = <250>;
+ polling-delay = <1000>;
+ thermal-sensors = <&tsens0 15>;
+
+ trips {
+ gpu_alert: trip-point0 {
+ temperature = <70000>;
+ hysteresis = <2000>;
+ type = "passive";
+ };
+
+ gpu_crit: crit {
+ temperature = <90000>;
+ hysteresis = <2000>;
+ type = "critical";
+ };
+ };
+
+ cooling-maps {
+ map0 {
+ trip = <&gpu_alert>;
+ cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+ };
+ };
+ };
};
timer {
diff --git a/arch/arm64/boot/dts/qcom/sdm450-motorola-ali.dts b/arch/arm64/boot/dts/qcom/sdm450-motorola-ali.dts
index 362be5719dd2..e27f3c5d5bba 100644
--- a/arch/arm64/boot/dts/qcom/sdm450-motorola-ali.dts
+++ b/arch/arm64/boot/dts/qcom/sdm450-motorola-ali.dts
@@ -4,7 +4,7 @@
*/
/dts-v1/;
-#include "msm8953.dtsi"
+#include "sdm450.dtsi"
#include "pm8953.dtsi"
#include "pmi8950.dtsi"
diff --git a/arch/arm64/boot/dts/qcom/sdm450.dtsi b/arch/arm64/boot/dts/qcom/sdm450.dtsi
new file mode 100644
index 000000000000..b222aeb459a3
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/sdm450.dtsi
@@ -0,0 +1,14 @@
+// SPDX-License-Identifier: BSD-3-Clause
+/* Copyright (c) 2023, Luca Weiss <luca@z3ntu.xyz> */
+
+#include "msm8953.dtsi"
+
+&gpu_opp_table {
+ /delete-node/ opp-650000000;
+
+ opp-600000000 {
+ opp-hz = /bits/ 64 <600000000>;
+ opp-supported-hw = <0xff>;
+ required-opps = <&rpmpd_opp_turbo>;
+ };
+};
diff --git a/arch/arm64/boot/dts/qcom/sdm632.dtsi b/arch/arm64/boot/dts/qcom/sdm632.dtsi
index 645b9f6a801f..95b025ea260b 100644
--- a/arch/arm64/boot/dts/qcom/sdm632.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm632.dtsi
@@ -79,3 +79,11 @@ &CPU7 {
compatible = "qcom,kryo250";
capacity-dmips-mhz = <1980>;
};
+
+&gpu_opp_table {
+ opp-725000000 {
+ opp-hz = /bits/ 64 <725000000>;
+ opp-supported-hw = <0xff>;
+ required-opps = <&rpmpd_opp_turbo>;
+ };
+};
--
2.43.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH RFC 1/2] arm64: dts: qcom: msm8953: Add GPU IOMMU
2024-01-25 21:56 ` [PATCH RFC 1/2] arm64: dts: qcom: msm8953: Add GPU IOMMU Luca Weiss
@ 2024-01-25 22:24 ` Dmitry Baryshkov
2024-01-25 23:49 ` Konrad Dybcio
0 siblings, 1 reply; 12+ messages in thread
From: Dmitry Baryshkov @ 2024-01-25 22:24 UTC (permalink / raw)
To: Luca Weiss, ~postmarketos/upstreaming, phone-devel,
Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Vladimir Lypak
Cc: linux-arm-msm, devicetree, linux-kernel
On 25/01/2024 23:56, Luca Weiss wrote:
> From: Vladimir Lypak <vladimir.lypak@gmail.com>
>
> Add the IOMMU used for the GPU on MSM8953.
>
> Signed-off-by: Vladimir Lypak <vladimir.lypak@gmail.com>
> ---
> arch/arm64/boot/dts/qcom/msm8953.dtsi | 31 +++++++++++++++++++++++++++++++
> 1 file changed, 31 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/msm8953.dtsi b/arch/arm64/boot/dts/qcom/msm8953.dtsi
> index dcb5c98b793c..91d083871ab0 100644
> --- a/arch/arm64/boot/dts/qcom/msm8953.dtsi
> +++ b/arch/arm64/boot/dts/qcom/msm8953.dtsi
> @@ -1046,6 +1046,37 @@ mdss_dsi1_phy: phy@1a96400 {
> };
> };
>
> + gpu_iommu: iommu@1c48000 {
Nit: most of the platforms use the adreno_smmu label. But maybe the
msm-iommu vs arm-smmu makes difference here.
Nevertheless:
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> + compatible = "qcom,msm8953-iommu", "qcom,msm-iommu-v2";
> + ranges = <0 0x01c48000 0x8000>;
> +
> + clocks = <&gcc GCC_OXILI_AHB_CLK>,
> + <&gcc GCC_BIMC_GFX_CLK>;
> + clock-names = "iface", "bus";
> +
> + power-domains = <&gcc OXILI_CX_GDSC>;
> +
> + qcom,iommu-secure-id = <18>;
> +
> + #address-cells = <1>;
> + #iommu-cells = <1>;
> + #size-cells = <1>;
> +
> + /* gfx3d_user */
> + iommu-ctx@0 {
> + compatible = "qcom,msm-iommu-v2-ns";
> + reg = <0x0000 0x1000>;
> + interrupts = <GIC_SPI 225 IRQ_TYPE_LEVEL_HIGH>;
> + };
> +
> + /* gfx3d_secure */
> + iommu-ctx@2000 {
> + compatible = "qcom,msm-iommu-v2-sec";
> + reg = <0x2000 0x1000>;
> + interrupts = <GIC_SPI 233 IRQ_TYPE_LEVEL_HIGH>;
> + };
> + };
> +
> apps_iommu: iommu@1e20000 {
> compatible = "qcom,msm8953-iommu", "qcom,msm-iommu-v1";
> ranges = <0 0x01e20000 0x20000>;
>
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH RFC 2/2] arm64: dts: qcom: msm8953: Add GPU
2024-01-25 21:56 ` [PATCH RFC 2/2] arm64: dts: qcom: msm8953: Add GPU Luca Weiss
@ 2024-01-25 22:25 ` Dmitry Baryshkov
2024-01-25 23:50 ` Konrad Dybcio
1 sibling, 0 replies; 12+ messages in thread
From: Dmitry Baryshkov @ 2024-01-25 22:25 UTC (permalink / raw)
To: Luca Weiss, ~postmarketos/upstreaming, phone-devel,
Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Vladimir Lypak
Cc: linux-arm-msm, devicetree, linux-kernel
On 25/01/2024 23:56, Luca Weiss wrote:
> From: Vladimir Lypak <vladimir.lypak@gmail.com>
>
> Add the GPU node for the Adreno 506 found on this family of SoCs. The
> clock speeds are a bit different per SoC variant, SDM450 maxes out at
> 600MHz while MSM8953 (= SDM625) goes up to 650MHz and SDM632 goes up to
> 725MHz.
>
> To achieve this, create a new sdm450.dtsi to hold the 600MHz OPP and
> use the new dtsi for sdm450-motorola-ali.
>
> Signed-off-by: Vladimir Lypak <vladimir.lypak@gmail.com>
> Co-developed-by: Luca Weiss <luca@z3ntu.xyz>
> Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
> ---
> arch/arm64/boot/dts/qcom/msm8953.dtsi | 115 +++++++++++++++++++++++
> arch/arm64/boot/dts/qcom/sdm450-motorola-ali.dts | 2 +-
> arch/arm64/boot/dts/qcom/sdm450.dtsi | 14 +++
> arch/arm64/boot/dts/qcom/sdm632.dtsi | 8 ++
> 4 files changed, 138 insertions(+), 1 deletion(-)
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH RFC 1/2] arm64: dts: qcom: msm8953: Add GPU IOMMU
2024-01-25 22:24 ` Dmitry Baryshkov
@ 2024-01-25 23:49 ` Konrad Dybcio
2024-01-27 17:24 ` Luca Weiss
0 siblings, 1 reply; 12+ messages in thread
From: Konrad Dybcio @ 2024-01-25 23:49 UTC (permalink / raw)
To: Dmitry Baryshkov, Luca Weiss, ~postmarketos/upstreaming,
phone-devel, Bjorn Andersson, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Vladimir Lypak
Cc: linux-arm-msm, devicetree, linux-kernel
On 1/25/24 23:24, Dmitry Baryshkov wrote:
> On 25/01/2024 23:56, Luca Weiss wrote:
>> From: Vladimir Lypak <vladimir.lypak@gmail.com>
>>
>> Add the IOMMU used for the GPU on MSM8953.
>>
>> Signed-off-by: Vladimir Lypak <vladimir.lypak@gmail.com>
>> ---
>> arch/arm64/boot/dts/qcom/msm8953.dtsi | 31 +++++++++++++++++++++++++++++++
>> 1 file changed, 31 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/qcom/msm8953.dtsi b/arch/arm64/boot/dts/qcom/msm8953.dtsi
>> index dcb5c98b793c..91d083871ab0 100644
>> --- a/arch/arm64/boot/dts/qcom/msm8953.dtsi
>> +++ b/arch/arm64/boot/dts/qcom/msm8953.dtsi
>> @@ -1046,6 +1046,37 @@ mdss_dsi1_phy: phy@1a96400 {
>> };
>> };
>> + gpu_iommu: iommu@1c48000 {
>
> Nit: most of the platforms use the adreno_smmu label. But maybe the msm-iommu vs arm-smmu makes difference here.
Not really :)
Please keep the labels unified
>
> Nevertheless:
>
> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
>
>> + compatible = "qcom,msm8953-iommu", "qcom,msm-iommu-v2";
>> + ranges = <0 0x01c48000 0x8000>;
>> +
>> + clocks = <&gcc GCC_OXILI_AHB_CLK>,
>> + <&gcc GCC_BIMC_GFX_CLK>;
And align these
Konrad
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH RFC 2/2] arm64: dts: qcom: msm8953: Add GPU
2024-01-25 21:56 ` [PATCH RFC 2/2] arm64: dts: qcom: msm8953: Add GPU Luca Weiss
2024-01-25 22:25 ` Dmitry Baryshkov
@ 2024-01-25 23:50 ` Konrad Dybcio
2024-01-27 17:32 ` Luca Weiss
1 sibling, 1 reply; 12+ messages in thread
From: Konrad Dybcio @ 2024-01-25 23:50 UTC (permalink / raw)
To: Luca Weiss, ~postmarketos/upstreaming, phone-devel,
Bjorn Andersson, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Vladimir Lypak
Cc: linux-arm-msm, devicetree, linux-kernel
On 1/25/24 22:56, Luca Weiss wrote:
> From: Vladimir Lypak <vladimir.lypak@gmail.com>
>
> Add the GPU node for the Adreno 506 found on this family of SoCs. The
> clock speeds are a bit different per SoC variant, SDM450 maxes out at
> 600MHz while MSM8953 (= SDM625) goes up to 650MHz and SDM632 goes up to
> 725MHz.
>
> To achieve this, create a new sdm450.dtsi to hold the 600MHz OPP and
> use the new dtsi for sdm450-motorola-ali.
>
> Signed-off-by: Vladimir Lypak <vladimir.lypak@gmail.com>
> Co-developed-by: Luca Weiss <luca@z3ntu.xyz>
> Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
> ---
> arch/arm64/boot/dts/qcom/msm8953.dtsi | 115 +++++++++++++++++++++++
> arch/arm64/boot/dts/qcom/sdm450-motorola-ali.dts | 2 +-
> arch/arm64/boot/dts/qcom/sdm450.dtsi | 14 +++
> arch/arm64/boot/dts/qcom/sdm632.dtsi | 8 ++
> 4 files changed, 138 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm64/boot/dts/qcom/msm8953.dtsi b/arch/arm64/boot/dts/qcom/msm8953.dtsi
> index 91d083871ab0..1fe0c0c4fd15 100644
> --- a/arch/arm64/boot/dts/qcom/msm8953.dtsi
> +++ b/arch/arm64/boot/dts/qcom/msm8953.dtsi
> @@ -1046,6 +1046,94 @@ mdss_dsi1_phy: phy@1a96400 {
> };
> };
>
> + gpu: gpu@1c00000 {
> + compatible = "qcom,adreno-506.0", "qcom,adreno";
> + reg = <0x01c00000 0x40000>;
> + reg-names = "kgsl_3d0_reg_memory";
> + interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
> +
> + clocks = <&gcc GCC_OXILI_GFX3D_CLK>,
> + <&gcc GCC_OXILI_AHB_CLK>,
> + <&gcc GCC_BIMC_GFX_CLK>,
> + <&gcc GCC_BIMC_GPU_CLK>,
> + <&gcc GCC_OXILI_TIMER_CLK>,
> + <&gcc GCC_OXILI_AON_CLK>;
> + clock-names = "core",
> + "iface",
> + "mem_iface",
> + "alt_mem_iface",
> + "rbbmtimer",
> + "alwayson";
> + power-domains = <&gcc OXILI_GX_GDSC>;
> +
> + iommus = <&gpu_iommu 0>;
> + operating-points-v2 = <&gpu_opp_table>;
> +
> + #cooling-cells = <2>;
> +
> + status = "disabled";
> +
> + zap-shader {
> + memory-region = <&zap_shader_region>;
> + };
> +
> + gpu_opp_table: opp-table {
> + compatible = "operating-points-v2";
> +
> + opp-19200000 {
> + opp-hz = /bits/ 64 <19200000>;
> + opp-supported-hw = <0xff>;
> + required-opps = <&rpmpd_opp_min_svs>;
> + };
If you remove all OPPs but this one, can the GPU still spit out pixels?
Konrad
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH RFC 1/2] arm64: dts: qcom: msm8953: Add GPU IOMMU
2024-01-25 23:49 ` Konrad Dybcio
@ 2024-01-27 17:24 ` Luca Weiss
2024-02-02 12:19 ` Konrad Dybcio
0 siblings, 1 reply; 12+ messages in thread
From: Luca Weiss @ 2024-01-27 17:24 UTC (permalink / raw)
To: Dmitry Baryshkov, ~postmarketos/upstreaming, phone-devel,
Bjorn Andersson, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Vladimir Lypak, Konrad Dybcio
Cc: linux-arm-msm, devicetree, linux-kernel
On Freitag, 26. Jänner 2024 00:49:55 CET Konrad Dybcio wrote:
> On 1/25/24 23:24, Dmitry Baryshkov wrote:
> > On 25/01/2024 23:56, Luca Weiss wrote:
> >> From: Vladimir Lypak <vladimir.lypak@gmail.com>
> >>
> >> Add the IOMMU used for the GPU on MSM8953.
> >>
> >> Signed-off-by: Vladimir Lypak <vladimir.lypak@gmail.com>
> >> ---
> >> arch/arm64/boot/dts/qcom/msm8953.dtsi | 31
> >> +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+)
> >>
> >> diff --git a/arch/arm64/boot/dts/qcom/msm8953.dtsi
> >> b/arch/arm64/boot/dts/qcom/msm8953.dtsi index dcb5c98b793c..91d083871ab0
> >> 100644
> >> --- a/arch/arm64/boot/dts/qcom/msm8953.dtsi
> >> +++ b/arch/arm64/boot/dts/qcom/msm8953.dtsi
> >> @@ -1046,6 +1046,37 @@ mdss_dsi1_phy: phy@1a96400 {
> >> };
> >> };
> >> + gpu_iommu: iommu@1c48000 {
> >
> > Nit: most of the platforms use the adreno_smmu label. But maybe the
> > msm-iommu vs arm-smmu makes difference here.
> Not really :)
>
> Please keep the labels unified
Ack, renaming to adreno_smmu
>
> > Nevertheless:
> >
> > Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> >
> >> + compatible = "qcom,msm8953-iommu", "qcom,msm-iommu-v2";
> >> + ranges = <0 0x01c48000 0x8000>;
> >> +
> >> + clocks = <&gcc GCC_OXILI_AHB_CLK>,
> >> + <&gcc GCC_BIMC_GFX_CLK>;
>
> And align these
They are?
Also any comment about the issues listed in the cover letter?
Regards
Luca
>
> Konrad
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH RFC 2/2] arm64: dts: qcom: msm8953: Add GPU
2024-01-25 23:50 ` Konrad Dybcio
@ 2024-01-27 17:32 ` Luca Weiss
2024-02-02 12:20 ` Konrad Dybcio
0 siblings, 1 reply; 12+ messages in thread
From: Luca Weiss @ 2024-01-27 17:32 UTC (permalink / raw)
To: ~postmarketos/upstreaming, phone-devel, Bjorn Andersson,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Vladimir Lypak,
Konrad Dybcio
Cc: linux-arm-msm, devicetree, linux-kernel
On Freitag, 26. Jänner 2024 00:50:43 CET Konrad Dybcio wrote:
> On 1/25/24 22:56, Luca Weiss wrote:
> > From: Vladimir Lypak <vladimir.lypak@gmail.com>
> >
> > Add the GPU node for the Adreno 506 found on this family of SoCs. The
> > clock speeds are a bit different per SoC variant, SDM450 maxes out at
> > 600MHz while MSM8953 (= SDM625) goes up to 650MHz and SDM632 goes up to
> > 725MHz.
> >
> > To achieve this, create a new sdm450.dtsi to hold the 600MHz OPP and
> > use the new dtsi for sdm450-motorola-ali.
> >
> > Signed-off-by: Vladimir Lypak <vladimir.lypak@gmail.com>
> > Co-developed-by: Luca Weiss <luca@z3ntu.xyz>
> > Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
> > ---
> >
> > arch/arm64/boot/dts/qcom/msm8953.dtsi | 115
> > +++++++++++++++++++++++
> > arch/arm64/boot/dts/qcom/sdm450-motorola-ali.dts | 2 +-
> > arch/arm64/boot/dts/qcom/sdm450.dtsi | 14 +++
> > arch/arm64/boot/dts/qcom/sdm632.dtsi | 8 ++
> > 4 files changed, 138 insertions(+), 1 deletion(-)
> >
> > diff --git a/arch/arm64/boot/dts/qcom/msm8953.dtsi
> > b/arch/arm64/boot/dts/qcom/msm8953.dtsi index 91d083871ab0..1fe0c0c4fd15
> > 100644
> > --- a/arch/arm64/boot/dts/qcom/msm8953.dtsi
> > +++ b/arch/arm64/boot/dts/qcom/msm8953.dtsi
> > @@ -1046,6 +1046,94 @@ mdss_dsi1_phy: phy@1a96400 {
> >
> > };
> >
> > };
> >
> > + gpu: gpu@1c00000 {
> > + compatible = "qcom,adreno-506.0", "qcom,adreno";
> > + reg = <0x01c00000 0x40000>;
> > + reg-names = "kgsl_3d0_reg_memory";
> > + interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
> > +
> > + clocks = <&gcc GCC_OXILI_GFX3D_CLK>,
> > + <&gcc GCC_OXILI_AHB_CLK>,
> > + <&gcc GCC_BIMC_GFX_CLK>,
> > + <&gcc GCC_BIMC_GPU_CLK>,
> > + <&gcc GCC_OXILI_TIMER_CLK>,
> > + <&gcc GCC_OXILI_AON_CLK>;
> > + clock-names = "core",
> > + "iface",
> > + "mem_iface",
> > + "alt_mem_iface",
> > + "rbbmtimer",
> > + "alwayson";
> > + power-domains = <&gcc OXILI_GX_GDSC>;
> > +
> > + iommus = <&gpu_iommu 0>;
> > + operating-points-v2 = <&gpu_opp_table>;
> > +
> > + #cooling-cells = <2>;
> > +
> > + status = "disabled";
> > +
> > + zap-shader {
> > + memory-region = <&zap_shader_region>;
> > + };
> > +
> > + gpu_opp_table: opp-table {
> > + compatible = "operating-points-v2";
> > +
> > + opp-19200000 {
> > + opp-hz = /bits/ 64 <19200000>;
> > + opp-supported-hw = <0xff>;
> > + required-opps = <&rpmpd_opp_min_svs>;
> > + };
>
> If you remove all OPPs but this one, can the GPU still spit out pixels?
Yep, phosh is starting and is rendering at a few fps.
fairphone-fp3:~$ cat /sys/devices/platform/soc@0/1c00000.gpu/devfreq/1c00000.gpu/min_freq
19200000
fairphone-fp3:~$ cat /sys/devices/platform/soc@0/1c00000.gpu/devfreq/1c00000.gpu/max_freq
19200000
fairphone-fp3:~$ cat /sys/devices/platform/soc@0/1c00000.gpu/devfreq/1c00000.gpu/cur_freq
19200000
Regards
Luca
>
> Konrad
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH RFC 1/2] arm64: dts: qcom: msm8953: Add GPU IOMMU
2024-01-27 17:24 ` Luca Weiss
@ 2024-02-02 12:19 ` Konrad Dybcio
0 siblings, 0 replies; 12+ messages in thread
From: Konrad Dybcio @ 2024-02-02 12:19 UTC (permalink / raw)
To: Luca Weiss, Dmitry Baryshkov, ~postmarketos/upstreaming,
phone-devel, Bjorn Andersson, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Vladimir Lypak
Cc: linux-arm-msm, devicetree, linux-kernel
On 27.01.2024 18:24, Luca Weiss wrote:
> On Freitag, 26. Jänner 2024 00:49:55 CET Konrad Dybcio wrote:
>> On 1/25/24 23:24, Dmitry Baryshkov wrote:
>>> On 25/01/2024 23:56, Luca Weiss wrote:
>>>> From: Vladimir Lypak <vladimir.lypak@gmail.com>
>>>>
>>>> Add the IOMMU used for the GPU on MSM8953.
>>>>
>>>> Signed-off-by: Vladimir Lypak <vladimir.lypak@gmail.com>
>>>> ---
>>>> arch/arm64/boot/dts/qcom/msm8953.dtsi | 31
>>>> +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+)
>>>>
>>>> diff --git a/arch/arm64/boot/dts/qcom/msm8953.dtsi
>>>> b/arch/arm64/boot/dts/qcom/msm8953.dtsi index dcb5c98b793c..91d083871ab0
>>>> 100644
>>>> --- a/arch/arm64/boot/dts/qcom/msm8953.dtsi
>>>> +++ b/arch/arm64/boot/dts/qcom/msm8953.dtsi
>>>> @@ -1046,6 +1046,37 @@ mdss_dsi1_phy: phy@1a96400 {
>>>> };
>>>> };
>>>> + gpu_iommu: iommu@1c48000 {
>>>
>>> Nit: most of the platforms use the adreno_smmu label. But maybe the
>>> msm-iommu vs arm-smmu makes difference here.
>> Not really :)
>>
>> Please keep the labels unified
>
> Ack, renaming to adreno_smmu
>
>>
>>> Nevertheless:
>>>
>>> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
>>>
>>>> + compatible = "qcom,msm8953-iommu", "qcom,msm-iommu-v2";
>>>> + ranges = <0 0x01c48000 0x8000>;
>>>> +
>>>> + clocks = <&gcc GCC_OXILI_AHB_CLK>,
>>>> + <&gcc GCC_BIMC_GFX_CLK>;
>>
>> And align these
>
> They are?
Not in my email client :P, anyway..
>
> Also any comment about the issues listed in the cover letter?
I think v2 on all smmus on this platform is right
Konrad
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH RFC 2/2] arm64: dts: qcom: msm8953: Add GPU
2024-01-27 17:32 ` Luca Weiss
@ 2024-02-02 12:20 ` Konrad Dybcio
0 siblings, 0 replies; 12+ messages in thread
From: Konrad Dybcio @ 2024-02-02 12:20 UTC (permalink / raw)
To: Luca Weiss, ~postmarketos/upstreaming, phone-devel,
Bjorn Andersson, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Vladimir Lypak
Cc: linux-arm-msm, devicetree, linux-kernel
On 27.01.2024 18:32, Luca Weiss wrote:
> On Freitag, 26. Jänner 2024 00:50:43 CET Konrad Dybcio wrote:
>> On 1/25/24 22:56, Luca Weiss wrote:
>>> From: Vladimir Lypak <vladimir.lypak@gmail.com>
>>>
>>> Add the GPU node for the Adreno 506 found on this family of SoCs. The
>>> clock speeds are a bit different per SoC variant, SDM450 maxes out at
>>> 600MHz while MSM8953 (= SDM625) goes up to 650MHz and SDM632 goes up to
>>> 725MHz.
>>>
>>> To achieve this, create a new sdm450.dtsi to hold the 600MHz OPP and
>>> use the new dtsi for sdm450-motorola-ali.
>>>
>>> Signed-off-by: Vladimir Lypak <vladimir.lypak@gmail.com>
>>> Co-developed-by: Luca Weiss <luca@z3ntu.xyz>
>>> Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
>>> ---
>>>
>>> arch/arm64/boot/dts/qcom/msm8953.dtsi | 115
>>> +++++++++++++++++++++++
>>> arch/arm64/boot/dts/qcom/sdm450-motorola-ali.dts | 2 +-
>>> arch/arm64/boot/dts/qcom/sdm450.dtsi | 14 +++
>>> arch/arm64/boot/dts/qcom/sdm632.dtsi | 8 ++
>>> 4 files changed, 138 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/arch/arm64/boot/dts/qcom/msm8953.dtsi
>>> b/arch/arm64/boot/dts/qcom/msm8953.dtsi index 91d083871ab0..1fe0c0c4fd15
>>> 100644
>>> --- a/arch/arm64/boot/dts/qcom/msm8953.dtsi
>>> +++ b/arch/arm64/boot/dts/qcom/msm8953.dtsi
>>> @@ -1046,6 +1046,94 @@ mdss_dsi1_phy: phy@1a96400 {
>>>
>>> };
>>>
>>> };
>>>
>>> + gpu: gpu@1c00000 {
>>> + compatible = "qcom,adreno-506.0", "qcom,adreno";
>>> + reg = <0x01c00000 0x40000>;
>>> + reg-names = "kgsl_3d0_reg_memory";
>>> + interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
>>> +
>>> + clocks = <&gcc GCC_OXILI_GFX3D_CLK>,
>>> + <&gcc GCC_OXILI_AHB_CLK>,
>>> + <&gcc GCC_BIMC_GFX_CLK>,
>>> + <&gcc GCC_BIMC_GPU_CLK>,
>>> + <&gcc GCC_OXILI_TIMER_CLK>,
>>> + <&gcc GCC_OXILI_AON_CLK>;
>>> + clock-names = "core",
>>> + "iface",
>>> + "mem_iface",
>>> + "alt_mem_iface",
>>> + "rbbmtimer",
>>> + "alwayson";
>>> + power-domains = <&gcc OXILI_GX_GDSC>;
>>> +
>>> + iommus = <&gpu_iommu 0>;
>>> + operating-points-v2 = <&gpu_opp_table>;
>>> +
>>> + #cooling-cells = <2>;
>>> +
>>> + status = "disabled";
>>> +
>>> + zap-shader {
>>> + memory-region = <&zap_shader_region>;
>>> + };
>>> +
>>> + gpu_opp_table: opp-table {
>>> + compatible = "operating-points-v2";
>>> +
>>> + opp-19200000 {
>>> + opp-hz = /bits/ 64 <19200000>;
>>> + opp-supported-hw = <0xff>;
>>> + required-opps = <&rpmpd_opp_min_svs>;
>>> + };
>>
>> If you remove all OPPs but this one, can the GPU still spit out pixels?
>
> Yep, phosh is starting and is rendering at a few fps.
>
> fairphone-fp3:~$ cat /sys/devices/platform/soc@0/1c00000.gpu/devfreq/1c00000.gpu/min_freq
> 19200000
> fairphone-fp3:~$ cat /sys/devices/platform/soc@0/1c00000.gpu/devfreq/1c00000.gpu/max_freq
> 19200000
> fairphone-fp3:~$ cat /sys/devices/platform/soc@0/1c00000.gpu/devfreq/1c00000.gpu/cur_freq
> 19200000
Interesting..
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Konrad
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH RFC 0/2] Add GPU support to MSM8953 SoC
2024-01-25 21:56 [PATCH RFC 0/2] Add GPU support to MSM8953 SoC Luca Weiss
2024-01-25 21:56 ` [PATCH RFC 1/2] arm64: dts: qcom: msm8953: Add GPU IOMMU Luca Weiss
2024-01-25 21:56 ` [PATCH RFC 2/2] arm64: dts: qcom: msm8953: Add GPU Luca Weiss
@ 2024-02-07 4:46 ` Bjorn Andersson
2 siblings, 0 replies; 12+ messages in thread
From: Bjorn Andersson @ 2024-02-07 4:46 UTC (permalink / raw)
To: ~postmarketos/upstreaming, phone-devel, Konrad Dybcio,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Vladimir Lypak,
Luca Weiss
Cc: linux-arm-msm, devicetree, linux-kernel
On Thu, 25 Jan 2024 22:56:24 +0100, Luca Weiss wrote:
> Add the GPU IOMMU and GPU nodes to the msm8953 dtsi so GPU can work.
>
> First of all, functionally this series looks fine, tested on
> sdm632-fairphone-fp3.
>
> Secondly and the reason this is marked RFC for now is basically just dt
> bindings check fail, and some questions regarding IOMMU compatible.
>
> [...]
Applied, thanks!
[1/2] arm64: dts: qcom: msm8953: Add GPU IOMMU
commit: 1e48ad0d85f05fb4f383cba006525aa3f253472b
[2/2] arm64: dts: qcom: msm8953: Add GPU
commit: 655815649fcd9bf80b21bcac071633ce80c358c0
Best regards,
--
Bjorn Andersson <andersson@kernel.org>
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2024-02-07 4:47 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-25 21:56 [PATCH RFC 0/2] Add GPU support to MSM8953 SoC Luca Weiss
2024-01-25 21:56 ` [PATCH RFC 1/2] arm64: dts: qcom: msm8953: Add GPU IOMMU Luca Weiss
2024-01-25 22:24 ` Dmitry Baryshkov
2024-01-25 23:49 ` Konrad Dybcio
2024-01-27 17:24 ` Luca Weiss
2024-02-02 12:19 ` Konrad Dybcio
2024-01-25 21:56 ` [PATCH RFC 2/2] arm64: dts: qcom: msm8953: Add GPU Luca Weiss
2024-01-25 22:25 ` Dmitry Baryshkov
2024-01-25 23:50 ` Konrad Dybcio
2024-01-27 17:32 ` Luca Weiss
2024-02-02 12:20 ` Konrad Dybcio
2024-02-07 4:46 ` [PATCH RFC 0/2] Add GPU support to MSM8953 SoC Bjorn Andersson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).