From patchwork Tue Aug 14 15:34:54 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Stanislawski X-Patchwork-Id: 1323601 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 AE25DDF266 for ; Tue, 14 Aug 2012 21:35:57 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 868749EB0F for ; Tue, 14 Aug 2012 14:35:57 -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 969549EB49 for ; Tue, 14 Aug 2012 08:38:17 -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:16 +0900 (KST) X-AuditID: cbfee61b-b7faf6d00000476a-46-502a70e8fa83 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id BA.2A.18282.8E07A205; Wed, 15 Aug 2012 00:38:16 +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:16 +0900 (KST) From: Tomasz Stanislawski To: linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: [PATCHv8 24/26] v4l: s5p-fimc: support for dmabuf exporting Date: Tue, 14 Aug 2012 17:34:54 +0200 Message-id: <1344958496-9373-25-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+t9jAd0XBVoBBs/2G1tc+fqezYHR4373 caYAxigum5TUnMyy1CJ9uwSujL4TE9gKpnJV7N38kKmB8RhHFyMHh4SAicT+F0FdjJxAppjE hXvr2boYuTiEBBYxSnzs6ody1jFJ/Fyxgxmkig2o4diSz4wgtoiAg8Tpu7OYQYqYBQ4xS+zv fc0OkhAWcJGY+mY2mM0ioCox+89qFhCbV8BD4ui1flaIdfIST+/3sYHYnEDxl5u6GUEuEhJw l1j4038CI+8CRoZVjKKpBckFxUnpuUZ6xYm5xaV56XrJ+bmbGME+fya9g3FVg8UhRgEORiUe 3sJEzQAh1sSy4srcQ4wSHMxKIrxFQVoBQrwpiZVVqUX58UWlOanFhxilOViUxHlNvL/6Cwmk J5akZqemFqQWwWSZODilGhgnnFsgpmS6m0dAv7BXXZCP7/9HEcm9Fkfv2IS+OuW/ZVrYnxjR MxItajcvPFy1unAWz1uZ8JRlIvmbfk2Wz3l6WNbw0xEDTVOTlP+iG54c+z9dqf1V4E2LM1/8 3tzWN87dpyrwqONzTu7BLfPMtB/YezrwN56r5q8K42GyS/6jeDR0VsfRyfZKLMUZiYZazEXF iQAFnheF9QEAAA== 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-fimc with support for DMABUF exporting via VIDIOC_EXPBUF ioctl. Signed-off-by: Tomasz Stanislawski Signed-off-by: Kyungmin Park --- drivers/media/video/s5p-fimc/fimc-capture.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/media/video/s5p-fimc/fimc-capture.c b/drivers/media/video/s5p-fimc/fimc-capture.c index 3fcaf7d..bdd2de5 100644 --- a/drivers/media/video/s5p-fimc/fimc-capture.c +++ b/drivers/media/video/s5p-fimc/fimc-capture.c @@ -1129,6 +1129,14 @@ static int fimc_cap_qbuf(struct file *file, void *priv, return vb2_qbuf(&fimc->vid_cap.vbq, buf); } +static int fimc_cap_expbuf(struct file *file, void *priv, + struct v4l2_exportbuffer *eb) +{ + struct fimc_dev *fimc = video_drvdata(file); + + return vb2_expbuf(&fimc->vid_cap.vbq, eb); +} + static int fimc_cap_dqbuf(struct file *file, void *priv, struct v4l2_buffer *buf) { @@ -1253,6 +1261,7 @@ static const struct v4l2_ioctl_ops fimc_capture_ioctl_ops = { .vidioc_qbuf = fimc_cap_qbuf, .vidioc_dqbuf = fimc_cap_dqbuf, + .vidioc_expbuf = fimc_cap_expbuf, .vidioc_prepare_buf = fimc_cap_prepare_buf, .vidioc_create_bufs = fimc_cap_create_bufs,