From patchwork Tue Oct 2 14:27:35 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Stanislawski X-Patchwork-Id: 1537621 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 04E38DFFAD for ; Tue, 2 Oct 2012 14:50:56 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E0294A0ACD for ; Tue, 2 Oct 2012 07:50:55 -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 DD9B39F391 for ; Tue, 2 Oct 2012 07:30:42 -0700 (PDT) Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MB900EW3SB6IC00@mailout4.samsung.com> for dri-devel@lists.freedesktop.org; Tue, 02 Oct 2012 23:30:42 +0900 (KST) X-AuditID: cbfee61b-b7f2b6d000000f14-2f-506afa9205ca Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 02.D1.03860.29AFA605; Tue, 02 Oct 2012 23:30:42 +0900 (KST) Received: from mcdsrvbld02.digital.local ([106.116.37.23]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MB9005A7S65K790@mmp2.samsung.com> for dri-devel@lists.freedesktop.org; Tue, 02 Oct 2012 23:30:42 +0900 (KST) From: Tomasz Stanislawski To: linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: [PATCHv9 24/25] v4l: s5p-tv: mixer: support for dmabuf exporting Date: Tue, 02 Oct 2012 16:27:35 +0200 Message-id: <1349188056-4886-25-git-send-email-t.stanislaws@samsung.com> X-Mailer: git-send-email 1.7.10 In-reply-to: <1349188056-4886-1-git-send-email-t.stanislaws@samsung.com> References: <1349188056-4886-1-git-send-email-t.stanislaws@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrCJMWRmVeSWpSXmKPExsVy+t9jQd1Jv7ICDPrnCFpc+fqezYHR4373 caYAxigum5TUnMyy1CJ9uwSujF+HpzIVtHNXXLi8jrmBcRNnFyMnh4SAicTyva/ZIWwxiQv3 1rN1MXJxCAlMZ5Ro2fEIylnHJLFi+UdWkCo2oI5jSz4zgtgiAg4Sp+/OYgYpYhZYwyzxYuUN NpCEsICnRNPvDjCbRUBVYl7vGhYQm1fAQ+Li39tQ6+Qlnt7vA6vhBIr/fHIBrEZIwF1iz/Im tgmMvAsYGVYxiqYWJBcUJ6XnGukVJ+YWl+al6yXn525iBPv9mfQOxlUNFocYBTgYlXh4d53M DBBiTSwrrsw9xCjBwawkwmt9PytAiDclsbIqtSg/vqg0J7X4EKM0B4uSOG+zR0qAkEB6Yklq dmpqQWoRTJaJg1OqgZG5qGahAb+g8XTLZXc1VUR2fkl6rGWYdFLzV4eJUO5KxzADu2CVmBM7 tqdMsj3yhKnZpkv/XJjakqVbJ13UFf7CX/f2kaVaXaUXE8eKb2Wzy9keVe6zSIxYdTg1sunx kV3LN9lXOSSznFnOr7rDrHyp18dZSs8irFk99ux+a7v4VsBGMRNmLyWW4oxEQy3mouJEAMtr yg/3AQAA 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 --- 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 2c299db..d1641b6 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,