diff mbox series

[RFC,1/2] arm64: dts: qcom: msm8953: Add GPU IOMMU

Message ID 20240125-msm8953-gpu-v1-1-f6493a5951f3@z3ntu.xyz (mailing list archive)
State Accepted
Headers show
Series Add GPU support to MSM8953 SoC | expand

Commit Message

Luca Weiss Jan. 25, 2024, 9:56 p.m. UTC
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(+)

Comments

Dmitry Baryshkov Jan. 25, 2024, 10:24 p.m. UTC | #1
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>;
>
Konrad Dybcio Jan. 25, 2024, 11:49 p.m. UTC | #2
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
Luca Weiss Jan. 27, 2024, 5:24 p.m. UTC | #3
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
Konrad Dybcio Feb. 2, 2024, 12:19 p.m. UTC | #4
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
diff mbox series

Patch

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>;