From patchwork Wed Oct 10 14:46:44 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Stanislawski X-Patchwork-Id: 1574671 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork1.kernel.org (Postfix) with ESMTP id 8BF963FE36 for ; Wed, 10 Oct 2012 15:23:51 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 630A8A0AB3 for ; Wed, 10 Oct 2012 08:23:51 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mailout4.samsung.com (mailout4.samsung.com [203.254.224.34]) by gabe.freedesktop.org (Postfix) with ESMTP id A0185A02B0 for ; Wed, 10 Oct 2012 08:03:54 -0700 (PDT) Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MBO00BIRN6IK980@mailout4.samsung.com> for dri-devel@lists.freedesktop.org; Thu, 11 Oct 2012 00:03:54 +0900 (KST) X-AuditID: cbfee61a-b7f726d000000ec7-57-50758e592693 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 32.6B.03783.95E85705; Thu, 11 Oct 2012 00:03:54 +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 <0MBO002YDME0EC70@mmp1.samsung.com> for dri-devel@lists.freedesktop.org; Thu, 11 Oct 2012 00:03:53 +0900 (KST) From: Tomasz Stanislawski To: linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: [PATCHv10 25/26] v4l: s5p-tv: mixer: support for dmabuf exporting Date: Wed, 10 Oct 2012 16:46:44 +0200 Message-id: <1349880405-26049-26-git-send-email-t.stanislaws@samsung.com> X-Mailer: git-send-email 1.7.10 In-reply-to: <1349880405-26049-1-git-send-email-t.stanislaws@samsung.com> References: <1349880405-26049-1-git-send-email-t.stanislaws@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrCJMWRmVeSWpSXmKPExsVy+t9jAd2ovtIAg52fWSyufH3P5sDocb/7 OFMAYxSXTUpqTmZZapG+XQJXxtbrs5kKTnBXbPz1hrWB8R1nFyMnh4SAicTHjlesELaYxIV7 69m6GLk4hAQWMUrMujCTEcJZxyQxe+YtsCo2oI5jSz4zgtgiAg4Sp+/OYgYpYhZYwyzxYuUN NpCEsICXxO62T2ANLAKqEgvmLGQGsXkFPCVu/d3OCLFOXuLp/T6wek6g+IV508FqhAQ8JP6v 38w0gZF3ASPDKkbR1ILkguKk9FxDveLE3OLSvHS95PzcTYxgvz+T2sG4ssHiEKMAB6MSD29G VEmAEGtiWXFl7iFGCQ5mJRFeU5/SACHelMTKqtSi/Pii0pzU4kOM0hwsSuK8zR4pAUIC6Ykl qdmpqQWpRTBZJg5OqQZG+a5rnZb2HsnLT/XEP52xaeePZpVy7Y9usWyfP0/WTb5msnhzuKFb bp3Vruiv5yaZ+fyfwf70UW1R1WKB9pjbBvH3LL9smp+h7erwUpdvQp3c3o9BWqdmJp/cx9Bj ffGjG/fGbPmGLSf1heyexMf+k+3WrZmt5FZT3q+1YEHnwk311x5K28gpsRRnJBpqMRcVJwIA MwfNXPcBAAA= Cc: t.stanislaws@samsung.com, s.nawrocki@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, zhangfei.gao@gmail.com, airlied@redhat.com, remi@remlab.net, 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 Acked-by: Hans Verkuil --- drivers/media/platform/s5p-tv/mixer_video.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/media/platform/s5p-tv/mixer_video.c b/drivers/media/platform/s5p-tv/mixer_video.c index 2421e527..5e3cdb2 100644 --- a/drivers/media/platform/s5p-tv/mixer_video.c +++ b/drivers/media/platform/s5p-tv/mixer_video.c @@ -698,6 +698,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); @@ -725,6 +734,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,