LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH v1] gpu: host1x: Skip IOMMU initialization if firewall is enabled
@ 2018-05-19  1:07 Dmitry Osipenko
  2018-07-07 11:07 ` Dmitry Osipenko
  2018-07-09  8:32 ` Thierry Reding
  0 siblings, 2 replies; 3+ messages in thread
From: Dmitry Osipenko @ 2018-05-19  1:07 UTC (permalink / raw)
  To: Thierry Reding, Mikko Perttunen; +Cc: linux-tegra, dri-devel, linux-kernel

Host1x's CDMA can't access the command buffers if IOMMU and Host1x
firewall are enabled in the kernels config because firewall doesn't map
the copied buffer into IOVA space. Fix this by skipping IOMMU
initialization if firewall is enabled as firewall merges sparse cmdbufs
into a single contiguous buffer and hence IOMMU isn't needed in this case.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
---
 drivers/gpu/host1x/dev.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/host1x/dev.c b/drivers/gpu/host1x/dev.c
index f1d5f76e9c33..d88073e7d22d 100644
--- a/drivers/gpu/host1x/dev.c
+++ b/drivers/gpu/host1x/dev.c
@@ -218,6 +218,9 @@ static int host1x_probe(struct platform_device *pdev)
 		return err;
 	}
 
+	if (IS_ENABLED(CONFIG_TEGRA_HOST1X_FIREWALL))
+		goto skip_iommu;
+
 	host->group = iommu_group_get(&pdev->dev);
 	if (host->group) {
 		struct iommu_domain_geometry *geometry;
-- 
2.17.0

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

* Re: [PATCH v1] gpu: host1x: Skip IOMMU initialization if firewall is enabled
  2018-05-19  1:07 [PATCH v1] gpu: host1x: Skip IOMMU initialization if firewall is enabled Dmitry Osipenko
@ 2018-07-07 11:07 ` Dmitry Osipenko
  2018-07-09  8:32 ` Thierry Reding
  1 sibling, 0 replies; 3+ messages in thread
From: Dmitry Osipenko @ 2018-07-07 11:07 UTC (permalink / raw)
  To: Thierry Reding; +Cc: Mikko Perttunen, linux-tegra, dri-devel, linux-kernel

On Saturday, 19 May 2018 04:07:10 MSK Dmitry Osipenko wrote:
> Host1x's CDMA can't access the command buffers if IOMMU and Host1x
> firewall are enabled in the kernels config because firewall doesn't map
> the copied buffer into IOVA space. Fix this by skipping IOMMU
> initialization if firewall is enabled as firewall merges sparse cmdbufs
> into a single contiguous buffer and hence IOMMU isn't needed in this case.
> 
> Signed-off-by: Dmitry Osipenko <digetx@gmail.com>

Thierry, please consider applying this patch.



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

* Re: [PATCH v1] gpu: host1x: Skip IOMMU initialization if firewall is enabled
  2018-05-19  1:07 [PATCH v1] gpu: host1x: Skip IOMMU initialization if firewall is enabled Dmitry Osipenko
  2018-07-07 11:07 ` Dmitry Osipenko
@ 2018-07-09  8:32 ` Thierry Reding
  1 sibling, 0 replies; 3+ messages in thread
From: Thierry Reding @ 2018-07-09  8:32 UTC (permalink / raw)
  To: Dmitry Osipenko; +Cc: Mikko Perttunen, linux-tegra, dri-devel, linux-kernel

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

On Sat, May 19, 2018 at 04:07:10AM +0300, Dmitry Osipenko wrote:
> Host1x's CDMA can't access the command buffers if IOMMU and Host1x
> firewall are enabled in the kernels config because firewall doesn't map
> the copied buffer into IOVA space. Fix this by skipping IOMMU
> initialization if firewall is enabled as firewall merges sparse cmdbufs
> into a single contiguous buffer and hence IOMMU isn't needed in this case.
> 
> Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
> ---
>  drivers/gpu/host1x/dev.c | 3 +++
>  1 file changed, 3 insertions(+)

Applied to drm/tegra/fixes, thanks.

Thierry

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

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

end of thread, other threads:[~2018-07-09  8:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-19  1:07 [PATCH v1] gpu: host1x: Skip IOMMU initialization if firewall is enabled Dmitry Osipenko
2018-07-07 11:07 ` Dmitry Osipenko
2018-07-09  8:32 ` Thierry Reding

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