public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: javier Martin <javier.martin@vista-silicon.com>
Cc: linux-media@vger.kernel.org
Subject: Re: omap3isp: iommu register problem.
Date: Mon, 11 Mar 2013 16:01:57 +0100	[thread overview]
Message-ID: <2233212.n9eBIia8fu@avalon> (raw)
In-Reply-To: <CACKLOr3ueVjDMf8zDmdJ=mYucczsDq4X2sbn0mRKz+hvZFTZZw@mail.gmail.com>

Hi Javier,

On Monday 11 March 2013 13:18:12 javier Martin wrote:
> I've just found the following thread where te problem is explained:
> http://lists.infradead.org/pipermail/linux-arm-kernel/2012-February/086364.h
> tml
> 
> The problem is related with the order iommu and omap3isp are probed
> when both are built-in. If I load omap3isp as a module the problem is
> gone.
> 
> However, according to the previous thread, omap3isp register should
> return error but an oops should not be generated. So I think there is
> a bug here anyway.

Does the following patch (compile-tested only) fix the issue ?

diff --git a/drivers/media/platform/omap3isp/isp.c b/drivers/media/platform/omap3isp/isp.c
index 6e5ad8e..4d889be 100644
--- a/drivers/media/platform/omap3isp/isp.c
+++ b/drivers/media/platform/omap3isp/isp.c
@@ -2123,6 +2123,7 @@ static int isp_probe(struct platform_device *pdev)
 	ret = iommu_attach_device(isp->domain, &pdev->dev);
 	if (ret) {
 		dev_err(&pdev->dev, "can't attach iommu device: %d\n", ret);
+		ret = -EPROBE_DEFER;
 		goto free_domain;
 	}
 
@@ -2161,6 +2162,7 @@ detach_dev:
 	iommu_detach_device(isp->domain, &pdev->dev);
 free_domain:
 	iommu_domain_free(isp->domain);
+	isp->domain = NULL;
 error_isp:
 	omap3isp_put(isp);
 error:

-- 
Regards,

Laurent Pinchart


  reply	other threads:[~2013-03-11 15:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-11 10:13 omap3isp: iommu register problem javier Martin
2013-03-11 12:18 ` javier Martin
2013-03-11 15:01   ` Laurent Pinchart [this message]
2013-03-11 15:28     ` javier Martin
2013-03-11 20:51       ` Laurent Pinchart
2013-03-12  7:52         ` javier Martin
2013-03-12 13:20           ` Laurent Pinchart

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=2233212.n9eBIia8fu@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=javier.martin@vista-silicon.com \
    --cc=linux-media@vger.kernel.org \
    /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