@@ -295,6 +295,8 @@ static int fimd_mgr_initialize(struct exynos_drm_manager *mgr,
{
struct fimd_context *ctx = mgr_to_fimd(mgr);
struct exynos_drm_private *priv;
+ int ret;
+
priv = drm_dev->dev_private;
mgr->drm_dev = drm_dev;
@@ -307,7 +309,12 @@ static int fimd_mgr_initialize(struct exynos_drm_manager *mgr,
* a PAGE FAULT when enabled. So clear any channel if enabled.
*/
fimd_clear_channel(mgr);
- drm_iommu_attach_device(mgr->drm_dev, ctx->dev);
+
+ ret = drm_iommu_attach_device(mgr->drm_dev, ctx->dev);
+ if (ret) {
+ DRM_ERROR("drm_iommu_attach failed.\n");
+ return ret;
+ }
}
return 0;
@@ -1075,8 +1082,14 @@ static int fimd_bind(struct device *dev, struct device *master, void *data)
{
struct fimd_context *ctx = dev_get_drvdata(dev);
struct drm_device *drm_dev = data;
+ int ret;
+
+ ret = fimd_mgr_initialize(&ctx->manager, drm_dev);
+ if (ret) {
+ DRM_ERROR("fimd_mgr_initialize failed.\n");
+ return ret;
+ }
- fimd_mgr_initialize(&ctx->manager, drm_dev);
exynos_drm_crtc_create(&ctx->manager);
if (ctx->display)
exynos_drm_create_enc_conn(drm_dev, ctx->display);
check error status for drm_iommu_attach_device() and make sure it propagates till the caller. Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com> --- drivers/gpu/drm/exynos/exynos_drm_fimd.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-)