Skip to contentSkip to conversation

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

PATCH Superseded Richard Acayan 3 participants 7 messages Jul 30, 2024 – Oct 31, 2024

Subsystems (5)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

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

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

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.45.2
#1 lore raw

PATCH 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 280b4e49f219..c672f7b6a2ae 100644
@@ -116,6 +116,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.45.2
#2 lore raw

PATCH 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.

---
 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 36c6b36ad4ff..7f4b15be4a11 100644
@@ -539,6 +539,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.45.2
#3 lore raw

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

Quoted 12 lines · Richard Acayan

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

---
 drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 1 +
 1 file changed, 1 insertion(+)
drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c +0 -0
index 36c6b36ad4ff..7f4b15be4a11 100644

drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c static const struct of_device_id __maybe_unused qcom_smmu_impl_of_match[] = { · line 542

Quoted 4 lines
drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c +1 -0
@@ -539,6 +539,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 },

Do the people even read the comments? What the comment is saying? I admit it might be not precise, but "500" and "v2" are the same from that point of view.

NAK.

Best regards,
Krzysztof

#4 lore raw

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

Quoted 8 lines · Krzysztof Kozlowski
Quoted 7 lines · Richard Acayan

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

---
 drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 1 +
 1 file changed, 1 insertion(+)
Quoted 13 lines

drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c static const struct of_device_id __maybe_unused qcom_smmu_impl_of_match[] = { · line 542

Quoted 9 lines
drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c +1 -0
index 36c6b36ad4ff..7f4b15be4a11 100644
@@ -539,6 +539,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 },

Do the people even read the comments? What the comment is saying? I admit it might be not precise, but "500" and "v2" are the same from that point of view.

Well, the comment speaks about -500 explicitly, because -v2 have differences (it is known that these platforms require more quirks).

Quoted 6 lines

NAK.

Best regards,
Krzysztof

Signature · 2 lines
With best wishes
Dmitry
#5 lore raw
In reply to Richard Acayan
Quoted 9 lines · Richard Acayan

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

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(+)

Hi, I'm wondering if this is still being considered.

The NAK doesn't really make sense here, as there's a warning/BUG at the bottom of the qcom SMMU driver that occurs when the compatible isn't added:

/*
* If you hit this WARN_ON() you are missing an entry in the
* qcom_smmu_impl_of_match[] table, and GPU per-process page-
* tables will be broken.
*/
WARN(of_device_is_compatible(np, "qcom,adreno-smmu"),
"Missing qcom_smmu_impl_of_match entry for: %s", dev_name(smmu->dev));

DTS change for context (pending):
https://lore.kernel.org/linux-arm-msm/[email protected]

#6 lore raw
Quoted 11 lines · Richard Acayan
Quoted 9 lines · Richard Acayan

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

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(+)
Quoted 5 lines

Hi, I'm wondering if this is still being considered.

The NAK doesn't really make sense here, as there's a warning/BUG at the bottom of the qcom SMMU driver that occurs when the compatible isn't added:

Please resend it, adding an explicit note about having no generic -v2 fallback and that being a correct way. I don't think Krzysztof reacts to old patches.

Quoted 12 lines

/*
* If you hit this WARN_ON() you are missing an entry in the
* qcom_smmu_impl_of_match[] table, and GPU per-process page-
* tables will be broken.
*/
WARN(of_device_is_compatible(np, "qcom,adreno-smmu"),
"Missing qcom_smmu_impl_of_match entry for: %s", dev_name(smmu->dev));

DTS change for context (pending):
https://lore.kernel.org/linux-arm-msm/[email protected]

Signature · 2 lines
With best wishes
Dmitry