Skip to contentSkip to conversation

iommu/arm-smmu-qcom: Add SDM670 SMMU v2

PATCH Applied Richard Acayan 4 participants 6 messages Nov 14, 2024 – Dec 9, 2024

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

v2 cover iommu/arm-smmu-qcom: Add SDM670 SMMU v2

This adds the SMMU v2 for the Snapdragon 670, used for the Adreno GPU.

Changes since v1 ([email protected]):
- explain need for specific compatible in iommu driver patch (2/2)

Richard Acayan (2):
dt-bindings: iommu: arm,smmu: add sdm670 adreno iommu compatible iommu/arm-smmu-qcom: add sdm670 adreno iommu compatible

 Documentation/devicetree/bindings/iommu/arm,smmu.yaml | 1 +
 drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c            | 1 +
 2 files changed, 2 insertions(+)
Signature · 1 line
2.47.0
#1 lore raw

PATCH v2 1/2 dt-bindings: iommu: arm,smmu: add sdm670 adreno iommu compatible

SDM670 has a separate IOMMU for the GPU, like SDM845. Add the compatible for it.

---
 Documentation/devicetree/bindings/iommu/arm,smmu.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/iommu/arm,smmu.yaml +1 -0
index 92d350b8e01a..6d1b92a57dc4 100644
@@ -119,6 +119,7 @@ properties:
               - qcom,msm8996-smmu-v2
               - qcom,sc7180-smmu-v2
               - qcom,sdm630-smmu-v2
+              - qcom,sdm670-smmu-v2
               - qcom,sdm845-smmu-v2
               - qcom,sm6350-smmu-v2
               - qcom,sm7150-smmu-v2
Signature · 1 line
2.47.0
#3 lore raw

PATCH v2 2/2 iommu/arm-smmu-qcom: add sdm670 adreno iommu compatible

In reply to Richard Acayan

Add the compatible for the separate IOMMU on SDM670 for the Adreno GPU.

This IOMMU has the compatible strings:

	"qcom,sdm670-smmu-v2", "qcom,adreno-smmu", "qcom,smmu-v2"

While the SMMU 500 doesn't need an entry for this specific SoC, the SMMU v2 compatible should have its own entry, as the fallback entry in arm-smmu.c handles "qcom,smmu-v2" without per-process page table support unless there is an entry here. This entry can't be the "qcom,adreno-smmu" compatible because dedicated GPU IOMMUs can also be SMMU 500 with different handling.

---
 drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 1 +
 1 file changed, 1 insertion(+)
drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c +1 -0
index 6372f3e25c4b..601fb878d0ef 100644
@@ -567,6 +567,7 @@ static const struct of_device_id __maybe_unused qcom_smmu_impl_of_match[] = {
 	{ .compatible = "qcom,sc8180x-smmu-500", .data = &qcom_smmu_500_impl0_data },
 	{ .compatible = "qcom,sc8280xp-smmu-500", .data = &qcom_smmu_500_impl0_data },
 	{ .compatible = "qcom,sdm630-smmu-v2", .data = &qcom_smmu_v2_data },
+	{ .compatible = "qcom,sdm670-smmu-v2", .data = &qcom_smmu_v2_data },
 	{ .compatible = "qcom,sdm845-smmu-v2", .data = &qcom_smmu_v2_data },
 	{ .compatible = "qcom,sdm845-smmu-500", .data = &sdm845_smmu_500_data },
 	{ .compatible = "qcom,sm6115-smmu-500", .data = &qcom_smmu_500_impl0_data},
Signature · 1 line
2.47.0
Reviewed-by on v2 2/2
#4 lore raw

Re: [PATCH v2 2/2] iommu/arm-smmu-qcom: add sdm670 adreno iommu compatible

Quoted 13 lines · Richard Acayan

Add the compatible for the separate IOMMU on SDM670 for the Adreno GPU.

This IOMMU has the compatible strings:

	"qcom,sdm670-smmu-v2", "qcom,adreno-smmu", "qcom,smmu-v2"

While the SMMU 500 doesn't need an entry for this specific SoC, the SMMU v2 compatible should have its own entry, as the fallback entry in arm-smmu.c handles "qcom,smmu-v2" without per-process page table support unless there is an entry here. This entry can't be the "qcom,adreno-smmu" compatible because dedicated GPU IOMMUs can also be SMMU 500 with different handling.

Quoted 4 lines
---
 drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 1 +
 1 file changed, 1 insertion(+)
Quoted 16 lines
drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c +1 -0
index 6372f3e25c4b..601fb878d0ef 100644
@@ -567,6 +567,7 @@ static const struct of_device_id __maybe_unused qcom_smmu_impl_of_match[] = {
 	{ .compatible = "qcom,sc8180x-smmu-500", .data = &qcom_smmu_500_impl0_data },
 	{ .compatible = "qcom,sc8280xp-smmu-500", .data = &qcom_smmu_500_impl0_data },
 	{ .compatible = "qcom,sdm630-smmu-v2", .data = &qcom_smmu_v2_data },
+	{ .compatible = "qcom,sdm670-smmu-v2", .data = &qcom_smmu_v2_data },
 	{ .compatible = "qcom,sdm845-smmu-v2", .data = &qcom_smmu_v2_data },
 	{ .compatible = "qcom,sdm845-smmu-500", .data = &sdm845_smmu_500_data },
 	{ .compatible = "qcom,sm6115-smmu-500", .data = &qcom_smmu_500_impl0_data},
Signature · 1 line
2.47.0
Signature · 2 lines
With best wishes
Dmitry
maintainer Applied
#5 lore raw
In reply to Richard Acayan
Quoted 10 lines · Richard Acayan

This adds the SMMU v2 for the Snapdragon 670, used for the Adreno GPU.

Changes since v1 ([email protected]):
- explain need for specific compatible in iommu driver patch (2/2)

Richard Acayan (2):
dt-bindings: iommu: arm,smmu: add sdm670 adreno iommu compatible iommu/arm-smmu-qcom: add sdm670 adreno iommu compatible

[...]

I applied the bindings change to will (for-joerg/arm-smmu/bindings)

[1/2] dt-bindings: iommu: arm,smmu: add sdm670 adreno iommu compatible

      https://git.kernel.org/will/c/87cafa082ce3

and the driver change to will (for-joerg/arm-smmu/updates), thanks!

[2/2] iommu/arm-smmu-qcom: add sdm670 adreno iommu compatible

      https://git.kernel.org/will/c/423147389063

Cheers,

Signature · 5 lines
Will

https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev