summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/exynos/exynos_mixer.c
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_mixer.c
parent3f46d807f861fb7304c9890fb091efb80161f2c7 (diff)
downloadblackbird-op-linux-fc2e013f78c42fdafcb48f4922c2ae6d2c8e7d09.tar.gz
blackbird-op-linux-fc2e013f78c42fdafcb48f4922c2ae6d2c8e7d09.zip
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_mixer.c')
-rw-r--r--drivers/gpu/drm/exynos/exynos_mixer.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c b/drivers/gpu/drm/exynos/exynos_mixer.c
index f57068781a37..cae98db33062 100644
--- a/drivers/gpu/drm/exynos/exynos_mixer.c
+++ b/drivers/gpu/drm/exynos/exynos_mixer.c
@@ -882,10 +882,12 @@ static int mixer_initialize(struct mixer_context *mixer_ctx,
}
}
- if (!is_drm_iommu_supported(mixer_ctx->drm_dev))
- return 0;
+ ret = drm_iommu_attach_device_if_possible(mixer_ctx->crtc, drm_dev,
+ mixer_ctx->dev);
+ if (ret)
+ priv->pipe--;
- return drm_iommu_attach_device(mixer_ctx->drm_dev, mixer_ctx->dev);
+ return ret;
}
static void mixer_ctx_remove(struct mixer_context *mixer_ctx)
OpenPOWER on IntegriCloud