Skip to content

Commit 0e1ff9f

Browse files
rmurphy-armgregkh
authored andcommitted
media: omap3isp: Handle ARM dma_iommu_mapping
commit 6bc076e upstream. It's no longer practical for the OMAP IOMMU driver to trick arm_setup_iommu_dma_ops() into ignoring its presence, so let's use the same tactic as other IOMMU API users on 32-bit ARM and explicitly kick the arch code's dma_iommu_mapping out of the way to avoid problems. Fixes: 4720287 ("iommu: Remove struct iommu_ops *iommu from arch_setup_dma_ops()") Cc: stable@vger.kernel.org Signed-off-by: Robin Murphy <robin.murphy@arm.com> Tested-by: Sicelo A. Mhlongo <absicsz@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent c0fbc0a commit 0e1ff9f

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

  • drivers/media/platform/ti/omap3isp

drivers/media/platform/ti/omap3isp/isp.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1961,6 +1961,13 @@ static int isp_attach_iommu(struct isp_device *isp)
19611961
struct dma_iommu_mapping *mapping;
19621962
int ret;
19631963

1964+
/* We always want to replace any default mapping from the arch code */
1965+
mapping = to_dma_iommu_mapping(isp->dev);
1966+
if (mapping) {
1967+
arm_iommu_detach_device(isp->dev);
1968+
arm_iommu_release_mapping(mapping);
1969+
}
1970+
19641971
/*
19651972
* Create the ARM mapping, used by the ARM DMA mapping core to allocate
19661973
* VAs. This will allocate a corresponding IOMMU domain.

0 commit comments

Comments
 (0)