From patchwork Tue Aug 2 09:54:30 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 1028632 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p729sXYC001786 for ; Tue, 2 Aug 2011 09:54:34 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752848Ab1HBJyb (ORCPT ); Tue, 2 Aug 2011 05:54:31 -0400 Received: from mailout4.w1.samsung.com ([210.118.77.14]:24224 "EHLO mailout4.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752361Ab1HBJyb (ORCPT ); Tue, 2 Aug 2011 05:54:31 -0400 MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=UTF-8; format=flowed Received: from eu_spt1 ([210.118.77.14]) by mailout4.w1.samsung.com (Sun Java(tm) System Messaging Server 6.3-8.04 (built Jul 29 2009; 32bit)) with ESMTP id <0LPA003Y8OUUWB30@mailout4.w1.samsung.com> for linux-media@vger.kernel.org; Tue, 02 Aug 2011 10:54:30 +0100 (BST) Received: from [127.0.0.1] ([106.10.22.139]) by spt1.w1.samsung.com (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTPA id <0LPA00JD5OUSXO@spt1.w1.samsung.com> for linux-media@vger.kernel.org; Tue, 02 Aug 2011 10:54:29 +0100 (BST) Date: Tue, 02 Aug 2011 11:54:30 +0200 From: Marek Szyprowski Subject: [PATCH 6/6] v4l: s5p-tv: mixer: integrate with shrbuf In-reply-to: <4E37C7D7.40301@samsung.com> To: Marek Szyprowski Cc: linaro-mm-sig@lists.linaro.org, linux-media@vger.kernel.org, Tomasz Stanislawski , Kyungmin Park Message-id: <4E37C956.1080008@samsung.com> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.9.2.18) Gecko/20110616 Thunderbird/3.1.11 References: <4E37C7D7.40301@samsung.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Tue, 02 Aug 2011 09:54:34 +0000 (UTC) From: Tomasz Stanislawski Signed-off-by: Tomasz Stanislawski Signed-off-by: Kyungmin Park Signed-off-by: Marek Szyprowski --- drivers/media/video/s5p-tv/mixer_video.c | 11 ++++++++++- 1 files changed, 10 insertions(+), 1 deletions(-) { struct mxr_layer *layer = video_drvdata(file); @@ -618,6 +626,7 @@ static const struct v4l2_ioctl_ops mxr_ioctl_ops = { .vidioc_querybuf = mxr_querybuf, .vidioc_qbuf = mxr_qbuf, .vidioc_dqbuf = mxr_dqbuf, + .vidioc_expbuf = mxr_expbuf, /* Streaming control */ .vidioc_streamon = mxr_streamon, .vidioc_streamoff = mxr_streamoff, @@ -972,7 +981,7 @@ struct mxr_layer *mxr_base_layer_create(struct mxr_device *mdev, layer->vb_queue = (struct vb2_queue) { .type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE, - .io_modes = VB2_MMAP | VB2_USERPTR, + .io_modes = VB2_MMAP | VB2_USERPTR | VB2_SHRBUF, .drv_priv = layer, .buf_struct_size = sizeof(struct mxr_buffer), .ops = &mxr_video_qops, diff --git a/drivers/media/video/s5p-tv/mixer_video.c b/drivers/media/video/s5p-tv/mixer_video.c index 43ac22f..52cb51a 100644 --- a/drivers/media/video/s5p-tv/mixer_video.c +++ b/drivers/media/video/s5p-tv/mixer_video.c @@ -591,6 +591,14 @@ static int mxr_dqbuf(struct file *file, void *priv, struct v4l2_buffer *p) return vb2_dqbuf(&layer->vb_queue, p, file->f_flags & O_NONBLOCK); } +static int mxr_expbuf(struct file *file, void *priv, unsigned int offset) +{ + struct mxr_layer *layer = video_drvdata(file); + + mxr_dbg(layer->mdev, "%s:%d\n", __func__, __LINE__); + return vb2_expbuf(&layer->vb_queue, offset); +} + static int mxr_streamon(struct file *file, void *priv, enum v4l2_buf_type i)