Skip to content

Commit c2418f9

Browse files
rmurphy-armthierryreding
authored andcommitted
gpu: host1x: Avoid trying to use GART on Tegra20
Since commit c7e3ca5 ("iommu/tegra: gart: Do not register with bus") quite some time ago, the GART driver has effectively disabled itself to avoid issues with the GPU driver expecting it to work in ways that it doesn't. As of commit 57365a0 ("iommu: Move bus setup to IOMMU device registration") that bodge no longer works, but really the GPU driver should be responsible for its own behaviour anyway. Make the workaround explicit. Reported-by: Jon Hunter <[email protected]> Suggested-by: Dmitry Osipenko <[email protected]> Signed-off-by: Robin Murphy <[email protected]> Tested-by: Jon Hunter <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
1 parent 9abf231 commit c2418f9

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

drivers/gpu/drm/tegra/drm.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1093,6 +1093,10 @@ static bool host1x_drm_wants_iommu(struct host1x_device *dev)
10931093
struct host1x *host1x = dev_get_drvdata(dev->dev.parent);
10941094
struct iommu_domain *domain;
10951095

1096+
/* Our IOMMU usage policy doesn't currently play well with GART */
1097+
if (of_machine_is_compatible("nvidia,tegra20"))
1098+
return false;
1099+
10961100
/*
10971101
* If the Tegra DRM clients are backed by an IOMMU, push buffers are
10981102
* likely to be allocated beyond the 32-bit boundary if sufficient

drivers/gpu/host1x/dev.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,10 @@ static void host1x_setup_virtualization_tables(struct host1x *host)
292292

293293
static bool host1x_wants_iommu(struct host1x *host1x)
294294
{
295+
/* Our IOMMU usage policy doesn't currently play well with GART */
296+
if (of_machine_is_compatible("nvidia,tegra20"))
297+
return false;
298+
295299
/*
296300
* If we support addressing a maximum of 32 bits of physical memory
297301
* and if the host1x firewall is enabled, there's no need to enable

0 commit comments

Comments
 (0)