From patchwork Tue Aug 14 15:34:55 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Stanislawski X-Patchwork-Id: 10754 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 0C21523E00 for ; Tue, 14 Aug 2012 15:38:31 +0000 (UTC) Received: from mail-wi0-f176.google.com (mail-wi0-f176.google.com [209.85.212.176]) by fiordland.canonical.com (Postfix) with ESMTP id 03D67A18A29 for ; Tue, 14 Aug 2012 15:38:31 +0000 (UTC) Received: by wibhn17 with SMTP id hn17so3932154wib.17 for ; Tue, 14 Aug 2012 08:38:30 -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=CBXOrIw73ax+8oqzEXc7zYuHgjQ3CqePKey2NYadnIc=; b=DZ7Wrnqhy6DXN36kVJBa6pSSWGT4z4hhCd3NNsn5X31HxVFrHVn64EKr2Y7UySic9s QR9XJtaM1a8InAmLMTr1beT+FPJL6xPmP43MLQDk2hHiy1r7boMkIhcvXrtGkDtAHP2Q 06d1wC9XabkIIbna4tgQDVcFb9l3yxBXvjzDS9URdjHIBZiEs0aniI6iCJO3ypQr4gzc UDGrzK7Oss2An0pfw3O0LvEL0FOAEqjgeSNCu6qWevpbzqu0eRvxZ2LuMLTYWgO+FEUn EqW5skHqzNq5Brf1qP70N3PZ1WEQhh0qRZhtQHYTgFk3kMHPmSkgLd6gYHYIMLSudMoE xU4g== Received: by 10.50.94.133 with SMTP id dc5mr12378905igb.16.1344958710211; Tue, 14 Aug 2012 08:38:30 -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 ew8csp20712igc; Tue, 14 Aug 2012 08:38:29 -0700 (PDT) Received: by 10.204.132.77 with SMTP id a13mr6345453bkt.99.1344958708916; Tue, 14 Aug 2012 08:38:28 -0700 (PDT) Received: from mombin.canonical.com (mombin.canonical.com. [91.189.95.16]) by mx.google.com with ESMTP id gq18si4094681bkc.15.2012.08.14.08.38.27; Tue, 14 Aug 2012 08:38:28 -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 1T1JCM-00007u-Ck; Tue, 14 Aug 2012 15:38:26 +0000 Received: from mailout2.samsung.com ([203.254.224.25]) by mombin.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1T1JCL-00007n-BW for linaro-mm-sig@lists.linaro.org; Tue, 14 Aug 2012 15:38:25 +0000 Received: from epcpsbgm1.samsung.com (mailout2.samsung.com [203.254.224.25]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0M8R00J7V4S0DVJ0@mailout2.samsung.com> for linaro-mm-sig@lists.linaro.org; Wed, 15 Aug 2012 00:38:24 +0900 (KST) X-AuditID: cbfee61a-b7fc66d0000043b7-42-502a70ef22e8 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id A2.AD.17335.FE07A205; Wed, 15 Aug 2012 00:38:24 +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:23 +0900 (KST) From: Tomasz Stanislawski To: linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org Date: Tue, 14 Aug 2012 17:34:55 +0200 Message-id: <1344958496-9373-26-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+t9jAd0PBVoBBs0XWCy+XHnI5MDocfvf Y+YAxigum5TUnMyy1CJ9uwSujMttU1kK2rkrPm1+zN7AuImzi5GTQ0LARGL6wq0sELaYxIV7 69m6GLk4hAQWMUoc2PkKylnLJLHwzSx2kCo2oI5jSz4zgtgiAg4Sp+/OYgYpYhY4xCyxv/c1 WJGwgKfEuRM7WEFsFgFViWuLbzOD2LwCHhLT9j5hglgnL/H0fh8biM0JFH+5qRtoKAfQNneJ hT/9JzDyLmBkWMUomlqQXFCclJ5rqFecmFtcmpeul5yfu4kR7PVnUjsYVzZYHGIU4GBU4uFV SNMMEGJNLCuuzD3EKMHBrCTCWxSkFSDEm5JYWZValB9fVJqTWnyIUZqDRUmc19j7q7+QQHpi SWp2ampBahFMlomDU6qBUV9xt9Z09aoLF1earsi1aJpTax2172HcTN1JwTJ/bwlGOW2r/LXg +9X4ZH6rae+CvHLmHCrdZihnMnNaU4hxgVxedfr76z+3T8yevCq/O2TaBBf3N9eTevf+Etzj vWlLbPlu3y27TUNVv3vaVxr+n7MsewYj030Os9+tUitehWxP7bIOWP7EQImlOCPRUIu5qDgR ACQUGsT2AQAA 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 25/26] v4l: s5p-tv: mixer: 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: ALoCoQkl8hYZ60QlvVoTyUSRRAMcjP9k95O6WvvBeJls6StX/y02jaBOtIexdUGf1PhRMOwzHDov 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 a7e3b53..e5ec6bd 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,