host1x_client_iommu_attach currently detaches a possible ARM DMA mapping on the device, since it would get in the way of the shared domain TegraDRM wants.
We are about to enable default domain based DMA domains for Host1x and TegraDRM devices. These will take the same path as on 64-bit ARM, but we need to avoid trying to detach the now perfectly functional mapping on the device, so get rid of that code. Strictly speaking, the code removed here would not be harmful but would cause WARNs to happen. Signed-off-by: Mikko Perttunen <[email protected]> --- drivers/gpu/drm/tegra/drm.c | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/drivers/gpu/drm/tegra/drm.c b/drivers/gpu/drm/tegra/drm.c index dd6c564ff408..39a271241cf0 100644 --- a/drivers/gpu/drm/tegra/drm.c +++ b/drivers/gpu/drm/tegra/drm.c @@ -25,10 +25,6 @@ #include <drm/drm_print.h> #include <drm/drm_vblank.h> -#if IS_ENABLED(CONFIG_ARM_DMA_USE_IOMMU) -#include <asm/dma-iommu.h> -#endif - #include "dc.h" #include "drm.h" #include "gem.h" @@ -947,17 +943,6 @@ int host1x_client_iommu_attach(struct host1x_client *client) struct iommu_group *group = NULL; int err; -#if IS_ENABLED(CONFIG_ARM_DMA_USE_IOMMU) - if (client->dev->archdata.mapping) { - struct dma_iommu_mapping *mapping = - to_dma_iommu_mapping(client->dev); - arm_iommu_detach_device(client->dev); - arm_iommu_release_mapping(mapping); - - domain = iommu_get_domain_for_dev(client->dev); - } -#endif - /* * If the host1x client is already attached to an IOMMU domain that is * not the shared IOMMU domain, don't try to attach it to a different -- 2.55.0
