From: eric.nelson@boundarydevices.com (Eric Nelson)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/6] staging: drm/imx: Add i.MX IPUv3 crtc support
Date: Fri, 21 Sep 2012 09:24:19 -0700 [thread overview]
Message-ID: <505C94B3.3020308@boundarydevices.com> (raw)
In-Reply-To: <1348214872-28594-5-git-send-email-s.hauer@pengutronix.de>
Hi Sascha,
While testing against a video-enabled U-Boot on i.MX6, I found the issue
below.
On 09/21/2012 01:07 AM, Sascha Hauer wrote:
> This adds a i.MX51/53/6 IPU (Image Processing Unit) KMS driver. The
> driver has been tested on the i.MX51 babbage board, the i.MX53 LOCO
> board and the i.MX6q sabrelite board in different clone mode and dual
> head setups.
>
> Signed-off-by: Sascha Hauer<s.hauer@pengutronix.de>
> ---
> +++ b/drivers/staging/imx-drm/ipuv3-crtc.c
> @@ -0,0 +1,579 @@
> +/*
> + * i.MX IPUv3 Graphics driver
> + *
>
> <snip>
>
> +static int ipu_get_resources(struct ipu_crtc *ipu_crtc,
> + struct ipu_client_platformdata *pdata)
> +{
> +
> + ipu_crtc->irq = ipu_idmac_channel_irq(ipu, ipu_crtc->ipu_ch,
> + IPU_IRQ_EOF);
Interrupts get enabled here
> + ret = devm_request_irq(ipu_crtc->dev, ipu_crtc->irq, ipu_irq_handler, 0,
> + "imx_drm", ipu_crtc);
> + if (ret< 0) {
> + dev_err(ipu_crtc->dev, "irq request failed with %d.\n", ret);
> + goto err_out;
> + }
> +
>
> <snip>
>
> +
> +static int ipu_crtc_init(struct ipu_crtc *ipu_crtc,
> + struct ipu_client_platformdata *pdata)
> +{
> + int ret;
> +
> + ret = ipu_get_resources(ipu_crtc, pdata);
> + if (ret) {
> + dev_err(ipu_crtc->dev, "getting resources failed with %d.\n",
> + ret);
> + return ret;
> + }
> +
But ipu_crtc->imx_crtc gets initialized in this call, and
ipu_irq_handler() makes use of it.
The U-Boot code doesn't enable interrupts, so it's not acking
along the way, and leaves bits set in IPU1_INT_STAT_15.
I found that I can get around this in U-Boot by disabling the
LCD controller and acking all of the interrupts after disabling
the controller, but I haven't yet figured out where to tap into
cleanup_before_linux().
Regards,
Eric
WARNING: multiple messages have this Message-ID (diff)
From: Eric Nelson <eric.nelson@boundarydevices.com>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: David Jander <david.jander@protonic.nl>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
DRI Development <dri-devel@lists.freedesktop.org>,
Ahmed Ammar <aammar@genesi-usa.com>,
kernel@pengutronix.de, Matt Sealey <matt@genesi-usa.com>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 4/6] staging: drm/imx: Add i.MX IPUv3 crtc support
Date: Fri, 21 Sep 2012 09:24:19 -0700 [thread overview]
Message-ID: <505C94B3.3020308@boundarydevices.com> (raw)
In-Reply-To: <1348214872-28594-5-git-send-email-s.hauer@pengutronix.de>
Hi Sascha,
While testing against a video-enabled U-Boot on i.MX6, I found the issue
below.
On 09/21/2012 01:07 AM, Sascha Hauer wrote:
> This adds a i.MX51/53/6 IPU (Image Processing Unit) KMS driver. The
> driver has been tested on the i.MX51 babbage board, the i.MX53 LOCO
> board and the i.MX6q sabrelite board in different clone mode and dual
> head setups.
>
> Signed-off-by: Sascha Hauer<s.hauer@pengutronix.de>
> ---
> +++ b/drivers/staging/imx-drm/ipuv3-crtc.c
> @@ -0,0 +1,579 @@
> +/*
> + * i.MX IPUv3 Graphics driver
> + *
>
> <snip>
>
> +static int ipu_get_resources(struct ipu_crtc *ipu_crtc,
> + struct ipu_client_platformdata *pdata)
> +{
> +
> + ipu_crtc->irq = ipu_idmac_channel_irq(ipu, ipu_crtc->ipu_ch,
> + IPU_IRQ_EOF);
Interrupts get enabled here
> + ret = devm_request_irq(ipu_crtc->dev, ipu_crtc->irq, ipu_irq_handler, 0,
> + "imx_drm", ipu_crtc);
> + if (ret< 0) {
> + dev_err(ipu_crtc->dev, "irq request failed with %d.\n", ret);
> + goto err_out;
> + }
> +
>
> <snip>
>
> +
> +static int ipu_crtc_init(struct ipu_crtc *ipu_crtc,
> + struct ipu_client_platformdata *pdata)
> +{
> + int ret;
> +
> + ret = ipu_get_resources(ipu_crtc, pdata);
> + if (ret) {
> + dev_err(ipu_crtc->dev, "getting resources failed with %d.\n",
> + ret);
> + return ret;
> + }
> +
But ipu_crtc->imx_crtc gets initialized in this call, and
ipu_irq_handler() makes use of it.
The U-Boot code doesn't enable interrupts, so it's not acking
along the way, and leaves bits set in IPU1_INT_STAT_15.
I found that I can get around this in U-Boot by disabling the
LCD controller and acking all of the interrupts after disabling
the controller, but I haven't yet figured out where to tap into
cleanup_before_linux().
Regards,
Eric
next prev parent reply other threads:[~2012-09-21 16:24 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-21 8:07 [PATCH] Add i.MX IPUv3 base/KMS driver to the staging tree Sascha Hauer
2012-09-21 8:07 ` Sascha Hauer
2012-09-21 8:07 ` [PATCH 1/6] staging: drm/imx: Add i.MX drm core support Sascha Hauer
2012-09-21 8:07 ` Sascha Hauer
2012-09-21 8:07 ` [PATCH 2/6] staging: drm/imx: Add parallel display support Sascha Hauer
2012-09-21 8:07 ` Sascha Hauer
2012-09-21 8:07 ` [PATCH 3/6] staging: drm/imx: add i.MX IPUv3 base driver Sascha Hauer
2012-09-21 8:07 ` Sascha Hauer
2012-09-21 8:07 ` [PATCH 4/6] staging: drm/imx: Add i.MX IPUv3 crtc support Sascha Hauer
2012-09-21 8:07 ` Sascha Hauer
2012-09-21 16:24 ` Eric Nelson [this message]
2012-09-21 16:24 ` Eric Nelson
2012-09-22 10:17 ` Sascha Hauer
2012-09-22 10:17 ` Sascha Hauer
2012-09-22 17:52 ` Eric Nelson
2012-09-22 17:52 ` Eric Nelson
2012-09-21 8:07 ` [PATCH 5/6] staging: drm/imx: Add devicetree binding documentation Sascha Hauer
2012-09-21 8:07 ` Sascha Hauer
2012-09-21 8:07 ` [PATCH 6/6] staging: drm/imx: Add TODO Sascha Hauer
2012-09-21 8:07 ` Sascha Hauer
2012-09-21 16:18 ` [PATCH] Add i.MX IPUv3 base/KMS driver to the staging tree Greg Kroah-Hartman
2012-09-21 16:18 ` Greg Kroah-Hartman
-- strict thread matches above, loose matches on Subject: below --
2012-09-12 10:31 Sascha Hauer
2012-09-12 10:31 ` [PATCH 4/6] staging: drm/imx: Add i.MX IPUv3 crtc support Sascha Hauer
2012-09-12 10:31 ` Sascha Hauer
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=505C94B3.3020308@boundarydevices.com \
--to=eric.nelson@boundarydevices.com \
--cc=linux-arm-kernel@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.