From: g.liakhovetski@gmx.de (Guennadi Liakhovetski)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/4] mx2_camera: implement forced termination of active buffer for mx25
Date: Fri, 27 Aug 2010 11:07:31 +0200 (CEST) [thread overview]
Message-ID: <Pine.LNX.4.64.1008271054060.28043@axis700.grange> (raw)
In-Reply-To: <967af81dac1c4c7627b18b5eec23a258ac7d9cd2.1280229966.git.baruch@tkos.co.il>
Hi Baruch
On Tue, 27 Jul 2010, Baruch Siach wrote:
> This allows userspace to terminate a capture without waiting for the current
> frame to complete.
This is an improvement, not a fix, right? Without this patch the
termination just have to wait a couple of ms longer? so, it is ok to
schedule it for 2.6.37?
Thanks
Guennadi
>
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> ---
> drivers/media/video/mx2_camera.c | 20 ++++++++++++++++----
> 1 files changed, 16 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/media/video/mx2_camera.c b/drivers/media/video/mx2_camera.c
> index d327d11..396542b 100644
> --- a/drivers/media/video/mx2_camera.c
> +++ b/drivers/media/video/mx2_camera.c
> @@ -648,15 +648,27 @@ static void mx2_videobuf_release(struct videobuf_queue *vq,
> * Terminate only queued but inactive buffers. Active buffers are
> * released when they become inactive after videobuf_waiton().
> *
> - * FIXME: implement forced termination of active buffers, so that the
> - * user won't get stuck in an uninterruptible state. This requires a
> - * specific handling for each of the three DMA types that this driver
> - * supports.
> + * FIXME: implement forced termination of active buffers for mx27 and
> + * mx27 eMMA, so that the user won't get stuck in an uninterruptible
> + * state. This requires a specific handling for each of the these DMA
> + * types.
> */
> spin_lock_irqsave(&pcdev->lock, flags);
> if (vb->state == VIDEOBUF_QUEUED) {
> list_del(&vb->queue);
> vb->state = VIDEOBUF_ERROR;
> + } else if (cpu_is_mx25() && vb->state == VIDEOBUF_ACTIVE) {
> + if (pcdev->fb1_active == buf) {
> + pcdev->csicr1 &= ~CSICR1_FB1_DMA_INTEN;
> + writel(0, pcdev->base_csi + CSIDMASA_FB1);
> + pcdev->fb1_active = NULL;
> + } else if (pcdev->fb2_active == buf) {
> + pcdev->csicr1 &= ~CSICR1_FB2_DMA_INTEN;
> + writel(0, pcdev->base_csi + CSIDMASA_FB2);
> + pcdev->fb2_active = NULL;
> + }
> + writel(pcdev->csicr1, pcdev->base_csi + CSICR1);
> + vb->state = VIDEOBUF_ERROR;
> }
> spin_unlock_irqrestore(&pcdev->lock, flags);
>
> --
> 1.7.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
next prev parent reply other threads:[~2010-08-27 9:07 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-27 12:06 [PATCH 0/4] mx2_camera: mx25 fixes and enhancements Baruch Siach
2010-07-27 12:06 ` [PATCH 1/4] mx2_camera: fix a race causing NULL dereference Baruch Siach
2010-07-27 12:06 ` [PATCH 2/4] mx2_camera: return IRQ_NONE when doing nothing Baruch Siach
2010-07-28 6:53 ` Sascha Hauer
2010-07-28 7:27 ` Russell King - ARM Linux
2010-07-28 11:25 ` Guennadi Liakhovetski
2010-08-09 11:46 ` Baruch Siach
2010-07-27 12:06 ` [PATCH 3/4] mx2_camera: fix comment typo Baruch Siach
2010-07-27 12:06 ` [PATCH 4/4] mx2_camera: implement forced termination of active buffer for mx25 Baruch Siach
2010-08-27 9:07 ` Guennadi Liakhovetski [this message]
2010-08-29 7:56 ` Baruch Siach
2010-08-23 4:11 ` [PATCH 0/4] mx2_camera: mx25 fixes and enhancements Baruch Siach
2010-08-23 22:05 ` Guennadi Liakhovetski
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=Pine.LNX.4.64.1008271054060.28043@axis700.grange \
--to=g.liakhovetski@gmx.de \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox