From patchwork Tue Apr 12 11:15:58 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anatolij Gustschin X-Patchwork-Id: 6390 Return-path: Envelope-to: mchehab@pedra Delivery-date: Tue, 12 Apr 2011 08:17:51 -0300 Received: from mchehab by pedra with local (Exim 4.72) (envelope-from ) id 1Q9bbS-0001YY-Ke for mchehab@pedra; Tue, 12 Apr 2011 08:17:50 -0300 Received: from casper.infradead.org [85.118.1.10] by pedra with IMAP (fetchmail-6.3.17) for (single-drop); Tue, 12 Apr 2011 08:17:50 -0300 (BRT) Received: from vger.kernel.org ([209.132.180.67]) by casper.infradead.org with esmtp (Exim 4.72 #1 (Red Hat Linux)) id 1Q9baK-0002uI-7E; Tue, 12 Apr 2011 11:16:40 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753144Ab1DLLQi (ORCPT + 1 other); Tue, 12 Apr 2011 07:16:38 -0400 Received: from mail-out.m-online.net ([212.18.0.10]:57872 "EHLO mail-out.m-online.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752850Ab1DLLQh (ORCPT ); Tue, 12 Apr 2011 07:16:37 -0400 Received: from frontend1.mail.m-online.net (frontend1.mail.intern.m-online.net [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id C6F151824451; Tue, 12 Apr 2011 13:16:35 +0200 (CEST) X-Auth-Info: IAuz/756XSMdRi4dCab9L/PJ41IVZFTbuCOol1u60aE= Received: from localhost (p4FDE6ED5.dip.t-dialin.net [79.222.110.213]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA id 03A181C000AD; Tue, 12 Apr 2011 13:16:35 +0200 (CEST) From: Anatolij Gustschin To: linux-media@vger.kernel.org Cc: Mauro Carvalho Chehab , Detlev Zundel , Anatolij Gustschin Subject: [PATCH] media: fsl_viu: fix bug in streamon routine Date: Tue, 12 Apr 2011 13:15:58 +0200 Message-Id: <1302606958-9301-1-git-send-email-agust@denx.de> X-Mailer: git-send-email 1.7.1 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Sender: Currently video capturing using streaming I/O method doesn't work if capturing to overlay buffer took place before. When enabling the stream we have to check the overlay enable driver flag and reset it so that the interrupt handler won't execute the overlay interrupt path after enabling DMA in streamon routine. Otherwise the capture interrupt won't be handled correctly causing non working VIDIOC_DQBUF ioctl. Signed-off-by: Anatolij Gustschin --- drivers/media/video/fsl-viu.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/drivers/media/video/fsl-viu.c b/drivers/media/video/fsl-viu.c index 031af16..4b2bba8 100644 --- a/drivers/media/video/fsl-viu.c +++ b/drivers/media/video/fsl-viu.c @@ -911,12 +911,16 @@ static int vidioc_dqbuf(struct file *file, void *priv, struct v4l2_buffer *p) static int vidioc_streamon(struct file *file, void *priv, enum v4l2_buf_type i) { struct viu_fh *fh = priv; + struct viu_dev *dev = fh->dev; if (fh->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) return -EINVAL; if (fh->type != i) return -EINVAL; + if (dev->ovenable) + dev->ovenable = 0; + viu_start_dma(fh->dev); return videobuf_streamon(&fh->vb_vidq);