Skip to contentSkip to conversation

drm/mediatek: Do not select IOMMU_DMA

PATCH New Thierry Reding 1 participant 1 message Jun 3, 2016

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

PATCH 1/1 drm/mediatek: Do not select IOMMU_DMA

From: Thierry Reding <[email protected]>

The IOMMU_DMA symbol depends on IOMMU_API, but DRM_MEDIATEK itself does not have a dependency on that symbol.

Furthermore the driver doesn't use any of the code enabled by IOMMU_DMA and the only IOMMU API call that it uses, iommu_present(), has a dummy implementation if IOMMU_API isn't selected. Effectively there really is no build time dependency on the IOMMU API.

Because of all of the above, the dependency on IOMMU_DMA or IOMMU_API doesn't belong in the Mediatek DRM driver, but is really a matter of platform integration. A default configuration should be enabling IOMMU support if the driver should take advantage of it.

Note that the driver currently defers probe indefinitely if no IOMMU is registered on the parent bus. There's really no reason for it to do that since the driver exclusively uses the DMA API to allocate and map memory and should therefore work even if no IOMMU is registered and for example the contiguous memory allocator is enabled instead.

---
 drivers/gpu/drm/mediatek/Kconfig | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/mediatek/Kconfig +0 -1
index eeefc971801a..9eefecedc3da 100644
@@ -6,7 +6,6 @@ config DRM_MEDIATEK
 	select DRM_KMS_HELPER
 	select DRM_MIPI_DSI
 	select DRM_PANEL
-	select IOMMU_DMA
 	select MEMORY
 	select MTK_SMI
 	help
Signature · 6 lines
2.8.3

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel