Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

gpu: host1x: Detach Host1x from IOMMU DMA domain on arm32

Host1x is getting attached to an implicit IOMMU DMA domain if
CONFIG_ARM_DMA_USE_IOMMU=y. Since Host1x driver manages IOMMU by
itself, Host1x device must be detached from the implicit domain using
arch-specific IOMMU-API.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>

authored by

Dmitry Osipenko and committed by
Thierry Reding
e31c8ea5 50bac83c

+12 -1
+12 -1
drivers/gpu/host1x/dev.c
··· 29 29 #include <trace/events/host1x.h> 30 30 #undef CREATE_TRACE_POINTS 31 31 32 + #if IS_ENABLED(CONFIG_ARM_DMA_USE_IOMMU) 33 + #include <asm/dma-iommu.h> 34 + #endif 35 + 32 36 #include "bus.h" 33 37 #include "channel.h" 34 38 #include "debug.h" ··· 221 217 dev_err(&pdev->dev, "failed to get reset: %d\n", err); 222 218 return err; 223 219 } 224 - 220 + #if IS_ENABLED(CONFIG_ARM_DMA_USE_IOMMU) 221 + if (host->dev->archdata.mapping) { 222 + struct dma_iommu_mapping *mapping = 223 + to_dma_iommu_mapping(host->dev); 224 + arm_iommu_detach_device(host->dev); 225 + arm_iommu_release_mapping(mapping); 226 + } 227 + #endif 225 228 if (IS_ENABLED(CONFIG_TEGRA_HOST1X_FIREWALL)) 226 229 goto skip_iommu; 227 230