* [PATCHv3 0/2] iommu/arm-smmu-qcom: Add SC7280 support
@ 2021-04-20 6:04 Sai Prakash Ranjan
2021-04-20 6:04 ` [PATCHv3 1/2] iommu/arm-smmu-qcom: Add SC7280 SMMU compatible Sai Prakash Ranjan
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Sai Prakash Ranjan @ 2021-04-20 6:04 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, Bjorn Andersson,
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 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 earlier
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] 8+ messages in thread
* [PATCHv3 1/2] iommu/arm-smmu-qcom: Add SC7280 SMMU compatible
2021-04-20 6:04 [PATCHv3 0/2] iommu/arm-smmu-qcom: Add SC7280 support Sai Prakash Ranjan
@ 2021-04-20 6:04 ` Sai Prakash Ranjan
2021-05-25 4:03 ` Bjorn Andersson
2021-04-20 6:04 ` [PATCHv3 2/2] iommu/arm-smmu-qcom: Move the adreno smmu specific impl earlier Sai Prakash Ranjan
` (2 subsequent siblings)
3 siblings, 1 reply; 8+ messages in thread
From: Sai Prakash Ranjan @ 2021-04-20 6:04 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, Bjorn Andersson,
Sai Prakash Ranjan
Add compatible for SC7280 SMMU to use the Qualcomm Technologies, Inc.
specific implementation.
Signed-off-by: Sai Prakash Ranjan <saiprakash.ranjan@codeaurora.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 98b3a1c2a181..bea3ee0dabc2 100644
--- a/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c
+++ b/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c
@@ -166,6 +166,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" },
@@ -330,6 +331,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] 8+ messages in thread
* [PATCHv3 2/2] iommu/arm-smmu-qcom: Move the adreno smmu specific impl earlier
2021-04-20 6:04 [PATCHv3 0/2] iommu/arm-smmu-qcom: Add SC7280 support Sai Prakash Ranjan
2021-04-20 6:04 ` [PATCHv3 1/2] iommu/arm-smmu-qcom: Add SC7280 SMMU compatible Sai Prakash Ranjan
@ 2021-04-20 6:04 ` Sai Prakash Ranjan
2021-05-24 2:43 ` [PATCHv3 0/2] iommu/arm-smmu-qcom: Add SC7280 support Sai Prakash Ranjan
2021-06-08 12:01 ` Will Deacon
3 siblings, 0 replies; 8+ messages in thread
From: Sai Prakash Ranjan @ 2021-04-20 6:04 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, Bjorn Andersson,
Sai Prakash Ranjan
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 bea3ee0dabc2..03f048aebb80 100644
--- a/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c
+++ b/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c
@@ -345,11 +345,17 @@ struct arm_smmu_device *qcom_smmu_impl_init(struct arm_smmu_device *smmu)
{
const struct device_node *np = smmu->dev->of_node;
- 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] 8+ messages in thread
* Re: [PATCHv3 0/2] iommu/arm-smmu-qcom: Add SC7280 support
2021-04-20 6:04 [PATCHv3 0/2] iommu/arm-smmu-qcom: Add SC7280 support Sai Prakash Ranjan
2021-04-20 6:04 ` [PATCHv3 1/2] iommu/arm-smmu-qcom: Add SC7280 SMMU compatible Sai Prakash Ranjan
2021-04-20 6:04 ` [PATCHv3 2/2] iommu/arm-smmu-qcom: Move the adreno smmu specific impl earlier Sai Prakash Ranjan
@ 2021-05-24 2:43 ` Sai Prakash Ranjan
2021-06-07 2:55 ` Sai Prakash Ranjan
2021-06-08 12:01 ` Will Deacon
3 siblings, 1 reply; 8+ messages in thread
From: Sai Prakash Ranjan @ 2021-05-24 2:43 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, Bjorn Andersson,
saiprakash.ranjan=codeaurora.org
Hi Will,
On 2021-04-20 11:34, 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 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 earlier
>
> drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 14 +++++++++++---
> 1 file changed, 11 insertions(+), 3 deletions(-)
Gentle Ping!
Thanks,
Sai
--
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] 8+ messages in thread
* Re: [PATCHv3 1/2] iommu/arm-smmu-qcom: Add SC7280 SMMU compatible
2021-04-20 6:04 ` [PATCHv3 1/2] iommu/arm-smmu-qcom: Add SC7280 SMMU compatible Sai Prakash Ranjan
@ 2021-05-25 4:03 ` Bjorn Andersson
0 siblings, 0 replies; 8+ messages in thread
From: Bjorn Andersson @ 2021-05-25 4:03 UTC (permalink / raw)
To: Sai Prakash Ranjan
Cc: Will Deacon, Robin Murphy, Joerg Roedel, iommu, linux-arm-kernel,
linux-kernel, linux-arm-msm, Jordan Crouse, Rob Clark,
Akhil P Oommen
On Tue 20 Apr 01:04 CDT 2021, Sai Prakash Ranjan wrote:
> Add compatible for SC7280 SMMU to use the Qualcomm Technologies, Inc.
> specific implementation.
>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Regards,
Bjorn
> Signed-off-by: Sai Prakash Ranjan <saiprakash.ranjan@codeaurora.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 98b3a1c2a181..bea3ee0dabc2 100644
> --- a/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c
> +++ b/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c
> @@ -166,6 +166,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" },
> @@ -330,6 +331,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 [flat|nested] 8+ messages in thread
* Re: [PATCHv3 0/2] iommu/arm-smmu-qcom: Add SC7280 support
2021-05-24 2:43 ` [PATCHv3 0/2] iommu/arm-smmu-qcom: Add SC7280 support Sai Prakash Ranjan
@ 2021-06-07 2:55 ` Sai Prakash Ranjan
0 siblings, 0 replies; 8+ messages in thread
From: Sai Prakash Ranjan @ 2021-06-07 2:55 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, Bjorn Andersson,
saiprakash.ranjan=codeaurora.org
Hi Will,
On 2021-05-24 08:13, Sai Prakash Ranjan wrote:
> Hi Will,
>
> On 2021-04-20 11:34, 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 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 earlier
>>
>> drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 14 +++++++++++---
>> 1 file changed, 11 insertions(+), 3 deletions(-)
>
> Gentle Ping!
>
Is this going to be taken for 5.14 or needs one more release cycle?
Thanks,
Sai
--
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] 8+ messages in thread
* Re: [PATCHv3 0/2] iommu/arm-smmu-qcom: Add SC7280 support
2021-04-20 6:04 [PATCHv3 0/2] iommu/arm-smmu-qcom: Add SC7280 support Sai Prakash Ranjan
` (2 preceding siblings ...)
2021-05-24 2:43 ` [PATCHv3 0/2] iommu/arm-smmu-qcom: Add SC7280 support Sai Prakash Ranjan
@ 2021-06-08 12:01 ` Will Deacon
2021-06-08 12:32 ` Sai Prakash Ranjan
3 siblings, 1 reply; 8+ messages in thread
From: Will Deacon @ 2021-06-08 12:01 UTC (permalink / raw)
To: Sai Prakash Ranjan
Cc: Robin Murphy, Joerg Roedel, iommu, linux-arm-kernel,
linux-kernel, linux-arm-msm, Jordan Crouse, Rob Clark,
Akhil P Oommen, Bjorn Andersson
On Tue, Apr 20, 2021 at 11:34:55AM +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.
This conflicts with what I've already got queued at [1]. Please can you
send an updated version, as I wasn't sure about the initialisation order
you need here wrt to the ACPI parts.
Thanks,
Will
[1] https://git.kernel.org/pub/scm/linux/kernel/git/will/linux.git/log/?h=for-joerg/arm-smmu/updates
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCHv3 0/2] iommu/arm-smmu-qcom: Add SC7280 support
2021-06-08 12:01 ` Will Deacon
@ 2021-06-08 12:32 ` Sai Prakash Ranjan
0 siblings, 0 replies; 8+ messages in thread
From: Sai Prakash Ranjan @ 2021-06-08 12:32 UTC (permalink / raw)
To: Will Deacon
Cc: Robin Murphy, Joerg Roedel, iommu, linux-arm-kernel,
linux-kernel, linux-arm-msm, Jordan Crouse, Rob Clark,
Akhil P Oommen, Bjorn Andersson
On 2021-06-08 17:31, Will Deacon wrote:
> On Tue, Apr 20, 2021 at 11:34:55AM +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.
>
> This conflicts with what I've already got queued at [1]. Please can you
> send an updated version, as I wasn't sure about the initialisation
> order
> you need here wrt to the ACPI parts.
>
> Thanks,
>
> Will
>
> [1]
> https://git.kernel.org/pub/scm/linux/kernel/git/will/linux.git/log/?h=for-joerg/arm-smmu/updates
Sure, have rebased and sent the updated patch [1] after testing for the
order.
Thanks,
Sai
[1]
https://lore.kernel.org/lkml/cover.1623155117.git.saiprakash.ranjan@codeaurora.org/
--
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] 8+ messages in thread
end of thread, other threads:[~2021-06-08 12:33 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-20 6:04 [PATCHv3 0/2] iommu/arm-smmu-qcom: Add SC7280 support Sai Prakash Ranjan
2021-04-20 6:04 ` [PATCHv3 1/2] iommu/arm-smmu-qcom: Add SC7280 SMMU compatible Sai Prakash Ranjan
2021-05-25 4:03 ` Bjorn Andersson
2021-04-20 6:04 ` [PATCHv3 2/2] iommu/arm-smmu-qcom: Move the adreno smmu specific impl earlier Sai Prakash Ranjan
2021-05-24 2:43 ` [PATCHv3 0/2] iommu/arm-smmu-qcom: Add SC7280 support Sai Prakash Ranjan
2021-06-07 2:55 ` Sai Prakash Ranjan
2021-06-08 12:01 ` Will Deacon
2021-06-08 12:32 ` Sai Prakash Ranjan
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).