From patchwork Tue Oct 2 14:27:35 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Stanislawski X-Patchwork-Id: 11945 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 E0BFD1A52FC for ; Tue, 2 Oct 2012 14:30:49 +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 72201A18726 for ; Tue, 2 Oct 2012 14:30:49 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id e10so14258231iej.11 for ; Tue, 02 Oct 2012 07:30:49 -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=Us78PcqMTzkxk3kUqYX/gdP8zkVtF2IPoElWUR20IOk=; b=lfCADTFAYTn18KOx2297eZRcIf8LKpb/OnrlcKiclfpkQ16jcFumtcqnU8SI/P9gjc JeUme8XsJnpNWg9axuvSUJ1gHXdQntAy+WZuVgkvqEinUhocpbcH3mrWOZxwpOdAXkwD 3tuWYsp1DioLdZ8PkyiA0kPj7ibW9e85W+wK6Cblo+pSp1oreI7Kf/cuqpjLoDg96srK /rBBwBMqPml2kVSxFM4opkHXFl9I3xkgLKLEYTSkbtBkQDV5nIINxdHRqp73PDrf3wZP aOz0yxRD2ygg6DhCRf7BzEOskcnAETwIynlhO+JAOL1vSiNlLeBIK4XjcQnRd1IeersC cZHw== Received: by 10.50.150.198 with SMTP id uk6mr8952225igb.43.1349188249231; Tue, 02 Oct 2012 07:30:49 -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 ex8csp85084igc; Tue, 2 Oct 2012 07:30:48 -0700 (PDT) Received: by 10.204.130.146 with SMTP id t18mr6841409bks.65.1349188247736; Tue, 02 Oct 2012 07:30:47 -0700 (PDT) Received: from mombin.canonical.com (mombin.canonical.com. [91.189.95.16]) by mx.google.com with ESMTP id fv4si1714885bkc.2.2012.10.02.07.30.46; Tue, 02 Oct 2012 07:30:47 -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 1TJ3Uj-0005JW-6Z; Tue, 02 Oct 2012 14:30:45 +0000 Received: from mailout1.samsung.com ([203.254.224.24]) by mombin.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1TJ3Uh-0005J1-E9 for linaro-mm-sig@lists.linaro.org; Tue, 02 Oct 2012 14:30:43 +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 <0MB9009VNSB63500@mailout1.samsung.com> for linaro-mm-sig@lists.linaro.org; Tue, 02 Oct 2012 23:30:42 +0900 (KST) X-AuditID: cbfee61a-b7f726d000000ec7-5f-506afa926f00 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 7A.CE.03783.29AFA605; Tue, 02 Oct 2012 23:30:42 +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:42 +0900 (KST) From: Tomasz Stanislawski To: linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org Date: Tue, 02 Oct 2012 16:27:35 +0200 Message-id: <1349188056-4886-25-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+NgFnrCJMWRmVeSWpSXmKPExsVy+t9jQd1Jv7ICDC4vFrL4cuUhkwOjx+1/ j5kDGKO4bFJSczLLUov07RK4Mn4dnspU0M5dceHyOuYGxk2cXYycHBICJhKzLu5ih7DFJC7c W8/WxcjFISQwnVGicc4BFghnLZPE/Td3WUCq2IA6ji35zAhiiwg4SJy+O4sZpIhZYA2zxIuV N9hAEsICnhJNvzvAbBYBVYl5vWvAmnkFPCQu/r0NtU5e4un9PrAaTqD4zycXwGqEBNwl9ixv YpvAyLuAkWEVo2hqQXJBcVJ6rqFecWJucWleul5yfu4mRrDfn0ntYFzZYHGIUYCDUYmHd+fJ zAAh1sSy4srcQ4wSHMxKIrzW97MChHhTEiurUovy44tKc1KLDzFKc7AoifM2e6QECAmkJ5ak ZqemFqQWwWSZODilGhjdwmeUlFWd8m/Y6q/yO0TrqdjRXxpnOlgtE58/szp8pr9Z4FZVk0uU uMLGC1fFP25Z0+OstatB3yH4ScjlCdo2B9vns08XMn3SlHJ4T03K2YJrdd/1RY9aRFqKeKe3 ZJxn3nVcmnXCFH2H9tzLxnnRH6MKnlhW5rhONc6dEdV8wb662epCjxJLcUaioRZzUXEiAJpq bd73AQAA 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 24/25] 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: ALoCoQmpvD0nHiHhUlK5T+2obDllh0CQyHzKmVQgJEiuRK+ME56vFk9BSUCGE+3V7qMmEuBpmRDS 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 2c299db..d1641b6 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,