aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/exynos/exynos_drm_fimd.c
diff options
context:
space:
mode:
authorInki Dae <inki.dae@samsung.com>2012-10-19 04:16:36 -0400
committerInki Dae <daeinki@gmail.com>2012-11-29 06:30:35 -0500
commitbcc5cd1c5fad9b4471aafff0d74d9d0fcde1c27d (patch)
tree24bad8971cf6838748b3809b5ee058ca8dd9bc30 /drivers/gpu/drm/exynos/exynos_drm_fimd.c
parent0519f9a12d0113caab78980c48a7902d2bd40c2c (diff)
drm/exynos: add iommu support to fimd driver
The iommu will be enabled when fimd sub driver is probed and will be disabled when removed. Signed-off-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Diffstat (limited to 'drivers/gpu/drm/exynos/exynos_drm_fimd.c')
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_fimd.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
index dcf3504ebab7..ad04eddfa405 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
@@ -25,6 +25,7 @@
25#include "exynos_drm_drv.h" 25#include "exynos_drm_drv.h"
26#include "exynos_drm_fbdev.h" 26#include "exynos_drm_fbdev.h"
27#include "exynos_drm_crtc.h" 27#include "exynos_drm_crtc.h"
28#include "exynos_drm_iommu.h"
28 29
29/* 30/*
30 * FIMD is stand for Fully Interactive Mobile Display and 31 * FIMD is stand for Fully Interactive Mobile Display and
@@ -691,6 +692,10 @@ static int fimd_subdrv_probe(struct drm_device *drm_dev, struct device *dev)
691 */ 692 */
692 drm_dev->vblank_disable_allowed = 1; 693 drm_dev->vblank_disable_allowed = 1;
693 694
695 /* attach this sub driver to iommu mapping if supported. */
696 if (is_drm_iommu_supported(drm_dev))
697 drm_iommu_attach_device(drm_dev, dev);
698
694 return 0; 699 return 0;
695} 700}
696 701
@@ -698,7 +703,9 @@ static void fimd_subdrv_remove(struct drm_device *drm_dev, struct device *dev)
698{ 703{
699 DRM_DEBUG_KMS("%s\n", __FILE__); 704 DRM_DEBUG_KMS("%s\n", __FILE__);
700 705
701 /* TODO. */ 706 /* detach this sub driver from iommu mapping if supported. */
707 if (is_drm_iommu_supported(drm_dev))
708 drm_iommu_detach_device(drm_dev, dev);
702} 709}
703 710
704static int fimd_calc_clkdiv(struct fimd_context *ctx, 711static int fimd_calc_clkdiv(struct fimd_context *ctx,