From patchwork Fri Nov 28 11:14:01 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ajay Kumar X-Patchwork-Id: 5402911 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 096629F1C5 for ; Fri, 28 Nov 2014 11:21:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 31E492012B for ; Fri, 28 Nov 2014 11:21:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 38C7020123 for ; Fri, 28 Nov 2014 11:21:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751151AbaK1LVF (ORCPT ); Fri, 28 Nov 2014 06:21:05 -0500 Received: from mailout4.samsung.com ([203.254.224.34]:38191 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751134AbaK1LVE (ORCPT ); Fri, 28 Nov 2014 06:21:04 -0500 Received: from epcpsbgr1.samsung.com (u141.gpu120.samsung.co.kr [203.254.230.141]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NFQ00MPSY72S810@mailout4.samsung.com>; Fri, 28 Nov 2014 20:21:02 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [172.20.52.125]) by epcpsbgr1.samsung.com (EPCPMTA) with SMTP id D4.21.17016.E9A58745; Fri, 28 Nov 2014 20:21:02 +0900 (KST) X-AuditID: cbfee68d-f79296d000004278-f4-54785a9ef0e0 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id BE.D4.09430.D9A58745; Fri, 28 Nov 2014 20:21:02 +0900 (KST) Received: from chromebld-server.sisodomain.com ([107.108.73.106]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0NFQ00DFCY5T8B40@mmp1.samsung.com>; Fri, 28 Nov 2014 20:21:01 +0900 (KST) From: Ajay Kumar To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-samsung-soc@vger.kernel.org, inki.dae@samsung.com Cc: jy0922.shim@samsung.com, jg1.han@samsung.com, seanpaul@google.com, ajaynumb@gmail.com, bhushan.r@samsung.com, prashanth.g@samsung.com, Ajay Kumar Subject: [PATCH 2/2] drm/exynos: fimd: check error status for drm_iommu_attach_device Date: Fri, 28 Nov 2014 16:44:01 +0530 Message-id: <1417173241-27802-2-git-send-email-ajaykumar.rs@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1417173241-27802-1-git-send-email-ajaykumar.rs@samsung.com> References: <1417173241-27802-1-git-send-email-ajaykumar.rs@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrLLMWRmVeSWpSXmKPExsWyRsSkVndeVEWIwY02XosD7w+yWGx4s5DZ YtnafywW84+cY7W48vU9m8Wk+xNYLC4vvMRq8eLeRRaLGef3MVmsOryB3WLuwVwHbo+ds+6y eyzYVOpxv/s4k0ffllWMHp83yQWwRnHZpKTmZJalFunbJXBlPHh3laVgDm/Fxt61rA2M/7m6 GDk5JARMJF6dWs4EYYtJXLi3nq2LkYtDSGApo8T8VRuZYYp2XJoOlVjEKHHn5y5GCGcCk8Tj N0vB2tkEtCW2Tb/JAmKLCFRJXF31GKyDWWALo8STjrVgRcIC4RLnf/5nBbFZBFQlTl/qA7N5 BTwkHp08zN7FyAG0TkFiziQbEJNTwFPic1cZSIUQUMW746tYQUZKCGxjl7j47h8bxBgBiW+T D7FAtMpKbDoAdbSkxMEVN1gmMAovYGRYxSiaWpBcUJyUXmSoV5yYW1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bxeqvL ky0ObqJlU8QtJ/jZf5/222BCmYyBzxbbPZ9dbt9o1IxaxO2cbTnr+8ZOXe+f969dSypd85Jn NrvTNObOmhvLIvba5R8On3SqcckVKY6tfv4cz57umfh90TkXocTYwAOz73AwiRz1zVgm2fM1 XYmlOCPRUIu5qDgRAODkCXvKAgAA DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP check error status for drm_iommu_attach_device() and make sure it propagates till the caller. Signed-off-by: Ajay Kumar --- drivers/gpu/drm/exynos/exynos_drm_fimd.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c index 122c851..528420c 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c @@ -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);