From patchwork Tue Aug 14 15:34:55 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Stanislawski X-Patchwork-Id: 1323681 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork2.kernel.org (Postfix) with ESMTP id 2C82BDF266 for ; Tue, 14 Aug 2012 21:37:34 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 172B19EB0F for ; Tue, 14 Aug 2012 14:37:34 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mailout1.samsung.com (mailout1.samsung.com [203.254.224.24]) by gabe.freedesktop.org (Postfix) with ESMTP id E36709E797 for ; Tue, 14 Aug 2012 08:38:24 -0700 (PDT) Received: from epcpsbgm2.samsung.com (mailout1.samsung.com [203.254.224.24]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0M8R0051T4RRDSF0@mailout1.samsung.com> for dri-devel@lists.freedesktop.org; Wed, 15 Aug 2012 00:38:24 +0900 (KST) X-AuditID: cbfee61b-b7faf6d00000476a-60-502a70ef49b5 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 7F.2A.18282.FE07A205; Wed, 15 Aug 2012 00:38:24 +0900 (KST) Received: from mcdsrvbld02.digital.local ([106.116.37.23]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0M8R004J44MBC810@mmp1.samsung.com> for dri-devel@lists.freedesktop.org; Wed, 15 Aug 2012 00:38:23 +0900 (KST) From: Tomasz Stanislawski To: linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: [PATCHv8 25/26] v4l: s5p-tv: mixer: support for dmabuf exporting Date: Tue, 14 Aug 2012 17:34:55 +0200 Message-id: <1344958496-9373-26-git-send-email-t.stanislaws@samsung.com> X-Mailer: git-send-email 1.7.10 In-reply-to: <1344958496-9373-1-git-send-email-t.stanislaws@samsung.com> References: <1344958496-9373-1-git-send-email-t.stanislaws@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrEJMWRmVeSWpSXmKPExsVy+t9jAd0PBVoBBsdXsVhc+fqezYHR4373 caYAxigum5TUnMyy1CJ9uwSujMttU1kK2rkrPm1+zN7AuImzi5GDQ0LARGJfp3YXIyeQKSZx 4d56ti5GLg4hgUWMEm3dHawQzjomiXNPv7CDVLEBNRxb8pkRxBYRcJA4fXcWM0gRs8AhZon9 va/BioQFPCXOndjBCmKzCKhKXFt8mxnE5hXwkJi29wkTxDp5iaf3+9hAbE6g+MtN3YwgFwkJ uEss/Ok/gZF3ASPDKkbR1ILkguKk9FwjveLE3OLSvHS95PzcTYxgnz+T3sG4qsHiEKMAB6MS D29homaAEGtiWXFl7iFGCQ5mJRHeoiCtACHelMTKqtSi/Pii0pzU4kOM0hwsSuK8Jt5f/YUE 0hNLUrNTUwtSi2CyTBycUg2MYl9W2O8u2lhbxNKbWhmb+E8hje/BE3Znh7z961/dDXmxbfZl a5at6f0xc9Kdg+/e2J4THN/C/KcimCNPUMr7wrbUr4d+/Z7N43tm188XX6ulK9cUM1/c/f60 gif/c4NXlzWfJc78fPivX1O7hKNA6u0LlxKY0jUkL9Yv2LCjQ+WXiEy12fbfSizFGYmGWsxF xYkAfbLa5vUBAAA= X-TM-AS-MML: No Cc: t.stanislaws@samsung.com, pawel@osciak.com, mchehab@redhat.com, daniel.vetter@ffwll.ch, subashrp@gmail.com, linaro-mm-sig@lists.linaro.org, kyungmin.park@samsung.com, laurent.pinchart@ideasonboard.com, s.nawrocki@samsung.com, airlied@redhat.com, remi@remlab.net, g.liakhovetski@gmx.de, m.szyprowski@samsung.com X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org This patch enhances s5p-tv with support for DMABUF exporting via VIDIOC_EXPBUF ioctl. Signed-off-by: Tomasz Stanislawski Signed-off-by: Kyungmin Park --- drivers/media/video/s5p-tv/mixer_video.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/media/video/s5p-tv/mixer_video.c b/drivers/media/video/s5p-tv/mixer_video.c index a7e3b53..e5ec6bd 100644 --- a/drivers/media/video/s5p-tv/mixer_video.c +++ b/drivers/media/video/s5p-tv/mixer_video.c @@ -697,6 +697,15 @@ 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, + struct v4l2_exportbuffer *eb) +{ + struct mxr_layer *layer = video_drvdata(file); + + mxr_dbg(layer->mdev, "%s:%d\n", __func__, __LINE__); + return vb2_expbuf(&layer->vb_queue, eb); +} + static int mxr_streamon(struct file *file, void *priv, enum v4l2_buf_type i) { struct mxr_layer *layer = video_drvdata(file); @@ -724,6 +733,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,