From patchwork Thu Jun 14 13:37:47 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Stanislawski X-Patchwork-Id: 9285 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 C25F523E1B for ; Thu, 14 Jun 2012 13:38:26 +0000 (UTC) Received: from mail-yx0-f180.google.com (mail-yx0-f180.google.com [209.85.213.180]) by fiordland.canonical.com (Postfix) with ESMTP id 90EF4A185A0 for ; Thu, 14 Jun 2012 13:38:26 +0000 (UTC) Received: by mail-yx0-f180.google.com with SMTP id q6so1554519yen.11 for ; Thu, 14 Jun 2012 06:38:26 -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:date:from :in-reply-to:to:message-id:x-mailer:references: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=c5LArT/0wt3ag7T2DbejAym4/XyzlWkzbNmAsxAsKBQ=; b=Lyj+2+MLrVbTMlP+3iAudgyy0qNTkV9XsJsjsTx6tJJBVhxid3ANdOFhgOyjuZbcz+ 2GKVR6XewKNjd4HKytP/cBcPBXoemwPzNBplc+MF0qVtcO5hfX3Qnb29eVxvdHNnzZjD +XqMvaIATLfsSdy92DGKmX1C8rXmZKwVlyboFIRVZgXjRa1mHcDpS7hxzzay/FJfqfxB DSZH9UKqxMV3hoyWYW+6eT3zplowfe2D7d/W/EmLaOtp4Rk5GsWaAeQ5xJR2ID53BBDc roJRYJI8SasE5PLuy5MHwNOROn9aObjDdVFl/fbbLoV9RfmP+o7ywd3lD5GBlLgGkUly mMyw== Received: by 10.50.193.196 with SMTP id hq4mr12558554igc.57.1339681106253; Thu, 14 Jun 2012 06:38:26 -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.231.24.148 with SMTP id v20csp85244ibb; Thu, 14 Jun 2012 06:38:22 -0700 (PDT) Received: by 10.204.148.74 with SMTP id o10mr1109015bkv.111.1339681100949; Thu, 14 Jun 2012 06:38:20 -0700 (PDT) Received: from mombin.canonical.com (mombin.canonical.com. [91.189.95.16]) by mx.google.com with ESMTP id gu13si4968287bkc.3.2012.06.14.06.38.19; Thu, 14 Jun 2012 06:38:20 -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 1SfAFc-0006rR-HK; Thu, 14 Jun 2012 13:38:16 +0000 Received: from mailout1.w1.samsung.com ([210.118.77.11]) by mombin.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1SfAFY-0006qF-P8 for linaro-mm-sig@lists.linaro.org; Thu, 14 Jun 2012 13:38:12 +0000 Received: from euspt2 (mailout1.w1.samsung.com [210.118.77.11]) by mailout1.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0M5M0050Z0KIWO60@mailout1.w1.samsung.com> for linaro-mm-sig@lists.linaro.org; Thu, 14 Jun 2012 14:38:42 +0100 (BST) Received: from linux.samsung.com ([106.116.38.10]) by spt2.w1.samsung.com (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTPA id <0M5M00FVE0JK8T@spt2.w1.samsung.com> for linaro-mm-sig@lists.linaro.org; Thu, 14 Jun 2012 14:38:08 +0100 (BST) Received: from mcdsrvbld02.digital.local (unknown [106.116.37.23]) by linux.samsung.com (Postfix) with ESMTP id A6F63270170; Thu, 14 Jun 2012 15:42:38 +0200 (CEST) Date: Thu, 14 Jun 2012 15:37:47 +0200 From: Tomasz Stanislawski In-reply-to: <1339681069-8483-1-git-send-email-t.stanislaws@samsung.com> To: linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org Message-id: <1339681069-8483-14-git-send-email-t.stanislaws@samsung.com> X-Mailer: git-send-email 1.7.10 References: <1339681069-8483-1-git-send-email-t.stanislaws@samsung.com> X-TM-AS-MML: No Cc: 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, g.liakhovetski@gmx.de Subject: [Linaro-mm-sig] [PATCHv7 13/15] v4l: vivi: support for dmabuf importing 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: ALoCoQmpF/tK52mB87bcURTT/+gbY9oKKJWzaEF233hO2C2wLQIazS6zsNUof5zhGsQMb+Zgqmqy This patch enhances VIVI driver with a support for importing a buffer from DMABUF file descriptors. Signed-off-by: Tomasz Stanislawski Signed-off-by: Kyungmin Park --- drivers/media/video/Kconfig | 1 + drivers/media/video/vivi.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig index 99937c9..9aa7306 100644 --- a/drivers/media/video/Kconfig +++ b/drivers/media/video/Kconfig @@ -630,6 +630,7 @@ config VIDEO_VIVI depends on FRAMEBUFFER_CONSOLE || STI_CONSOLE select FONT_8x16 select VIDEOBUF2_VMALLOC + select DMA_SHARED_BUFFER default n ---help--- Enables a virtual video driver. This device shows a color bar diff --git a/drivers/media/video/vivi.c b/drivers/media/video/vivi.c index 0960d7f..05709cd 100644 --- a/drivers/media/video/vivi.c +++ b/drivers/media/video/vivi.c @@ -1422,7 +1422,7 @@ static int __init vivi_create_instance(int inst) q = &dev->vb_vidq; memset(q, 0, sizeof(dev->vb_vidq)); q->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; - q->io_modes = VB2_MMAP | VB2_USERPTR | VB2_READ; + q->io_modes = VB2_MMAP | VB2_USERPTR | VB2_DMABUF | VB2_READ; q->drv_priv = dev; q->buf_struct_size = sizeof(struct vivi_buffer); q->ops = &vivi_video_qops;