linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] iommu/arm-smmu-qcom: Skip the TTBR1 quirk for db820c.
@ 2021-03-26 23:13 Eric Anholt
  2021-03-26 23:13 ` [PATCH 2/2] arm64: dts: msm8996: Mark the GPU's SMMU as an adreno one Eric Anholt
                   ` (4 more replies)
  0 siblings, 5 replies; 14+ messages in thread
From: Eric Anholt @ 2021-03-26 23:13 UTC (permalink / raw)
  To: dri-devel, linux-arm-msm, freedreno, Rob Clark, Sean Paul,
	Jordan Crouse, Robin Murphy, Will Deacon, Rob Herring,
	Joerg Roedel, linux-arm-kernel, devicetree
  Cc: linux-kernel, Eric Anholt

db820c wants to use the qcom smmu path to get HUPCF set (which keeps
the GPU from wedging and then sometimes wedging the kernel after a
page fault), but it doesn't have separate pagetables support yet in
drm/msm so we can't go all the way to the TTBR1 path.

Signed-off-by: Eric Anholt <eric@anholt.net>
---

We've been seeing a flaky test per day or so in Mesa CI where the
kernel gets wedged after an iommu fault turns into CP errors.  With
this patch, the CI isn't throwing the string of CP errors on the
faults in any of the ~10 jobs I've run so far.

 drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c b/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c
index bcda17012aee..51f22193e456 100644
--- a/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c
+++ b/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c
@@ -130,6 +130,16 @@ static int qcom_adreno_smmu_alloc_context_bank(struct arm_smmu_domain *smmu_doma
 	return __arm_smmu_alloc_bitmap(smmu->context_map, start, count);
 }
 
+static bool qcom_adreno_can_do_ttbr1(struct arm_smmu_device *smmu)
+{
+	const struct device_node *np = smmu->dev->of_node;
+
+	if (of_device_is_compatible(np, "qcom,msm8996-smmu-v2"))
+		return false;
+
+	return true;
+}
+
 static int qcom_adreno_smmu_init_context(struct arm_smmu_domain *smmu_domain,
 		struct io_pgtable_cfg *pgtbl_cfg, struct device *dev)
 {
@@ -144,7 +154,8 @@ static int qcom_adreno_smmu_init_context(struct arm_smmu_domain *smmu_domain,
 	 * be AARCH64 stage 1 but double check because the arm-smmu code assumes
 	 * that is the case when the TTBR1 quirk is enabled
 	 */
-	if ((smmu_domain->stage == ARM_SMMU_DOMAIN_S1) &&
+	if (qcom_adreno_can_do_ttbr1(smmu_domain->smmu) &&
+	    (smmu_domain->stage == ARM_SMMU_DOMAIN_S1) &&
 	    (smmu_domain->cfg.fmt == ARM_SMMU_CTX_FMT_AARCH64))
 		pgtbl_cfg->quirks |= IO_PGTABLE_QUIRK_ARM_TTBR1;
 
-- 
2.31.0


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH 2/2] arm64: dts: msm8996: Mark the GPU's SMMU as an adreno one.
  2021-03-26 23:13 [PATCH 1/2] iommu/arm-smmu-qcom: Skip the TTBR1 quirk for db820c Eric Anholt
@ 2021-03-26 23:13 ` Eric Anholt
  2021-03-30  3:23   ` Bjorn Andersson
  2021-03-29 14:47 ` [PATCH 1/2] iommu/arm-smmu-qcom: Skip the TTBR1 quirk for db820c Will Deacon
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 14+ messages in thread
From: Eric Anholt @ 2021-03-26 23:13 UTC (permalink / raw)
  To: dri-devel, linux-arm-msm, freedreno, Rob Clark, Sean Paul,
	Jordan Crouse, Robin Murphy, Will Deacon, Rob Herring,
	Joerg Roedel, linux-arm-kernel, devicetree
  Cc: linux-kernel, Eric Anholt

This enables the adreno-specific SMMU path that sets HUPCF so
(user-managed) page faults don't wedge the GPU.

Signed-off-by: Eric Anholt <eric@anholt.net>
---

We've been seeing a flaky test per day or so in Mesa CI where the
kernel gets wedged after an iommu fault turns into CP errors.  With
this patch, the CI isn't throwing the string of CP errors on the
faults in any of the ~10 jobs I've run so far.

 arch/arm64/boot/dts/qcom/msm8996.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/msm8996.dtsi b/arch/arm64/boot/dts/qcom/msm8996.dtsi
index 6de136e3add9..432b87ec9c5e 100644
--- a/arch/arm64/boot/dts/qcom/msm8996.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8996.dtsi
@@ -1127,7 +1127,7 @@ cci_i2c1: i2c-bus@1 {
 		};
 
 		adreno_smmu: iommu@b40000 {
-			compatible = "qcom,msm8996-smmu-v2", "qcom,smmu-v2";
+			compatible = "qcom,msm8996-smmu-v2", "qcom,adreno-smmu", "qcom,smmu-v2";
 			reg = <0x00b40000 0x10000>;
 
 			#global-interrupts = <1>;
-- 
2.31.0


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 1/2] iommu/arm-smmu-qcom: Skip the TTBR1 quirk for db820c.
  2021-03-26 23:13 [PATCH 1/2] iommu/arm-smmu-qcom: Skip the TTBR1 quirk for db820c Eric Anholt
  2021-03-26 23:13 ` [PATCH 2/2] arm64: dts: msm8996: Mark the GPU's SMMU as an adreno one Eric Anholt
@ 2021-03-29 14:47 ` Will Deacon
  2021-03-29 17:55   ` Eric Anholt
  2021-03-30  4:02   ` Rob Clark
  2021-03-30  3:22 ` Bjorn Andersson
                   ` (2 subsequent siblings)
  4 siblings, 2 replies; 14+ messages in thread
From: Will Deacon @ 2021-03-29 14:47 UTC (permalink / raw)
  To: Eric Anholt
  Cc: dri-devel, linux-arm-msm, freedreno, Rob Clark, Sean Paul,
	Jordan Crouse, Robin Murphy, Rob Herring, Joerg Roedel,
	linux-arm-kernel, devicetree, linux-kernel

On Fri, Mar 26, 2021 at 04:13:02PM -0700, Eric Anholt wrote:
> db820c wants to use the qcom smmu path to get HUPCF set (which keeps
> the GPU from wedging and then sometimes wedging the kernel after a
> page fault), but it doesn't have separate pagetables support yet in
> drm/msm so we can't go all the way to the TTBR1 path.

What do you mean by "doesn't have separate pagetables support yet"? The
compatible string doesn't feel like the right way to determine this.

Will

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 1/2] iommu/arm-smmu-qcom: Skip the TTBR1 quirk for db820c.
  2021-03-29 14:47 ` [PATCH 1/2] iommu/arm-smmu-qcom: Skip the TTBR1 quirk for db820c Will Deacon
@ 2021-03-29 17:55   ` Eric Anholt
  2021-03-30  4:02   ` Rob Clark
  1 sibling, 0 replies; 14+ messages in thread
From: Eric Anholt @ 2021-03-29 17:55 UTC (permalink / raw)
  To: Will Deacon
  Cc: DRI Development, open list:DRM DRIVER FOR MSM ADRENO GPU,
	freedreno, Rob Clark, Sean Paul, Jordan Crouse, Robin Murphy,
	Rob Herring, Joerg Roedel, Linux ARM, devicetree, LKML

On Mon, Mar 29, 2021 at 7:47 AM Will Deacon <will@kernel.org> wrote:
>
> On Fri, Mar 26, 2021 at 04:13:02PM -0700, Eric Anholt wrote:
> > db820c wants to use the qcom smmu path to get HUPCF set (which keeps
> > the GPU from wedging and then sometimes wedging the kernel after a
> > page fault), but it doesn't have separate pagetables support yet in
> > drm/msm so we can't go all the way to the TTBR1 path.
>
> What do you mean by "doesn't have separate pagetables support yet"? The
> compatible string doesn't feel like the right way to determine this.

In my past experience with DT, software looking at the (existing)
board-specific compatibles has been a typical mechanism used to
resolve something like this "ok, but you need to actually get down to
what board is involved here to figure out how to play along with the
rest of Linux that later attaches to other DT nodes".  Do you have a
preferred mechanism here?

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 1/2] iommu/arm-smmu-qcom: Skip the TTBR1 quirk for db820c.
  2021-03-26 23:13 [PATCH 1/2] iommu/arm-smmu-qcom: Skip the TTBR1 quirk for db820c Eric Anholt
  2021-03-26 23:13 ` [PATCH 2/2] arm64: dts: msm8996: Mark the GPU's SMMU as an adreno one Eric Anholt
  2021-03-29 14:47 ` [PATCH 1/2] iommu/arm-smmu-qcom: Skip the TTBR1 quirk for db820c Will Deacon
@ 2021-03-30  3:22 ` Bjorn Andersson
  2021-06-08 11:42 ` Will Deacon
  2021-07-20  2:30 ` patchwork-bot+linux-arm-msm
  4 siblings, 0 replies; 14+ messages in thread
From: Bjorn Andersson @ 2021-03-30  3:22 UTC (permalink / raw)
  To: Eric Anholt
  Cc: dri-devel, linux-arm-msm, freedreno, Rob Clark, Sean Paul,
	Jordan Crouse, Robin Murphy, Will Deacon, Rob Herring,
	Joerg Roedel, linux-arm-kernel, devicetree, linux-kernel

On Fri 26 Mar 18:13 CDT 2021, Eric Anholt wrote:

> db820c wants to use the qcom smmu path to get HUPCF set (which keeps
> the GPU from wedging and then sometimes wedging the kernel after a
> page fault), but it doesn't have separate pagetables support yet in
> drm/msm so we can't go all the way to the TTBR1 path.
> 
> Signed-off-by: Eric Anholt <eric@anholt.net>

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>

Regards,
Bjorn

> ---
> 
> We've been seeing a flaky test per day or so in Mesa CI where the
> kernel gets wedged after an iommu fault turns into CP errors.  With
> this patch, the CI isn't throwing the string of CP errors on the
> faults in any of the ~10 jobs I've run so far.
> 
>  drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 13 ++++++++++++-
>  1 file changed, 12 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c b/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c
> index bcda17012aee..51f22193e456 100644
> --- a/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c
> +++ b/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c
> @@ -130,6 +130,16 @@ static int qcom_adreno_smmu_alloc_context_bank(struct arm_smmu_domain *smmu_doma
>  	return __arm_smmu_alloc_bitmap(smmu->context_map, start, count);
>  }
>  
> +static bool qcom_adreno_can_do_ttbr1(struct arm_smmu_device *smmu)
> +{
> +	const struct device_node *np = smmu->dev->of_node;
> +
> +	if (of_device_is_compatible(np, "qcom,msm8996-smmu-v2"))
> +		return false;
> +
> +	return true;
> +}
> +
>  static int qcom_adreno_smmu_init_context(struct arm_smmu_domain *smmu_domain,
>  		struct io_pgtable_cfg *pgtbl_cfg, struct device *dev)
>  {
> @@ -144,7 +154,8 @@ static int qcom_adreno_smmu_init_context(struct arm_smmu_domain *smmu_domain,
>  	 * be AARCH64 stage 1 but double check because the arm-smmu code assumes
>  	 * that is the case when the TTBR1 quirk is enabled
>  	 */
> -	if ((smmu_domain->stage == ARM_SMMU_DOMAIN_S1) &&
> +	if (qcom_adreno_can_do_ttbr1(smmu_domain->smmu) &&
> +	    (smmu_domain->stage == ARM_SMMU_DOMAIN_S1) &&
>  	    (smmu_domain->cfg.fmt == ARM_SMMU_CTX_FMT_AARCH64))
>  		pgtbl_cfg->quirks |= IO_PGTABLE_QUIRK_ARM_TTBR1;
>  
> -- 
> 2.31.0
> 

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 2/2] arm64: dts: msm8996: Mark the GPU's SMMU as an adreno one.
  2021-03-26 23:13 ` [PATCH 2/2] arm64: dts: msm8996: Mark the GPU's SMMU as an adreno one Eric Anholt
@ 2021-03-30  3:23   ` Bjorn Andersson
  0 siblings, 0 replies; 14+ messages in thread
From: Bjorn Andersson @ 2021-03-30  3:23 UTC (permalink / raw)
  To: Eric Anholt
  Cc: dri-devel, linux-arm-msm, freedreno, Rob Clark, Sean Paul,
	Jordan Crouse, Robin Murphy, Will Deacon, Rob Herring,
	Joerg Roedel, linux-arm-kernel, devicetree, linux-kernel

On Fri 26 Mar 18:13 CDT 2021, Eric Anholt wrote:

> This enables the adreno-specific SMMU path that sets HUPCF so
> (user-managed) page faults don't wedge the GPU.
> 
> Signed-off-by: Eric Anholt <eric@anholt.net>

Acked-by: Bjorn Andersson <bjorn.andersson@linaro.org>

@Will, can you pick this together with the driver patch? (So that they
land in order)

Regards,
Bjorn

> ---
> 
> We've been seeing a flaky test per day or so in Mesa CI where the
> kernel gets wedged after an iommu fault turns into CP errors.  With
> this patch, the CI isn't throwing the string of CP errors on the
> faults in any of the ~10 jobs I've run so far.
> 
>  arch/arm64/boot/dts/qcom/msm8996.dtsi | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/boot/dts/qcom/msm8996.dtsi b/arch/arm64/boot/dts/qcom/msm8996.dtsi
> index 6de136e3add9..432b87ec9c5e 100644
> --- a/arch/arm64/boot/dts/qcom/msm8996.dtsi
> +++ b/arch/arm64/boot/dts/qcom/msm8996.dtsi
> @@ -1127,7 +1127,7 @@ cci_i2c1: i2c-bus@1 {
>  		};
>  
>  		adreno_smmu: iommu@b40000 {
> -			compatible = "qcom,msm8996-smmu-v2", "qcom,smmu-v2";
> +			compatible = "qcom,msm8996-smmu-v2", "qcom,adreno-smmu", "qcom,smmu-v2";
>  			reg = <0x00b40000 0x10000>;
>  
>  			#global-interrupts = <1>;
> -- 
> 2.31.0
> 

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 1/2] iommu/arm-smmu-qcom: Skip the TTBR1 quirk for db820c.
  2021-03-29 14:47 ` [PATCH 1/2] iommu/arm-smmu-qcom: Skip the TTBR1 quirk for db820c Will Deacon
  2021-03-29 17:55   ` Eric Anholt
@ 2021-03-30  4:02   ` Rob Clark
  2021-03-30  9:34     ` Will Deacon
  1 sibling, 1 reply; 14+ messages in thread
From: Rob Clark @ 2021-03-30  4:02 UTC (permalink / raw)
  To: Will Deacon
  Cc: Eric Anholt, dri-devel, linux-arm-msm, freedreno, Sean Paul,
	Jordan Crouse, Robin Murphy, Rob Herring, Joerg Roedel,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux Kernel Mailing List

On Mon, Mar 29, 2021 at 7:47 AM Will Deacon <will@kernel.org> wrote:
>
> On Fri, Mar 26, 2021 at 04:13:02PM -0700, Eric Anholt wrote:
> > db820c wants to use the qcom smmu path to get HUPCF set (which keeps
> > the GPU from wedging and then sometimes wedging the kernel after a
> > page fault), but it doesn't have separate pagetables support yet in
> > drm/msm so we can't go all the way to the TTBR1 path.
>
> What do you mean by "doesn't have separate pagetables support yet"? The
> compatible string doesn't feel like the right way to determine this.

the compatible string identifies what it is, not what the sw
limitations are, so in that regard it seems right to me..

BR,
-R

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 1/2] iommu/arm-smmu-qcom: Skip the TTBR1 quirk for db820c.
  2021-03-30  4:02   ` Rob Clark
@ 2021-03-30  9:34     ` Will Deacon
  2021-03-30 15:03       ` Rob Clark
  0 siblings, 1 reply; 14+ messages in thread
From: Will Deacon @ 2021-03-30  9:34 UTC (permalink / raw)
  To: Rob Clark
  Cc: Eric Anholt, dri-devel, linux-arm-msm, freedreno, Sean Paul,
	Jordan Crouse, Robin Murphy, Rob Herring, Joerg Roedel,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux Kernel Mailing List

On Mon, Mar 29, 2021 at 09:02:50PM -0700, Rob Clark wrote:
> On Mon, Mar 29, 2021 at 7:47 AM Will Deacon <will@kernel.org> wrote:
> >
> > On Fri, Mar 26, 2021 at 04:13:02PM -0700, Eric Anholt wrote:
> > > db820c wants to use the qcom smmu path to get HUPCF set (which keeps
> > > the GPU from wedging and then sometimes wedging the kernel after a
> > > page fault), but it doesn't have separate pagetables support yet in
> > > drm/msm so we can't go all the way to the TTBR1 path.
> >
> > What do you mean by "doesn't have separate pagetables support yet"? The
> > compatible string doesn't feel like the right way to determine this.
> 
> the compatible string identifies what it is, not what the sw
> limitations are, so in that regard it seems right to me..

Well it depends on what "doesn't have separate pagetables support yet"
means. I can't tell if it's a hardware issue, a firmware issue or a driver
issue.

Will

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 1/2] iommu/arm-smmu-qcom: Skip the TTBR1 quirk for db820c.
  2021-03-30  9:34     ` Will Deacon
@ 2021-03-30 15:03       ` Rob Clark
  2021-03-30 15:31         ` Will Deacon
  0 siblings, 1 reply; 14+ messages in thread
From: Rob Clark @ 2021-03-30 15:03 UTC (permalink / raw)
  To: Will Deacon
  Cc: Eric Anholt, dri-devel, linux-arm-msm, freedreno, Sean Paul,
	Jordan Crouse, Robin Murphy, Rob Herring, Joerg Roedel,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux Kernel Mailing List

On Tue, Mar 30, 2021 at 2:34 AM Will Deacon <will@kernel.org> wrote:
>
> On Mon, Mar 29, 2021 at 09:02:50PM -0700, Rob Clark wrote:
> > On Mon, Mar 29, 2021 at 7:47 AM Will Deacon <will@kernel.org> wrote:
> > >
> > > On Fri, Mar 26, 2021 at 04:13:02PM -0700, Eric Anholt wrote:
> > > > db820c wants to use the qcom smmu path to get HUPCF set (which keeps
> > > > the GPU from wedging and then sometimes wedging the kernel after a
> > > > page fault), but it doesn't have separate pagetables support yet in
> > > > drm/msm so we can't go all the way to the TTBR1 path.
> > >
> > > What do you mean by "doesn't have separate pagetables support yet"? The
> > > compatible string doesn't feel like the right way to determine this.
> >
> > the compatible string identifies what it is, not what the sw
> > limitations are, so in that regard it seems right to me..
>
> Well it depends on what "doesn't have separate pagetables support yet"
> means. I can't tell if it's a hardware issue, a firmware issue or a driver
> issue.

Just a driver issue (and the fact that currently we don't have
physical access to a device... debugging a5xx per-process-pgtables by
pushing untested things to the CI farm is kind of a difficult way to
work)

BR,
-R

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 1/2] iommu/arm-smmu-qcom: Skip the TTBR1 quirk for db820c.
  2021-03-30 15:03       ` Rob Clark
@ 2021-03-30 15:31         ` Will Deacon
  2021-03-30 16:07           ` Rob Clark
  2021-05-25 17:14           ` Bjorn Andersson
  0 siblings, 2 replies; 14+ messages in thread
From: Will Deacon @ 2021-03-30 15:31 UTC (permalink / raw)
  To: Rob Clark
  Cc: Eric Anholt, dri-devel, linux-arm-msm, freedreno, Sean Paul,
	Jordan Crouse, Robin Murphy, Rob Herring, Joerg Roedel,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux Kernel Mailing List

On Tue, Mar 30, 2021 at 08:03:36AM -0700, Rob Clark wrote:
> On Tue, Mar 30, 2021 at 2:34 AM Will Deacon <will@kernel.org> wrote:
> >
> > On Mon, Mar 29, 2021 at 09:02:50PM -0700, Rob Clark wrote:
> > > On Mon, Mar 29, 2021 at 7:47 AM Will Deacon <will@kernel.org> wrote:
> > > >
> > > > On Fri, Mar 26, 2021 at 04:13:02PM -0700, Eric Anholt wrote:
> > > > > db820c wants to use the qcom smmu path to get HUPCF set (which keeps
> > > > > the GPU from wedging and then sometimes wedging the kernel after a
> > > > > page fault), but it doesn't have separate pagetables support yet in
> > > > > drm/msm so we can't go all the way to the TTBR1 path.
> > > >
> > > > What do you mean by "doesn't have separate pagetables support yet"? The
> > > > compatible string doesn't feel like the right way to determine this.
> > >
> > > the compatible string identifies what it is, not what the sw
> > > limitations are, so in that regard it seems right to me..
> >
> > Well it depends on what "doesn't have separate pagetables support yet"
> > means. I can't tell if it's a hardware issue, a firmware issue or a driver
> > issue.
> 
> Just a driver issue (and the fact that currently we don't have
> physical access to a device... debugging a5xx per-process-pgtables by
> pushing untested things to the CI farm is kind of a difficult way to
> work)

But then in that case, this is using the compatible string to identify a
driver issue, no?

Will

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 1/2] iommu/arm-smmu-qcom: Skip the TTBR1 quirk for db820c.
  2021-03-30 15:31         ` Will Deacon
@ 2021-03-30 16:07           ` Rob Clark
  2021-05-25 17:14           ` Bjorn Andersson
  1 sibling, 0 replies; 14+ messages in thread
From: Rob Clark @ 2021-03-30 16:07 UTC (permalink / raw)
  To: Will Deacon
  Cc: Eric Anholt, dri-devel, linux-arm-msm, freedreno, Sean Paul,
	Jordan Crouse, Robin Murphy, Rob Herring, Joerg Roedel,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux Kernel Mailing List

On Tue, Mar 30, 2021 at 8:31 AM Will Deacon <will@kernel.org> wrote:
>
> On Tue, Mar 30, 2021 at 08:03:36AM -0700, Rob Clark wrote:
> > On Tue, Mar 30, 2021 at 2:34 AM Will Deacon <will@kernel.org> wrote:
> > >
> > > On Mon, Mar 29, 2021 at 09:02:50PM -0700, Rob Clark wrote:
> > > > On Mon, Mar 29, 2021 at 7:47 AM Will Deacon <will@kernel.org> wrote:
> > > > >
> > > > > On Fri, Mar 26, 2021 at 04:13:02PM -0700, Eric Anholt wrote:
> > > > > > db820c wants to use the qcom smmu path to get HUPCF set (which keeps
> > > > > > the GPU from wedging and then sometimes wedging the kernel after a
> > > > > > page fault), but it doesn't have separate pagetables support yet in
> > > > > > drm/msm so we can't go all the way to the TTBR1 path.
> > > > >
> > > > > What do you mean by "doesn't have separate pagetables support yet"? The
> > > > > compatible string doesn't feel like the right way to determine this.
> > > >
> > > > the compatible string identifies what it is, not what the sw
> > > > limitations are, so in that regard it seems right to me..
> > >
> > > Well it depends on what "doesn't have separate pagetables support yet"
> > > means. I can't tell if it's a hardware issue, a firmware issue or a driver
> > > issue.
> >
> > Just a driver issue (and the fact that currently we don't have
> > physical access to a device... debugging a5xx per-process-pgtables by
> > pushing untested things to the CI farm is kind of a difficult way to
> > work)
>
> But then in that case, this is using the compatible string to identify a
> driver issue, no?
>

Well, I suppose yes.. but OTOH it is keeping the problem out of the
dtb.  Once per-process pgtables works for a5xx, there would be no dtb
change, just a change to the quirk behavior in arm-smmu-qcom.

BR,
-R

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 1/2] iommu/arm-smmu-qcom: Skip the TTBR1 quirk for db820c.
  2021-03-30 15:31         ` Will Deacon
  2021-03-30 16:07           ` Rob Clark
@ 2021-05-25 17:14           ` Bjorn Andersson
  1 sibling, 0 replies; 14+ messages in thread
From: Bjorn Andersson @ 2021-05-25 17:14 UTC (permalink / raw)
  To: Will Deacon
  Cc: Rob Clark, Eric Anholt, dri-devel, linux-arm-msm, freedreno,
	Sean Paul, Jordan Crouse, Robin Murphy, Rob Herring,
	Joerg Roedel,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux Kernel Mailing List

On Tue 30 Mar 10:31 CDT 2021, Will Deacon wrote:

> On Tue, Mar 30, 2021 at 08:03:36AM -0700, Rob Clark wrote:
> > On Tue, Mar 30, 2021 at 2:34 AM Will Deacon <will@kernel.org> wrote:
> > >
> > > On Mon, Mar 29, 2021 at 09:02:50PM -0700, Rob Clark wrote:
> > > > On Mon, Mar 29, 2021 at 7:47 AM Will Deacon <will@kernel.org> wrote:
> > > > >
> > > > > On Fri, Mar 26, 2021 at 04:13:02PM -0700, Eric Anholt wrote:
> > > > > > db820c wants to use the qcom smmu path to get HUPCF set (which keeps
> > > > > > the GPU from wedging and then sometimes wedging the kernel after a
> > > > > > page fault), but it doesn't have separate pagetables support yet in
> > > > > > drm/msm so we can't go all the way to the TTBR1 path.
> > > > >
> > > > > What do you mean by "doesn't have separate pagetables support yet"? The
> > > > > compatible string doesn't feel like the right way to determine this.
> > > >
> > > > the compatible string identifies what it is, not what the sw
> > > > limitations are, so in that regard it seems right to me..
> > >
> > > Well it depends on what "doesn't have separate pagetables support yet"
> > > means. I can't tell if it's a hardware issue, a firmware issue or a driver
> > > issue.
> > 
> > Just a driver issue (and the fact that currently we don't have
> > physical access to a device... debugging a5xx per-process-pgtables by
> > pushing untested things to the CI farm is kind of a difficult way to
> > work)
> 
> But then in that case, this is using the compatible string to identify a
> driver issue, no?
> 

No the compatible addition identifies the hardware, the implementation
then uses this information to know that it needs to behave "differently"
on this platform.

When/if someone decides to add the necessary support in the driver they
can remove the driver quirk, but it doesn't invalidate the specific
compatible.

Regards,
Bjorn

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 1/2] iommu/arm-smmu-qcom: Skip the TTBR1 quirk for db820c.
  2021-03-26 23:13 [PATCH 1/2] iommu/arm-smmu-qcom: Skip the TTBR1 quirk for db820c Eric Anholt
                   ` (2 preceding siblings ...)
  2021-03-30  3:22 ` Bjorn Andersson
@ 2021-06-08 11:42 ` Will Deacon
  2021-07-20  2:30 ` patchwork-bot+linux-arm-msm
  4 siblings, 0 replies; 14+ messages in thread
From: Will Deacon @ 2021-06-08 11:42 UTC (permalink / raw)
  To: Sean Paul, Robin Murphy, Rob Herring, freedreno, Jordan Crouse,
	Eric Anholt, Rob Clark, linux-arm-kernel, Joerg Roedel,
	dri-devel, linux-arm-msm, devicetree
  Cc: catalin.marinas, kernel-team, Will Deacon, linux-kernel

On Fri, 26 Mar 2021 16:13:02 -0700, Eric Anholt wrote:
> db820c wants to use the qcom smmu path to get HUPCF set (which keeps
> the GPU from wedging and then sometimes wedging the kernel after a
> page fault), but it doesn't have separate pagetables support yet in
> drm/msm so we can't go all the way to the TTBR1 path.

Applied to will (for-joerg/arm-smmu/updates), thanks!

[1/2] iommu/arm-smmu-qcom: Skip the TTBR1 quirk for db820c.
      https://git.kernel.org/will/c/a242f4297cfe
[2/2] arm64: dts: msm8996: Mark the GPU's SMMU as an adreno one.
      https://git.kernel.org/will/c/19c07b91f85d

Cheers,
-- 
Will

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

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 1/2] iommu/arm-smmu-qcom: Skip the TTBR1 quirk for db820c.
  2021-03-26 23:13 [PATCH 1/2] iommu/arm-smmu-qcom: Skip the TTBR1 quirk for db820c Eric Anholt
                   ` (3 preceding siblings ...)
  2021-06-08 11:42 ` Will Deacon
@ 2021-07-20  2:30 ` patchwork-bot+linux-arm-msm
  4 siblings, 0 replies; 14+ messages in thread
From: patchwork-bot+linux-arm-msm @ 2021-07-20  2:30 UTC (permalink / raw)
  To: Eric Anholt; +Cc: linux-arm-msm

Hello:

This series was applied to qcom/linux.git (refs/heads/for-next):

On Fri, 26 Mar 2021 16:13:02 -0700 you wrote:
> db820c wants to use the qcom smmu path to get HUPCF set (which keeps
> the GPU from wedging and then sometimes wedging the kernel after a
> page fault), but it doesn't have separate pagetables support yet in
> drm/msm so we can't go all the way to the TTBR1 path.
> 
> Signed-off-by: Eric Anholt <eric@anholt.net>
> 
> [...]

Here is the summary with links:
  - [1/2] iommu/arm-smmu-qcom: Skip the TTBR1 quirk for db820c.
    https://git.kernel.org/qcom/c/a242f4297cfe
  - [2/2] arm64: dts: msm8996: Mark the GPU's SMMU as an adreno one.
    https://git.kernel.org/qcom/c/19c07b91f85d

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2021-07-20  2:42 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-26 23:13 [PATCH 1/2] iommu/arm-smmu-qcom: Skip the TTBR1 quirk for db820c Eric Anholt
2021-03-26 23:13 ` [PATCH 2/2] arm64: dts: msm8996: Mark the GPU's SMMU as an adreno one Eric Anholt
2021-03-30  3:23   ` Bjorn Andersson
2021-03-29 14:47 ` [PATCH 1/2] iommu/arm-smmu-qcom: Skip the TTBR1 quirk for db820c Will Deacon
2021-03-29 17:55   ` Eric Anholt
2021-03-30  4:02   ` Rob Clark
2021-03-30  9:34     ` Will Deacon
2021-03-30 15:03       ` Rob Clark
2021-03-30 15:31         ` Will Deacon
2021-03-30 16:07           ` Rob Clark
2021-05-25 17:14           ` Bjorn Andersson
2021-03-30  3:22 ` Bjorn Andersson
2021-06-08 11:42 ` Will Deacon
2021-07-20  2:30 ` patchwork-bot+linux-arm-msm

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