From patchwork Tue Oct 2 14:27:34 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Stanislawski X-Patchwork-Id: 1537611 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 136C1DFFAD for ; Tue, 2 Oct 2012 14:50:01 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E99C2A0ACF for ; Tue, 2 Oct 2012 07:50:00 -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 26C879F5EC for ; Tue, 2 Oct 2012 07:30:36 -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 <0MB900N1HSAZ2V40@mailout4.samsung.com> for dri-devel@lists.freedesktop.org; Tue, 02 Oct 2012 23:30:35 +0900 (KST) X-AuditID: cbfee61b-b7f2b6d000000f14-06-506afa8b65a8 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 09.C1.03860.B8AFA605; Tue, 02 Oct 2012 23:30:35 +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:35 +0900 (KST) From: Tomasz Stanislawski To: linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: [PATCHv9 23/25] v4l: s5p-fimc: support for dmabuf exporting Date: Tue, 02 Oct 2012 16:27:34 +0200 Message-id: <1349188056-4886-24-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+NgFnrIJMWRmVeSWpSXmKPExsVy+t9jQd3uX1kBBhumyltc+fqezYHR4373 caYAxigum5TUnMyy1CJ9uwSujC/dd9kKjnFV7Pw0h72B8RNHFyMHh4SAicTDg3VdjJxAppjE hXvr2boYuTiEBKYzSuyYtwnKWcck0dg6jxmkig2o4diSz4wgtoiAg8Tpu7OYQYqYBdYwS7xY eYMNZKqwgIvEyz4pkBoWAVWJS3efMoOEeQU8JL4d4YVYJi/x9H4fG4jNCRT++eQCC4gtJOAu sWd5E9sERt4FjAyrGEVTC5ILipPSc430ihNzi0vz0vWS83M3MYI9/kx6B+OqBotDjAIcjEo8 vLtOZgYIsSaWFVfmHmKU4GBWEuG1vp8VIMSbklhZlVqUH19UmpNafIhRmoNFSZy32SMlQEgg PbEkNTs1tSC1CCbLxMEp1cCYYvh6U9ROy3Axf3aJObMLn2x+xKx16kN6qECJ/Q2uO8sL9jtk 7mW4mf+e8YZ3j++u80vM85dPWaEeacp6SWLHjBear3ptJrMEX+bRSzxgV5Q/lelvoMiVx1cd dl3/tvJvwNq8P5Nu8sqlaTV+y3ByfhVq+7r26U/z1/3T3pyd96J/o5yLnGW7EktxRqKhFnNR cSIAFrczMPQBAAA= 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-fimc with support for DMABUF exporting via VIDIOC_EXPBUF ioctl. Signed-off-by: Tomasz Stanislawski Signed-off-by: Kyungmin Park CC: Sylwester Nawrocki --- 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,