Skip to contentSkip to conversation

gpu: host1x: Skip IOMMU initialization if firewall is enabled

PATCH Applied Dmitry Osipenko 2 participants 3 messages May 19, 2018 – Jul 9, 2018

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gpu: host1x: Skip IOMMU initialization if firewall is enabled

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.

---
 drivers/gpu/host1x/dev.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/host1x/dev.c +3 -0
index f1d5f76e9c33..d88073e7d22d 100644
@@ -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;
Signature · 1 line
2.17.0
#1 lore raw
Quoted 7 lines · 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.

Thierry, please consider applying this patch.

#2 lore raw
In reply to Dmitry Osipenko
Quoted 10 lines · Dmitry Osipenko

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.

---
 drivers/gpu/host1x/dev.c | 3 +++
 1 file changed, 3 insertions(+)

Applied to drm/tegra/fixes, thanks.

Thierry

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel