* [PATCHv4 0/2] iommu/arm-smmu-qcom: Add SC7280 support
@ 2021-06-08 12:30 ` Sai Prakash Ranjan
0 siblings, 0 replies; 9+ messages in thread
From: Sai Prakash Ranjan @ 2021-06-08 12:30 UTC (permalink / raw)
To: Will Deacon, Robin Murphy, Joerg Roedel
Cc: iommu, linux-arm-kernel, linux-kernel, linux-arm-msm,
Jordan Crouse, Rob Clark, Akhil P Oommen, Sai Prakash Ranjan
Patch 1 adds the sc7280 smmu compatible.
Patch 2 moves the adreno smmu check before apss smmu to enable
adreno smmu specific implementation.
Note that dt-binding for sc7280 is already merged.
Changes in v4:
* Rebased on top of arm-smmu/updates with acpi changes.
Changes in v3:
* Collect acks and reviews
* Rebase on top of for-joerg/arm-smmu/updates
Changes in v2:
* Add a comment to make sure this order is not changed in future (Jordan)
Sai Prakash Ranjan (2):
iommu/arm-smmu-qcom: Add SC7280 SMMU compatible
iommu/arm-smmu-qcom: Move the adreno smmu specific impl
drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
--
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCHv4 0/2] iommu/arm-smmu-qcom: Add SC7280 support
@ 2021-06-08 12:30 ` Sai Prakash Ranjan
0 siblings, 0 replies; 9+ messages in thread
From: Sai Prakash Ranjan @ 2021-06-08 12:30 UTC (permalink / raw)
To: Will Deacon, Robin Murphy, Joerg Roedel
Cc: linux-arm-msm, Jordan Crouse, linux-kernel, iommu,
Akhil P Oommen, linux-arm-kernel
Patch 1 adds the sc7280 smmu compatible.
Patch 2 moves the adreno smmu check before apss smmu to enable
adreno smmu specific implementation.
Note that dt-binding for sc7280 is already merged.
Changes in v4:
* Rebased on top of arm-smmu/updates with acpi changes.
Changes in v3:
* Collect acks and reviews
* Rebase on top of for-joerg/arm-smmu/updates
Changes in v2:
* Add a comment to make sure this order is not changed in future (Jordan)
Sai Prakash Ranjan (2):
iommu/arm-smmu-qcom: Add SC7280 SMMU compatible
iommu/arm-smmu-qcom: Move the adreno smmu specific impl
drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
--
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCHv4 1/2] iommu/arm-smmu-qcom: Add SC7280 SMMU compatible
2021-06-08 12:30 ` Sai Prakash Ranjan
@ 2021-06-08 12:30 ` Sai Prakash Ranjan
-1 siblings, 0 replies; 9+ messages in thread
From: Sai Prakash Ranjan @ 2021-06-08 12:30 UTC (permalink / raw)
To: Will Deacon, Robin Murphy, Joerg Roedel
Cc: iommu, linux-arm-kernel, linux-kernel, linux-arm-msm,
Jordan Crouse, Rob Clark, Akhil P Oommen, Sai Prakash Ranjan,
Bjorn Andersson
Add compatible for SC7280 SMMU to use the Qualcomm Technologies, Inc.
specific implementation.
Signed-off-by: Sai Prakash Ranjan <saiprakash.ranjan@codeaurora.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
---
drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c b/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c
index 6f70f0e57c64..e93b5dbda7de 100644
--- a/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c
+++ b/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c
@@ -178,6 +178,7 @@ static const struct of_device_id qcom_smmu_client_of_match[] __maybe_unused = {
{ .compatible = "qcom,mdss" },
{ .compatible = "qcom,sc7180-mdss" },
{ .compatible = "qcom,sc7180-mss-pil" },
+ { .compatible = "qcom,sc7280-mdss" },
{ .compatible = "qcom,sc8180x-mdss" },
{ .compatible = "qcom,sdm845-mdss" },
{ .compatible = "qcom,sdm845-mss-pil" },
@@ -342,6 +343,7 @@ static struct arm_smmu_device *qcom_smmu_create(struct arm_smmu_device *smmu,
static const struct of_device_id __maybe_unused qcom_smmu_impl_of_match[] = {
{ .compatible = "qcom,msm8998-smmu-v2" },
{ .compatible = "qcom,sc7180-smmu-500" },
+ { .compatible = "qcom,sc7280-smmu-500" },
{ .compatible = "qcom,sc8180x-smmu-500" },
{ .compatible = "qcom,sdm630-smmu-v2" },
{ .compatible = "qcom,sdm845-smmu-500" },
--
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCHv4 1/2] iommu/arm-smmu-qcom: Add SC7280 SMMU compatible
@ 2021-06-08 12:30 ` Sai Prakash Ranjan
0 siblings, 0 replies; 9+ messages in thread
From: Sai Prakash Ranjan @ 2021-06-08 12:30 UTC (permalink / raw)
To: Will Deacon, Robin Murphy, Joerg Roedel
Cc: linux-arm-msm, Jordan Crouse, linux-kernel, iommu,
Akhil P Oommen, linux-arm-kernel
Add compatible for SC7280 SMMU to use the Qualcomm Technologies, Inc.
specific implementation.
Signed-off-by: Sai Prakash Ranjan <saiprakash.ranjan@codeaurora.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
---
drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c b/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c
index 6f70f0e57c64..e93b5dbda7de 100644
--- a/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c
+++ b/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c
@@ -178,6 +178,7 @@ static const struct of_device_id qcom_smmu_client_of_match[] __maybe_unused = {
{ .compatible = "qcom,mdss" },
{ .compatible = "qcom,sc7180-mdss" },
{ .compatible = "qcom,sc7180-mss-pil" },
+ { .compatible = "qcom,sc7280-mdss" },
{ .compatible = "qcom,sc8180x-mdss" },
{ .compatible = "qcom,sdm845-mdss" },
{ .compatible = "qcom,sdm845-mss-pil" },
@@ -342,6 +343,7 @@ static struct arm_smmu_device *qcom_smmu_create(struct arm_smmu_device *smmu,
static const struct of_device_id __maybe_unused qcom_smmu_impl_of_match[] = {
{ .compatible = "qcom,msm8998-smmu-v2" },
{ .compatible = "qcom,sc7180-smmu-500" },
+ { .compatible = "qcom,sc7280-smmu-500" },
{ .compatible = "qcom,sc8180x-smmu-500" },
{ .compatible = "qcom,sdm630-smmu-v2" },
{ .compatible = "qcom,sdm845-smmu-500" },
--
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCHv4 2/2] iommu/arm-smmu-qcom: Move the adreno smmu specific impl
2021-06-08 12:30 ` Sai Prakash Ranjan
@ 2021-06-08 12:30 ` Sai Prakash Ranjan
-1 siblings, 0 replies; 9+ messages in thread
From: Sai Prakash Ranjan @ 2021-06-08 12:30 UTC (permalink / raw)
To: Will Deacon, Robin Murphy, Joerg Roedel
Cc: iommu, linux-arm-kernel, linux-kernel, linux-arm-msm,
Jordan Crouse, Rob Clark, Akhil P Oommen, Sai Prakash Ranjan,
Bjorn Andersson, Jordan Crouse
Adreno(GPU) SMMU and APSS(Application Processor SubSystem) SMMU
both implement "arm,mmu-500" in some QTI SoCs and to run through
adreno smmu specific implementation such as enabling split pagetables
support, we need to match the "qcom,adreno-smmu" compatible first
before apss smmu or else we will be running apps smmu implementation
for adreno smmu and the additional features for adreno smmu is never
set. For ex: we have "qcom,sc7280-smmu-500" compatible for both apps
and adreno smmu implementing "arm,mmu-500", so the adreno smmu
implementation is never reached because the current sequence checks
for apps smmu compatible(qcom,sc7280-smmu-500) first and runs that
specific impl and we never reach adreno smmu specific implementation.
Suggested-by: Akhil P Oommen <akhilpo@codeaurora.org>
Signed-off-by: Sai Prakash Ranjan <saiprakash.ranjan@codeaurora.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Acked-by: Jordan Crouse <jordan@cosmicpenguin.net>
---
drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c b/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c
index e93b5dbda7de..83c32566bf64 100644
--- a/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c
+++ b/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c
@@ -370,11 +370,17 @@ struct arm_smmu_device *qcom_smmu_impl_init(struct arm_smmu_device *smmu)
return qcom_smmu_create(smmu, &qcom_smmu_impl);
}
- if (of_match_node(qcom_smmu_impl_of_match, np))
- return qcom_smmu_create(smmu, &qcom_smmu_impl);
-
+ /*
+ * Do not change this order of implementation, i.e., first adreno
+ * smmu impl and then apss smmu since we can have both implementing
+ * arm,mmu-500 in which case we will miss setting adreno smmu specific
+ * features if the order is changed.
+ */
if (of_device_is_compatible(np, "qcom,adreno-smmu"))
return qcom_smmu_create(smmu, &qcom_adreno_smmu_impl);
+ if (of_match_node(qcom_smmu_impl_of_match, np))
+ return qcom_smmu_create(smmu, &qcom_smmu_impl);
+
return smmu;
}
--
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCHv4 2/2] iommu/arm-smmu-qcom: Move the adreno smmu specific impl
@ 2021-06-08 12:30 ` Sai Prakash Ranjan
0 siblings, 0 replies; 9+ messages in thread
From: Sai Prakash Ranjan @ 2021-06-08 12:30 UTC (permalink / raw)
To: Will Deacon, Robin Murphy, Joerg Roedel
Cc: linux-arm-msm, Jordan Crouse, linux-kernel, iommu,
Akhil P Oommen, linux-arm-kernel
Adreno(GPU) SMMU and APSS(Application Processor SubSystem) SMMU
both implement "arm,mmu-500" in some QTI SoCs and to run through
adreno smmu specific implementation such as enabling split pagetables
support, we need to match the "qcom,adreno-smmu" compatible first
before apss smmu or else we will be running apps smmu implementation
for adreno smmu and the additional features for adreno smmu is never
set. For ex: we have "qcom,sc7280-smmu-500" compatible for both apps
and adreno smmu implementing "arm,mmu-500", so the adreno smmu
implementation is never reached because the current sequence checks
for apps smmu compatible(qcom,sc7280-smmu-500) first and runs that
specific impl and we never reach adreno smmu specific implementation.
Suggested-by: Akhil P Oommen <akhilpo@codeaurora.org>
Signed-off-by: Sai Prakash Ranjan <saiprakash.ranjan@codeaurora.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Acked-by: Jordan Crouse <jordan@cosmicpenguin.net>
---
drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c b/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c
index e93b5dbda7de..83c32566bf64 100644
--- a/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c
+++ b/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c
@@ -370,11 +370,17 @@ struct arm_smmu_device *qcom_smmu_impl_init(struct arm_smmu_device *smmu)
return qcom_smmu_create(smmu, &qcom_smmu_impl);
}
- if (of_match_node(qcom_smmu_impl_of_match, np))
- return qcom_smmu_create(smmu, &qcom_smmu_impl);
-
+ /*
+ * Do not change this order of implementation, i.e., first adreno
+ * smmu impl and then apss smmu since we can have both implementing
+ * arm,mmu-500 in which case we will miss setting adreno smmu specific
+ * features if the order is changed.
+ */
if (of_device_is_compatible(np, "qcom,adreno-smmu"))
return qcom_smmu_create(smmu, &qcom_adreno_smmu_impl);
+ if (of_match_node(qcom_smmu_impl_of_match, np))
+ return qcom_smmu_create(smmu, &qcom_smmu_impl);
+
return smmu;
}
--
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCHv4 0/2] iommu/arm-smmu-qcom: Add SC7280 support
2021-06-08 12:30 ` Sai Prakash Ranjan
(?)
@ 2021-06-08 17:16 ` Will Deacon
-1 siblings, 0 replies; 9+ messages in thread
From: Will Deacon @ 2021-06-08 17:16 UTC (permalink / raw)
To: Robin Murphy, Joerg Roedel, Sai Prakash Ranjan
Cc: catalin.marinas, kernel-team, Will Deacon, linux-kernel,
linux-arm-msm, linux-arm-kernel, Jordan Crouse, Rob Clark,
Akhil P Oommen, iommu
On Tue, 8 Jun 2021 18:00:05 +0530, Sai Prakash Ranjan wrote:
> Patch 1 adds the sc7280 smmu compatible.
> Patch 2 moves the adreno smmu check before apss smmu to enable
> adreno smmu specific implementation.
>
> Note that dt-binding for sc7280 is already merged.
>
> Changes in v4:
> * Rebased on top of arm-smmu/updates with acpi changes.
>
> [...]
Applied to will (for-joerg/arm-smmu/updates), thanks!
[1/2] iommu/arm-smmu-qcom: Add SC7280 SMMU compatible
https://git.kernel.org/will/c/0b779f562b14
[2/2] iommu/arm-smmu-qcom: Move the adreno smmu specific impl
https://git.kernel.org/will/c/ab9a77a141cc
Cheers,
--
Will
https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCHv4 0/2] iommu/arm-smmu-qcom: Add SC7280 support
@ 2021-06-08 17:16 ` Will Deacon
0 siblings, 0 replies; 9+ messages in thread
From: Will Deacon @ 2021-06-08 17:16 UTC (permalink / raw)
To: Robin Murphy, Joerg Roedel, Sai Prakash Ranjan
Cc: Will Deacon, catalin.marinas, linux-kernel, iommu,
Akhil P Oommen, Jordan Crouse, linux-arm-msm, kernel-team,
linux-arm-kernel
On Tue, 8 Jun 2021 18:00:05 +0530, Sai Prakash Ranjan wrote:
> Patch 1 adds the sc7280 smmu compatible.
> Patch 2 moves the adreno smmu check before apss smmu to enable
> adreno smmu specific implementation.
>
> Note that dt-binding for sc7280 is already merged.
>
> Changes in v4:
> * Rebased on top of arm-smmu/updates with acpi changes.
>
> [...]
Applied to will (for-joerg/arm-smmu/updates), thanks!
[1/2] iommu/arm-smmu-qcom: Add SC7280 SMMU compatible
https://git.kernel.org/will/c/0b779f562b14
[2/2] iommu/arm-smmu-qcom: Move the adreno smmu specific impl
https://git.kernel.org/will/c/ab9a77a141cc
Cheers,
--
Will
https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCHv4 0/2] iommu/arm-smmu-qcom: Add SC7280 support
@ 2021-06-08 17:16 ` Will Deacon
0 siblings, 0 replies; 9+ messages in thread
From: Will Deacon @ 2021-06-08 17:16 UTC (permalink / raw)
To: Robin Murphy, Joerg Roedel, Sai Prakash Ranjan
Cc: catalin.marinas, kernel-team, Will Deacon, linux-kernel,
linux-arm-msm, linux-arm-kernel, Jordan Crouse, Rob Clark,
Akhil P Oommen, iommu
On Tue, 8 Jun 2021 18:00:05 +0530, Sai Prakash Ranjan wrote:
> Patch 1 adds the sc7280 smmu compatible.
> Patch 2 moves the adreno smmu check before apss smmu to enable
> adreno smmu specific implementation.
>
> Note that dt-binding for sc7280 is already merged.
>
> Changes in v4:
> * Rebased on top of arm-smmu/updates with acpi changes.
>
> [...]
Applied to will (for-joerg/arm-smmu/updates), thanks!
[1/2] iommu/arm-smmu-qcom: Add SC7280 SMMU compatible
https://git.kernel.org/will/c/0b779f562b14
[2/2] iommu/arm-smmu-qcom: Move the adreno smmu specific impl
https://git.kernel.org/will/c/ab9a77a141cc
Cheers,
--
Will
https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2021-06-08 17:18 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-08 12:30 [PATCHv4 0/2] iommu/arm-smmu-qcom: Add SC7280 support Sai Prakash Ranjan
2021-06-08 12:30 ` Sai Prakash Ranjan
2021-06-08 12:30 ` [PATCHv4 1/2] iommu/arm-smmu-qcom: Add SC7280 SMMU compatible Sai Prakash Ranjan
2021-06-08 12:30 ` Sai Prakash Ranjan
2021-06-08 12:30 ` [PATCHv4 2/2] iommu/arm-smmu-qcom: Move the adreno smmu specific impl Sai Prakash Ranjan
2021-06-08 12:30 ` Sai Prakash Ranjan
2021-06-08 17:16 ` [PATCHv4 0/2] iommu/arm-smmu-qcom: Add SC7280 support Will Deacon
2021-06-08 17:16 ` Will Deacon
2021-06-08 17:16 ` Will Deacon
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.