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: 10753 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 6D09E23E00 for ; Tue, 14 Aug 2012 15:38:24 +0000 (UTC) Received: from mail-yw0-f52.google.com (mail-yw0-f52.google.com [209.85.213.52]) by fiordland.canonical.com (Postfix) with ESMTP id 27BF4A18586 for ; Tue, 14 Aug 2012 15:38:24 +0000 (UTC) Received: by yhpp61 with SMTP id p61so618076yhp.11 for ; Tue, 14 Aug 2012 08:38:23 -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:x-tm-as-mml: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=lyFokdrYJ3z67HfmJY++YlCdjwIL8ssoDYQC5Dor1cU=; b=Dy/fN7ZOJQYV9LpX2EtPpZt9x8/A8UEqBq1nX/aI8wACcFpdDZO4oL/O+sdM2evtYW GxAxuJ3JcxsWBjp4bMoO9D8y1GNzibSCmThIM3AXjcoqKAG6Nf+LPPZCyNOY2sNQ2mAr Eys3AWdsGijxDhLWzLSQqlK67pxPxzJZ4/WTMIVu7qbrhrVcsChB9YlXyHSkzP8yc1R7 kBgWxkBv+y7abYI21qTQmyQ071sh0uoUQS/g6gzp8mAmtCCjwlYGZj31My9eZ7zxszCT jNFLNmbQGaEmVdlAuIDZlP8MAcuoSCtaGXtJKKGMfK9MI2ftXLqXMef9cMWz802eGrDw j3uw== Received: by 10.50.6.229 with SMTP id e5mr12635475iga.9.1344958703096; Tue, 14 Aug 2012 08:38:23 -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.200 with SMTP id ew8csp20708igc; Tue, 14 Aug 2012 08:38:22 -0700 (PDT) Received: by 10.204.156.70 with SMTP id v6mr6455360bkw.66.1344958701584; Tue, 14 Aug 2012 08:38:21 -0700 (PDT) Received: from mombin.canonical.com (mombin.canonical.com. [91.189.95.16]) by mx.google.com with ESMTP id ha18si4017659bkc.99.2012.08.14.08.38.20; Tue, 14 Aug 2012 08:38:21 -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 1T1JCF-000071-1c; Tue, 14 Aug 2012 15:38:19 +0000 Received: from mailout3.samsung.com ([203.254.224.33]) by mombin.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1T1JCE-00006t-Bg for linaro-mm-sig@lists.linaro.org; Tue, 14 Aug 2012 15:38:18 +0000 Received: from epcpsbgm1.samsung.com (mailout3.samsung.com [203.254.224.33]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0M8R00JKN4RSWF20@mailout3.samsung.com> for linaro-mm-sig@lists.linaro.org; Wed, 15 Aug 2012 00:38:16 +0900 (KST) X-AuditID: cbfee61a-b7fc66d0000043b7-2d-502a70e8b858 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 0D.9D.17335.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 linaro-mm-sig@lists.linaro.org; Wed, 15 Aug 2012 00:38:16 +0900 (KST) From: Tomasz Stanislawski To: linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org 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+NgFnrMJMWRmVeSWpSXmKPExsVy+t9jAd0XBVoBBi8umVh8ufKQyYHR4/a/ x8wBjFFcNimpOZllqUX6dglcGX0nJrAVTOWq2Lv5IVMD4zGOLkZODgkBE4k7my4zQ9hiEhfu rWfrYuTiEBJYxCix4uUHZghnLZPEvV9rWECq2IA6ji35zAhiiwg4SJy+OwusiFngELPE/t7X 7CAJYQEXialvZoPZLAKqErP/rAZr5hXwkDh6rZ8VYp28xNP7fWwgNidQ/OWmbqChHEDb3CUW /vSfwMi7gJFhFaNoakFyQXFSeq6hXnFibnFpXrpecn7uJkaw159J7WBc2WBxiFGAg1GJh1ch TTNAiDWxrLgy9xCjBAezkghvUZBWgBBvSmJlVWpRfnxRaU5q8SFGaQ4WJXFeY++v/kIC6Ykl qdmpqQWpRTBZJg5OqQZGlcnZa/5rxGxsNf76MOrRgTOaTK3nm4M3nXqm9qIskTN39cWQCeEb jc+vyNTYcUvOWe17TkZmxBzB7leu76a9bhJpfWEnXndOqcJk/Qr/6n23pS3P/z1QcvJXjFQh 6+PK7o2vp3hnfF19corEvyOzAi9/O3+visVTYM7Ee8+LVVjZUha1mH9IVWIpzkg01GIuKk4E AAHKsXz2AQAA X-TM-AS-MML: No Cc: k.debski@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, dmitriyz@google.com, laurent.pinchart@ideasonboard.com, s.nawrocki@samsung.com, airlied@redhat.com, remi@remlab.net, g.liakhovetski@gmx.de Subject: [Linaro-mm-sig] [PATCHv8 24/26] 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: ALoCoQkepUy3u7AbLtY7WpmiCMYOx1uuRJEAZM8+zZBUUpLh5dQXhMYWvzOP5B41oXdnmkLZlYEH 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,