From: Ajay Kumar <ajaykumar.rs@samsung.com>
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 <ajaykumar.rs@samsung.com>
Subject: [PATCH 2/2] drm/exynos: fimd: check error status for drm_iommu_attach_device
Date: Fri, 28 Nov 2014 16:44:01 +0530 [thread overview]
Message-ID: <1417173241-27802-2-git-send-email-ajaykumar.rs@samsung.com> (raw)
In-Reply-To: <1417173241-27802-1-git-send-email-ajaykumar.rs@samsung.com>
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(-)
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);
--
1.7.9.5
next prev parent reply other threads:[~2014-11-28 11:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-28 11:14 [PATCH 1/2] drm/exynos: fimd: Remove drm_dev pointer from fimd_context Ajay Kumar
2014-11-28 11:14 ` Ajay Kumar [this message]
-- strict thread matches above, loose matches on Subject: below --
2014-12-07 12:04 [PATCH 1/2] drm/exynos: fimd: Remove drm_dev and pipe members " Ajay Kumar
2014-12-07 12:04 ` [PATCH 2/2] drm/exynos: fimd: check error status for drm_iommu_attach_device Ajay Kumar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1417173241-27802-2-git-send-email-ajaykumar.rs@samsung.com \
--to=ajaykumar.rs@samsung.com \
--cc=ajaynumb@gmail.com \
--cc=bhushan.r@samsung.com \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=inki.dae@samsung.com \
--cc=jg1.han@samsung.com \
--cc=jy0922.shim@samsung.com \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=prashanth.g@samsung.com \
--cc=seanpaul@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).