From patchwork Wed Oct 10 14:46:44 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Stanislawski X-Patchwork-Id: 12134 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 747A823EFB for ; Wed, 10 Oct 2012 15:04:04 +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 6A153A18F32 for ; Wed, 10 Oct 2012 15:04:02 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id e10so1028486iej.11 for ; Wed, 10 Oct 2012 08:04:01 -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=zj4dT4X16YN5fyijT1WJ0IHamKvMd/tObrCBK2B14rA=; b=eIMjuAjCDKBH3eToicHbFw3UyR4GsobC4+t5YB+kizgUm9VwepHA1aeUfjwWP1+DGm PHER51PqUcAyEwp4zZHeXROmbDSVDw4jrNmdCGL7/g+19q8gbJHLUg4xSoB57k7E1H0y O/Sxd4YiyD1pgGv6E3Cpnwlw2oWq3bCBeYzzwZu+LoOGSK5bnw9iT0yJxCeyl5JfrM2f aP2zTb0y2/vaiSs92eZxLAcn50ylPoDE+JFa8OZp+WCJ8Hr36HodyTXRSQ9MlZyjpDrB /KRWGKVvsWetgOMzeR5HvkanDYfXzkwQOgNhp4eJhNjQphuaWvp3xmoP+lt7RYoWbVJi KWJQ== Received: by 10.50.100.137 with SMTP id ey9mr5547251igb.57.1349881441781; Wed, 10 Oct 2012 08:04:01 -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.67.148 with SMTP id n20csp237601igt; Wed, 10 Oct 2012 08:04:00 -0700 (PDT) Received: by 10.14.202.71 with SMTP id c47mr33458379eeo.42.1349881439682; Wed, 10 Oct 2012 08:03:59 -0700 (PDT) Received: from mombin.canonical.com (mombin.canonical.com. [91.189.95.16]) by mx.google.com with ESMTP id g9si1096905eep.132.2012.10.10.08.03.58; Wed, 10 Oct 2012 08:03:59 -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 1TLxpF-00031u-Kd; Wed, 10 Oct 2012 15:03:57 +0000 Received: from mailout3.samsung.com ([203.254.224.33]) by mombin.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1TLxpE-00031l-1E for linaro-mm-sig@lists.linaro.org; Wed, 10 Oct 2012 15:03:56 +0000 Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MBO006P7N66QC11@mailout3.samsung.com> for linaro-mm-sig@lists.linaro.org; Thu, 11 Oct 2012 00:03:54 +0900 (KST) X-AuditID: cbfee61b-b7f2b6d000000f14-c7-50758e59cb8c Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 28.0D.03860.95E85705; Thu, 11 Oct 2012 00:03:54 +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 <0MBO002YDME0EC70@mmp1.samsung.com> for linaro-mm-sig@lists.linaro.org; Thu, 11 Oct 2012 00:03:53 +0900 (KST) From: Tomasz Stanislawski To: linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org Date: Wed, 10 Oct 2012 16:46:44 +0200 Message-id: <1349880405-26049-26-git-send-email-t.stanislaws@samsung.com> X-Mailer: git-send-email 1.7.10 In-reply-to: <1349880405-26049-1-git-send-email-t.stanislaws@samsung.com> References: <1349880405-26049-1-git-send-email-t.stanislaws@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrMJMWRmVeSWpSXmKPExsVy+t9jAd2ovtIAgwefWSy+XHnI5MDocfvf Y+YAxigum5TUnMyy1CJ9uwSujK3XZzMVnOCu2PjrDWsD4zvOLkZODgkBE4mnk38yQ9hiEhfu rWcDsYUEFjFK9DSXdzFyAdlrmSS6WyeCFbEBNRxb8pkRxBYRcJA4fXcWM0gRs8AaZokXK2+A dQsLeEnsbvvECmKzCKhKLJizEKyZV8BT4tbf7YwQ2+Qlnt7vA6vnBIpfmDedGWKzh8T/9ZuZ JjDyLmBkWMUomlqQXFCclJ5rpFecmFtcmpeul5yfu4kR7PVn0jsYVzVYHGIU4GBU4uGtyCgJ EGJNLCuuzD3EKMHBrCTCa+pTGiDEm5JYWZValB9fVJqTWnyIUZqDRUmct9kjJUBIID2xJDU7 NbUgtQgmy8TBKdXA2HU76u9FUfE7LmeaHpQuqd8iuP3TFCWNuDPcpvxT3VmfLmR2mbPLQVTj e+4c09atfi2pMQwne3L/fuXdd4x51llxr8xZNsGv9ggqaKS+Ktjg41Zt+TiqN7nW1sBcZ2dO wqTLX/+K1wnO15Q5o+i75u3rHTtZ7TzdZpkcP7VlV/vMspTNBdFvlFiKMxINtZiLihMBTGlG JvYBAAA= 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] [PATCHv10 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: ALoCoQlPRFqXIqCJ2mMcsTX7XKR2bl6QzNUNB504kUbdD5M1IQ65MoLJjNxDrEsgm11O0T4fNH+5 This patch enhances s5p-tv with support for DMABUF exporting via VIDIOC_EXPBUF ioctl. Signed-off-by: Tomasz Stanislawski Signed-off-by: Kyungmin Park Acked-by: Hans Verkuil --- drivers/media/platform/s5p-tv/mixer_video.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/media/platform/s5p-tv/mixer_video.c b/drivers/media/platform/s5p-tv/mixer_video.c index 2421e527..5e3cdb2 100644 --- a/drivers/media/platform/s5p-tv/mixer_video.c +++ b/drivers/media/platform/s5p-tv/mixer_video.c @@ -698,6 +698,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); @@ -725,6 +734,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,