Hi all, This patch set adds iommu support for exynos drm framework and also relevant drivers, fimd and hdmi.
Exynos4xxx SoC and later have some iommu hardware units for video codec, Camera, Post Processer(FIMC and GScaler), FIMD, HDMI, Graphics 2D and so on. In other words, each device has its own iommu hardware unit. So each device could have its own device address space. But in case of using DRM GEM and DMA Mapping API as allocator, there is one issue. the issue is that we can't know which device a gem buffer should be allocated for. So this patch set will use unified device address space. Simply saying, exynos drm-based all devices of using iommu have same device address space. For example, if user process requested gem allocation, exynos drm gem framework allocates desired physical memory region and maps it with unified iommu mapping table through DMA Mapping API call, dma_allc_attrs function. And this patch set is based on the following patch, "DMA-mapping & IOMMU - physically contiguous allocations" Marek posted before as RFC. For this, you can refer to below link, http://www.serverphorums.com/read.php?12,581741 As you know, RFC to the above patch is in progress so we have to wait for the patch to be merged to mainline. Thanks, Inki Dae Inki Dae (3): drm/exynos: add iommu support for exynos drm framework drm/exynos: add iommu support to fimd driver drm/exynos: add iommu support for hdmi driver drivers/gpu/drm/exynos/Kconfig | 6 + drivers/gpu/drm/exynos/Makefile | 1 + drivers/gpu/drm/exynos/exynos_drm_buf.c | 88 +++++------- drivers/gpu/drm/exynos/exynos_drm_dmabuf.c | 87 +++++------- drivers/gpu/drm/exynos/exynos_drm_drv.c | 23 +++- drivers/gpu/drm/exynos/exynos_drm_drv.h | 11 ++ drivers/gpu/drm/exynos/exynos_drm_fb.c | 52 ++++++- drivers/gpu/drm/exynos/exynos_drm_fimd.c | 9 +- drivers/gpu/drm/exynos/exynos_drm_gem.c | 210 +++-------------------------- drivers/gpu/drm/exynos/exynos_drm_gem.h | 1 + drivers/gpu/drm/exynos/exynos_drm_hdmi.c | 15 +++ drivers/gpu/drm/exynos/exynos_drm_hdmi.h | 1 + drivers/gpu/drm/exynos/exynos_drm_iommu.c | 156 +++++++++++++++++++++ drivers/gpu/drm/exynos/exynos_drm_iommu.h | 85 ++++++++++++ drivers/gpu/drm/exynos/exynos_hdmi.c | 21 +++ 15 files changed, 460 insertions(+), 306 deletions(-) create mode 100644 drivers/gpu/drm/exynos/exynos_drm_iommu.c create mode 100644 drivers/gpu/drm/exynos/exynos_drm_iommu.h -- 1.8.0.rc3.16.g8ead1bf