From patchwork Sun Dec 7 12:04:35 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ajay Kumar X-Patchwork-Id: 5451321 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 7DBF19F4DC for ; Sun, 7 Dec 2014 12:11:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 54F6D20172 for ; Sun, 7 Dec 2014 12:11:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D3CFD2015A for ; Sun, 7 Dec 2014 12:11:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752227AbaLGMLS (ORCPT ); Sun, 7 Dec 2014 07:11:18 -0500 Received: from mailout2.samsung.com ([203.254.224.25]:51571 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752056AbaLGMLQ (ORCPT ); Sun, 7 Dec 2014 07:11:16 -0500 Received: from epcpsbgr5.samsung.com (u145.gpu120.samsung.co.kr [203.254.230.145]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NG7003CTOIQC280@mailout2.samsung.com>; Sun, 07 Dec 2014 21:11:14 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [172.20.52.124]) by epcpsbgr5.samsung.com (EPCPMTA) with SMTP id 13.EB.19034.2E344845; Sun, 07 Dec 2014 21:11:14 +0900 (KST) X-AuditID: cbfee691-f79b86d000004a5a-20-548443e2af8e Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id E5.92.09430.2E344845; Sun, 07 Dec 2014 21:11:14 +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 <0NG7003LKOIIDQ20@mmp1.samsung.com>; Sun, 07 Dec 2014 21:11:14 +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: Sun, 07 Dec 2014 17:34:35 +0530 Message-id: <1417953876-28266-2-git-send-email-ajaykumar.rs@samsung.com> X-Mailer: git-send-email 2.2.0 In-reply-to: <1417953876-28266-1-git-send-email-ajaykumar.rs@samsung.com> References: <1417953876-28266-1-git-send-email-ajaykumar.rs@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrHLMWRmVeSWpSXmKPExsWyRsSkRveRc0uIQf9KBYsD7w+yWGx4s5DZ YtnafywW84+cY7W48vU9m8Wk+xNYLC4vvMRq8eLeRRaLGef3MVmsOryB3WLuwVwHbo+ds+6y eyzYVOpxv/s4k0ffllWMHp83yQWwRnHZpKTmZJalFunbJXBlvJyxi6VgDm/FjGMzWBsY/3N1 MXJySAiYSLw8/5ERwhaTuHBvPVsXIxeHkMBSRomZB36zwhR9XrWdFSKxiFFiU9NzRghnApPE tTltbCBVbALaEtum32QBsUUEqiSurnoMNopZYAujxJOOtUwgCWGBcInzP/+DjWURUJU40tQG 1MDBwSvgIXH0UxzENjmJLbcesYPYnAKeEn/nvAazhYBK5kycxgwyU0JgG7vElFX72SHmCEh8 m3wIbI6EgKzEpgPMEHMkJQ6uuMEygVF4ASPDKkbR1ILkguKk9CJTveLE3OLSvHS95P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jbF amxYrz3/GbPM5c8BbMsXvPvKsy7INve76j4L7k+FGV9WMTw37DE6IPVQ5qBo7GkNiaq36zfn +G72KA2sjPcqqbt0mqMqdQ7fCqVvKb792Y3PzDPb5O7OVf/Qn/ktfnXTs6enV2uKa0vftTmi xFKckWioxVxUnAgAPAf7gMsCAAA= 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 157f4dd..a53d35b 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c @@ -294,6 +294,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; @@ -306,7 +308,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; @@ -1074,8 +1081,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);