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: 11944 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 5FC7E1A52FC for ; Tue, 2 Oct 2012 14:30:42 +0000 (UTC) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by fiordland.canonical.com (Postfix) with ESMTP id D628AA18672 for ; Tue, 2 Oct 2012 14:30:41 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id e10so14258231iej.11 for ; Tue, 02 Oct 2012 07:30:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:x-auditid :from:to:date:message-id:x-mailer:in-reply-to:references :x-brightmail-tracker:cc:subject:x-beenthere:x-mailman-version :precedence:list-id:list-unsubscribe:list-archive:list-post :list-help:list-subscribe:mime-version:content-type :content-transfer-encoding:sender:errors-to:x-gm-message-state; bh=7QRbq7Sji/+7ih6lLONdWLY1mah5lJBSw+RJVef/j5s=; b=FwBHt7HzIU9uzmjpS8AimfNdKNhrSW8ryLs1F0ZcVnpe8PmWboWL1bavK90UJPJW5s WdP3jbtVgSI0r/zCaZhgkzT+ADLXjvNuLeepAYGZ7+vSoCZhsrDJF/VdyIvOVDCRZOFF vRqYlHh/myYhW6KFayfRHlrgP5Yg/Z/QvxIP6FjQjgyfDQEKN5ZckEPaUSSWUGdtjWVH KJSzbK7W/iMVHw3YpXeR9zGoBTfmM/qOcd9zUsaYX7i4OF10rF+NwErvG3LqINpJR8Lw I8iz8+mVXpYmkPxAPNCktFGuS1ghdcHrawJZu+yUeQjsQXJ8+Tjq8NZCIsf77Jvgpmr/ YP+w== Received: by 10.50.184.129 with SMTP id eu1mr9100756igc.0.1349188241628; Tue, 02 Oct 2012 07:30:41 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.184.232 with SMTP id ex8csp85070igc; Tue, 2 Oct 2012 07:30:40 -0700 (PDT) Received: by 10.205.135.20 with SMTP id ie20mr6434848bkc.16.1349188240141; Tue, 02 Oct 2012 07:30:40 -0700 (PDT) Received: from mombin.canonical.com (mombin.canonical.com. [91.189.95.16]) by mx.google.com with ESMTP id gi9si1708686bkc.58.2012.10.02.07.30.38; Tue, 02 Oct 2012 07:30:40 -0700 (PDT) Received-SPF: neutral (google.com: 91.189.95.16 is neither permitted nor denied by best guess record for domain of linaro-mm-sig-bounces@lists.linaro.org) client-ip=91.189.95.16; Authentication-Results: mx.google.com; spf=neutral (google.com: 91.189.95.16 is neither permitted nor denied by best guess record for domain of linaro-mm-sig-bounces@lists.linaro.org) smtp.mail=linaro-mm-sig-bounces@lists.linaro.org Received: from localhost ([127.0.0.1] helo=mombin.canonical.com) by mombin.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1TJ3Ub-0005Hy-NG; Tue, 02 Oct 2012 14:30:37 +0000 Received: from mailout1.samsung.com ([203.254.224.24]) by mombin.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1TJ3Ua-0005Hh-Kh for linaro-mm-sig@lists.linaro.org; Tue, 02 Oct 2012 14:30:36 +0000 Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MB9005RJSAZHX10@mailout1.samsung.com> for linaro-mm-sig@lists.linaro.org; Tue, 02 Oct 2012 23:30:35 +0900 (KST) X-AuditID: cbfee61a-b7f726d000000ec7-36-506afa8b9bf4 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 42.CE.03783.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 linaro-mm-sig@lists.linaro.org; Tue, 02 Oct 2012 23:30:35 +0900 (KST) From: Tomasz Stanislawski To: linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org 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+NgFnrEJMWRmVeSWpSXmKPExsVy+t9jQd3uX1kBBvsmy1t8ufKQyYHR4/a/ x8wBjFFcNimpOZllqUX6dglcGV+677IVHOOq2PlpDnsD4yeOLkZODgkBE4mGOweZIGwxiQv3 1rN1MXJxCAlMZ5T4+LqXEcJZyySxuG89M0gVG1DHsSWfGUFsEQEHidN3ZzGDFDELrGGWeLHy BlA7B4ewgIvEyz4pkBoWAVWJS3efMoOEeQU8JL4d4YVYJi/x9H4fG4jNCRT++eQCC4gtJOAu sWd5E9sERt4FjAyrGEVTC5ILipPScw31ihNzi0vz0vWS83M3MYJ9/kxqB+PKBotDjAIcjEo8 vDtPZgYIsSaWFVfmHmKU4GBWEuG1vp8VIMSbklhZlVqUH19UmpNafIhRmoNFSZy32SMlQEgg PbEkNTs1tSC1CCbLxMEp1cB40KNzTrOwk05si8kf179xMlttmw51rjnUfSi4yzqh0I95R/mN yHKzpe2nft9e0nfh2H0ee5u5Xw88n/e5Ue+hObeB1f/bTTET00IFeOLurBaxEz7/ebHb75jn cp/Pf+9tNyzP9+sRnaVk0rjbV9NG8LRYo/7/u/v2qXC88rCufT1Bw+2A+HslluKMREMt5qLi RAAAVYlq9QEAAA== Cc: k.debski@samsung.com, s.nawrocki@samsung.com, pawel@osciak.com, sumit.semwal@ti.com, mchehab@redhat.com, robdclark@gmail.com, linaro-mm-sig@lists.linaro.org, kyungmin.park@samsung.com, laurent.pinchart@ideasonboard.com, airlied@redhat.com, remi@remlab.net Subject: [Linaro-mm-sig] [PATCHv9 23/25] v4l: s5p-fimc: support for dmabuf exporting X-BeenThere: linaro-mm-sig@lists.linaro.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Unified memory management interest group." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linaro-mm-sig-bounces@lists.linaro.org Errors-To: linaro-mm-sig-bounces@lists.linaro.org X-Gm-Message-State: ALoCoQlgLMD5LPPegrn2VsgSnPaMTEb+9hR/l1N0y2pwDHNFHv8lo2Z+E9p7pVlVSi0SbsEo3W54 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,