iommu.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] iommu/tegra-smmu: Fix mc errors on tegra124-nyan
@ 2021-02-18 22:07 Nicolin Chen
  2021-02-20  5:16 ` Dmitry Osipenko
                   ` (4 more replies)
  0 siblings, 5 replies; 18+ messages in thread
From: Nicolin Chen @ 2021-02-18 22:07 UTC (permalink / raw)
  To: joro, thierry.reding, will, guillaume.tucker
  Cc: linux-kernel, iommu, jonathanh, linux-tegra, digetx

Commit 25938c73cd79 ("iommu/tegra-smmu: Rework tegra_smmu_probe_device()")
removed certain hack in the tegra_smmu_probe() by relying on IOMMU core to
of_xlate SMMU's SID per device, so as to get rid of tegra_smmu_find() and
tegra_smmu_configure() that are typically done in the IOMMU core also.

This approach works for both existing devices that have DT nodes and other
devices (like PCI device) that don't exist in DT, on Tegra210 and Tegra3
upon testing. However, Page Fault errors are reported on tegra124-Nyan:

  tegra-mc 70019000.memory-controller: display0a: read @0xfe056b40:
	 EMEM address decode error (SMMU translation error [--S])
  tegra-mc 70019000.memory-controller: display0a: read @0xfe056b40:
	 Page fault (SMMU translation error [--S])

After debugging, I found that the mentioned commit changed some function
callback sequence of tegra-smmu's, resulting in enabling SMMU for display
client before display driver gets initialized. I couldn't reproduce exact
same issue on Tegra210 as Tegra124 (arm-32) differs at arch-level code.

Actually this Page Fault is a known issue, as on most of Tegra platforms,
display gets enabled by the bootloader for the splash screen feature, so
it keeps filling the framebuffer memory. A proper fix to this issue is to
1:1 linear map the framebuffer memory to IOVA space so the SMMU will have
the same address as the physical address in its page table. Yet, Thierry
has been working on the solution above for a year, and it hasn't merged.

Therefore, let's partially revert the mentioned commit to fix the errors.

The reason why we do a partial revert here is that we can still set priv
in ->of_xlate() callback for PCI devices. Meanwhile, devices existing in
DT, like display, will go through tegra_smmu_configure() at the stage of
bus_set_iommu() when SMMU gets probed(), as what it did before we merged
the mentioned commit.

Once we have the linear map solution for framebuffer memory, this change
can be cleaned away.

[Big thank to Guillaume who reported and helped debugging/verification]

Fixes: 25938c73cd79 ("iommu/tegra-smmu: Rework tegra_smmu_probe_device()")
Reported-by: Guillaume Tucker <guillaume.tucker@collabora.com>
Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com>
---

Guillaume, would you please give a "Tested-by" to this change? Thanks!

 drivers/iommu/tegra-smmu.c | 72 +++++++++++++++++++++++++++++++++++++-
 1 file changed, 71 insertions(+), 1 deletion(-)

diff --git a/drivers/iommu/tegra-smmu.c b/drivers/iommu/tegra-smmu.c
index 4a3f095a1c26..97eb62f667d2 100644
--- a/drivers/iommu/tegra-smmu.c
+++ b/drivers/iommu/tegra-smmu.c
@@ -798,10 +798,70 @@ static phys_addr_t tegra_smmu_iova_to_phys(struct iommu_domain *domain,
 	return SMMU_PFN_PHYS(pfn) + SMMU_OFFSET_IN_PAGE(iova);
 }
 
+static struct tegra_smmu *tegra_smmu_find(struct device_node *np)
+{
+	struct platform_device *pdev;
+	struct tegra_mc *mc;
+
+	pdev = of_find_device_by_node(np);
+	if (!pdev)
+		return NULL;
+
+	mc = platform_get_drvdata(pdev);
+	if (!mc)
+		return NULL;
+
+	return mc->smmu;
+}
+
+static int tegra_smmu_configure(struct tegra_smmu *smmu, struct device *dev,
+				struct of_phandle_args *args)
+{
+	const struct iommu_ops *ops = smmu->iommu.ops;
+	int err;
+
+	err = iommu_fwspec_init(dev, &dev->of_node->fwnode, ops);
+	if (err < 0) {
+		dev_err(dev, "failed to initialize fwspec: %d\n", err);
+		return err;
+	}
+
+	err = ops->of_xlate(dev, args);
+	if (err < 0) {
+		dev_err(dev, "failed to parse SW group ID: %d\n", err);
+		iommu_fwspec_free(dev);
+		return err;
+	}
+
+	return 0;
+}
+
 static struct iommu_device *tegra_smmu_probe_device(struct device *dev)
 {
-	struct tegra_smmu *smmu = dev_iommu_priv_get(dev);
+	struct device_node *np = dev->of_node;
+	struct tegra_smmu *smmu = NULL;
+	struct of_phandle_args args;
+	unsigned int index = 0;
+	int err;
+
+	while (of_parse_phandle_with_args(np, "iommus", "#iommu-cells", index,
+					  &args) == 0) {
+		smmu = tegra_smmu_find(args.np);
+		if (smmu) {
+			err = tegra_smmu_configure(smmu, dev, &args);
+			of_node_put(args.np);
 
+			if (err < 0)
+				return ERR_PTR(err);
+
+			break;
+		}
+
+		of_node_put(args.np);
+		index++;
+	}
+
+	smmu = dev_iommu_priv_get(dev);
 	if (!smmu)
 		return ERR_PTR(-ENODEV);
 
@@ -1028,6 +1088,16 @@ struct tegra_smmu *tegra_smmu_probe(struct device *dev,
 	if (!smmu)
 		return ERR_PTR(-ENOMEM);
 
+	/*
+	 * This is a bit of a hack. Ideally we'd want to simply return this
+	 * value. However the IOMMU registration process will attempt to add
+	 * all devices to the IOMMU when bus_set_iommu() is called. In order
+	 * not to rely on global variables to track the IOMMU instance, we
+	 * set it here so that it can be looked up from the .probe_device()
+	 * callback via the IOMMU device's .drvdata field.
+	 */
+	mc->smmu = smmu;
+
 	size = BITS_TO_LONGS(soc->num_asids) * sizeof(long);
 
 	smmu->asids = devm_kzalloc(dev, size, GFP_KERNEL);
-- 
2.17.1

_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

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

* Re: [PATCH] iommu/tegra-smmu: Fix mc errors on tegra124-nyan
  2021-02-18 22:07 [PATCH] iommu/tegra-smmu: Fix mc errors on tegra124-nyan Nicolin Chen
@ 2021-02-20  5:16 ` Dmitry Osipenko
  2021-02-23  2:13   ` Nicolin Chen
  2021-02-22 13:15 ` Guillaume Tucker
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 18+ messages in thread
From: Dmitry Osipenko @ 2021-02-20  5:16 UTC (permalink / raw)
  To: Nicolin Chen, joro, thierry.reding, will, guillaume.tucker
  Cc: linux-tegra, linux-kernel, iommu, jonathanh

19.02.2021 01:07, Nicolin Chen пишет:
> Commit 25938c73cd79 ("iommu/tegra-smmu: Rework tegra_smmu_probe_device()")
> removed certain hack in the tegra_smmu_probe() by relying on IOMMU core to
> of_xlate SMMU's SID per device, so as to get rid of tegra_smmu_find() and
> tegra_smmu_configure() that are typically done in the IOMMU core also.
> 
> This approach works for both existing devices that have DT nodes and other
> devices (like PCI device) that don't exist in DT, on Tegra210 and Tegra3
> upon testing. However, Page Fault errors are reported on tegra124-Nyan:
> 
>   tegra-mc 70019000.memory-controller: display0a: read @0xfe056b40:
> 	 EMEM address decode error (SMMU translation error [--S])
>   tegra-mc 70019000.memory-controller: display0a: read @0xfe056b40:
> 	 Page fault (SMMU translation error [--S])
> 
> After debugging, I found that the mentioned commit changed some function
> callback sequence of tegra-smmu's, resulting in enabling SMMU for display
> client before display driver gets initialized. I couldn't reproduce exact
> same issue on Tegra210 as Tegra124 (arm-32) differs at arch-level code.

Hello Nicolin,

Could you please explain in a more details what exactly makes the
difference for the callback sequence?
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

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

* Re: [PATCH] iommu/tegra-smmu: Fix mc errors on tegra124-nyan
  2021-02-18 22:07 [PATCH] iommu/tegra-smmu: Fix mc errors on tegra124-nyan Nicolin Chen
  2021-02-20  5:16 ` Dmitry Osipenko
@ 2021-02-22 13:15 ` Guillaume Tucker
  2021-03-03 18:26 ` Thierry Reding
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 18+ messages in thread
From: Guillaume Tucker @ 2021-02-22 13:15 UTC (permalink / raw)
  To: Nicolin Chen, joro, thierry.reding, will
  Cc: linux-kernel, iommu, jonathanh, linux-tegra, digetx, Collabora Kernel ML

On 18/02/2021 22:07, Nicolin Chen wrote:
> Commit 25938c73cd79 ("iommu/tegra-smmu: Rework tegra_smmu_probe_device()")
> removed certain hack in the tegra_smmu_probe() by relying on IOMMU core to
> of_xlate SMMU's SID per device, so as to get rid of tegra_smmu_find() and
> tegra_smmu_configure() that are typically done in the IOMMU core also.
> 
> This approach works for both existing devices that have DT nodes and other
> devices (like PCI device) that don't exist in DT, on Tegra210 and Tegra3
> upon testing. However, Page Fault errors are reported on tegra124-Nyan:
> 
>   tegra-mc 70019000.memory-controller: display0a: read @0xfe056b40:
> 	 EMEM address decode error (SMMU translation error [--S])
>   tegra-mc 70019000.memory-controller: display0a: read @0xfe056b40:
> 	 Page fault (SMMU translation error [--S])
> 
> After debugging, I found that the mentioned commit changed some function
> callback sequence of tegra-smmu's, resulting in enabling SMMU for display
> client before display driver gets initialized. I couldn't reproduce exact
> same issue on Tegra210 as Tegra124 (arm-32) differs at arch-level code.
> 
> Actually this Page Fault is a known issue, as on most of Tegra platforms,
> display gets enabled by the bootloader for the splash screen feature, so
> it keeps filling the framebuffer memory. A proper fix to this issue is to
> 1:1 linear map the framebuffer memory to IOVA space so the SMMU will have
> the same address as the physical address in its page table. Yet, Thierry
> has been working on the solution above for a year, and it hasn't merged.
> 
> Therefore, let's partially revert the mentioned commit to fix the errors.
> 
> The reason why we do a partial revert here is that we can still set priv
> in ->of_xlate() callback for PCI devices. Meanwhile, devices existing in
> DT, like display, will go through tegra_smmu_configure() at the stage of
> bus_set_iommu() when SMMU gets probed(), as what it did before we merged
> the mentioned commit.
> 
> Once we have the linear map solution for framebuffer memory, this change
> can be cleaned away.
> 
> [Big thank to Guillaume who reported and helped debugging/verification]
> 
> Fixes: 25938c73cd79 ("iommu/tegra-smmu: Rework tegra_smmu_probe_device()")
> Reported-by: Guillaume Tucker <guillaume.tucker@collabora.com>

You're welcome.  I would actually prefer to see it as reported by
kernelci.org since I wouldn't have found it without the automated
testing and bisection.  If you're OK to change this trailer:

  Reported-by: "kernelci.org bot" <bot@kernelci.org>

> Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com>
> ---
> 
> Guillaume, would you please give a "Tested-by" to this change? Thanks!

Sure. https://lava.collabora.co.uk/scheduler/job/3249387

  Tested-by: Guillaume Tucker <guillaume.tucker@collabora.com>

Thanks,
Guillaume
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

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

* Re: [PATCH] iommu/tegra-smmu: Fix mc errors on tegra124-nyan
  2021-02-20  5:16 ` Dmitry Osipenko
@ 2021-02-23  2:13   ` Nicolin Chen
  2021-02-23  5:10     ` Dmitry Osipenko
  0 siblings, 1 reply; 18+ messages in thread
From: Nicolin Chen @ 2021-02-23  2:13 UTC (permalink / raw)
  To: Dmitry Osipenko
  Cc: guillaume.tucker, iommu, jonathanh, thierry.reding, linux-tegra,
	will, linux-kernel

Hi Dmitry,

On Sat, Feb 20, 2021 at 08:16:22AM +0300, Dmitry Osipenko wrote:
> 19.02.2021 01:07, Nicolin Chen пишет:
> > Commit 25938c73cd79 ("iommu/tegra-smmu: Rework tegra_smmu_probe_device()")
> > removed certain hack in the tegra_smmu_probe() by relying on IOMMU core to
> > of_xlate SMMU's SID per device, so as to get rid of tegra_smmu_find() and
> > tegra_smmu_configure() that are typically done in the IOMMU core also.
> > 
> > This approach works for both existing devices that have DT nodes and other
> > devices (like PCI device) that don't exist in DT, on Tegra210 and Tegra3
> > upon testing. However, Page Fault errors are reported on tegra124-Nyan:
> > 
> >   tegra-mc 70019000.memory-controller: display0a: read @0xfe056b40:
> > 	 EMEM address decode error (SMMU translation error [--S])
> >   tegra-mc 70019000.memory-controller: display0a: read @0xfe056b40:
> > 	 Page fault (SMMU translation error [--S])
> > 
> > After debugging, I found that the mentioned commit changed some function
> > callback sequence of tegra-smmu's, resulting in enabling SMMU for display
> > client before display driver gets initialized. I couldn't reproduce exact
> > same issue on Tegra210 as Tegra124 (arm-32) differs at arch-level code.
> 
> Hello Nicolin,
> 
> Could you please explain in a more details what exactly makes the
> difference for the callback sequence?

Here is a log with 5.11.0-rc6:
https://lava.collabora.co.uk/scheduler/job/3187849
[dump_stack was added in some tegra-smmu functions]

And here is a corresponding log with reverting the original commit:
https://lava.collabora.co.uk/scheduler/job/3187851

Here is a log with 5.11.0-rc7-next-20210210:
https://lava.collabora.co.uk/scheduler/job/3210245

And here is a corresponding log with reverting the original commit:
https://lava.collabora.co.uk/scheduler/job/3210596

Both failing logs show that mc errors started right after client DC
got enabled by ->attach_dev() callback that in the passing logs was
not called until Host1x driver init. And note that two failing logs
show that ->attach_dev() could be called from two different sources,
of_dma_configure_id() or arch_setup_dma_ops().

The reason why ->attach_dev() gets called is probably related to the
following reasons (sorry, can't be 100% sure as I don't have Tegra124
or other 32bit Tegra board to test):
1) With the commit reverted, all clients are probed in "arch" stage,
   which is even prior to iommu core initialization -- including it
   setting default domain type. This probably messed up the type of
   allocating domains against the default domain type. Also internal
   group is somehow affected. So some condition check in iommu core
   failed and then it bypassed ->attach_dev callback in really_probe
   stage, until Host1x driver does attach_dev again.

2) 32bit ARM has arch_setup_dma_ops() does an additional set of iommu
   domain allocation + attach_dev(), after of_dma_configure_id() did
   once. This isn't reproducible for me on Tegra210.

As debugging online isn't very efficient, and given that Thierry has
been working on the linear mapping of framebuffer carveout, I choose
to partially revert as a quick fix.

Thanks
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

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

* Re: [PATCH] iommu/tegra-smmu: Fix mc errors on tegra124-nyan
  2021-02-23  2:13   ` Nicolin Chen
@ 2021-02-23  5:10     ` Dmitry Osipenko
  2021-02-25  6:27       ` Nicolin Chen
  0 siblings, 1 reply; 18+ messages in thread
From: Dmitry Osipenko @ 2021-02-23  5:10 UTC (permalink / raw)
  To: Nicolin Chen
  Cc: guillaume.tucker, iommu, jonathanh, thierry.reding, linux-tegra,
	will, linux-kernel

23.02.2021 05:13, Nicolin Chen пишет:
> Hi Dmitry,
> 
> On Sat, Feb 20, 2021 at 08:16:22AM +0300, Dmitry Osipenko wrote:
>> 19.02.2021 01:07, Nicolin Chen пишет:
>>> Commit 25938c73cd79 ("iommu/tegra-smmu: Rework tegra_smmu_probe_device()")
>>> removed certain hack in the tegra_smmu_probe() by relying on IOMMU core to
>>> of_xlate SMMU's SID per device, so as to get rid of tegra_smmu_find() and
>>> tegra_smmu_configure() that are typically done in the IOMMU core also.
>>>
>>> This approach works for both existing devices that have DT nodes and other
>>> devices (like PCI device) that don't exist in DT, on Tegra210 and Tegra3
>>> upon testing. However, Page Fault errors are reported on tegra124-Nyan:
>>>
>>>   tegra-mc 70019000.memory-controller: display0a: read @0xfe056b40:
>>> 	 EMEM address decode error (SMMU translation error [--S])
>>>   tegra-mc 70019000.memory-controller: display0a: read @0xfe056b40:
>>> 	 Page fault (SMMU translation error [--S])
>>>
>>> After debugging, I found that the mentioned commit changed some function
>>> callback sequence of tegra-smmu's, resulting in enabling SMMU for display
>>> client before display driver gets initialized. I couldn't reproduce exact
>>> same issue on Tegra210 as Tegra124 (arm-32) differs at arch-level code.
>>
>> Hello Nicolin,
>>
>> Could you please explain in a more details what exactly makes the
>> difference for the callback sequence?
> 
> Here is a log with 5.11.0-rc6:
> https://lava.collabora.co.uk/scheduler/job/3187849
> [dump_stack was added in some tegra-smmu functions]
> 
> And here is a corresponding log with reverting the original commit:
> https://lava.collabora.co.uk/scheduler/job/3187851
> 
> Here is a log with 5.11.0-rc7-next-20210210:
> https://lava.collabora.co.uk/scheduler/job/3210245
> 
> And here is a corresponding log with reverting the original commit:
> https://lava.collabora.co.uk/scheduler/job/3210596
> 
> Both failing logs show that mc errors started right after client DC
> got enabled by ->attach_dev() callback that in the passing logs was
> not called until Host1x driver init. And note that two failing logs
> show that ->attach_dev() could be called from two different sources,
> of_dma_configure_id() or arch_setup_dma_ops().
> 
> The reason why ->attach_dev() gets called is probably related to the
> following reasons (sorry, can't be 100% sure as I don't have Tegra124
> or other 32bit Tegra board to test):
> 1) With the commit reverted, all clients are probed in "arch" stage,
>    which is even prior to iommu core initialization -- including it
>    setting default domain type. This probably messed up the type of
>    allocating domains against the default domain type. Also internal
>    group is somehow affected. So some condition check in iommu core
>    failed and then it bypassed ->attach_dev callback in really_probe
>    stage, until Host1x driver does attach_dev again.
> 
> 2) 32bit ARM has arch_setup_dma_ops() does an additional set of iommu
>    domain allocation + attach_dev(), after of_dma_configure_id() did
>    once. This isn't reproducible for me on Tegra210.
> 
> As debugging online isn't very efficient, and given that Thierry has
> been working on the linear mapping of framebuffer carveout, I choose
> to partially revert as a quick fix.

The partially revert should be okay, but it's not clear to me what makes
difference for T124 since I don't see that problem on T30, which also
has active display at a boot time.

_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

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

* Re: [PATCH] iommu/tegra-smmu: Fix mc errors on tegra124-nyan
  2021-02-23  5:10     ` Dmitry Osipenko
@ 2021-02-25  6:27       ` Nicolin Chen
  2021-02-27  9:59         ` Dmitry Osipenko
  0 siblings, 1 reply; 18+ messages in thread
From: Nicolin Chen @ 2021-02-25  6:27 UTC (permalink / raw)
  To: Dmitry Osipenko
  Cc: guillaume.tucker, iommu, jonathanh, thierry.reding, linux-tegra,
	will, linux-kernel

On Tue, Feb 23, 2021 at 08:10:41AM +0300, Dmitry Osipenko wrote:
> 23.02.2021 05:13, Nicolin Chen пишет:
> > Hi Dmitry,
> > 
> > On Sat, Feb 20, 2021 at 08:16:22AM +0300, Dmitry Osipenko wrote:
> >> 19.02.2021 01:07, Nicolin Chen пишет:
> >>> Commit 25938c73cd79 ("iommu/tegra-smmu: Rework tegra_smmu_probe_device()")
> >>> removed certain hack in the tegra_smmu_probe() by relying on IOMMU core to
> >>> of_xlate SMMU's SID per device, so as to get rid of tegra_smmu_find() and
> >>> tegra_smmu_configure() that are typically done in the IOMMU core also.
> >>>
> >>> This approach works for both existing devices that have DT nodes and other
> >>> devices (like PCI device) that don't exist in DT, on Tegra210 and Tegra3
> >>> upon testing. However, Page Fault errors are reported on tegra124-Nyan:
> >>>
> >>>   tegra-mc 70019000.memory-controller: display0a: read @0xfe056b40:
> >>> 	 EMEM address decode error (SMMU translation error [--S])
> >>>   tegra-mc 70019000.memory-controller: display0a: read @0xfe056b40:
> >>> 	 Page fault (SMMU translation error [--S])
> >>>
> >>> After debugging, I found that the mentioned commit changed some function
> >>> callback sequence of tegra-smmu's, resulting in enabling SMMU for display
> >>> client before display driver gets initialized. I couldn't reproduce exact
> >>> same issue on Tegra210 as Tegra124 (arm-32) differs at arch-level code.
> >>
> >> Hello Nicolin,
> >>
> >> Could you please explain in a more details what exactly makes the
> >> difference for the callback sequence?
> > 
> > Here is a log with 5.11.0-rc6:
> > https://lava.collabora.co.uk/scheduler/job/3187849
> > [dump_stack was added in some tegra-smmu functions]
> > 
> > And here is a corresponding log with reverting the original commit:
> > https://lava.collabora.co.uk/scheduler/job/3187851
> > 
> > Here is a log with 5.11.0-rc7-next-20210210:
> > https://lava.collabora.co.uk/scheduler/job/3210245
> > 
> > And here is a corresponding log with reverting the original commit:
> > https://lava.collabora.co.uk/scheduler/job/3210596
> > 
> > Both failing logs show that mc errors started right after client DC
> > got enabled by ->attach_dev() callback that in the passing logs was
> > not called until Host1x driver init. And note that two failing logs
> > show that ->attach_dev() could be called from two different sources,
> > of_dma_configure_id() or arch_setup_dma_ops().
> > 
> > The reason why ->attach_dev() gets called is probably related to the
> > following reasons (sorry, can't be 100% sure as I don't have Tegra124
> > or other 32bit Tegra board to test):
> > 1) With the commit reverted, all clients are probed in "arch" stage,
> >    which is even prior to iommu core initialization -- including it
> >    setting default domain type. This probably messed up the type of
> >    allocating domains against the default domain type. Also internal
> >    group is somehow affected. So some condition check in iommu core
> >    failed and then it bypassed ->attach_dev callback in really_probe
> >    stage, until Host1x driver does attach_dev again.
> > 
> > 2) 32bit ARM has arch_setup_dma_ops() does an additional set of iommu
> >    domain allocation + attach_dev(), after of_dma_configure_id() did
> >    once. This isn't reproducible for me on Tegra210.
> > 
> > As debugging online isn't very efficient, and given that Thierry has
> > been working on the linear mapping of framebuffer carveout, I choose
> > to partially revert as a quick fix.
> 
> The partially revert should be okay, but it's not clear to me what makes
> difference for T124 since I don't see that problem on T30, which also
> has active display at a boot time.

Hmm..do you see ->attach_dev() is called from host1x_client_iommu_attach
or from of_dma_configure_id/arch_setup_dma_ops?
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

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

* Re: [PATCH] iommu/tegra-smmu: Fix mc errors on tegra124-nyan
  2021-02-25  6:27       ` Nicolin Chen
@ 2021-02-27  9:59         ` Dmitry Osipenko
  2021-03-02 23:08           ` Nicolin Chen
  0 siblings, 1 reply; 18+ messages in thread
From: Dmitry Osipenko @ 2021-02-27  9:59 UTC (permalink / raw)
  To: Nicolin Chen
  Cc: guillaume.tucker, iommu, jonathanh, thierry.reding, linux-tegra,
	will, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 560 bytes --]

25.02.2021 09:27, Nicolin Chen пишет:
...
>> The partially revert should be okay, but it's not clear to me what makes
>> difference for T124 since I don't see that problem on T30, which also
>> has active display at a boot time.
> 
> Hmm..do you see ->attach_dev() is called from host1x_client_iommu_attach
> or from of_dma_configure_id/arch_setup_dma_ops?
> 

I applied yours debug-patch, please see dmesg.txt attached to the email.
Seems probe-defer of the tegra-dc driver prevents the implicit
tegra_smmu_attach_dev, so it happens to work by accident.

[-- Attachment #2: dmesg.txt --]
[-- Type: text/plain, Size: 76125 bytes --]

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 5.11.0-next-20210226-00003-g89069e0f4a28 (dima@dimapc) (armv7a-hardfloat-linux-gnueabi-gcc (Gentoo 9.3.0-r2 p4) 9.3.0, GNU ld (Gentoo 2.26.1 p1.0) 2.26.1) #7012 SMP PREEMPT Sat Feb 27 11:49:27 MSK 2021
[    0.000000] CPU: ARMv7 Processor [412fc099] revision 9 (ARMv7), cr=50c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: ASUS Google Nexus 7 (Project Bach / ME370TG) E1565
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] Reserved memory: created CMA memory pool at 0xa0000000, size 256 MiB
[    0.000000] OF: reserved mem: initialized node linux,cma@80000000, compatible id shared-dma-pool
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x000000009f7fffff]
[    0.000000]   HighMem  [mem 0x000000009f800000-0x00000000bfdfffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000080000000-0x00000000bfdfffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000080000000-0x00000000bfdfffff]
[    0.000000] On node 0 totalpages: 261632
[    0.000000]   Normal zone: 1134 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 129024 pages, LIFO batch:31
[    0.000000]   HighMem zone: 132608 pages, LIFO batch:31
[    0.000000] percpu: Embedded 21 pages/cpu s53324 r8192 d24500 u86016
[    0.000000] pcpu-alloc: s53324 r8192 d24500 u86016 alloc=21*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 260498
[    0.000000] Kernel command line: tegraid=30.1.3.0.0 mem=1022M@2048M android.commchip=0 vmalloc=512M androidboot.serialno=015d3f18c9081210 video=tegrafb no_console_suspend=1 console=none debug_uartport=hsport usbcore.old_scheme_first=1 lp0_vec=8192@0xbddf9000 tegra_fbmem=8195200@0xabe01000 core_edp_mv=0 audio_codec=rt5640 board_info=f41:a00:1:44:2 root=/dev/sda1 rw rootwait tegraboot=sdmmc gpt gpt_sector=61079551 androidboot.bootloader=4.23 androidboot.baseband=1231_0.18.0_0409 init=/usr/lib/systemd/systemd root=/dev/nfs nfsroot=192.168.3.100:/nfs/root,v3,tcp rw ip=192.168.3.101::192.168.3.100:255.255.255.0::usb0 no_console_suspend gpt gpt_sector=61079551 console=tty1 no_console_suspend
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 754680K/1046528K available (10240K kernel code, 1579K rwdata, 5404K rodata, 1024K init, 418K bss, 29704K reserved, 262144K cma-reserved, 268224K highmem)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] ftrace: allocating 46557 entries in 91 pages
[    0.000000] ------------[ cut here ]------------
[    0.000000] WARNING: CPU: 0 PID: 0 at arch/arm/kernel/insn.c:15 __arm_gen_branch+0x7f/0x84
[    0.000000] Modules linked in:
[    0.000000] CPU: 0 PID: 0 Comm: swapper Not tainted 5.11.0-next-20210226-00003-g89069e0f4a28 #7012
[    0.000000] Hardware name: NVIDIA Tegra SoC (Flattened Device Tree)
[    0.000000] [<c010cfa9>] (unwind_backtrace) from [<c01090cd>] (show_stack+0x11/0x14)
[    0.000000] [<c01090cd>] (show_stack) from [<c0a0f4d1>] (dump_stack+0x8d/0x9a)
[    0.000000] [<c0a0f4d1>] (dump_stack) from [<c011e367>] (__warn+0xb7/0xc8)
[    0.000000] [<c011e367>] (__warn) from [<c0a0cc21>] (warn_slowpath_fmt+0x45/0x78)
[    0.000000] [<c0a0cc21>] (warn_slowpath_fmt) from [<c010c553>] (__arm_gen_branch+0x7f/0x84)
[    0.000000] [<c010c553>] (__arm_gen_branch) from [<c010c4c3>] (ftrace_make_nop+0xf/0x20)
[    0.000000] [<c010c4c3>] (ftrace_make_nop) from [<c01b0bd9>] (ftrace_process_locs+0x211/0x320)
[    0.000000] [<c01b0bd9>] (ftrace_process_locs) from [<c110d5c9>] (ftrace_init+0x6f/0xbe)
[    0.000000] [<c110d5c9>] (ftrace_init) from [<c1100d6b>] (start_kernel+0x42d/0x662)
[    0.000000] [<c1100d6b>] (start_kernel) from [<00000000>] (0x0)
[    0.000000] random: get_random_bytes called from print_oops_end_marker+0x25/0x64 with crng_init=0
[    0.000000] ---[ end trace 0000000000000000 ]---
[    0.000000] ------------[ ftrace bug ]------------
[    0.000000] ftrace failed to modify
[    0.000000] [<c110c754>] crash_notes_memory_init+0x4/0x34
[    0.000000]  actual:   23:f0:9c:ec
[    0.000000] Initializing ftrace call sites
[    0.000000] ftrace record flags: 0
[    0.000000]  (0)
                expected tramp: c010c32d
[    0.000000] ------------[ cut here ]------------
[    0.000000] WARNING: CPU: 0 PID: 0 at kernel/trace/ftrace.c:2066 ftrace_bug+0x1bf/0x1da
[    0.000000] Modules linked in:
[    0.000000] CPU: 0 PID: 0 Comm: swapper Tainted: G        W         5.11.0-next-20210226-00003-g89069e0f4a28 #7012
[    0.000000] Hardware name: NVIDIA Tegra SoC (Flattened Device Tree)
[    0.000000] [<c010cfa9>] (unwind_backtrace) from [<c01090cd>] (show_stack+0x11/0x14)
[    0.000000] [<c01090cd>] (show_stack) from [<c0a0f4d1>] (dump_stack+0x8d/0x9a)
[    0.000000] [<c0a0f4d1>] (dump_stack) from [<c011e367>] (__warn+0xb7/0xc8)
[    0.000000] [<c011e367>] (__warn) from [<c0a0cc21>] (warn_slowpath_fmt+0x45/0x78)
[    0.000000] [<c0a0cc21>] (warn_slowpath_fmt) from [<c0a0e221>] (ftrace_bug+0x1bf/0x1da)
[    0.000000] [<c0a0e221>] (ftrace_bug) from [<c01b0c19>] (ftrace_process_locs+0x251/0x320)
[    0.000000] [<c01b0c19>] (ftrace_process_locs) from [<c110d5c9>] (ftrace_init+0x6f/0xbe)
[    0.000000] [<c110d5c9>] (ftrace_init) from [<c1100d6b>] (start_kernel+0x42d/0x662)
[    0.000000] [<c1100d6b>] (start_kernel) from [<00000000>] (0x0)
[    0.000000] ---[ end trace f68728a0d3053b52 ]---
[    0.000000] ftrace: allocated 91 pages with 5 groups
[    0.000000] rcu: Preemptible hierarchical RCU implementation.
[    0.000000]  Trampoline variant of Tasks RCU enabled.
[    0.000000]  Rude variant of Tasks RCU enabled.
[    0.000000]  Tracing variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 100 jiffies.
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] /interrupt-controller@60004000: 160 interrupts forwarded to /interrupt-controller@50041000
[    0.000000] L2C: platform modifies aux control register: 0x2c080000 -> 0x3c480000
[    0.000000] L2C: DT/platform modifies aux control register: 0x2c080000 -> 0x3c480000
[    0.000000] L2C-310 erratum 769419 enabled
[    0.000000] L2C-310 enabling early BRESP for Cortex-A9
[    0.000000] L2C-310 ID prefetch enabled, offset 1 lines
[    0.000000] L2C-310 dynamic clock gating enabled, standby mode enabled
[    0.000000] L2C-310 cache controller enabled, 8 ways, 1024 kB
[    0.000000] L2C-310: CACHE_ID 0x410000c7, AUX_CTRL 0x7e080001
[    0.000001] sched_clock: 32 bits at 1000kHz, resolution 1000ns, wraps every 2147483647500ns
[    0.000023] clocksource: timer_us: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275 ns
[    0.000040] Switching to timer-based delay loop, resolution 1000ns
[    0.000470] clocksource: tegra_suspend_timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275000 ns
[    0.001269] Console: colour dummy device 80x30
[    0.002285] printk: console [tty1] enabled
[    0.002329] Calibrating delay loop (skipped), value calculated using timer frequency.. 2.00 BogoMIPS (lpj=1000)
[    0.002360] pid_max: default: 32768 minimum: 301
[    0.002504] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.002532] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.003357] CPU: Testing write buffer coherency: ok
[    0.003638] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.004438] Setting up static identity map for 0x80100000 - 0x801000a0
[    0.004588] rcu: Hierarchical SRCU implementation.
[    0.005626] Tegra Revision: A03 SKU: 131 CPU Process: 4 SoC Process: 0
[    0.006808] smp: Bringing up secondary CPUs ...
[    0.008391] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.009393] CPU2: thread -1, cpu 2, socket 0, mpidr 80000002
[    0.010374] CPU3: thread -1, cpu 3, socket 0, mpidr 80000003
[    0.010488] smp: Brought up 1 node, 4 CPUs
[    0.010550] SMP: Total of 4 processors activated (8.00 BogoMIPS).
[    0.010569] CPU: All CPU(s) started in SVC mode.
[    0.011202] devtmpfs: initialized
[    0.026055] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
[    0.026327] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275000 ns
[    0.026368] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[    0.044714] pinctrl core: initialized pinctrl subsystem

[    0.045417] *************************************************************
[    0.045434] **     NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE    **
[    0.045450] **                                                         **
[    0.045466] **  IOMMU DebugFS SUPPORT HAS BEEN ENABLED IN THIS KERNEL  **
[    0.045482] **                                                         **
[    0.045497] ** This means that this kernel is built to expose internal **
[    0.045512] ** IOMMU data structures, which may compromise security on **
[    0.045527] ** your system.                                            **
[    0.045543] **                                                         **
[    0.045558] ** If you see this message and you are not debugging the   **
[    0.045573] ** kernel, report this immediately to your vendor!         **
[    0.045588] **                                                         **
[    0.045603] **     NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE    **
[    0.045618] *************************************************************
[    0.046421] NET: Registered protocol family 16
[    0.049945] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.051033] thermal_sys: Registered thermal governor 'step_wise'
[    0.051659] cpuidle: using governor menu
[    0.067905] No ATAGs?
[    0.068090] hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
[    0.068119] hw-breakpoint: maximum watchpoint size is 4 bytes.
[    0.074374] random: fast init done
[    0.078424] Serial: AMBA PL011 UART driver
[    0.080056] ramoops: uncorrectable error in header
[    0.080197] ramoops: uncorrectable error in header
[    0.080303] ramoops: uncorrectable error in header
[    0.080407] ramoops: uncorrectable error in header
[    0.080509] ramoops: uncorrectable error in header
[    0.080613] ramoops: uncorrectable error in header
[    0.080716] ramoops: uncorrectable error in header
[    0.080817] ramoops: uncorrectable error in header
[    0.080919] ramoops: uncorrectable error in header
[    0.081021] ramoops: uncorrectable error in header
[    0.081140] ramoops: uncorrectable error in header
[    0.081258] ramoops: uncorrectable error in header
[    0.081365] ramoops: uncorrectable error in header
[    0.081471] ramoops: uncorrectable error in header
[    0.081574] ramoops: uncorrectable error in header
[    0.081683] ramoops: uncorrectable error in header
[    0.081786] ramoops: uncorrectable error in header
[    0.081889] ramoops: uncorrectable error in header
[    0.081992] ramoops: uncorrectable error in header
[    0.082111] ramoops: uncorrectable error in header
[    0.082217] ramoops: uncorrectable error in header
[    0.082321] ramoops: uncorrectable error in header
[    0.082412] ramoops: uncorrectable error in header
[    0.082516] ramoops: uncorrectable error in header
[    0.082619] ramoops: uncorrectable error in header
[    0.082721] ramoops: uncorrectable error in header
[    0.082823] ramoops: uncorrectable error in header
[    0.082926] ramoops: uncorrectable error in header
[    0.083034] ramoops: uncorrectable error in header
[    0.083155] ramoops: uncorrectable error in header
[    0.083262] ramoops: uncorrectable error in header
[    0.083370] ramoops: uncorrectable error in header
[    0.083485] ramoops: uncorrectable error in header
[    0.099794] printk: console [ramoops-1] enabled
[    0.099936] pstore: Registered ramoops as persistent store backend
[    0.100019] ramoops: using 0x10000@0xbfdf0000, ecc: 16
[    0.118284] ldo_s-1167_3v3: supplied by vdd_5v0
[    0.119018] iommu: Default domain type: Translated
[    0.119588] SCSI subsystem initialized
[    0.119832] libata version 3.00 loaded.
[    0.120146] usbcore: registered new interface driver usbfs
[    0.120279] usbcore: registered new interface driver hub
[    0.120476] usbcore: registered new device driver usb
[    0.120671] pps_core: LinuxPPS API ver. 1 registered
[    0.120812] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.120970] PTP clock support registered
[    0.121445] Advanced Linux Sound Architecture Driver Initialized.
[    0.122114] Bluetooth: Core ver 2.22
[    0.122237] NET: Registered protocol family 31
[    0.122321] Bluetooth: HCI device and connection manager initialized
[    0.122468] Bluetooth: HCI socket layer initialized
[    0.122552] Bluetooth: L2CAP socket layer initialized
[    0.122723] Bluetooth: SCO socket layer initialized
[    0.123046] nfc: nfc_init: NFC Core ver 0.1
[    0.123214] NET: Registered protocol family 39
[    0.124459] clocksource: Switched to clocksource timer_us
[    0.182958] FS-Cache: Loaded
[    0.183344] CacheFiles: Loaded
[    0.192345] NET: Registered protocol family 2
[    0.193277] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
[    0.193540] TCP established hash table entries: 4096 (order: 2, 16384 bytes, linear)
[    0.193723] TCP bind hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    0.193859] TCP: Hash tables configured (established 4096 bind 4096)
[    0.194138] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.194260] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.194600] NET: Registered protocol family 1
[    0.195181] RPC: Registered named UNIX socket transport module.
[    0.195332] RPC: Registered udp transport module.
[    0.195433] RPC: Registered tcp transport module.
[    0.195574] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.198029] hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available
[    0.199228] Initialise system trusted keyrings
[    0.199504] workingset: timestamp_bits=14 max_order=18 bucket_order=4
[    0.203589] zbud: loaded
[    0.204891] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.205733] FS-Cache: Netfs 'nfs' registered for caching
[    0.206353] NFS: Registering the id_resolver key type
[    0.206539] Key type id_resolver registered
[    0.206624] Key type id_legacy registered
[    0.207454] Key type cifs.idmap registered
[    0.208044] fuse: init (API version 7.33)
[    0.302402] NET: Registered protocol family 38
[    0.302514] Key type asymmetric registered
[    0.302654] Asymmetric key parser 'x509' registered
[    0.302785] bounce: pool size: 64 pages
[    0.302956] io scheduler kyber registered
[    0.304826] gpio-239 (init-mode-hog): hogged as output/low
[    0.304938] gpio-230 (init-mode-hog): hogged as output/low
[    0.305090] gpio-136 (init-mode-hog): hogged as output/low
[    0.305186] gpio-70 (init-low-power-mode-hog): hogged as input
[    0.305338] gpio-26 (init-mode-3g-hog): hogged as output/low
[    0.305451] gpio-22 (init-mode-3g-hog): hogged as output/low
[    0.305602] gpio-179 (init-mode-3g-hog): hogged as output/low
[    0.305697] gpio-121 (init-mode-3g-hog): hogged as output/low
[    0.305846] gpio-189 (init-mode-3g-hog): hogged as output/low
[    0.305936] gpio-165 (init-mode-3g-hog): hogged as output/low
[    0.306083] gpio-191 (init-mode-3g-hog): hogged as output/low
[    0.306174] gpio-184 (init-mode-3g-hog): hogged as output/low
[    0.306322] gpio-241 (init-mode-3g-hog): hogged as output/low
[    0.306444] gpio-194 (init-mode-3g-hog): hogged as output/low
[    0.306596] gpio-195 (init-mode-3g-hog): hogged as output/low
[    0.306687] gpio-143 (init-mode-3g-hog): hogged as output/low
[    0.306836] gpio-164 (init-mode-3g-hog): hogged as output/low
[    0.306983] gpio-163 (init-mode-3g-hog): hogged as output/low
[    0.307075] gpio-105 (init-mode-3g-hog): hogged as output/low
[    0.307223] gpio-106 (init-mode-3g-hog): hogged as output/low
[    0.307314] gpio-104 (init-mode-3g-hog): hogged as output/low
[    0.307483] gpio-107 (init-mode-3g-hog): hogged as output/low
[    0.312990] tegra-apbdma 6000a000.dma: Tegra20 APB DMA driver registered 32 channels
[    0.314145] tegra-pmc 7000e400.pmc: i2c-thermtrip node not found, emergency thermal reset disabled.
[    0.315070] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    0.317454] 70006200.serial: ttyTHS1 at MMIO 0x70006200 (irq = 78, base_baud = 0) is a TEGRA_UART
[    0.317754] serial serial0: tty port ttyTHS1 registered
[    0.318264] tegra-host1x 50000000.host1x: -------tegra_smmu_of_xlate: id 12
[    0.318442] tegra-host1x 50000000.host1x: --------tegra_smmu_probe_device, 822
[    0.318591] tegra-host1x 50000000.host1x: ---------iommu_group_get_for_dev, 1572
[    0.318681] tegra-host1x 50000000.host1x: ---------tegra_smmu_device_group, 862
[    0.318851] tegra-host1x 50000000.host1x: ---------tegra_smmu_device_group, 911: 12
[    0.319001] tegra-host1x 50000000.host1x: ---------iommu_group_get_for_dev, 1574
[    0.319098] tegra-host1x 50000000.host1x: ---------iommu_group_add_device, 858
[    0.319242] tegra-host1x 50000000.host1x: Adding to iommu group 0
[    0.319337] tegra-host1x 50000000.host1x: ---------iommu_alloc_default_domain, 1543: type 3
[    0.319542] iommu: ------iommu_group_alloc_default_domain: platform, (null), (null)
[    0.319692] ---------tegra_smmu_domain_alloc, 284: type 3
[    0.319778] CPU: 2 PID: 1 Comm: swapper/0 Tainted: G        W         5.11.0-next-20210226-00003-g89069e0f4a28 #7012
[    0.319927] Hardware name: NVIDIA Tegra SoC (Flattened Device Tree)
[    0.320073] [<c010cfa9>] (unwind_backtrace) from [<c01090cd>] (show_stack+0x11/0x14)
[    0.320244] [<c01090cd>] (show_stack) from [<c0a0f4d1>] (dump_stack+0x8d/0x9a)
[    0.320351] [<c0a0f4d1>] (dump_stack) from [<c0a0ff45>] (tegra_smmu_domain_alloc+0x23/0xb6)
[    0.320507] [<c0a0ff45>] (tegra_smmu_domain_alloc) from [<c0a0f87b>] (iommu_group_alloc_default_domain+0x4b/0xfa)
[    0.320664] [<c0a0f87b>] (iommu_group_alloc_default_domain) from [<c052c41d>] (iommu_probe_device+0x69/0xec)
[    0.320830] [<c052c41d>] (iommu_probe_device) from [<c052e6ab>] (of_iommu_configure+0xfb/0x150)
[    0.320934] [<c052e6ab>] (of_iommu_configure) from [<c073f697>] (of_dma_configure_id+0x1fb/0x2ec)
[    0.321109] [<c073f697>] (of_dma_configure_id) from [<c059743f>] (really_probe+0x7b/0x2a0)
[    0.321278] [<c059743f>] (really_probe) from [<c05976a3>] (driver_probe_device+0x3f/0x78)
[    0.321434] [<c05976a3>] (driver_probe_device) from [<c05978d5>] (device_driver_attach+0x3d/0x40)
[    0.321535] [<c05978d5>] (device_driver_attach) from [<c059790f>] (__driver_attach+0x37/0x78)
[    0.321689] [<c059790f>] (__driver_attach) from [<c059607b>] (bus_for_each_dev+0x43/0x6c)
[    0.321844] [<c059607b>] (bus_for_each_dev) from [<c0596b8b>] (bus_add_driver+0xe3/0x148)
[    0.321999] [<c0596b8b>] (bus_add_driver) from [<c0598051>] (driver_register+0x39/0xa0)
[    0.322096] [<c0598051>] (driver_register) from [<c0598d91>] (__platform_register_drivers+0x2d/0x68)
[    0.322253] [<c0598d91>] (__platform_register_drivers) from [<c1121d7f>] (tegra_host1x_init+0x29/0x3c)
[    0.322425] [<c1121d7f>] (tegra_host1x_init) from [<c0101d25>] (do_one_initcall+0x45/0x1e4)
[    0.322585] [<c0101d25>] (do_one_initcall) from [<c1101141>] (kernel_init_freeable+0x157/0x1a2)
[    0.322741] [<c1101141>] (kernel_init_freeable) from [<c0a15581>] (kernel_init+0xd/0xe0)
[    0.322840] [<c0a15581>] (kernel_init) from [<c0100155>] (ret_from_fork+0x11/0x1c)
[    0.322991] Exception stack(0xc1533fb0 to 0xc1533ff8)
[    0.323076] 3fa0:                                     00000000 00000000 00000000 00000000
[    0.323223] 3fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    0.323369] 3fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[    0.323502] tegra-host1x 50000000.host1x: ---------iommu_probe_device, 272
[    0.327005] host1x drm: -------tegra_smmu_of_xlate: id 12
[    0.327826] tegra-dc 54200000.dc: -------tegra_smmu_of_xlate: id 1
[    0.327921] CPU: 2 PID: 1 Comm: swapper/0 Tainted: G        W         5.11.0-next-20210226-00003-g89069e0f4a28 #7012
[    0.328071] Hardware name: NVIDIA Tegra SoC (Flattened Device Tree)
[    0.328213] [<c010cfa9>] (unwind_backtrace) from [<c01090cd>] (show_stack+0x11/0x14)
[    0.328321] [<c01090cd>] (show_stack) from [<c0a0f4d1>] (dump_stack+0x8d/0x9a)
[    0.328480] [<c0a0f4d1>] (dump_stack) from [<c052ec75>] (tegra_smmu_of_xlate+0x7d/0x84)
[    0.328641] [<c052ec75>] (tegra_smmu_of_xlate) from [<c052e591>] (of_iommu_xlate+0x51/0x70)
[    0.328740] [<c052e591>] (of_iommu_xlate) from [<c052e6d7>] (of_iommu_configure+0x127/0x150)
[    0.328896] [<c052e6d7>] (of_iommu_configure) from [<c073f697>] (of_dma_configure_id+0x1fb/0x2ec)
[    0.329060] [<c073f697>] (of_dma_configure_id) from [<c059743f>] (really_probe+0x7b/0x2a0)
[    0.329222] [<c059743f>] (really_probe) from [<c05976a3>] (driver_probe_device+0x3f/0x78)
[    0.329321] [<c05976a3>] (driver_probe_device) from [<c05978d5>] (device_driver_attach+0x3d/0x40)
[    0.329478] [<c05978d5>] (device_driver_attach) from [<c059790f>] (__driver_attach+0x37/0x78)
[    0.329633] [<c059790f>] (__driver_attach) from [<c059607b>] (bus_for_each_dev+0x43/0x6c)
[    0.329788] [<c059607b>] (bus_for_each_dev) from [<c0596b8b>] (bus_add_driver+0xe3/0x148)
[    0.329886] [<c0596b8b>] (bus_add_driver) from [<c0598051>] (driver_register+0x39/0xa0)
[    0.330039] [<c0598051>] (driver_register) from [<c0598d91>] (__platform_register_drivers+0x2d/0x68)
[    0.330194] [<c0598d91>] (__platform_register_drivers) from [<c1121e6b>] (host1x_drm_init+0x2b/0x42)
[    0.330354] [<c1121e6b>] (host1x_drm_init) from [<c0101d25>] (do_one_initcall+0x45/0x1e4)
[    0.330456] [<c0101d25>] (do_one_initcall) from [<c1101141>] (kernel_init_freeable+0x157/0x1a2)
[    0.330610] [<c1101141>] (kernel_init_freeable) from [<c0a15581>] (kernel_init+0xd/0xe0)
[    0.330762] [<c0a15581>] (kernel_init) from [<c0100155>] (ret_from_fork+0x11/0x1c)
[    0.330913] Exception stack(0xc1533fb0 to 0xc1533ff8)
[    0.330999] 3fa0:                                     00000000 00000000 00000000 00000000
[    0.331145] 3fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    0.331234] 3fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[    0.331438] tegra-dc 54200000.dc: --------tegra_smmu_probe_device, 822
[    0.331586] CPU: 2 PID: 1 Comm: swapper/0 Tainted: G        W         5.11.0-next-20210226-00003-g89069e0f4a28 #7012
[    0.331735] Hardware name: NVIDIA Tegra SoC (Flattened Device Tree)
[    0.331819] [<c010cfa9>] (unwind_backtrace) from [<c01090cd>] (show_stack+0x11/0x14)
[    0.331978] [<c01090cd>] (show_stack) from [<c0a0f4d1>] (dump_stack+0x8d/0x9a)
[    0.332076] [<c0a0f4d1>] (dump_stack) from [<c052ebed>] (tegra_smmu_probe_device+0x49/0x54)
[    0.332234] [<c052ebed>] (tegra_smmu_probe_device) from [<c052bd6d>] (__iommu_probe_device+0x35/0x1c4)
[    0.332391] [<c052bd6d>] (__iommu_probe_device) from [<c052c3cd>] (iommu_probe_device+0x19/0xec)
[    0.332545] [<c052c3cd>] (iommu_probe_device) from [<c052e6ab>] (of_iommu_configure+0xfb/0x150)
[    0.332701] [<c052e6ab>] (of_iommu_configure) from [<c073f697>] (of_dma_configure_id+0x1fb/0x2ec)
[    0.332804] [<c073f697>] (of_dma_configure_id) from [<c059743f>] (really_probe+0x7b/0x2a0)
[    0.332963] [<c059743f>] (really_probe) from [<c05976a3>] (driver_probe_device+0x3f/0x78)
[    0.333119] [<c05976a3>] (driver_probe_device) from [<c05978d5>] (device_driver_attach+0x3d/0x40)
[    0.333276] [<c05978d5>] (device_driver_attach) from [<c059790f>] (__driver_attach+0x37/0x78)
[    0.333374] [<c059790f>] (__driver_attach) from [<c059607b>] (bus_for_each_dev+0x43/0x6c)
[    0.333529] [<c059607b>] (bus_for_each_dev) from [<c0596b8b>] (bus_add_driver+0xe3/0x148)
[    0.333682] [<c0596b8b>] (bus_add_driver) from [<c0598051>] (driver_register+0x39/0xa0)
[    0.333837] [<c0598051>] (driver_register) from [<c0598d91>] (__platform_register_drivers+0x2d/0x68)
[    0.333934] [<c0598d91>] (__platform_register_drivers) from [<c1121e6b>] (host1x_drm_init+0x2b/0x42)
[    0.334091] [<c1121e6b>] (host1x_drm_init) from [<c0101d25>] (do_one_initcall+0x45/0x1e4)
[    0.334247] [<c0101d25>] (do_one_initcall) from [<c1101141>] (kernel_init_freeable+0x157/0x1a2)
[    0.334401] [<c1101141>] (kernel_init_freeable) from [<c0a15581>] (kernel_init+0xd/0xe0)
[    0.334497] [<c0a15581>] (kernel_init) from [<c0100155>] (ret_from_fork+0x11/0x1c)
[    0.334647] Exception stack(0xc1533fb0 to 0xc1533ff8)
[    0.334784] 3fa0:                                     00000000 00000000 00000000 00000000
[    0.334874] 3fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    0.335019] 3fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[    0.335202] tegra-dc 54200000.dc: ---------iommu_group_get_for_dev, 1572
[    0.335292] tegra-dc 54200000.dc: ---------tegra_smmu_device_group, 862
[    0.335474] tegra-dc 54200000.dc: ---------tegra_smmu_device_group, 909: 1: drm
[    0.335566] tegra-dc 54200000.dc: ---------iommu_group_get_for_dev, 1574
[    0.335718] tegra-dc 54200000.dc: ---------iommu_group_add_device, 858
[    0.335862] tegra-dc 54200000.dc: Adding to iommu group 1
[    0.335955] tegra-dc 54200000.dc: ---------iommu_alloc_default_domain, 1543: type 3
[    0.336101] iommu: ------iommu_group_alloc_default_domain: platform, (null), drm
[    0.336187] ---------tegra_smmu_domain_alloc, 284: type 3
[    0.336326] CPU: 2 PID: 1 Comm: swapper/0 Tainted: G        W         5.11.0-next-20210226-00003-g89069e0f4a28 #7012
[    0.336474] Hardware name: NVIDIA Tegra SoC (Flattened Device Tree)
[    0.336557] [<c010cfa9>] (unwind_backtrace) from [<c01090cd>] (show_stack+0x11/0x14)
[    0.336716] [<c01090cd>] (show_stack) from [<c0a0f4d1>] (dump_stack+0x8d/0x9a)
[    0.336868] [<c0a0f4d1>] (dump_stack) from [<c0a0ff45>] (tegra_smmu_domain_alloc+0x23/0xb6)
[    0.336968] [<c0a0ff45>] (tegra_smmu_domain_alloc) from [<c0a0f87b>] (iommu_group_alloc_default_domain+0x4b/0xfa)
[    0.337127] [<c0a0f87b>] (iommu_group_alloc_default_domain) from [<c052c41d>] (iommu_probe_device+0x69/0xec)
[    0.337285] [<c052c41d>] (iommu_probe_device) from [<c052e6ab>] (of_iommu_configure+0xfb/0x150)
[    0.337441] [<c052e6ab>] (of_iommu_configure) from [<c073f697>] (of_dma_configure_id+0x1fb/0x2ec)
[    0.337599] [<c073f697>] (of_dma_configure_id) from [<c059743f>] (really_probe+0x7b/0x2a0)
[    0.337701] [<c059743f>] (really_probe) from [<c05976a3>] (driver_probe_device+0x3f/0x78)
[    0.337857] [<c05976a3>] (driver_probe_device) from [<c05978d5>] (device_driver_attach+0x3d/0x40)
[    0.338014] [<c05978d5>] (device_driver_attach) from [<c059790f>] (__driver_attach+0x37/0x78)
[    0.338169] [<c059790f>] (__driver_attach) from [<c059607b>] (bus_for_each_dev+0x43/0x6c)
[    0.338266] [<c059607b>] (bus_for_each_dev) from [<c0596b8b>] (bus_add_driver+0xe3/0x148)
[    0.338419] [<c0596b8b>] (bus_add_driver) from [<c0598051>] (driver_register+0x39/0xa0)
[    0.338573] [<c0598051>] (driver_register) from [<c0598d91>] (__platform_register_drivers+0x2d/0x68)
[    0.338728] [<c0598d91>] (__platform_register_drivers) from [<c1121e6b>] (host1x_drm_init+0x2b/0x42)
[    0.338886] [<c1121e6b>] (host1x_drm_init) from [<c0101d25>] (do_one_initcall+0x45/0x1e4)
[    0.338986] [<c0101d25>] (do_one_initcall) from [<c1101141>] (kernel_init_freeable+0x157/0x1a2)
[    0.339139] [<c1101141>] (kernel_init_freeable) from [<c0a15581>] (kernel_init+0xd/0xe0)
[    0.339290] [<c0a15581>] (kernel_init) from [<c0100155>] (ret_from_fork+0x11/0x1c)
[    0.339381] Exception stack(0xc1533fb0 to 0xc1533ff8)
[    0.339521] 3fa0:                                     00000000 00000000 00000000 00000000
[    0.339667] 3fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    0.339755] 3fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[    0.339913] tegra-dc 54200000.dc: ---------iommu_probe_device, 272
[    0.348144] tegra-dc 54200000.dc: failed to probe RGB output: -517
[    0.348225] tegra-dc 54240000.dc: -------tegra_smmu_of_xlate: id 2
[    0.348368] CPU: 2 PID: 1 Comm: swapper/0 Tainted: G        W         5.11.0-next-20210226-00003-g89069e0f4a28 #7012
[    0.348513] Hardware name: NVIDIA Tegra SoC (Flattened Device Tree)
[    0.348648] [<c010cfa9>] (unwind_backtrace) from [<c01090cd>] (show_stack+0x11/0x14)
[    0.348747] [<c01090cd>] (show_stack) from [<c0a0f4d1>] (dump_stack+0x8d/0x9a)
[    0.348899] [<c0a0f4d1>] (dump_stack) from [<c052ec75>] (tegra_smmu_of_xlate+0x7d/0x84)
[    0.349054] [<c052ec75>] (tegra_smmu_of_xlate) from [<c052e591>] (of_iommu_xlate+0x51/0x70)
[    0.349150] [<c052e591>] (of_iommu_xlate) from [<c052e6d7>] (of_iommu_configure+0x127/0x150)
[    0.349300] [<c052e6d7>] (of_iommu_configure) from [<c073f697>] (of_dma_configure_id+0x1fb/0x2ec)
[    0.349471] [<c073f697>] (of_dma_configure_id) from [<c059743f>] (really_probe+0x7b/0x2a0)
[    0.349572] [<c059743f>] (really_probe) from [<c05976a3>] (driver_probe_device+0x3f/0x78)
[    0.349724] [<c05976a3>] (driver_probe_device) from [<c05978d5>] (device_driver_attach+0x3d/0x40)
[    0.349877] [<c05978d5>] (device_driver_attach) from [<c059790f>] (__driver_attach+0x37/0x78)
[    0.350027] [<c059790f>] (__driver_attach) from [<c059607b>] (bus_for_each_dev+0x43/0x6c)
[    0.350123] [<c059607b>] (bus_for_each_dev) from [<c0596b8b>] (bus_add_driver+0xe3/0x148)
[    0.350272] [<c0596b8b>] (bus_add_driver) from [<c0598051>] (driver_register+0x39/0xa0)
[    0.350421] [<c0598051>] (driver_register) from [<c0598d91>] (__platform_register_drivers+0x2d/0x68)
[    0.350574] [<c0598d91>] (__platform_register_drivers) from [<c1121e6b>] (host1x_drm_init+0x2b/0x42)
[    0.350674] [<c1121e6b>] (host1x_drm_init) from [<c0101d25>] (do_one_initcall+0x45/0x1e4)
[    0.350825] [<c0101d25>] (do_one_initcall) from [<c1101141>] (kernel_init_freeable+0x157/0x1a2)
[    0.350975] [<c1101141>] (kernel_init_freeable) from [<c0a15581>] (kernel_init+0xd/0xe0)
[    0.351121] [<c0a15581>] (kernel_init) from [<c0100155>] (ret_from_fork+0x11/0x1c)
[    0.351211] Exception stack(0xc1533fb0 to 0xc1533ff8)
[    0.351349] 3fa0:                                     00000000 00000000 00000000 00000000
[    0.351437] 3fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    0.351577] 3fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[    0.351742] tegra-dc 54240000.dc: --------tegra_smmu_probe_device, 822
[    0.351830] CPU: 2 PID: 1 Comm: swapper/0 Tainted: G        W         5.11.0-next-20210226-00003-g89069e0f4a28 #7012
[    0.351976] Hardware name: NVIDIA Tegra SoC (Flattened Device Tree)
[    0.352110] [<c010cfa9>] (unwind_backtrace) from [<c01090cd>] (show_stack+0x11/0x14)
[    0.352208] [<c01090cd>] (show_stack) from [<c0a0f4d1>] (dump_stack+0x8d/0x9a)
[    0.352356] [<c0a0f4d1>] (dump_stack) from [<c052ebed>] (tegra_smmu_probe_device+0x49/0x54)
[    0.352510] [<c052ebed>] (tegra_smmu_probe_device) from [<c052bd6d>] (__iommu_probe_device+0x35/0x1c4)
[    0.352662] [<c052bd6d>] (__iommu_probe_device) from [<c052c3cd>] (iommu_probe_device+0x19/0xec)
[    0.352757] [<c052c3cd>] (iommu_probe_device) from [<c052e6ab>] (of_iommu_configure+0xfb/0x150)
[    0.352906] [<c052e6ab>] (of_iommu_configure) from [<c073f697>] (of_dma_configure_id+0x1fb/0x2ec)
[    0.353060] [<c073f697>] (of_dma_configure_id) from [<c059743f>] (really_probe+0x7b/0x2a0)
[    0.353214] [<c059743f>] (really_probe) from [<c05976a3>] (driver_probe_device+0x3f/0x78)
[    0.353309] [<c05976a3>] (driver_probe_device) from [<c05978d5>] (device_driver_attach+0x3d/0x40)
[    0.353459] [<c05978d5>] (device_driver_attach) from [<c059790f>] (__driver_attach+0x37/0x78)
[    0.353609] [<c059790f>] (__driver_attach) from [<c059607b>] (bus_for_each_dev+0x43/0x6c)
[    0.353759] [<c059607b>] (bus_for_each_dev) from [<c0596b8b>] (bus_add_driver+0xe3/0x148)
[    0.353854] [<c0596b8b>] (bus_add_driver) from [<c0598051>] (driver_register+0x39/0xa0)
[    0.354005] [<c0598051>] (driver_register) from [<c0598d91>] (__platform_register_drivers+0x2d/0x68)
[    0.354155] [<c0598d91>] (__platform_register_drivers) from [<c1121e6b>] (host1x_drm_init+0x2b/0x42)
[    0.354308] [<c1121e6b>] (host1x_drm_init) from [<c0101d25>] (do_one_initcall+0x45/0x1e4)
[    0.354458] [<c0101d25>] (do_one_initcall) from [<c1101141>] (kernel_init_freeable+0x157/0x1a2)
[    0.354552] [<c1101141>] (kernel_init_freeable) from [<c0a15581>] (kernel_init+0xd/0xe0)
[    0.354698] [<c0a15581>] (kernel_init) from [<c0100155>] (ret_from_fork+0x11/0x1c)
[    0.354843] Exception stack(0xc1533fb0 to 0xc1533ff8)
[    0.354924] 3fa0:                                     00000000 00000000 00000000 00000000
[    0.355065] 3fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    0.355204] 3fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[    0.355303] tegra-dc 54240000.dc: ---------iommu_group_get_for_dev, 1572
[    0.355453] tegra-dc 54240000.dc: ---------tegra_smmu_device_group, 862
[    0.355539] tegra-dc 54240000.dc: ---------tegra_smmu_device_group, 874: 2: drm
[    0.355680] tegra-dc 54240000.dc: ---------iommu_group_get_for_dev, 1574
[    0.355828] tegra-dc 54240000.dc: ---------iommu_group_add_device, 858
[    0.355914] tegra-dc 54240000.dc: Adding to iommu group 1
[    0.356057] tegra-dc 54240000.dc: ---------iommu_alloc_default_domain, 1543: type 3
[    0.356144] iommu: ------iommu_group_alloc_default_domain: platform, (null), drm
[    0.356282] ---------tegra_smmu_domain_alloc, 284: type 3
[    0.356363] CPU: 2 PID: 1 Comm: swapper/0 Tainted: G        W         5.11.0-next-20210226-00003-g89069e0f4a28 #7012
[    0.356508] Hardware name: NVIDIA Tegra SoC (Flattened Device Tree)
[    0.356643] [<c010cfa9>] (unwind_backtrace) from [<c01090cd>] (show_stack+0x11/0x14)
[    0.356796] [<c01090cd>] (show_stack) from [<c0a0f4d1>] (dump_stack+0x8d/0x9a)
[    0.356889] [<c0a0f4d1>] (dump_stack) from [<c0a0ff45>] (tegra_smmu_domain_alloc+0x23/0xb6)
[    0.357038] [<c0a0ff45>] (tegra_smmu_domain_alloc) from [<c0a0f87b>] (iommu_group_alloc_default_domain+0x4b/0xfa)
[    0.357192] [<c0a0f87b>] (iommu_group_alloc_default_domain) from [<c052c41d>] (iommu_probe_device+0x69/0xec)
[    0.357346] [<c052c41d>] (iommu_probe_device) from [<c052e6ab>] (of_iommu_configure+0xfb/0x150)
[    0.357496] [<c052e6ab>] (of_iommu_configure) from [<c073f697>] (of_dma_configure_id+0x1fb/0x2ec)
[    0.357596] [<c073f697>] (of_dma_configure_id) from [<c059743f>] (really_probe+0x7b/0x2a0)
[    0.357750] [<c059743f>] (really_probe) from [<c05976a3>] (driver_probe_device+0x3f/0x78)
[    0.357902] [<c05976a3>] (driver_probe_device) from [<c05978d5>] (device_driver_attach+0x3d/0x40)
[    0.358054] [<c05978d5>] (device_driver_attach) from [<c059790f>] (__driver_attach+0x37/0x78)
[    0.358150] [<c059790f>] (__driver_attach) from [<c059607b>] (bus_for_each_dev+0x43/0x6c)
[    0.358299] [<c059607b>] (bus_for_each_dev) from [<c0596b8b>] (bus_add_driver+0xe3/0x148)
[    0.358446] [<c0596b8b>] (bus_add_driver) from [<c0598051>] (driver_register+0x39/0xa0)
[    0.358594] [<c0598051>] (driver_register) from [<c0598d91>] (__platform_register_drivers+0x2d/0x68)
[    0.358690] [<c0598d91>] (__platform_register_drivers) from [<c1121e6b>] (host1x_drm_init+0x2b/0x42)
[    0.358844] [<c1121e6b>] (host1x_drm_init) from [<c0101d25>] (do_one_initcall+0x45/0x1e4)
[    0.358996] [<c0101d25>] (do_one_initcall) from [<c1101141>] (kernel_init_freeable+0x157/0x1a2)
[    0.359145] [<c1101141>] (kernel_init_freeable) from [<c0a15581>] (kernel_init+0xd/0xe0)
[    0.359238] [<c0a15581>] (kernel_init) from [<c0100155>] (ret_from_fork+0x11/0x1c)
[    0.359382] Exception stack(0xc1533fb0 to 0xc1533ff8)
[    0.359518] 3fa0:                                     00000000 00000000 00000000 00000000
[    0.359605] 3fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    0.359747] 3fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[    0.359899] tegra-dc 54240000.dc: ---------iommu_probe_device, 272
[    0.369164] tegra-gr2d 54140000.gr2d: -------tegra_smmu_of_xlate: id 4
[    0.369315] tegra-gr2d 54140000.gr2d: --------tegra_smmu_probe_device, 822
[    0.369452] tegra-gr2d 54140000.gr2d: ---------iommu_group_get_for_dev, 1572
[    0.369595] tegra-gr2d 54140000.gr2d: ---------tegra_smmu_device_group, 862
[    0.369734] tegra-gr2d 54140000.gr2d: ---------tegra_smmu_device_group, 874: 4: drm
[    0.369821] tegra-gr2d 54140000.gr2d: ---------iommu_group_get_for_dev, 1574
[    0.369969] tegra-gr2d 54140000.gr2d: ---------iommu_group_add_device, 858
[    0.370052] tegra-gr2d 54140000.gr2d: Adding to iommu group 1
[    0.370196] tegra-gr2d 54140000.gr2d: ---------iommu_alloc_default_domain, 1543: type 3
[    0.370336] iommu: ------iommu_group_alloc_default_domain: platform, (null), drm
[    0.370436] ---------tegra_smmu_domain_alloc, 284: type 3
[    0.370573] CPU: 2 PID: 1 Comm: swapper/0 Tainted: G        W         5.11.0-next-20210226-00003-g89069e0f4a28 #7012
[    0.370717] Hardware name: NVIDIA Tegra SoC (Flattened Device Tree)
[    0.370799] [<c010cfa9>] (unwind_backtrace) from [<c01090cd>] (show_stack+0x11/0x14)
[    0.370954] [<c01090cd>] (show_stack) from [<c0a0f4d1>] (dump_stack+0x8d/0x9a)
[    0.371106] [<c0a0f4d1>] (dump_stack) from [<c0a0ff45>] (tegra_smmu_domain_alloc+0x23/0xb6)
[    0.371202] [<c0a0ff45>] (tegra_smmu_domain_alloc) from [<c0a0f87b>] (iommu_group_alloc_default_domain+0x4b/0xfa)
[    0.371355] [<c0a0f87b>] (iommu_group_alloc_default_domain) from [<c052c41d>] (iommu_probe_device+0x69/0xec)
[    0.371508] [<c052c41d>] (iommu_probe_device) from [<c052e6ab>] (of_iommu_configure+0xfb/0x150)
[    0.371660] [<c052e6ab>] (of_iommu_configure) from [<c073f697>] (of_dma_configure_id+0x1fb/0x2ec)
[    0.371818] [<c073f697>] (of_dma_configure_id) from [<c059743f>] (really_probe+0x7b/0x2a0)
[    0.371919] [<c059743f>] (really_probe) from [<c05976a3>] (driver_probe_device+0x3f/0x78)
[    0.372071] [<c05976a3>] (driver_probe_device) from [<c05978d5>] (device_driver_attach+0x3d/0x40)
[    0.372222] [<c05978d5>] (device_driver_attach) from [<c059790f>] (__driver_attach+0x37/0x78)
[    0.372372] [<c059790f>] (__driver_attach) from [<c059607b>] (bus_for_each_dev+0x43/0x6c)
[    0.372468] [<c059607b>] (bus_for_each_dev) from [<c0596b8b>] (bus_add_driver+0xe3/0x148)
[    0.372618] [<c0596b8b>] (bus_add_driver) from [<c0598051>] (driver_register+0x39/0xa0)
[    0.372767] [<c0598051>] (driver_register) from [<c0598d91>] (__platform_register_drivers+0x2d/0x68)
[    0.372919] [<c0598d91>] (__platform_register_drivers) from [<c1121e6b>] (host1x_drm_init+0x2b/0x42)
[    0.373074] [<c1121e6b>] (host1x_drm_init) from [<c0101d25>] (do_one_initcall+0x45/0x1e4)
[    0.373172] [<c0101d25>] (do_one_initcall) from [<c1101141>] (kernel_init_freeable+0x157/0x1a2)
[    0.373322] [<c1101141>] (kernel_init_freeable) from [<c0a15581>] (kernel_init+0xd/0xe0)
[    0.373469] [<c0a15581>] (kernel_init) from [<c0100155>] (ret_from_fork+0x11/0x1c)
[    0.373560] Exception stack(0xc1533fb0 to 0xc1533ff8)
[    0.373697] 3fa0:                                     00000000 00000000 00000000 00000000
[    0.373839] 3fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    0.373925] 3fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[    0.374103] tegra-gr2d 54140000.gr2d: ---------iommu_probe_device, 272
[    0.374477] tegra-gr3d 54180000.gr3d: -------tegra_smmu_of_xlate: id 9
[    0.374635] tegra-gr3d 54180000.gr3d: -------tegra_smmu_of_xlate: id 10
[    0.374779] tegra-gr3d 54180000.gr3d: --------tegra_smmu_probe_device, 822
[    0.374862] tegra-gr3d 54180000.gr3d: ---------iommu_group_get_for_dev, 1572
[    0.375000] tegra-gr3d 54180000.gr3d: ---------tegra_smmu_device_group, 862
[    0.375083] tegra-gr3d 54180000.gr3d: ---------tegra_smmu_device_group, 874: 9: drm
[    0.375169] tegra-gr3d 54180000.gr3d: ---------iommu_group_get_for_dev, 1574
[    0.375316] tegra-gr3d 54180000.gr3d: ---------iommu_group_add_device, 858
[    0.375418] tegra-gr3d 54180000.gr3d: Adding to iommu group 1
[    0.375567] tegra-gr3d 54180000.gr3d: ---------iommu_alloc_default_domain, 1543: type 3
[    0.375710] iommu: ------iommu_group_alloc_default_domain: platform, (null), drm
[    0.375794] ---------tegra_smmu_domain_alloc, 284: type 3
[    0.375929] CPU: 2 PID: 1 Comm: swapper/0 Tainted: G        W         5.11.0-next-20210226-00003-g89069e0f4a28 #7012
[    0.376073] Hardware name: NVIDIA Tegra SoC (Flattened Device Tree)
[    0.376155] [<c010cfa9>] (unwind_backtrace) from [<c01090cd>] (show_stack+0x11/0x14)
[    0.376310] [<c01090cd>] (show_stack) from [<c0a0f4d1>] (dump_stack+0x8d/0x9a)
[    0.376460] [<c0a0f4d1>] (dump_stack) from [<c0a0ff45>] (tegra_smmu_domain_alloc+0x23/0xb6)
[    0.376556] [<c0a0ff45>] (tegra_smmu_domain_alloc) from [<c0a0f87b>] (iommu_group_alloc_default_domain+0x4b/0xfa)
[    0.376709] [<c0a0f87b>] (iommu_group_alloc_default_domain) from [<c052c41d>] (iommu_probe_device+0x69/0xec)
[    0.376862] [<c052c41d>] (iommu_probe_device) from [<c052e6ab>] (of_iommu_configure+0xfb/0x150)
[    0.377013] [<c052e6ab>] (of_iommu_configure) from [<c073f697>] (of_dma_configure_id+0x1fb/0x2ec)
[    0.377170] [<c073f697>] (of_dma_configure_id) from [<c059743f>] (really_probe+0x7b/0x2a0)
[    0.377272] [<c059743f>] (really_probe) from [<c05976a3>] (driver_probe_device+0x3f/0x78)
[    0.377427] [<c05976a3>] (driver_probe_device) from [<c05978d5>] (device_driver_attach+0x3d/0x40)
[    0.377581] [<c05978d5>] (device_driver_attach) from [<c059790f>] (__driver_attach+0x37/0x78)
[    0.377733] [<c059790f>] (__driver_attach) from [<c059607b>] (bus_for_each_dev+0x43/0x6c)
[    0.377828] [<c059607b>] (bus_for_each_dev) from [<c0596b8b>] (bus_add_driver+0xe3/0x148)
[    0.377978] [<c0596b8b>] (bus_add_driver) from [<c0598051>] (driver_register+0x39/0xa0)
[    0.378129] [<c0598051>] (driver_register) from [<c0598d91>] (__platform_register_drivers+0x2d/0x68)
[    0.378280] [<c0598d91>] (__platform_register_drivers) from [<c1121e6b>] (host1x_drm_init+0x2b/0x42)
[    0.378383] [<c1121e6b>] (host1x_drm_init) from [<c0101d25>] (do_one_initcall+0x45/0x1e4)
[    0.378537] [<c0101d25>] (do_one_initcall) from [<c1101141>] (kernel_init_freeable+0x157/0x1a2)
[    0.378686] [<c1101141>] (kernel_init_freeable) from [<c0a15581>] (kernel_init+0xd/0xe0)
[    0.378832] [<c0a15581>] (kernel_init) from [<c0100155>] (ret_from_fork+0x11/0x1c)
[    0.378924] Exception stack(0xc1533fb0 to 0xc1533ff8)
[    0.379061] 3fa0:                                     00000000 00000000 00000000 00000000
[    0.379204] 3fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    0.379291] 3fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[    0.379445] tegra-gr3d 54180000.gr3d: ---------iommu_probe_device, 272
[    0.389317] loop: module loaded
[    0.391692] libphy: Fixed MDIO Bus: probed
[    0.391895] tun: Universal TUN/TAP device driver, 1.6
[    0.392189] CAN device driver interface
[    0.392670] usbcore: registered new interface driver rtl8192cu
[    0.392758] pegasus: v0.9.3 (2013/04/25), Pegasus/Pegasus II USB Ethernet driver
[    0.392938] usbcore: registered new interface driver pegasus
[    0.393110] usbcore: registered new interface driver asix
[    0.393219] usbcore: registered new interface driver ax88179_178a
[    0.393421] usbcore: registered new interface driver cdc_ether
[    0.393535] usbcore: registered new interface driver cdc_eem
[    0.393710] usbcore: registered new interface driver smsc75xx
[    0.393828] usbcore: registered new interface driver smsc95xx
[    0.393993] usbcore: registered new interface driver net1080
[    0.394102] usbcore: registered new interface driver cdc_subset
[    0.394272] usbcore: registered new interface driver zaurus
[    0.394420] usbcore: registered new interface driver cdc_ncm
[    0.394842] tegra-phy 7d000000.usb-phy: supply vbus not found, using dummy regulator
[    0.395194] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.395601] usbcore: registered new interface driver cdc_acm
[    0.395687] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
[    0.395862] usbcore: registered new interface driver cdc_wdm
[    0.396040] usbcore: registered new interface driver usb-storage
[    0.413352] using random self ethernet address
[    0.413473] using random host ethernet address
[    0.413993] usb0: HOST MAC 8e:55:84:d7:11:1a
[    0.414147] usb0: MAC 8e:3d:0c:3c:00:74
[    0.414302] using random self ethernet address
[    0.414404] using random host ethernet address
[    0.414526] g_ether gadget: Ethernet Gadget, version: Memorial Day 2008
[    0.414665] g_ether gadget: g_ether ready
[    0.415053] mousedev: PS/2 mouse device common for all mice
[    0.416811] tegra_rtc 7000e000.rtc: registered as rtc1
[    0.416905] tegra_rtc 7000e000.rtc: Tegra internal Real Time Clock
[    0.417243] i2c /dev entries driver
[    0.421957] max77620 0-003c: PMIC Version OTP:0x23 and ES:0x5
[    0.429811] vdd_cpu: supplied by vdd_5v0
[    0.433149] vdd_core: supplied by vdd_5v0
[    0.436402] vdd_gen1v8: supplied by vdd_5v0
[    0.439697] vdd_ddr3l_1v35: supplied by vdd_5v0
[    0.440958] max77620-sd4: supplied by vdd_5v0
[    0.443724] vdd_ddr_hs: supplied by vdd_ddr3l_1v35
[    0.445064] max77620-ldo1: supplied by vdd_ddr3l_1v35
[    0.453211] vdd_rtc: supplied by vdd_5v0
[    0.455292] vdd_camera: Bringing 2800000uV into 1800000-1800000uV
[    0.458660] vddio_sdmmc: supplied by vdd_5v0
[    0.460940] avdd_dsi_csi: supplied by vdd_ddr3l_1v35
[    0.463751] avdd_pll: supplied by vdd_ddr3l_1v35
[    0.464745] gpio-1022 (cpu-pwr-req-hog): hogged as input
[    0.608319] max77686-rtc max77620-rtc: registered as rtc0
[    0.642362] max77686-rtc max77620-rtc: setting system clock to 2000-01-23T04:27:03 UTC (948601623)
[    0.649105] pn544_hci_i2c 2-002a: NFC: Detecting nfc_en polarity
[    0.760738] input: Elan Touchscreen as /devices/soc0/7000c400.i2c/i2c-1/1-0010/input/input0
[    0.765138] pn544_hci_i2c 2-002a: NFC: nfc_en polarity : active high
[    0.782797] power_supply bq27541-0: Not all required supplies found, defer probe
[    0.796543] tegra-wdt 60005000.timer: initialized (heartbeat = 120 sec, nowayout = 0)
[    0.799296] Bluetooth: HCI UART driver ver 2.3
[    0.799470] Bluetooth: HCI UART protocol H4 registered
[    0.799876] Bluetooth: HCI UART protocol Broadcom registered
[    0.800664] sdhci: Secure Digital Host Controller Interface driver
[    0.800751] sdhci: Copyright(c) Pierre Ossman
[    0.800883] sdhci-pltfm: SDHCI platform and OF driver helper
[    0.801425] sdhci-tegra 78000400.mmc: allocated mmc-pwrseq
[    0.802206] usbcore: registered new interface driver usbhid
[    0.802297] usbhid: USB HID core driver
[    0.802483] tegra-vde 6001a000.vde: -------tegra_smmu_of_xlate: id 15
[    0.802634] tegra-vde 6001a000.vde: --------tegra_smmu_probe_device, 822
[    0.802774] tegra-vde 6001a000.vde: ---------iommu_group_get_for_dev, 1572
[    0.802858] tegra-vde 6001a000.vde: ---------tegra_smmu_device_group, 862
[    0.803020] tegra-vde 6001a000.vde: ---------tegra_smmu_device_group, 911: 15
[    0.803106] tegra-vde 6001a000.vde: ---------iommu_group_get_for_dev, 1574
[    0.803253] tegra-vde 6001a000.vde: ---------iommu_group_add_device, 858
[    0.803439] tegra-vde 6001a000.vde: Adding to iommu group 2
[    0.803544] tegra-vde 6001a000.vde: ---------iommu_alloc_default_domain, 1543: type 3
[    0.803688] iommu: ------iommu_group_alloc_default_domain: platform, (null), (null)
[    0.803826] ---------tegra_smmu_domain_alloc, 284: type 3
[    0.803907] CPU: 2 PID: 1 Comm: swapper/0 Tainted: G        W         5.11.0-next-20210226-00003-g89069e0f4a28 #7012
[    0.804052] Hardware name: NVIDIA Tegra SoC (Flattened Device Tree)
[    0.804138] [<c010cfa9>] (unwind_backtrace) from [<c01090cd>] (show_stack+0x11/0x14)
[    0.804303] [<c01090cd>] (show_stack) from [<c0a0f4d1>] (dump_stack+0x8d/0x9a)
[    0.804460] [<c0a0f4d1>] (dump_stack) from [<c0a0ff45>] (tegra_smmu_domain_alloc+0x23/0xb6)
[    0.804610] [<c0a0ff45>] (tegra_smmu_domain_alloc) from [<c0a0f87b>] (iommu_group_alloc_default_domain+0x4b/0xfa)
[    0.804707] [<c0a0f87b>] (iommu_group_alloc_default_domain) from [<c052c41d>] (iommu_probe_device+0x69/0xec)
[    0.804866] [<c052c41d>] (iommu_probe_device) from [<c052e6ab>] (of_iommu_configure+0xfb/0x150)
[    0.805021] [<c052e6ab>] (of_iommu_configure) from [<c073f697>] (of_dma_configure_id+0x1fb/0x2ec)
[    0.805184] [<c073f697>] (of_dma_configure_id) from [<c059743f>] (really_probe+0x7b/0x2a0)
[    0.805348] [<c059743f>] (really_probe) from [<c05976a3>] (driver_probe_device+0x3f/0x78)
[    0.805445] [<c05976a3>] (driver_probe_device) from [<c05978d5>] (device_driver_attach+0x3d/0x40)
[    0.805598] [<c05978d5>] (device_driver_attach) from [<c059790f>] (__driver_attach+0x37/0x78)
[    0.805750] [<c059790f>] (__driver_attach) from [<c059607b>] (bus_for_each_dev+0x43/0x6c)
[    0.805902] [<c059607b>] (bus_for_each_dev) from [<c0596b8b>] (bus_add_driver+0xe3/0x148)
[    0.805997] [<c0596b8b>] (bus_add_driver) from [<c0598051>] (driver_register+0x39/0xa0)
[    0.806150] [<c0598051>] (driver_register) from [<c0101d25>] (do_one_initcall+0x45/0x1e4)
[    0.806305] [<c0101d25>] (do_one_initcall) from [<c1101141>] (kernel_init_freeable+0x157/0x1a2)
[    0.806460] [<c1101141>] (kernel_init_freeable) from [<c0a15581>] (kernel_init+0xd/0xe0)
[    0.806555] [<c0a15581>] (kernel_init) from [<c0100155>] (ret_from_fork+0x11/0x1c)
[    0.806701] Exception stack(0xc1533fb0 to 0xc1533ff8)
[    0.806783] 3fa0:                                     00000000 00000000 00000000 00000000
[    0.806923] 3fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    0.807064] 3fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[    0.807186] tegra-vde 6001a000.vde: ---------iommu_probe_device, 272
[    0.807647] iommu: ------iommu_domain_alloc: platform, (null)
[    0.807825] ---------tegra_smmu_domain_alloc, 284: type 1
[    0.807910] CPU: 2 PID: 1 Comm: swapper/0 Tainted: G        W         5.11.0-next-20210226-00003-g89069e0f4a28 #7012
[    0.808056] Hardware name: NVIDIA Tegra SoC (Flattened Device Tree)
[    0.808137] [<c010cfa9>] (unwind_backtrace) from [<c01090cd>] (show_stack+0x11/0x14)
[    0.808292] [<c01090cd>] (show_stack) from [<c0a0f4d1>] (dump_stack+0x8d/0x9a)
[    0.808445] [<c0a0f4d1>] (dump_stack) from [<c0a0ff45>] (tegra_smmu_domain_alloc+0x23/0xb6)
[    0.808597] [<c0a0ff45>] (tegra_smmu_domain_alloc) from [<c0a0f953>] (iommu_domain_alloc+0x29/0x46)
[    0.808693] [<c0a0f953>] (iommu_domain_alloc) from [<c0747629>] (tegra_vde_iommu_init+0x25/0xe0)
[    0.808853] [<c0747629>] (tegra_vde_iommu_init) from [<c0744113>] (tegra_vde_probe+0x23b/0x350)
[    0.809004] [<c0744113>] (tegra_vde_probe) from [<c0598e5b>] (platform_probe+0x43/0x80)
[    0.809155] [<c0598e5b>] (platform_probe) from [<c0597473>] (really_probe+0xaf/0x2a0)
[    0.809252] [<c0597473>] (really_probe) from [<c05976a3>] (driver_probe_device+0x3f/0x78)
[    0.809403] [<c05976a3>] (driver_probe_device) from [<c05978d5>] (device_driver_attach+0x3d/0x40)
[    0.809557] [<c05978d5>] (device_driver_attach) from [<c059790f>] (__driver_attach+0x37/0x78)
[    0.809709] [<c059790f>] (__driver_attach) from [<c059607b>] (bus_for_each_dev+0x43/0x6c)
[    0.809806] [<c059607b>] (bus_for_each_dev) from [<c0596b8b>] (bus_add_driver+0xe3/0x148)
[    0.809956] [<c0596b8b>] (bus_add_driver) from [<c0598051>] (driver_register+0x39/0xa0)
[    0.810107] [<c0598051>] (driver_register) from [<c0101d25>] (do_one_initcall+0x45/0x1e4)
[    0.810208] [<c0101d25>] (do_one_initcall) from [<c1101141>] (kernel_init_freeable+0x157/0x1a2)
[    0.810367] [<c1101141>] (kernel_init_freeable) from [<c0a15581>] (kernel_init+0xd/0xe0)
[    0.810523] [<c0a15581>] (kernel_init) from [<c0100155>] (ret_from_fork+0x11/0x1c)
[    0.810679] Exception stack(0xc1533fb0 to 0xc1533ff8)
[    0.810762] 3fa0:                                     00000000 00000000 00000000 00000000
[    0.810903] 3fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    0.811046] 3fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[    0.811614] ---------tegra_smmu_domain_alloc, 323: type 1
[    0.811923] tegra-vde 6001a000.vde: -------tegra_smmu_attach_dev
[    0.812016] tegra-vde 6001a000.vde: -------tegra_smmu_attach_dev: domain not matched
[    0.812215] --------tegra_smmu_enable, swgroup 15: writing 80000000 to reg1 27c
[    0.812309] --------tegra_smmu_enable, swgroup 15: writing ffffffff to reg2 22c
[    0.812528] --------tegra_smmu_enable, swgroup 15: writing ffffffff to reg2 22c
[    0.812675] --------tegra_smmu_enable, swgroup 15: writing ffffffff to reg2 22c
[    0.812791] --------tegra_smmu_enable, swgroup 15: writing ffffffff to reg2 22c
[    0.812937] --------tegra_smmu_enable, swgroup 15: writing ffffffff to reg2 22c
[    0.813129] --------tegra_smmu_enable, swgroup 15: writing ffffffff to reg2 22c
[    0.813220] --------tegra_smmu_enable, swgroup 15: writing ffffffff to reg2 230
[    0.813362] --------tegra_smmu_enable, swgroup 15: writing ffffffff to reg2 230
[    0.814878] tegra30-emc 7000f400.memory-controller: got 6 timings for RAM code 1 (min 25MHz max 667MHz)
[    0.816621] tegra30-emc 7000f400.memory-controller: OPP HW ver. 0x2, current clock rate 667 MHz
[    0.832037] rt5640 0-001c: Failed to reguest IRQ 0: -22
[    0.834582] tegra30-i2s 70080400.i2s: DMA channels sourced from device 70080000.ahub
[    0.847090] input: ASUS Google Nexus 7 ALC5642 Headphones as /devices/soc0/sound/sound/card0/input1
[    0.849211] xt_time: kernel timezone is -0000
[    0.850435] NET: Registered protocol family 10
[    0.851550] Segment Routing with IPv6
[    0.851732] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    0.852433] NET: Registered protocol family 17
[    0.852541] NET: Registered protocol family 15
[    0.852729] Bridge firewalling registered
[    0.852811] can: controller area network core
[    0.852941] NET: Registered protocol family 29
[    0.853080] can: raw protocol
[    0.853157] can: broadcast manager protocol
[    0.853241] can: netlink gateway - max_hops=1
[    0.853674] Bluetooth: RFCOMM socket layer initialized
[    0.853788] Bluetooth: RFCOMM ver 1.11
[    0.853930] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    0.854016] Bluetooth: BNEP socket layer initialized
[    0.854096] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[    0.854235] Bluetooth: HIDP socket layer initialized
[    0.854521] Key type dns_resolver registered
[    0.856340] tegra20-cpufreq tegra20-cpufreq: hardware version 0x10 0x80
[    0.858796] Registering SWP/SWPB emulation handler
[    0.859184] registered taskstats version 1
[    0.859287] Loading compiled-in X.509 certificates
[    0.859781] tegra voltage-coupler: core minimum voltage limited to 1200000uV
[    0.860040] zswap: loaded using pool lzo/z3fold
[    0.860825] Key type ._fscrypt registered
[    0.860919] Key type .fscrypt registered
[    0.860998] Key type fscrypt-provisioning registered
[    0.895069] vdd_3v3: supplied by vdd_5v0
[    0.904660] vdd_ddr_rx: supplied by vdd_3v3
[    0.905285] vcore_emmc: supplied by vdd_3v3
[    0.906263] vdd_camera: supplied by vdd_3v3
[    0.906922] avdd_usb: supplied by vdd_3v3
[    0.909741] vdd_panel: supplied by vdd_3v3
[    0.918581] tegra-dc 54200000.dc: failed to probe RGB output: -517
[    0.919866] power_supply bq27541-0: bq27541-0: Found supply : smb347-usb
[    0.920310] bq27xxx-battery 0-0055: data memory update not supported for chip
[    0.965452] sdhci-tegra 78000400.mmc: allocated mmc-pwrseq
[    0.972478] mmc0: Invalid maximum block size, assuming 512 bytes
[    0.981012] mmc1: Invalid maximum block size, assuming 512 bytes
[    1.011963] mmc0: SDHCI controller on 78000600.mmc [78000600.mmc] using ADMA
[    1.140160] mmc0: new high speed MMC card at address 0001
[    1.142935] mmcblk0: mmc0:0001 HBG4e 29.1 GiB
[    1.143649] mmcblk0boot0: mmc0:0001 HBG4e partition 1 2.00 MiB
[    1.144356] mmcblk0boot1: mmc0:0001 HBG4e partition 2 2.00 MiB
[    1.144970] mmcblk0rpmb: mmc0:0001 HBG4e partition 3 2.00 MiB, chardev (245:0)
[    1.148969] Primary GPT is invalid, using alternate GPT.
[    1.149191]  mmcblk0: p1 p2 p3 p4 p5 p6 p7 p8 p9 p10
[    1.328986] mmc1: SDHCI controller on 78000400.mmc [78000400.mmc] using ADMA
[    1.346767] Bluetooth: hci0: BCM: chip id 62
[    1.348202] Bluetooth: hci0: BCM: features 0x0f
[    1.350404] Bluetooth: hci0: BCM4330B1
[    1.350599] Bluetooth: hci0: BCM4330B1 (002.001.003) build 0000
[    1.350920] Bluetooth: hci0: BCM4330B1 'brcm/BCM4330B1.hcd' Patch
[    1.357456] mmc1: queuing unknown CIS tuple 0x80 (2 bytes)
[    1.360736] i2c i2c-2: Added multiplexed i2c bus 3
[    1.360813] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
[    1.364589] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
[    1.370836] ak8974 2-000e: detected ami306, FW ver 0b, S/N: 0866
[    1.371086] mmc1: queuing unknown CIS tuple 0x80 (7 bytes)
[    1.375419] ak8974 2-000e: factory calibration for axis X: offz=45 sens=618 fine=244 pgaZ=138 pgaY=85
[    1.375714] ak8974 2-000e: factory calibration for axis Y: offz=46 sens=619 fine=246 pgaZ=147 pgaX=165
[    1.375997] ak8974 2-000e: factory calibration for axis Z: offz=48 sens=574 fine=157 pgaY=113 pgaX=112
[    1.376631] mmc1: queuing unknown CIS tuple 0x80 (7 bytes)
[    1.389910] ak8974 2-000e: enable rising edge DRDY IRQ
[    1.403102] iommu: ------iommu_domain_alloc: platform, (null)
[    1.403577] ---------tegra_smmu_domain_alloc, 284: type 1
[    1.404196] CPU: 2 PID: 87 Comm: kworker/2:1 Tainted: G        W         5.11.0-next-20210226-00003-g89069e0f4a28 #7012
[    1.404826] Hardware name: NVIDIA Tegra SoC (Flattened Device Tree)
[    1.405172] Workqueue: events deferred_probe_work_func
[    1.405920] [<c010cfa9>] (unwind_backtrace) from [<c01090cd>] (show_stack+0x11/0x14)
[    1.406375] [<c01090cd>] (show_stack) from [<c0a0f4d1>] (dump_stack+0x8d/0x9a)
[    1.407058] [<c0a0f4d1>] (dump_stack) from [<c0a0ff45>] (tegra_smmu_domain_alloc+0x23/0xb6)
[    1.407727] [<c0a0ff45>] (tegra_smmu_domain_alloc) from [<c0a0f953>] (iommu_domain_alloc+0x29/0x46)
[    1.408168] [<c0a0f953>] (iommu_domain_alloc) from [<c0571601>] (host1x_drm_probe+0x2b9/0x2e4)
[    1.408834] [<c0571601>] (host1x_drm_probe) from [<c0597473>] (really_probe+0xaf/0x2a0)
[    1.409508] [<c0597473>] (really_probe) from [<c05976a3>] (driver_probe_device+0x3f/0x78)
[    1.410175] [<c05976a3>] (driver_probe_device) from [<c059610b>] (bus_for_each_drv+0x4f/0x78)
[    1.410622] [<c059610b>] (bus_for_each_drv) from [<c059736f>] (__device_attach+0x93/0xdc)
[    1.411272] [<c059736f>] (__device_attach) from [<c05969f3>] (bus_probe_device+0x5b/0x60)
[    1.411922] [<c05969f3>] (bus_probe_device) from [<c05951e5>] (device_add+0x289/0x5b4)
[    1.412564] [<c05951e5>] (device_add) from [<c052fc39>] (host1x_subdev_register+0x89/0xa8)
[    1.413093] [<c052fc39>] (host1x_subdev_register) from [<c052fefd>] (host1x_client_register+0x91/0xf8)
[    1.413781] [<c052fefd>] (host1x_client_register) from [<c0577351>] (tegra_dc_probe+0x19d/0x2b8)
[    1.414503] [<c0577351>] (tegra_dc_probe) from [<c0598e5b>] (platform_probe+0x43/0x80)
[    1.415174] [<c0598e5b>] (platform_probe) from [<c0597473>] (really_probe+0xaf/0x2a0)
[    1.415621] [<c0597473>] (really_probe) from [<c05976a3>] (driver_probe_device+0x3f/0x78)
[    1.416273] [<c05976a3>] (driver_probe_device) from [<c059610b>] (bus_for_each_drv+0x4f/0x78)
[    1.416938] [<c059610b>] (bus_for_each_drv) from [<c059736f>] (__device_attach+0x93/0xdc)
[    1.417376] [<c059736f>] (__device_attach) from [<c05969f3>] (bus_probe_device+0x5b/0x60)
[    1.418036] [<c05969f3>] (bus_probe_device) from [<c0596d2f>] (deferred_probe_work_func+0x4b/0x6c)
[    1.418704] [<c0596d2f>] (deferred_probe_work_func) from [<c0132fbd>] (process_one_work+0x145/0x408)
[    1.419392] [<c0132fbd>] (process_one_work) from [<c01334a7>] (worker_thread+0x227/0x3bc)
[    1.420061] [<c01334a7>] (worker_thread) from [<c0138a2f>] (kthread+0x10b/0x13c)
[    1.420501] [<c0138a2f>] (kthread) from [<c0100155>] (ret_from_fork+0x11/0x1c)
[    1.421138] Exception stack(0xc2043fb0 to 0xc2043ff8)
[    1.421503] 3fa0:                                     00000000 00000000 00000000 00000000
[    1.422098] 3fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    1.422676] 3fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[    1.423208] ---------tegra_smmu_domain_alloc, 323: type 1
[    1.424222] tegra-dc 54240000.dc: -----------tegra_dc_init, 2036
[    1.424744] tegra-dc 54240000.dc: -----------host1x_client_iommu_attach, 909
[    1.425339] tegra-dc 54240000.dc: -----------host1x_client_iommu_attach, 918
[    1.425776] tegra-dc 54240000.dc: -----------host1x_client_iommu_attach, 920
[    1.425855] tegra-dc 54200000.dc: -------tegra_smmu_attach_dev
[    1.425973] CPU: 2 PID: 87 Comm: kworker/2:1 Tainted: G        W         5.11.0-next-20210226-00003-g89069e0f4a28 #7012
[    1.426091] Hardware name: NVIDIA Tegra SoC (Flattened Device Tree)
[    1.426164] Workqueue: events deferred_probe_work_func
[    1.426287] [<c010cfa9>] (unwind_backtrace) from [<c01090cd>] (show_stack+0x11/0x14)
[    1.426370] [<c01090cd>] (show_stack) from [<c0a0f4d1>] (dump_stack+0x8d/0x9a)
[    1.426501] [<c0a0f4d1>] (dump_stack) from [<c0a0fc5d>] (tegra_smmu_attach_dev+0x49/0x2f8)
[    1.426625] [<c0a0fc5d>] (tegra_smmu_attach_dev) from [<c052b8cd>] (__iommu_attach_device+0x15/0xb4)
[    1.426761] [<c052b8cd>] (__iommu_attach_device) from [<c052c26b>] (__iommu_attach_group+0x33/0x70)
[    1.426844] [<c052c26b>] (__iommu_attach_group) from [<c052c2c7>] (iommu_attach_group+0x1f/0x2c)
[    1.426966] [<c052c2c7>] (iommu_attach_group) from [<c0571edb>] (host1x_client_iommu_attach+0xa3/0xb4)
[    1.427094] [<c0571edb>] (host1x_client_iommu_attach) from [<c0a10483>] (tegra_dc_init+0x8f/0x3c8)
[    1.427222] [<c0a10483>] (tegra_dc_init) from [<c052f627>] (host1x_device_init+0x2f/0x80)
[    1.427301] [<c052f627>] (host1x_device_init) from [<c057141b>] (host1x_drm_probe+0xd3/0x2e4)
[    1.427428] [<c057141b>] (host1x_drm_probe) from [<c0597473>] (really_probe+0xaf/0x2a0)
[    1.427562] [<c0597473>] (really_probe) from [<c05976a3>] (driver_probe_device+0x3f/0x78)
[    1.427687] [<c05976a3>] (driver_probe_device) from [<c059610b>] (bus_for_each_drv+0x4f/0x78)
[    1.427766] [<c059610b>] (bus_for_each_drv) from [<c059736f>] (__device_attach+0x93/0xdc)
[    1.427891] [<c059736f>] (__device_attach) from [<c05969f3>] (bus_probe_device+0x5b/0x60)
[    1.428013] [<c05969f3>] (bus_probe_device) from [<c05951e5>] (device_add+0x289/0x5b4)
[    1.428141] [<c05951e5>] (device_add) from [<c052fc39>] (host1x_subdev_register+0x89/0xa8)
[    1.428221] [<c052fc39>] (host1x_subdev_register) from [<c052fefd>] (host1x_client_register+0x91/0xf8)
[    1.428348] [<c052fefd>] (host1x_client_register) from [<c0577351>] (tegra_dc_probe+0x19d/0x2b8)
[    1.428492] [<c0577351>] (tegra_dc_probe) from [<c0598e5b>] (platform_probe+0x43/0x80)
[    1.428617] [<c0598e5b>] (platform_probe) from [<c0597473>] (really_probe+0xaf/0x2a0)
[    1.428693] [<c0597473>] (really_probe) from [<c05976a3>] (driver_probe_device+0x3f/0x78)
[    1.428825] [<c05976a3>] (driver_probe_device) from [<c059610b>] (bus_for_each_drv+0x4f/0x78)
[    1.428949] [<c059610b>] (bus_for_each_drv) from [<c059736f>] (__device_attach+0x93/0xdc)
[    1.429073] [<c059736f>] (__device_attach) from [<c05969f3>] (bus_probe_device+0x5b/0x60)
[    1.429165] [<c05969f3>] (bus_probe_device) from [<c0596d2f>] (deferred_probe_work_func+0x4b/0x6c)
[    1.429298] [<c0596d2f>] (deferred_probe_work_func) from [<c0132fbd>] (process_one_work+0x145/0x408)
[    1.429426] [<c0132fbd>] (process_one_work) from [<c01334a7>] (worker_thread+0x227/0x3bc)
[    1.429555] [<c01334a7>] (worker_thread) from [<c0138a2f>] (kthread+0x10b/0x13c)
[    1.429635] [<c0138a2f>] (kthread) from [<c0100155>] (ret_from_fork+0x11/0x1c)
[    1.429762] Exception stack(0xc2043fb0 to 0xc2043ff8)
[    1.429832] 3fa0:                                     00000000 00000000 00000000 00000000
[    1.429949] 3fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    1.430079] 3fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[    1.430168] tegra-dc 54200000.dc: -------tegra_smmu_attach_dev: domain not matched
[    1.430319] --------tegra_smmu_enable, swgroup 1: writing 80000001 to reg1 240
[    1.430461] --------tegra_smmu_enable, swgroup 1: writing ffffffff to reg2 228
[    1.430535] --------tegra_smmu_enable, swgroup 1: writing ffffffff to reg2 228
[    1.430658] --------tegra_smmu_enable, swgroup 1: writing ffffffff to reg2 228
[    1.430781] --------tegra_smmu_enable, swgroup 1: writing ffffffff to reg2 228
[    1.430858] --------tegra_smmu_enable, swgroup 1: writing ffffffff to reg2 228
[    1.430984] tegra-dc 54240000.dc: -------tegra_smmu_attach_dev
[    1.431053] CPU: 2 PID: 87 Comm: kworker/2:1 Tainted: G        W         5.11.0-next-20210226-00003-g89069e0f4a28 #7012
[    1.431187] Hardware name: NVIDIA Tegra SoC (Flattened Device Tree)
[    1.431328] Workqueue: events deferred_probe_work_func
[    1.431411] [<c010cfa9>] (unwind_backtrace) from [<c01090cd>] (show_stack+0x11/0x14)
[    1.431546] [<c01090cd>] (show_stack) from [<c0a0f4d1>] (dump_stack+0x8d/0x9a)
[    1.431672] [<c0a0f4d1>] (dump_stack) from [<c0a0fc5d>] (tegra_smmu_attach_dev+0x49/0x2f8)
[    1.431755] [<c0a0fc5d>] (tegra_smmu_attach_dev) from [<c052b8cd>] (__iommu_attach_device+0x15/0xb4)
[    1.431893] [<c052b8cd>] (__iommu_attach_device) from [<c052c26b>] (__iommu_attach_group+0x33/0x70)
[    1.432025] [<c052c26b>] (__iommu_attach_group) from [<c052c2c7>] (iommu_attach_group+0x1f/0x2c)
[    1.432152] [<c052c2c7>] (iommu_attach_group) from [<c0571edb>] (host1x_client_iommu_attach+0xa3/0xb4)
[    1.432286] [<c0571edb>] (host1x_client_iommu_attach) from [<c0a10483>] (tegra_dc_init+0x8f/0x3c8)
[    1.432382] [<c0a10483>] (tegra_dc_init) from [<c052f627>] (host1x_device_init+0x2f/0x80)
[    1.432522] [<c052f627>] (host1x_device_init) from [<c057141b>] (host1x_drm_probe+0xd3/0x2e4)
[    1.432657] [<c057141b>] (host1x_drm_probe) from [<c0597473>] (really_probe+0xaf/0x2a0)
[    1.432783] [<c0597473>] (really_probe) from [<c05976a3>] (driver_probe_device+0x3f/0x78)
[    1.432868] [<c05976a3>] (driver_probe_device) from [<c059610b>] (bus_for_each_drv+0x4f/0x78)
[    1.432991] [<c059610b>] (bus_for_each_drv) from [<c059736f>] (__device_attach+0x93/0xdc)
[    1.433115] [<c059736f>] (__device_attach) from [<c05969f3>] (bus_probe_device+0x5b/0x60)
[    1.433239] [<c05969f3>] (bus_probe_device) from [<c05951e5>] (device_add+0x289/0x5b4)
[    1.433317] [<c05951e5>] (device_add) from [<c052fc39>] (host1x_subdev_register+0x89/0xa8)
[    1.433447] [<c052fc39>] (host1x_subdev_register) from [<c052fefd>] (host1x_client_register+0x91/0xf8)
[    1.433579] [<c052fefd>] (host1x_client_register) from [<c0577351>] (tegra_dc_probe+0x19d/0x2b8)
[    1.433711] [<c0577351>] (tegra_dc_probe) from [<c0598e5b>] (platform_probe+0x43/0x80)
[    1.433790] [<c0598e5b>] (platform_probe) from [<c0597473>] (really_probe+0xaf/0x2a0)
[    1.433912] [<c0597473>] (really_probe) from [<c05976a3>] (driver_probe_device+0x3f/0x78)
[    1.434039] [<c05976a3>] (driver_probe_device) from [<c059610b>] (bus_for_each_drv+0x4f/0x78)
[    1.434166] [<c059610b>] (bus_for_each_drv) from [<c059736f>] (__device_attach+0x93/0xdc)
[    1.434246] [<c059736f>] (__device_attach) from [<c05969f3>] (bus_probe_device+0x5b/0x60)
[    1.434379] [<c05969f3>] (bus_probe_device) from [<c0596d2f>] (deferred_probe_work_func+0x4b/0x6c)
[    1.434513] [<c0596d2f>] (deferred_probe_work_func) from [<c0132fbd>] (process_one_work+0x145/0x408)
[    1.434657] [<c0132fbd>] (process_one_work) from [<c01334a7>] (worker_thread+0x227/0x3bc)
[    1.434738] [<c01334a7>] (worker_thread) from [<c0138a2f>] (kthread+0x10b/0x13c)
[    1.434866] [<c0138a2f>] (kthread) from [<c0100155>] (ret_from_fork+0x11/0x1c)
[    1.434992] Exception stack(0xc2043fb0 to 0xc2043ff8)
[    1.435063] 3fa0:                                     00000000 00000000 00000000 00000000
[    1.435183] 3fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    1.435299] 3fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[    1.435389] tegra-dc 54240000.dc: -------tegra_smmu_attach_dev: domain not matched
[    1.435514] --------tegra_smmu_enable, swgroup 2: writing 80000001 to reg1 244
[    1.435587] --------tegra_smmu_enable, swgroup 2: writing ffffffff to reg2 228
[    1.435715] --------tegra_smmu_enable, swgroup 2: writing ffffffff to reg2 228
[    1.435835] --------tegra_smmu_enable, swgroup 2: writing ffffffff to reg2 228
[    1.435905] --------tegra_smmu_enable, swgroup 2: writing ffffffff to reg2 228
[    1.436026] --------tegra_smmu_enable, swgroup 2: writing ffffffff to reg2 228
[    1.436148] tegra-gr2d 54140000.gr2d: -------tegra_smmu_attach_dev
[    1.436224] tegra-gr2d 54140000.gr2d: -------tegra_smmu_attach_dev: domain not matched
[    1.436344] --------tegra_smmu_enable, swgroup 4: writing 80000001 to reg1 24c
[    1.436481] --------tegra_smmu_enable, swgroup 4: writing ffffffff to reg2 228
[    1.436558] --------tegra_smmu_enable, swgroup 4: writing ffffffff to reg2 228
[    1.436682] --------tegra_smmu_enable, swgroup 4: writing ffffffff to reg2 228
[    1.436760] --------tegra_smmu_enable, swgroup 4: writing ffffffff to reg2 22c
[    1.436883] tegra-gr3d 54180000.gr3d: -------tegra_smmu_attach_dev
[    1.436999] tegra-gr3d 54180000.gr3d: -------tegra_smmu_attach_dev: domain not matched
[    1.437073] --------tegra_smmu_enable, swgroup 9: writing 80000001 to reg1 268
[    1.437196] --------tegra_smmu_enable, swgroup 9: writing ffffffff to reg2 228
[    1.437319] --------tegra_smmu_enable, swgroup 9: writing ffffffff to reg2 228
[    1.437406] --------tegra_smmu_enable, swgroup 9: writing ffffffff to reg2 22c
[    1.437524] --------tegra_smmu_enable, swgroup 9: writing ffffffff to reg2 22c
[    1.437652] --------tegra_smmu_enable, swgroup 10: writing 80000001 to reg1 26c
[    1.437732] --------tegra_smmu_enable, swgroup 10: writing ffffffff to reg2 228
[    1.437862] --------tegra_smmu_enable, swgroup 10: writing ffffffff to reg2 228
[    1.437941] --------tegra_smmu_enable, swgroup 10: writing ffffffff to reg2 22c
[    1.438061] --------tegra_smmu_enable, swgroup 10: writing ffffffff to reg2 22c
[    1.438180] tegra-dc 54240000.dc: -----------host1x_client_iommu_attach, 938
[    1.438778] tegra-gr2d 54140000.gr2d: -----------host1x_client_iommu_attach, 909
[    1.438909] tegra-gr2d 54140000.gr2d: -----------host1x_client_iommu_attach, 918
[    1.439034] tegra-gr2d 54140000.gr2d: -----------host1x_client_iommu_attach, 920
[    1.439108] tegra-gr2d 54140000.gr2d: -----------host1x_client_iommu_attach, 938
[    1.439278] tegra-gr3d 54180000.gr3d: -----------host1x_client_iommu_attach, 909
[    1.439425] tegra-gr3d 54180000.gr3d: -----------host1x_client_iommu_attach, 918
[    1.439501] tegra-gr3d 54180000.gr3d: -----------host1x_client_iommu_attach, 920
[    1.439632] tegra-gr3d 54180000.gr3d: -----------host1x_client_iommu_attach, 938
[    1.439759] tegra-dc 54200000.dc: -----------tegra_dc_init, 2036
[    1.439832] tegra-dc 54200000.dc: -----------host1x_client_iommu_attach, 909
[    1.439951] tegra-dc 54200000.dc: -----------host1x_client_iommu_attach, 918
[    1.440020] tegra-dc 54200000.dc: -----------host1x_client_iommu_attach, 920
[    1.440139] tegra-dc 54200000.dc: -----------host1x_client_iommu_attach, 938
[    1.908241] mmc1: new high speed SDIO card at address 0001
[    1.915351] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4330-sdio for chip BCM4330/4
[    1.915567] brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac4330-sdio.asus,tilapia.txt failed with error -2
[    1.972908] Console: switching to colour frame buffer device 100x80
[    2.005857] drm drm: [drm] fb0: tegradrmfb frame buffer device
[    2.007277] [drm] Initialized tegra 0.0.0 20120330 for drm on minor 0
[    2.008771] input: gpio-keys as /devices/soc0/gpio-keys/input/input2
[    2.022408] IP-Config: Complete:
[    2.022622]      device=usb0, hwaddr=8e:3d:0c:3c:00:74, ipaddr=192.168.3.43, mask=255.255.255.0, gw=192.168.3.177
[    2.023019]      host=192.168.3.43, domain=, nis-domain=(none)
[    2.023306]      bootserver=255.255.255.255, rootserver=192.168.3.177, rootpath=
[    2.023527] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    2.028577] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[    2.029009] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[    2.029304] cfg80211: failed to load regulatory.db
[    2.030029] ALSA device list:
[    2.030201]   #0: ASUS Google Nexus 7 ALC5642
[    2.042704] Bluetooth: hci0: AZW Module665 BCM4330B1 37.4 MHz Class 1.5 ExtLNA
[    2.042955] Bluetooth: hci0: BCM4330B1 (002.001.003) build 0820
[    2.082821] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4330-sdio for chip BCM4330/4
[    2.083153] brcmfmac: brcmf_c_process_clm_blob: no clm_blob available (err=-2), device may have limited channels available
[    2.084983] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4330/4 wl0: Jan 23 2013 17:47:32 version 5.90.195.114 FWID 01-f9e7e464
[    3.064265] VFS: Mounted root (nfs filesystem) on device 0:17.
[    3.065198] devtmpfs: mounted
[    3.070761] Freeing unused kernel memory: 1024K
[    3.075915] Run /usr/lib/systemd/systemd as init process
[    3.076111]   with arguments:
[    3.076116]     /usr/lib/systemd/systemd
[    3.076121]   with environment:
[    3.076125]     HOME=/
[    3.076130]     TERM=linux
[    3.076134]     tegraid=30.1.3.0.0
[    3.076139]     debug_uartport=hsport
[    3.076144]     lp0_vec=8192@0xbddf9000
[    3.076149]     tegra_fbmem=8195200@0xabe01000
[    3.076153]     core_edp_mv=0
[    3.076158]     audio_codec=rt5640
[    3.076162]     board_info=f41:a00:1:44:2
[    3.076167]     tegraboot=sdmmc
[    4.063116] random: crng init done
[    4.282563] systemd[1]: System time before build time, advancing clock.
[    4.568368] systemd[1]: systemd 239 running in system mode. (+PAM -AUDIT -SELINUX +IMA -APPARMOR +SMACK -SYSVINIT +UTMP -LIBCRYPTSETUP +GCRYPT -GNUTLS +ACL -XZ +LZ4 -SECCOMP +BLKID -ELFUTILS +KMOD -IDN2 -IDN +PCRE2 default-hierarchy=hybrid)
[    4.571617] systemd[1]: Detected architecture arm.
[    5.923742] systemd[1]: Reached target Remote File Systems.
[    5.985953] systemd[1]: Listening on Process Core Dump Socket.
[    5.987733] systemd[1]: Listening on udev Kernel Socket.
[    5.989790] systemd[1]: Listening on Journal Socket (/dev/log).
[    6.006842] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
[    6.023209] systemd[1]: Created slice User and Session Slice.
[    6.036057] systemd[1]: Reached target Swap.
[    6.048733] systemd[1]: Listening on initctl Compatibility Named Pipe.
[    6.687296] systemd-journald[169]: Received request to flush runtime journal from PID 1
[   32.230886] vdd_camera: disabling
[   32.238883] avdd_dsi_csi: disabling

[-- Attachment #3: Type: text/plain, Size: 156 bytes --]

_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

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

* Re: [PATCH] iommu/tegra-smmu: Fix mc errors on tegra124-nyan
  2021-02-27  9:59         ` Dmitry Osipenko
@ 2021-03-02 23:08           ` Nicolin Chen
  2021-03-03  9:47             ` Dmitry Osipenko
  0 siblings, 1 reply; 18+ messages in thread
From: Nicolin Chen @ 2021-03-02 23:08 UTC (permalink / raw)
  To: Dmitry Osipenko
  Cc: guillaume.tucker, iommu, jonathanh, thierry.reding, linux-tegra,
	will, linux-kernel

On Sat, Feb 27, 2021 at 12:59:17PM +0300, Dmitry Osipenko wrote:
> 25.02.2021 09:27, Nicolin Chen пишет:
> ...
> >> The partially revert should be okay, but it's not clear to me what makes
> >> difference for T124 since I don't see that problem on T30, which also
> >> has active display at a boot time.
> > 
> > Hmm..do you see ->attach_dev() is called from host1x_client_iommu_attach
> > or from of_dma_configure_id/arch_setup_dma_ops?
> > 
> 
> I applied yours debug-patch, please see dmesg.txt attached to the email.
> Seems probe-defer of the tegra-dc driver prevents the implicit
> tegra_smmu_attach_dev, so it happens to work by accident.

> [    0.327826] tegra-dc 54200000.dc: -------tegra_smmu_of_xlate: id 1
> [    0.328641] [<c052ec75>] (tegra_smmu_of_xlate) from [<c052e591>] (of_iommu_xlate+0x51/0x70)
> [    0.328740] [<c052e591>] (of_iommu_xlate) from [<c052e6d7>] (of_iommu_configure+0x127/0x150)
> [    0.328896] [<c052e6d7>] (of_iommu_configure) from [<c073f697>] (of_dma_configure_id+0x1fb/0x2ec)
> [    0.329060] [<c073f697>] (of_dma_configure_id) from [<c059743f>] (really_probe+0x7b/0x2a0)
> [    0.331438] tegra-dc 54200000.dc: --------tegra_smmu_probe_device, 822
> [    0.332234] [<c052ebed>] (tegra_smmu_probe_device) from [<c052bd6d>] (__iommu_probe_device+0x35/0x1c4)
> [    0.332391] [<c052bd6d>] (__iommu_probe_device) from [<c052c3cd>] (iommu_probe_device+0x19/0xec)
> [    0.332545] [<c052c3cd>] (iommu_probe_device) from [<c052e6ab>] (of_iommu_configure+0xfb/0x150)
> [    0.332701] [<c052e6ab>] (of_iommu_configure) from [<c073f697>] (of_dma_configure_id+0x1fb/0x2ec)
> [    0.332804] [<c073f697>] (of_dma_configure_id) from [<c059743f>] (really_probe+0x7b/0x2a0)
> [    0.335202] tegra-dc 54200000.dc: ---------iommu_group_get_for_dev, 1572
> [    0.335292] tegra-dc 54200000.dc: ---------tegra_smmu_device_group, 862
> [    0.335474] tegra-dc 54200000.dc: ---------tegra_smmu_device_group, 909: 1: drm
> [    0.335566] tegra-dc 54200000.dc: ---------iommu_group_get_for_dev, 1574
> [    0.335718] tegra-dc 54200000.dc: ---------iommu_group_add_device, 858
> [    0.335862] tegra-dc 54200000.dc: Adding to iommu group 1
> [    0.335955] tegra-dc 54200000.dc: ---------iommu_alloc_default_domain, 1543: type 3
> [    0.336101] iommu: ------iommu_group_alloc_default_domain: platform, (null), drm
> [    0.336187] ---------tegra_smmu_domain_alloc, 284: type 3
 [    0.336968] [<c0a0ff45>] (tegra_smmu_domain_alloc) from [<c0a0f87b>] (iommu_group_alloc_default_domain+0x4b/0xfa)
> [    0.337127] [<c0a0f87b>] (iommu_group_alloc_default_domain) from [<c052c41d>] (iommu_probe_device+0x69/0xec)
> [    0.337285] [<c052c41d>] (iommu_probe_device) from [<c052e6ab>] (of_iommu_configure+0xfb/0x150)
> [    0.337441] [<c052e6ab>] (of_iommu_configure) from [<c073f697>] (of_dma_configure_id+0x1fb/0x2ec)
> [    0.337599] [<c073f697>] (of_dma_configure_id) from [<c059743f>] (really_probe+0x7b/0x2a0)
> [    0.339913] tegra-dc 54200000.dc: ---------iommu_probe_device, 272
> [    0.348144] tegra-dc 54200000.dc: failed to probe RGB output: -517

Hmm..not sure where this EPROBE_DEFER comes from. But you are right,
as of_dma_configure_id() returns because of that so it didn't run to
arch_setup_dma_ops() call, which allocates an UNMANAGED iommu domain
and attaches DC to it on Tegra124.

By the way, anyone can accept this change? It doesn't feel right to
leave a regression in the newer release...
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

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

* Re: [PATCH] iommu/tegra-smmu: Fix mc errors on tegra124-nyan
  2021-03-02 23:08           ` Nicolin Chen
@ 2021-03-03  9:47             ` Dmitry Osipenko
  2021-03-28 15:25               ` Dmitry Osipenko
  0 siblings, 1 reply; 18+ messages in thread
From: Dmitry Osipenko @ 2021-03-03  9:47 UTC (permalink / raw)
  To: Nicolin Chen
  Cc: guillaume.tucker, iommu, jonathanh, thierry.reding, linux-tegra,
	will, linux-kernel

03.03.2021 02:08, Nicolin Chen пишет:
> On Sat, Feb 27, 2021 at 12:59:17PM +0300, Dmitry Osipenko wrote:
>> 25.02.2021 09:27, Nicolin Chen пишет:
>> ...
>>>> The partially revert should be okay, but it's not clear to me what makes
>>>> difference for T124 since I don't see that problem on T30, which also
>>>> has active display at a boot time.
>>>
>>> Hmm..do you see ->attach_dev() is called from host1x_client_iommu_attach
>>> or from of_dma_configure_id/arch_setup_dma_ops?
>>>
>>
>> I applied yours debug-patch, please see dmesg.txt attached to the email.
>> Seems probe-defer of the tegra-dc driver prevents the implicit
>> tegra_smmu_attach_dev, so it happens to work by accident.
> 
>> [    0.327826] tegra-dc 54200000.dc: -------tegra_smmu_of_xlate: id 1
>> [    0.328641] [<c052ec75>] (tegra_smmu_of_xlate) from [<c052e591>] (of_iommu_xlate+0x51/0x70)
>> [    0.328740] [<c052e591>] (of_iommu_xlate) from [<c052e6d7>] (of_iommu_configure+0x127/0x150)
>> [    0.328896] [<c052e6d7>] (of_iommu_configure) from [<c073f697>] (of_dma_configure_id+0x1fb/0x2ec)
>> [    0.329060] [<c073f697>] (of_dma_configure_id) from [<c059743f>] (really_probe+0x7b/0x2a0)
>> [    0.331438] tegra-dc 54200000.dc: --------tegra_smmu_probe_device, 822
>> [    0.332234] [<c052ebed>] (tegra_smmu_probe_device) from [<c052bd6d>] (__iommu_probe_device+0x35/0x1c4)
>> [    0.332391] [<c052bd6d>] (__iommu_probe_device) from [<c052c3cd>] (iommu_probe_device+0x19/0xec)
>> [    0.332545] [<c052c3cd>] (iommu_probe_device) from [<c052e6ab>] (of_iommu_configure+0xfb/0x150)
>> [    0.332701] [<c052e6ab>] (of_iommu_configure) from [<c073f697>] (of_dma_configure_id+0x1fb/0x2ec)
>> [    0.332804] [<c073f697>] (of_dma_configure_id) from [<c059743f>] (really_probe+0x7b/0x2a0)
>> [    0.335202] tegra-dc 54200000.dc: ---------iommu_group_get_for_dev, 1572
>> [    0.335292] tegra-dc 54200000.dc: ---------tegra_smmu_device_group, 862
>> [    0.335474] tegra-dc 54200000.dc: ---------tegra_smmu_device_group, 909: 1: drm
>> [    0.335566] tegra-dc 54200000.dc: ---------iommu_group_get_for_dev, 1574
>> [    0.335718] tegra-dc 54200000.dc: ---------iommu_group_add_device, 858
>> [    0.335862] tegra-dc 54200000.dc: Adding to iommu group 1
>> [    0.335955] tegra-dc 54200000.dc: ---------iommu_alloc_default_domain, 1543: type 3
>> [    0.336101] iommu: ------iommu_group_alloc_default_domain: platform, (null), drm
>> [    0.336187] ---------tegra_smmu_domain_alloc, 284: type 3
>  [    0.336968] [<c0a0ff45>] (tegra_smmu_domain_alloc) from [<c0a0f87b>] (iommu_group_alloc_default_domain+0x4b/0xfa)
>> [    0.337127] [<c0a0f87b>] (iommu_group_alloc_default_domain) from [<c052c41d>] (iommu_probe_device+0x69/0xec)
>> [    0.337285] [<c052c41d>] (iommu_probe_device) from [<c052e6ab>] (of_iommu_configure+0xfb/0x150)
>> [    0.337441] [<c052e6ab>] (of_iommu_configure) from [<c073f697>] (of_dma_configure_id+0x1fb/0x2ec)
>> [    0.337599] [<c073f697>] (of_dma_configure_id) from [<c059743f>] (really_probe+0x7b/0x2a0)
>> [    0.339913] tegra-dc 54200000.dc: ---------iommu_probe_device, 272
>> [    0.348144] tegra-dc 54200000.dc: failed to probe RGB output: -517
> 
> Hmm..not sure where this EPROBE_DEFER comes from.

DC driver on Nexus 7 depends on LVDS bridge and display panel, which
cause the probe defer.

> But you are right,
> as of_dma_configure_id() returns because of that so it didn't run to
> arch_setup_dma_ops() call, which allocates an UNMANAGED iommu domain
> and attaches DC to it on Tegra124.
> 
> By the way, anyone can accept this change? It doesn't feel right to
> leave a regression in the newer release...
> 

I think Thierry should give ack.
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

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

* Re: [PATCH] iommu/tegra-smmu: Fix mc errors on tegra124-nyan
  2021-02-18 22:07 [PATCH] iommu/tegra-smmu: Fix mc errors on tegra124-nyan Nicolin Chen
  2021-02-20  5:16 ` Dmitry Osipenko
  2021-02-22 13:15 ` Guillaume Tucker
@ 2021-03-03 18:26 ` Thierry Reding
  2021-03-04 12:21 ` Joerg Roedel
  2021-03-10 19:13 ` Dmitry Osipenko
  4 siblings, 0 replies; 18+ messages in thread
From: Thierry Reding @ 2021-03-03 18:26 UTC (permalink / raw)
  To: Nicolin Chen
  Cc: guillaume.tucker, iommu, jonathanh, linux-tegra, digetx, will,
	linux-kernel


[-- Attachment #1.1: Type: text/plain, Size: 2696 bytes --]

On Thu, Feb 18, 2021 at 02:07:02PM -0800, Nicolin Chen wrote:
> Commit 25938c73cd79 ("iommu/tegra-smmu: Rework tegra_smmu_probe_device()")
> removed certain hack in the tegra_smmu_probe() by relying on IOMMU core to
> of_xlate SMMU's SID per device, so as to get rid of tegra_smmu_find() and
> tegra_smmu_configure() that are typically done in the IOMMU core also.
> 
> This approach works for both existing devices that have DT nodes and other
> devices (like PCI device) that don't exist in DT, on Tegra210 and Tegra3
> upon testing. However, Page Fault errors are reported on tegra124-Nyan:
> 
>   tegra-mc 70019000.memory-controller: display0a: read @0xfe056b40:
> 	 EMEM address decode error (SMMU translation error [--S])
>   tegra-mc 70019000.memory-controller: display0a: read @0xfe056b40:
> 	 Page fault (SMMU translation error [--S])
> 
> After debugging, I found that the mentioned commit changed some function
> callback sequence of tegra-smmu's, resulting in enabling SMMU for display
> client before display driver gets initialized. I couldn't reproduce exact
> same issue on Tegra210 as Tegra124 (arm-32) differs at arch-level code.
> 
> Actually this Page Fault is a known issue, as on most of Tegra platforms,
> display gets enabled by the bootloader for the splash screen feature, so
> it keeps filling the framebuffer memory. A proper fix to this issue is to
> 1:1 linear map the framebuffer memory to IOVA space so the SMMU will have
> the same address as the physical address in its page table. Yet, Thierry
> has been working on the solution above for a year, and it hasn't merged.
> 
> Therefore, let's partially revert the mentioned commit to fix the errors.
> 
> The reason why we do a partial revert here is that we can still set priv
> in ->of_xlate() callback for PCI devices. Meanwhile, devices existing in
> DT, like display, will go through tegra_smmu_configure() at the stage of
> bus_set_iommu() when SMMU gets probed(), as what it did before we merged
> the mentioned commit.
> 
> Once we have the linear map solution for framebuffer memory, this change
> can be cleaned away.
> 
> [Big thank to Guillaume who reported and helped debugging/verification]
> 
> Fixes: 25938c73cd79 ("iommu/tegra-smmu: Rework tegra_smmu_probe_device()")
> Reported-by: Guillaume Tucker <guillaume.tucker@collabora.com>
> Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com>
> ---
> 
> Guillaume, would you please give a "Tested-by" to this change? Thanks!
> 
>  drivers/iommu/tegra-smmu.c | 72 +++++++++++++++++++++++++++++++++++++-
>  1 file changed, 71 insertions(+), 1 deletion(-)

Acked-by: Thierry Reding <treding@nvidia.com>

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 156 bytes --]

_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

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

* Re: [PATCH] iommu/tegra-smmu: Fix mc errors on tegra124-nyan
  2021-02-18 22:07 [PATCH] iommu/tegra-smmu: Fix mc errors on tegra124-nyan Nicolin Chen
                   ` (2 preceding siblings ...)
  2021-03-03 18:26 ` Thierry Reding
@ 2021-03-04 12:21 ` Joerg Roedel
  2021-03-10 19:13 ` Dmitry Osipenko
  4 siblings, 0 replies; 18+ messages in thread
From: Joerg Roedel @ 2021-03-04 12:21 UTC (permalink / raw)
  To: Nicolin Chen
  Cc: guillaume.tucker, iommu, jonathanh, thierry.reding, linux-tegra,
	digetx, will, linux-kernel

On Thu, Feb 18, 2021 at 02:07:02PM -0800, Nicolin Chen wrote:
>  drivers/iommu/tegra-smmu.c | 72 +++++++++++++++++++++++++++++++++++++-
>  1 file changed, 71 insertions(+), 1 deletion(-)

Applied for v5.12, thanks.
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

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

* Re: [PATCH] iommu/tegra-smmu: Fix mc errors on tegra124-nyan
  2021-02-18 22:07 [PATCH] iommu/tegra-smmu: Fix mc errors on tegra124-nyan Nicolin Chen
                   ` (3 preceding siblings ...)
  2021-03-04 12:21 ` Joerg Roedel
@ 2021-03-10 19:13 ` Dmitry Osipenko
  2021-03-10 20:22   ` Dmitry Osipenko
  4 siblings, 1 reply; 18+ messages in thread
From: Dmitry Osipenko @ 2021-03-10 19:13 UTC (permalink / raw)
  To: Nicolin Chen, joro, thierry.reding, will, guillaume.tucker
  Cc: linux-tegra, linux-kernel, iommu, jonathanh

19.02.2021 01:07, Nicolin Chen пишет:
> Commit 25938c73cd79 ("iommu/tegra-smmu: Rework tegra_smmu_probe_device()")
> removed certain hack in the tegra_smmu_probe() by relying on IOMMU core to
> of_xlate SMMU's SID per device, so as to get rid of tegra_smmu_find() and
> tegra_smmu_configure() that are typically done in the IOMMU core also.
> 
> This approach works for both existing devices that have DT nodes and other
> devices (like PCI device) that don't exist in DT, on Tegra210 and Tegra3
> upon testing. However, Page Fault errors are reported on tegra124-Nyan:
> 
>   tegra-mc 70019000.memory-controller: display0a: read @0xfe056b40:
> 	 EMEM address decode error (SMMU translation error [--S])
>   tegra-mc 70019000.memory-controller: display0a: read @0xfe056b40:
> 	 Page fault (SMMU translation error [--S])
> 
> After debugging, I found that the mentioned commit changed some function
> callback sequence of tegra-smmu's, resulting in enabling SMMU for display
> client before display driver gets initialized. I couldn't reproduce exact
> same issue on Tegra210 as Tegra124 (arm-32) differs at arch-level code.
> 
> Actually this Page Fault is a known issue, as on most of Tegra platforms,
> display gets enabled by the bootloader for the splash screen feature, so
> it keeps filling the framebuffer memory. A proper fix to this issue is to
> 1:1 linear map the framebuffer memory to IOVA space so the SMMU will have
> the same address as the physical address in its page table. Yet, Thierry
> has been working on the solution above for a year, and it hasn't merged.
> 
> Therefore, let's partially revert the mentioned commit to fix the errors.
> 
> The reason why we do a partial revert here is that we can still set priv
> in ->of_xlate() callback for PCI devices. Meanwhile, devices existing in
> DT, like display, will go through tegra_smmu_configure() at the stage of
> bus_set_iommu() when SMMU gets probed(), as what it did before we merged
> the mentioned commit.
> 
> Once we have the linear map solution for framebuffer memory, this change
> can be cleaned away.
> 
> [Big thank to Guillaume who reported and helped debugging/verification]
> 
> Fixes: 25938c73cd79 ("iommu/tegra-smmu: Rework tegra_smmu_probe_device()")
> Reported-by: Guillaume Tucker <guillaume.tucker@collabora.com>
> Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com>
> ---
> 
> Guillaume, would you please give a "Tested-by" to this change? Thanks!
> 
>  drivers/iommu/tegra-smmu.c | 72 +++++++++++++++++++++++++++++++++++++-
>  1 file changed, 71 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/iommu/tegra-smmu.c b/drivers/iommu/tegra-smmu.c
> index 4a3f095a1c26..97eb62f667d2 100644
> --- a/drivers/iommu/tegra-smmu.c
> +++ b/drivers/iommu/tegra-smmu.c
> @@ -798,10 +798,70 @@ static phys_addr_t tegra_smmu_iova_to_phys(struct iommu_domain *domain,
>  	return SMMU_PFN_PHYS(pfn) + SMMU_OFFSET_IN_PAGE(iova);
>  }
>  
> +static struct tegra_smmu *tegra_smmu_find(struct device_node *np)
> +{
> +	struct platform_device *pdev;
> +	struct tegra_mc *mc;
> +
> +	pdev = of_find_device_by_node(np);
> +	if (!pdev)
> +		return NULL;
> +
> +	mc = platform_get_drvdata(pdev);
> +	if (!mc)
> +		return NULL;
> +
> +	return mc->smmu;
> +}
> +
> +static int tegra_smmu_configure(struct tegra_smmu *smmu, struct device *dev,
> +				struct of_phandle_args *args)
> +{
> +	const struct iommu_ops *ops = smmu->iommu.ops;
> +	int err;
> +
> +	err = iommu_fwspec_init(dev, &dev->of_node->fwnode, ops);
> +	if (err < 0) {
> +		dev_err(dev, "failed to initialize fwspec: %d\n", err);
> +		return err;
> +	}
> +
> +	err = ops->of_xlate(dev, args);
> +	if (err < 0) {
> +		dev_err(dev, "failed to parse SW group ID: %d\n", err);
> +		iommu_fwspec_free(dev);
> +		return err;
> +	}
> +
> +	return 0;
> +}
> +
>  static struct iommu_device *tegra_smmu_probe_device(struct device *dev)
>  {
> -	struct tegra_smmu *smmu = dev_iommu_priv_get(dev);
> +	struct device_node *np = dev->of_node;
> +	struct tegra_smmu *smmu = NULL;
> +	struct of_phandle_args args;
> +	unsigned int index = 0;
> +	int err;
> +
> +	while (of_parse_phandle_with_args(np, "iommus", "#iommu-cells", index,
> +					  &args) == 0) {
> +		smmu = tegra_smmu_find(args.np);
> +		if (smmu) {
> +			err = tegra_smmu_configure(smmu, dev, &args);
> +			of_node_put(args.np);
>  
> +			if (err < 0)
> +				return ERR_PTR(err);
> +
> +			break;
> +		}
> +
> +		of_node_put(args.np);
> +		index++;
> +	}
> +
> +	smmu = dev_iommu_priv_get(dev);
>  	if (!smmu)
>  		return ERR_PTR(-ENODEV);
>  
> @@ -1028,6 +1088,16 @@ struct tegra_smmu *tegra_smmu_probe(struct device *dev,
>  	if (!smmu)
>  		return ERR_PTR(-ENOMEM);
>  
> +	/*
> +	 * This is a bit of a hack. Ideally we'd want to simply return this
> +	 * value. However the IOMMU registration process will attempt to add
> +	 * all devices to the IOMMU when bus_set_iommu() is called. In order
> +	 * not to rely on global variables to track the IOMMU instance, we
> +	 * set it here so that it can be looked up from the .probe_device()
> +	 * callback via the IOMMU device's .drvdata field.
> +	 */
> +	mc->smmu = smmu;
> +
>  	size = BITS_TO_LONGS(soc->num_asids) * sizeof(long);
>  
>  	smmu->asids = devm_kzalloc(dev, size, GFP_KERNEL);
> 

I found that this patch introduced a serious regression on Tegra30 using
today's linux-next. Tegra30 has two 3d h/w blocks connected in SLI and
only one of the blocks is now attached to IOMMU domain, meaning that GPU
is unusable now. All 3d, 2d and display devices share the same "DRM"
group on Tegra30.

Nicolin, please let me know if have any suggestions. I may take a closer
look a day later, for now I'll just revert this patch locally. Thanks in
advance.
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

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

* Re: [PATCH] iommu/tegra-smmu: Fix mc errors on tegra124-nyan
  2021-03-10 19:13 ` Dmitry Osipenko
@ 2021-03-10 20:22   ` Dmitry Osipenko
  2021-03-10 22:17     ` Nicolin Chen
  0 siblings, 1 reply; 18+ messages in thread
From: Dmitry Osipenko @ 2021-03-10 20:22 UTC (permalink / raw)
  To: Nicolin Chen, joro, thierry.reding, will, guillaume.tucker
  Cc: linux-tegra, linux-kernel, iommu, jonathanh

10.03.2021 22:13, Dmitry Osipenko пишет:
> 19.02.2021 01:07, Nicolin Chen пишет:
>> Commit 25938c73cd79 ("iommu/tegra-smmu: Rework tegra_smmu_probe_device()")
>> removed certain hack in the tegra_smmu_probe() by relying on IOMMU core to
>> of_xlate SMMU's SID per device, so as to get rid of tegra_smmu_find() and
>> tegra_smmu_configure() that are typically done in the IOMMU core also.
>>
>> This approach works for both existing devices that have DT nodes and other
>> devices (like PCI device) that don't exist in DT, on Tegra210 and Tegra3
>> upon testing. However, Page Fault errors are reported on tegra124-Nyan:
>>
>>   tegra-mc 70019000.memory-controller: display0a: read @0xfe056b40:
>> 	 EMEM address decode error (SMMU translation error [--S])
>>   tegra-mc 70019000.memory-controller: display0a: read @0xfe056b40:
>> 	 Page fault (SMMU translation error [--S])
>>
>> After debugging, I found that the mentioned commit changed some function
>> callback sequence of tegra-smmu's, resulting in enabling SMMU for display
>> client before display driver gets initialized. I couldn't reproduce exact
>> same issue on Tegra210 as Tegra124 (arm-32) differs at arch-level code.
>>
>> Actually this Page Fault is a known issue, as on most of Tegra platforms,
>> display gets enabled by the bootloader for the splash screen feature, so
>> it keeps filling the framebuffer memory. A proper fix to this issue is to
>> 1:1 linear map the framebuffer memory to IOVA space so the SMMU will have
>> the same address as the physical address in its page table. Yet, Thierry
>> has been working on the solution above for a year, and it hasn't merged.
>>
>> Therefore, let's partially revert the mentioned commit to fix the errors.
>>
>> The reason why we do a partial revert here is that we can still set priv
>> in ->of_xlate() callback for PCI devices. Meanwhile, devices existing in
>> DT, like display, will go through tegra_smmu_configure() at the stage of
>> bus_set_iommu() when SMMU gets probed(), as what it did before we merged
>> the mentioned commit.
>>
>> Once we have the linear map solution for framebuffer memory, this change
>> can be cleaned away.
>>
>> [Big thank to Guillaume who reported and helped debugging/verification]
>>
>> Fixes: 25938c73cd79 ("iommu/tegra-smmu: Rework tegra_smmu_probe_device()")
>> Reported-by: Guillaume Tucker <guillaume.tucker@collabora.com>
>> Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com>
>> ---
>>
>> Guillaume, would you please give a "Tested-by" to this change? Thanks!
>>
>>  drivers/iommu/tegra-smmu.c | 72 +++++++++++++++++++++++++++++++++++++-
>>  1 file changed, 71 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/iommu/tegra-smmu.c b/drivers/iommu/tegra-smmu.c
>> index 4a3f095a1c26..97eb62f667d2 100644
>> --- a/drivers/iommu/tegra-smmu.c
>> +++ b/drivers/iommu/tegra-smmu.c
>> @@ -798,10 +798,70 @@ static phys_addr_t tegra_smmu_iova_to_phys(struct iommu_domain *domain,
>>  	return SMMU_PFN_PHYS(pfn) + SMMU_OFFSET_IN_PAGE(iova);
>>  }
>>  
>> +static struct tegra_smmu *tegra_smmu_find(struct device_node *np)
>> +{
>> +	struct platform_device *pdev;
>> +	struct tegra_mc *mc;
>> +
>> +	pdev = of_find_device_by_node(np);
>> +	if (!pdev)
>> +		return NULL;
>> +
>> +	mc = platform_get_drvdata(pdev);
>> +	if (!mc)
>> +		return NULL;
>> +
>> +	return mc->smmu;
>> +}
>> +
>> +static int tegra_smmu_configure(struct tegra_smmu *smmu, struct device *dev,
>> +				struct of_phandle_args *args)
>> +{
>> +	const struct iommu_ops *ops = smmu->iommu.ops;
>> +	int err;
>> +
>> +	err = iommu_fwspec_init(dev, &dev->of_node->fwnode, ops);
>> +	if (err < 0) {
>> +		dev_err(dev, "failed to initialize fwspec: %d\n", err);
>> +		return err;
>> +	}
>> +
>> +	err = ops->of_xlate(dev, args);
>> +	if (err < 0) {
>> +		dev_err(dev, "failed to parse SW group ID: %d\n", err);
>> +		iommu_fwspec_free(dev);
>> +		return err;
>> +	}
>> +
>> +	return 0;
>> +}
>> +
>>  static struct iommu_device *tegra_smmu_probe_device(struct device *dev)
>>  {
>> -	struct tegra_smmu *smmu = dev_iommu_priv_get(dev);
>> +	struct device_node *np = dev->of_node;
>> +	struct tegra_smmu *smmu = NULL;
>> +	struct of_phandle_args args;
>> +	unsigned int index = 0;
>> +	int err;
>> +
>> +	while (of_parse_phandle_with_args(np, "iommus", "#iommu-cells", index,
>> +					  &args) == 0) {
>> +		smmu = tegra_smmu_find(args.np);
>> +		if (smmu) {
>> +			err = tegra_smmu_configure(smmu, dev, &args);
>> +			of_node_put(args.np);
>>  
>> +			if (err < 0)
>> +				return ERR_PTR(err);
>> +
>> +			break;
>> +		}
>> +
>> +		of_node_put(args.np);
>> +		index++;
>> +	}
>> +
>> +	smmu = dev_iommu_priv_get(dev);
>>  	if (!smmu)
>>  		return ERR_PTR(-ENODEV);
>>  
>> @@ -1028,6 +1088,16 @@ struct tegra_smmu *tegra_smmu_probe(struct device *dev,
>>  	if (!smmu)
>>  		return ERR_PTR(-ENOMEM);
>>  
>> +	/*
>> +	 * This is a bit of a hack. Ideally we'd want to simply return this
>> +	 * value. However the IOMMU registration process will attempt to add
>> +	 * all devices to the IOMMU when bus_set_iommu() is called. In order
>> +	 * not to rely on global variables to track the IOMMU instance, we
>> +	 * set it here so that it can be looked up from the .probe_device()
>> +	 * callback via the IOMMU device's .drvdata field.
>> +	 */
>> +	mc->smmu = smmu;
>> +
>>  	size = BITS_TO_LONGS(soc->num_asids) * sizeof(long);
>>  
>>  	smmu->asids = devm_kzalloc(dev, size, GFP_KERNEL);
>>
> 
> I found that this patch introduced a serious regression on Tegra30 using
> today's linux-next. Tegra30 has two 3d h/w blocks connected in SLI and
> only one of the blocks is now attached to IOMMU domain, meaning that GPU
> is unusable now. All 3d, 2d and display devices share the same "DRM"
> group on Tegra30.
> 
> Nicolin, please let me know if have any suggestions. I may take a closer
> look a day later, for now I'll just revert this patch locally. Thanks in
> advance.
> 

Actually, this was easy to fix:

diff --git a/drivers/iommu/tegra-smmu.c b/drivers/iommu/tegra-smmu.c
index 97eb62f667d2..639d5ceab60b 100644
--- a/drivers/iommu/tegra-smmu.c
+++ b/drivers/iommu/tegra-smmu.c
@@ -853,8 +853,6 @@ static struct iommu_device
*tegra_smmu_probe_device(struct device *dev)

 			if (err < 0)
 				return ERR_PTR(err);
-
-			break;
 		}

 		of_node_put(args.np);


Nicolin, please make a proper patch. You may add my reported-by and
tested-by.
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

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

* Re: [PATCH] iommu/tegra-smmu: Fix mc errors on tegra124-nyan
  2021-03-10 20:22   ` Dmitry Osipenko
@ 2021-03-10 22:17     ` Nicolin Chen
  2021-03-11 12:06       ` Dmitry Osipenko
  0 siblings, 1 reply; 18+ messages in thread
From: Nicolin Chen @ 2021-03-10 22:17 UTC (permalink / raw)
  To: Dmitry Osipenko
  Cc: guillaume.tucker, iommu, jonathanh, thierry.reding, linux-tegra,
	will, linux-kernel

On Wed, Mar 10, 2021 at 11:22:57PM +0300, Dmitry Osipenko wrote:
> 10.03.2021 22:13, Dmitry Osipenko пишет:
> > I found that this patch introduced a serious regression on Tegra30 using
> > today's linux-next. Tegra30 has two 3d h/w blocks connected in SLI and
> > only one of the blocks is now attached to IOMMU domain, meaning that GPU
> > is unusable now. All 3d, 2d and display devices share the same "DRM"
> > group on Tegra30.
> > 
> > Nicolin, please let me know if have any suggestions. I may take a closer
> > look a day later, for now I'll just revert this patch locally. Thanks in
> > advance.
> > 
> 
> Actually, this was easy to fix:
> 
> diff --git a/drivers/iommu/tegra-smmu.c b/drivers/iommu/tegra-smmu.c
> index 97eb62f667d2..639d5ceab60b 100644
> --- a/drivers/iommu/tegra-smmu.c
> +++ b/drivers/iommu/tegra-smmu.c
> @@ -853,8 +853,6 @@ static struct iommu_device
> *tegra_smmu_probe_device(struct device *dev)
> 
>  			if (err < 0)
>  				return ERR_PTR(err);
> -
> -			break;

Hmm..I don't understand why this "break" causes problems on Tegra30.
The older versions that used _find()+configure() had it also, e.g.:
https://elixir.bootlin.com/linux/v5.9.16/source/drivers/iommu/tegra-smmu.c#L760

Dmitry, do you have any idea?
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

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

* Re: [PATCH] iommu/tegra-smmu: Fix mc errors on tegra124-nyan
  2021-03-10 22:17     ` Nicolin Chen
@ 2021-03-11 12:06       ` Dmitry Osipenko
  2021-03-12  1:09         ` Nicolin Chen
  0 siblings, 1 reply; 18+ messages in thread
From: Dmitry Osipenko @ 2021-03-11 12:06 UTC (permalink / raw)
  To: Nicolin Chen
  Cc: guillaume.tucker, iommu, jonathanh, thierry.reding, linux-tegra,
	will, linux-kernel

11.03.2021 01:17, Nicolin Chen пишет:
> On Wed, Mar 10, 2021 at 11:22:57PM +0300, Dmitry Osipenko wrote:
>> 10.03.2021 22:13, Dmitry Osipenko пишет:
>>> I found that this patch introduced a serious regression on Tegra30 using
>>> today's linux-next. Tegra30 has two 3d h/w blocks connected in SLI and
>>> only one of the blocks is now attached to IOMMU domain, meaning that GPU
>>> is unusable now. All 3d, 2d and display devices share the same "DRM"
>>> group on Tegra30.
>>>
>>> Nicolin, please let me know if have any suggestions. I may take a closer
>>> look a day later, for now I'll just revert this patch locally. Thanks in
>>> advance.
>>>
>>
>> Actually, this was easy to fix:
>>
>> diff --git a/drivers/iommu/tegra-smmu.c b/drivers/iommu/tegra-smmu.c
>> index 97eb62f667d2..639d5ceab60b 100644
>> --- a/drivers/iommu/tegra-smmu.c
>> +++ b/drivers/iommu/tegra-smmu.c
>> @@ -853,8 +853,6 @@ static struct iommu_device
>> *tegra_smmu_probe_device(struct device *dev)
>>
>>  			if (err < 0)
>>  				return ERR_PTR(err);
>> -
>> -			break;
> 
> Hmm..I don't understand why this "break" causes problems on Tegra30.
> The older versions that used _find()+configure() had it also, e.g.:
> https://elixir.bootlin.com/linux/v5.9.16/source/drivers/iommu/tegra-smmu.c#L760
> 
> Dmitry, do you have any idea?
> 

The older variant of tegra_smmu_attach_dev() didn't use fwspec [1], that
makes the difference. In other words, the older variant of
tegra_smmu_probe_device() was already buggy, but the bug was masked by
the tegra_smmu_attach_dev() that didn't use the fwspec.

[1]
https://elixir.bootlin.com/linux/v5.10.22/source/drivers/iommu/tegra-smmu.c#L476
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

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

* Re: [PATCH] iommu/tegra-smmu: Fix mc errors on tegra124-nyan
  2021-03-11 12:06       ` Dmitry Osipenko
@ 2021-03-12  1:09         ` Nicolin Chen
  0 siblings, 0 replies; 18+ messages in thread
From: Nicolin Chen @ 2021-03-12  1:09 UTC (permalink / raw)
  To: Dmitry Osipenko
  Cc: guillaume.tucker, iommu, jonathanh, thierry.reding, linux-tegra,
	will, linux-kernel

On Thu, Mar 11, 2021 at 03:06:25PM +0300, Dmitry Osipenko wrote:
> 11.03.2021 01:17, Nicolin Chen пишет:
> > On Wed, Mar 10, 2021 at 11:22:57PM +0300, Dmitry Osipenko wrote:
> >> 10.03.2021 22:13, Dmitry Osipenko пишет:
> >>> I found that this patch introduced a serious regression on Tegra30 using
> >>> today's linux-next. Tegra30 has two 3d h/w blocks connected in SLI and
> >>> only one of the blocks is now attached to IOMMU domain, meaning that GPU
> >>> is unusable now. All 3d, 2d and display devices share the same "DRM"
> >>> group on Tegra30.
> >>>
> >>> Nicolin, please let me know if have any suggestions. I may take a closer
> >>> look a day later, for now I'll just revert this patch locally. Thanks in
> >>> advance.
> >>>
> >>
> >> Actually, this was easy to fix:
> >>
> >> diff --git a/drivers/iommu/tegra-smmu.c b/drivers/iommu/tegra-smmu.c
> >> index 97eb62f667d2..639d5ceab60b 100644
> >> --- a/drivers/iommu/tegra-smmu.c
> >> +++ b/drivers/iommu/tegra-smmu.c
> >> @@ -853,8 +853,6 @@ static struct iommu_device
> >> *tegra_smmu_probe_device(struct device *dev)
> >>
> >>  			if (err < 0)
> >>  				return ERR_PTR(err);
> >> -
> >> -			break;
> > 
> > Hmm..I don't understand why this "break" causes problems on Tegra30.
> > The older versions that used _find()+configure() had it also, e.g.:
> > https://elixir.bootlin.com/linux/v5.9.16/source/drivers/iommu/tegra-smmu.c#L760
> > 
> > Dmitry, do you have any idea?
> > 
> 
> The older variant of tegra_smmu_attach_dev() didn't use fwspec [1], that
> makes the difference. In other words, the older variant of
> tegra_smmu_probe_device() was already buggy, but the bug was masked by
> the tegra_smmu_attach_dev() that didn't use the fwspec.
> 
> [1]
> https://elixir.bootlin.com/linux/v5.10.22/source/drivers/iommu/tegra-smmu.c#L476

Hmm...would you mind submitting a fix from your side? I think it'd
be more appropriate to do so, as you can definitely write a better
commit message than I can for this bug.

Thanks!
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

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

* Re: [PATCH] iommu/tegra-smmu: Fix mc errors on tegra124-nyan
  2021-03-03  9:47             ` Dmitry Osipenko
@ 2021-03-28 15:25               ` Dmitry Osipenko
  2021-03-28 15:36                 ` Dmitry Osipenko
  0 siblings, 1 reply; 18+ messages in thread
From: Dmitry Osipenko @ 2021-03-28 15:25 UTC (permalink / raw)
  To: Nicolin Chen, thierry.reding
  Cc: guillaume.tucker, iommu, jonathanh, linux-tegra, will, linux-kernel

03.03.2021 12:47, Dmitry Osipenko пишет:
> 03.03.2021 02:08, Nicolin Chen пишет:
>> On Sat, Feb 27, 2021 at 12:59:17PM +0300, Dmitry Osipenko wrote:
>>> 25.02.2021 09:27, Nicolin Chen пишет:
>>> ...
>>>>> The partially revert should be okay, but it's not clear to me what makes
>>>>> difference for T124 since I don't see that problem on T30, which also
>>>>> has active display at a boot time.
>>>> Hmm..do you see ->attach_dev() is called from host1x_client_iommu_attach
>>>> or from of_dma_configure_id/arch_setup_dma_ops?
>>>>
>>> I applied yours debug-patch, please see dmesg.txt attached to the email.
>>> Seems probe-defer of the tegra-dc driver prevents the implicit
>>> tegra_smmu_attach_dev, so it happens to work by accident.
>>> [    0.327826] tegra-dc 54200000.dc: -------tegra_smmu_of_xlate: id 1
>>> [    0.328641] [<c052ec75>] (tegra_smmu_of_xlate) from [<c052e591>] (of_iommu_xlate+0x51/0x70)
>>> [    0.328740] [<c052e591>] (of_iommu_xlate) from [<c052e6d7>] (of_iommu_configure+0x127/0x150)
>>> [    0.328896] [<c052e6d7>] (of_iommu_configure) from [<c073f697>] (of_dma_configure_id+0x1fb/0x2ec)
>>> [    0.329060] [<c073f697>] (of_dma_configure_id) from [<c059743f>] (really_probe+0x7b/0x2a0)
>>> [    0.331438] tegra-dc 54200000.dc: --------tegra_smmu_probe_device, 822
>>> [    0.332234] [<c052ebed>] (tegra_smmu_probe_device) from [<c052bd6d>] (__iommu_probe_device+0x35/0x1c4)
>>> [    0.332391] [<c052bd6d>] (__iommu_probe_device) from [<c052c3cd>] (iommu_probe_device+0x19/0xec)
>>> [    0.332545] [<c052c3cd>] (iommu_probe_device) from [<c052e6ab>] (of_iommu_configure+0xfb/0x150)
>>> [    0.332701] [<c052e6ab>] (of_iommu_configure) from [<c073f697>] (of_dma_configure_id+0x1fb/0x2ec)
>>> [    0.332804] [<c073f697>] (of_dma_configure_id) from [<c059743f>] (really_probe+0x7b/0x2a0)
>>> [    0.335202] tegra-dc 54200000.dc: ---------iommu_group_get_for_dev, 1572
>>> [    0.335292] tegra-dc 54200000.dc: ---------tegra_smmu_device_group, 862
>>> [    0.335474] tegra-dc 54200000.dc: ---------tegra_smmu_device_group, 909: 1: drm
>>> [    0.335566] tegra-dc 54200000.dc: ---------iommu_group_get_for_dev, 1574
>>> [    0.335718] tegra-dc 54200000.dc: ---------iommu_group_add_device, 858
>>> [    0.335862] tegra-dc 54200000.dc: Adding to iommu group 1
>>> [    0.335955] tegra-dc 54200000.dc: ---------iommu_alloc_default_domain, 1543: type 3
>>> [    0.336101] iommu: ------iommu_group_alloc_default_domain: platform, (null), drm
>>> [    0.336187] ---------tegra_smmu_domain_alloc, 284: type 3
>>  [    0.336968] [<c0a0ff45>] (tegra_smmu_domain_alloc) from [<c0a0f87b>] (iommu_group_alloc_default_domain+0x4b/0xfa)
>>> [    0.337127] [<c0a0f87b>] (iommu_group_alloc_default_domain) from [<c052c41d>] (iommu_probe_device+0x69/0xec)
>>> [    0.337285] [<c052c41d>] (iommu_probe_device) from [<c052e6ab>] (of_iommu_configure+0xfb/0x150)
>>> [    0.337441] [<c052e6ab>] (of_iommu_configure) from [<c073f697>] (of_dma_configure_id+0x1fb/0x2ec)
>>> [    0.337599] [<c073f697>] (of_dma_configure_id) from [<c059743f>] (really_probe+0x7b/0x2a0)
>>> [    0.339913] tegra-dc 54200000.dc: ---------iommu_probe_device, 272
>>> [    0.348144] tegra-dc 54200000.dc: failed to probe RGB output: -517
>> Hmm..not sure where this EPROBE_DEFER comes from.
> DC driver on Nexus 7 depends on LVDS bridge and display panel, which
> cause the probe defer.
> 
>> But you are right,
>> as of_dma_configure_id() returns because of that so it didn't run to
>> arch_setup_dma_ops() call, which allocates an UNMANAGED iommu domain
>> and attaches DC to it on Tegra124.
>>
>> By the way, anyone can accept this change? It doesn't feel right to
>> leave a regression in the newer release...

Guys, I have a good and bad news.

The good news is that I figured out why I didn't see this problem on
Nexus 7 and the reason is that I had CONFIG_ARM_DMA_USE_IOMMU=n.

The other good news is that I have a simple workaround which fixes the
implicit IOMMU problem by deferring the ASID enabling for display clients.

The bad news is that CONFIG_ARM_DMA_USE_IOMMU=y breaks GPU (DRM, host1x)
drivers because they aren't properly prepared to this case and
CONFIG_ARM_DMA_USE_IOMMU is enabled in multi-platform kernel config. I
will try to fix up the drivers, but not sure how much time this may take.
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

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

* Re: [PATCH] iommu/tegra-smmu: Fix mc errors on tegra124-nyan
  2021-03-28 15:25               ` Dmitry Osipenko
@ 2021-03-28 15:36                 ` Dmitry Osipenko
  0 siblings, 0 replies; 18+ messages in thread
From: Dmitry Osipenko @ 2021-03-28 15:36 UTC (permalink / raw)
  To: Nicolin Chen, thierry.reding
  Cc: guillaume.tucker, iommu, jonathanh, linux-tegra, will, linux-kernel

28.03.2021 18:25, Dmitry Osipenko пишет:
> 03.03.2021 12:47, Dmitry Osipenko пишет:
>> 03.03.2021 02:08, Nicolin Chen пишет:
>>> On Sat, Feb 27, 2021 at 12:59:17PM +0300, Dmitry Osipenko wrote:
>>>> 25.02.2021 09:27, Nicolin Chen пишет:
>>>> ...
>>>>>> The partially revert should be okay, but it's not clear to me what makes
>>>>>> difference for T124 since I don't see that problem on T30, which also
>>>>>> has active display at a boot time.
>>>>> Hmm..do you see ->attach_dev() is called from host1x_client_iommu_attach
>>>>> or from of_dma_configure_id/arch_setup_dma_ops?
>>>>>
>>>> I applied yours debug-patch, please see dmesg.txt attached to the email.
>>>> Seems probe-defer of the tegra-dc driver prevents the implicit
>>>> tegra_smmu_attach_dev, so it happens to work by accident.
>>>> [    0.327826] tegra-dc 54200000.dc: -------tegra_smmu_of_xlate: id 1
>>>> [    0.328641] [<c052ec75>] (tegra_smmu_of_xlate) from [<c052e591>] (of_iommu_xlate+0x51/0x70)
>>>> [    0.328740] [<c052e591>] (of_iommu_xlate) from [<c052e6d7>] (of_iommu_configure+0x127/0x150)
>>>> [    0.328896] [<c052e6d7>] (of_iommu_configure) from [<c073f697>] (of_dma_configure_id+0x1fb/0x2ec)
>>>> [    0.329060] [<c073f697>] (of_dma_configure_id) from [<c059743f>] (really_probe+0x7b/0x2a0)
>>>> [    0.331438] tegra-dc 54200000.dc: --------tegra_smmu_probe_device, 822
>>>> [    0.332234] [<c052ebed>] (tegra_smmu_probe_device) from [<c052bd6d>] (__iommu_probe_device+0x35/0x1c4)
>>>> [    0.332391] [<c052bd6d>] (__iommu_probe_device) from [<c052c3cd>] (iommu_probe_device+0x19/0xec)
>>>> [    0.332545] [<c052c3cd>] (iommu_probe_device) from [<c052e6ab>] (of_iommu_configure+0xfb/0x150)
>>>> [    0.332701] [<c052e6ab>] (of_iommu_configure) from [<c073f697>] (of_dma_configure_id+0x1fb/0x2ec)
>>>> [    0.332804] [<c073f697>] (of_dma_configure_id) from [<c059743f>] (really_probe+0x7b/0x2a0)
>>>> [    0.335202] tegra-dc 54200000.dc: ---------iommu_group_get_for_dev, 1572
>>>> [    0.335292] tegra-dc 54200000.dc: ---------tegra_smmu_device_group, 862
>>>> [    0.335474] tegra-dc 54200000.dc: ---------tegra_smmu_device_group, 909: 1: drm
>>>> [    0.335566] tegra-dc 54200000.dc: ---------iommu_group_get_for_dev, 1574
>>>> [    0.335718] tegra-dc 54200000.dc: ---------iommu_group_add_device, 858
>>>> [    0.335862] tegra-dc 54200000.dc: Adding to iommu group 1
>>>> [    0.335955] tegra-dc 54200000.dc: ---------iommu_alloc_default_domain, 1543: type 3
>>>> [    0.336101] iommu: ------iommu_group_alloc_default_domain: platform, (null), drm
>>>> [    0.336187] ---------tegra_smmu_domain_alloc, 284: type 3
>>>  [    0.336968] [<c0a0ff45>] (tegra_smmu_domain_alloc) from [<c0a0f87b>] (iommu_group_alloc_default_domain+0x4b/0xfa)
>>>> [    0.337127] [<c0a0f87b>] (iommu_group_alloc_default_domain) from [<c052c41d>] (iommu_probe_device+0x69/0xec)
>>>> [    0.337285] [<c052c41d>] (iommu_probe_device) from [<c052e6ab>] (of_iommu_configure+0xfb/0x150)
>>>> [    0.337441] [<c052e6ab>] (of_iommu_configure) from [<c073f697>] (of_dma_configure_id+0x1fb/0x2ec)
>>>> [    0.337599] [<c073f697>] (of_dma_configure_id) from [<c059743f>] (really_probe+0x7b/0x2a0)
>>>> [    0.339913] tegra-dc 54200000.dc: ---------iommu_probe_device, 272
>>>> [    0.348144] tegra-dc 54200000.dc: failed to probe RGB output: -517
>>> Hmm..not sure where this EPROBE_DEFER comes from.
>> DC driver on Nexus 7 depends on LVDS bridge and display panel, which
>> cause the probe defer.
>>
>>> But you are right,
>>> as of_dma_configure_id() returns because of that so it didn't run to
>>> arch_setup_dma_ops() call, which allocates an UNMANAGED iommu domain
>>> and attaches DC to it on Tegra124.
>>>
>>> By the way, anyone can accept this change? It doesn't feel right to
>>> leave a regression in the newer release...
> 
> Guys, I have a good and bad news.
> 
> The good news is that I figured out why I didn't see this problem on
> Nexus 7 and the reason is that I had CONFIG_ARM_DMA_USE_IOMMU=n.
> 
> The other good news is that I have a simple workaround which fixes the
> implicit IOMMU problem by deferring the ASID enabling for display clients.
> 
> The bad news is that CONFIG_ARM_DMA_USE_IOMMU=y breaks GPU (DRM, host1x)
> drivers because they aren't properly prepared to this case and
> CONFIG_ARM_DMA_USE_IOMMU is enabled in multi-platform kernel config. I
> will try to fix up the drivers, but not sure how much time this may take.
> 

Oh, actually the old workaround with arm_iommu_detach_device() still
works, so we just need to bring it back. I'll prepare the patches.
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

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

end of thread, other threads:[~2021-03-28 15:36 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-18 22:07 [PATCH] iommu/tegra-smmu: Fix mc errors on tegra124-nyan Nicolin Chen
2021-02-20  5:16 ` Dmitry Osipenko
2021-02-23  2:13   ` Nicolin Chen
2021-02-23  5:10     ` Dmitry Osipenko
2021-02-25  6:27       ` Nicolin Chen
2021-02-27  9:59         ` Dmitry Osipenko
2021-03-02 23:08           ` Nicolin Chen
2021-03-03  9:47             ` Dmitry Osipenko
2021-03-28 15:25               ` Dmitry Osipenko
2021-03-28 15:36                 ` Dmitry Osipenko
2021-02-22 13:15 ` Guillaume Tucker
2021-03-03 18:26 ` Thierry Reding
2021-03-04 12:21 ` Joerg Roedel
2021-03-10 19:13 ` Dmitry Osipenko
2021-03-10 20:22   ` Dmitry Osipenko
2021-03-10 22:17     ` Nicolin Chen
2021-03-11 12:06       ` Dmitry Osipenko
2021-03-12  1:09         ` Nicolin Chen

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