summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/exynos/exynos_drm_iommu.h
diff options
context:
space:
mode:
authorHyungwon Hwang <human.hwang@samsung.com>2015-06-22 19:05:04 +0900
committerInki Dae <inki.dae@samsung.com>2015-06-22 19:05:46 +0900
commitfc2e013f78c42fdafcb48f4922c2ae6d2c8e7d09 (patch)
treee906df44bda58b6940586e75bce9eee97f258d8a /drivers/gpu/drm/exynos/exynos_drm_iommu.h
parent3f46d807f861fb7304c9890fb091efb80161f2c7 (diff)
drm/exynos: add drm_iommu_attach_device_if_possible()
Every CRTC drivers in Exynos DRM implements the code which checks whether IOMMU is supported or not, and if supported enable it. Making new helper for it generalize each CRTC drivers. Signed-off-by: Hyungwon Hwang <human.hwang@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
Diffstat (limited to 'drivers/gpu/drm/exynos/exynos_drm_iommu.h')
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_iommu.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_iommu.h b/drivers/gpu/drm/exynos/exynos_drm_iommu.h
index 35d25889b476..8341c7a475b4 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_iommu.h
+++ b/drivers/gpu/drm/exynos/exynos_drm_iommu.h
@@ -38,6 +38,10 @@ static inline bool is_drm_iommu_supported(struct drm_device *drm_dev)
#endif
}
+int drm_iommu_attach_device_if_possible(
+ struct exynos_drm_crtc *exynos_crtc, struct drm_device *drm_dev,
+ struct device *subdrv_dev);
+
#else
static inline int drm_create_iommu_mapping(struct drm_device *drm_dev)
@@ -65,5 +69,12 @@ static inline bool is_drm_iommu_supported(struct drm_device *drm_dev)
return false;
}
+static inline int drm_iommu_attach_device_if_possible(
+ struct exynos_drm_crtc *exynos_crtc, struct drm_device *drm_dev,
+ struct device *subdrv_dev)
+{
+ return 0;
+}
+
#endif
#endif