Skip to contentSkip to conversation

memory: tegra: Remove GPU from DRM IOMMU group

PATCH Applied Thierry Reding 3 participants 3 messages Sep 1, 2020 – Sep 2, 2020

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

PATCH 1/1 memory: tegra: Remove GPU from DRM IOMMU group

From: Thierry Reding <[email protected]>

Commit 63a613fdb16c ("memory: tegra: Add gr2d and gr3d to DRM IOMMU group") added the GPU to the DRM IOMMU group, which doesn't make any sense. This causes problems when Nouveau tries to attach to the SMMU and causes it to fall back to using the DMA API.

Remove the GPU from the DRM groups to restore the old behaviour. The GPU should always have its own IOMMU domain to make sure it can map buffers into contiguous chunks (for big page support) without getting in the way of mappings from the DRM group.

Fixes 63a613fdb16c ("memory: tegra: Add gr2d and gr3d to DRM IOMMU group")
---
 drivers/memory/tegra/tegra124.c | 1 -
 1 file changed, 1 deletion(-)
drivers/memory/tegra/tegra124.c +0 -1
index 493b5dc3a4b3..0cede24479bf 100644
@@ -957,7 +957,6 @@ static const struct tegra_smmu_swgroup tegra124_swgroups[] = {
 static const unsigned int tegra124_group_drm[] = {
 	TEGRA_SWGROUP_DC,
 	TEGRA_SWGROUP_DCB,
-	TEGRA_SWGROUP_GPU,
 	TEGRA_SWGROUP_VIC,
 };
 
Signature · 1 line
2.28.0
Reviewed-by on v1 1/1
#1 lore raw

01.09.2020 18:32, Thierry Reding пишет:

Quoted 25 lines

From: Thierry Reding <[email protected]>

Commit 63a613fdb16c ("memory: tegra: Add gr2d and gr3d to DRM IOMMU group") added the GPU to the DRM IOMMU group, which doesn't make any sense. This causes problems when Nouveau tries to attach to the SMMU and causes it to fall back to using the DMA API.

Remove the GPU from the DRM groups to restore the old behaviour. The GPU should always have its own IOMMU domain to make sure it can map buffers into contiguous chunks (for big page support) without getting in the way of mappings from the DRM group.

Fixes 63a613fdb16c ("memory: tegra: Add gr2d and gr3d to DRM IOMMU group")
---
 drivers/memory/tegra/tegra124.c | 1 -
 1 file changed, 1 deletion(-)
drivers/memory/tegra/tegra124.c +0 -0
index 493b5dc3a4b3..0cede24479bf 100644

drivers/memory/tegra/tegra124.c static const struct tegra_smmu_swgroup tegra124_swgroups[] = { · line 962

Quoted 7 lines
drivers/memory/tegra/tegra124.c +0 -1
@@ -957,7 +957,6 @@ static const struct tegra_smmu_swgroup tegra124_swgroups[] = {
 static const unsigned int tegra124_group_drm[] = {
 	TEGRA_SWGROUP_DC,
 	TEGRA_SWGROUP_DCB,
-	TEGRA_SWGROUP_GPU,
 	TEGRA_SWGROUP_VIC,
 };
 

Technically a stable tag is needed for this patch, but I guess the bot will recognize that this patch is useful for older kernels.

Otherwise looks good!

maintainer Applied
#2 lore raw
In reply to Thierry Reding
Quoted 12 lines · Thierry Reding

From: Thierry Reding <[email protected]>

Commit 63a613fdb16c ("memory: tegra: Add gr2d and gr3d to DRM IOMMU group") added the GPU to the DRM IOMMU group, which doesn't make any sense. This causes problems when Nouveau tries to attach to the SMMU and causes it to fall back to using the DMA API.

Remove the GPU from the DRM groups to restore the old behaviour. The GPU should always have its own IOMMU domain to make sure it can map buffers into contiguous chunks (for big page support) without getting in the way of mappings from the DRM group.

Quoted 5 lines
Fixes 63a613fdb16c ("memory: tegra: Add gr2d and gr3d to DRM IOMMU group")
---
 drivers/memory/tegra/tegra124.c | 1 -

Thanks, applied.

Best regards,
Krzysztof