#include <linux/dma-map-ops.h>
#include <linux/iommu.h>
#include <linux/platform_device.h>
#include <drm/drm_print.h>
#include <drm/exynos_drm.h>
#include "exynos_drm_drv.h"
#if defined(CONFIG_ARM_DMA_USE_IOMMU)
#include <asm/dma-iommu.h>
#else
#define arm_iommu_create_mapping(...) …
#define arm_iommu_attach_device(...) …
#define arm_iommu_release_mapping(...) …
#define arm_iommu_detach_device(...) …
#define to_dma_iommu_mapping(dev) …
#endif
#if !defined(CONFIG_IOMMU_DMA)
#define iommu_dma_init_domain …
#endif
#define EXYNOS_DEV_ADDR_START …
#define EXYNOS_DEV_ADDR_SIZE …
static int drm_iommu_attach_device(struct drm_device *drm_dev,
struct device *subdrv_dev, void **dma_priv)
{ … }
static void drm_iommu_detach_device(struct drm_device *drm_dev,
struct device *subdrv_dev, void **dma_priv)
{ … }
int exynos_drm_register_dma(struct drm_device *drm, struct device *dev,
void **dma_priv)
{ … }
void exynos_drm_unregister_dma(struct drm_device *drm, struct device *dev,
void **dma_priv)
{ … }
void exynos_drm_cleanup_dma(struct drm_device *drm)
{ … }