From patchwork Fri Dec 17 09:40:50 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anatolij Gustschin X-Patchwork-Id: 5118 Return-path: Envelope-to: mchehab@gaivota Delivery-date: Fri, 17 Dec 2010 07:42:17 -0200 Received: from mchehab by gaivota with local (Exim 4.72) (envelope-from ) id 1PTWpN-00019X-0i for mchehab@gaivota; Fri, 17 Dec 2010 07:42:17 -0200 Received: from casper.infradead.org [85.118.1.10] by gaivota with IMAP (fetchmail-6.3.17) for (single-drop); Fri, 17 Dec 2010 07:42:17 -0200 (BRST) Received: from vger.kernel.org ([209.132.180.67]) by casper.infradead.org with esmtp (Exim 4.72 #1 (Red Hat Linux)) id 1PTWnv-00074W-NI; Fri, 17 Dec 2010 09:40:48 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752055Ab0LQJkl (ORCPT + 1 other); Fri, 17 Dec 2010 04:40:41 -0500 Received: from mail-out.m-online.net ([212.18.0.9]:42490 "EHLO mail-out.m-online.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751842Ab0LQJkk (ORCPT ); Fri, 17 Dec 2010 04:40:40 -0500 Received: from frontend1.mail.m-online.net (unknown [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id E034E1C088BE; Fri, 17 Dec 2010 10:40:38 +0100 (CET) X-Auth-Info: pee+p1Jr6PLLGeVdyLOlvJpmvF0Ig6UwXvk7JosqKdQ= Received: from localhost (p4FE3F269.dip.t-dialin.net [79.227.242.105]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA id B59521C00194; Fri, 17 Dec 2010 10:40:38 +0100 (CET) From: Anatolij Gustschin To: linux-media@vger.kernel.org Cc: Mauro Carvalho Chehab , Detlev Zundel Subject: [PATCH] media: fsl-viu: fix support for streaming with mmap method Date: Fri, 17 Dec 2010 10:40:50 +0100 Message-Id: <1292578850-7392-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: Mauro Carvalho Chehab Streaming using mmap didn't work in the VIU driver. We need to start/stop DMA in streamon/streamoff and free the buffers on release. Add appropriate driver extension now. Signed-off-by: Anatolij Gustschin --- drivers/media/video/fsl-viu.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/drivers/media/video/fsl-viu.c b/drivers/media/video/fsl-viu.c index c9eb161..483a5ed 100644 --- a/drivers/media/video/fsl-viu.c +++ b/drivers/media/video/fsl-viu.c @@ -917,6 +917,8 @@ static int vidioc_streamon(struct file *file, void *priv, enum v4l2_buf_type i) if (fh->type != i) return -EINVAL; + viu_start_dma(fh->dev); + return videobuf_streamon(&fh->vb_vidq); } @@ -929,6 +931,8 @@ static int vidioc_streamoff(struct file *file, void *priv, enum v4l2_buf_type i) if (fh->type != i) return -EINVAL; + viu_stop_dma(fh->dev); + return videobuf_streamoff(&fh->vb_vidq); } @@ -1350,6 +1354,7 @@ static int viu_release(struct file *file) viu_stop_dma(dev); videobuf_stop(&fh->vb_vidq); + videobuf_mmap_free(&fh->vb_vidq); kfree(fh);