From patchwork Tue Apr 10 10:11:31 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Stanislawski X-Patchwork-Id: 7701 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 A234423E1D for ; Tue, 10 Apr 2012 10:11:55 +0000 (UTC) Received: from mail-iy0-f180.google.com (mail-iy0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id 69933A18563 for ; Tue, 10 Apr 2012 10:11:55 +0000 (UTC) Received: by mail-iy0-f180.google.com with SMTP id e36so10014794iag.11 for ; Tue, 10 Apr 2012 03:11:55 -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 :mime-version:date:from:in-reply-to:to:message-id:x-mailer :references:cc:subject:x-beenthere:x-mailman-version:precedence :list-id:list-unsubscribe:list-archive:list-post:list-help :list-subscribe:content-type:content-transfer-encoding:sender :errors-to:x-gm-message-state; bh=donFHG5K8RtiJ8tFLCMKvz/km0PcGJTTOh1zGWWgWsM=; b=H/jdobBUz0qgyKspNq8z4fLdGJn+TA+4SC1eKcporyMWPi2iY6VlvC4klBoMjoceCq vOZf4h/950rR0FgsQ9ejaqET3+LbvDsaEaHfpJFouCqkMpa9dzY5PFKdqefuiHAumIL+ vOejk7K9jd6OsJ0mgXfno1/17DysPnd+C036br+rIanDFiJKRCdrRN09p6mu0L8BrfZI S+yBlIiBplp0Gbu+dhXfg4PNvrT0BCqA0OZ41+8v/IHqX6XLjMhjPrOGKL4EVB9e9ivZ 4q47ka4Xb84biHKONrVKypF2/XuypL2AyK6d4BOtDd7cl8WjCOgudh/kJ3h2fhugDgUL xMiA== Received: by 10.50.168.67 with SMTP id zu3mr1692318igb.28.1334052715165; Tue, 10 Apr 2012 03:11:55 -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.164.217 with SMTP id f25csp13369iby; Tue, 10 Apr 2012 03:11:54 -0700 (PDT) Received: by 10.216.137.97 with SMTP id x75mr6253001wei.25.1334052708711; Tue, 10 Apr 2012 03:11:48 -0700 (PDT) Received: from mombin.canonical.com (mombin.canonical.com. [91.189.95.16]) by mx.google.com with ESMTP id m9si13916596wim.37.2012.04.10.03.11.47; Tue, 10 Apr 2012 03:11:48 -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 1SHY37-0007OM-By; Tue, 10 Apr 2012 10:11:45 +0000 Received: from mailout4.w1.samsung.com ([210.118.77.14]) by mombin.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1SHY35-0007Nr-38 for linaro-mm-sig@lists.linaro.org; Tue, 10 Apr 2012 10:11:43 +0000 MIME-version: 1.0 Received: from euspt2 ([210.118.77.14]) by mailout4.w1.samsung.com (Sun Java(tm) System Messaging Server 6.3-8.04 (built Jul 29 2009; 32bit)) with ESMTP id <0M29005P8DNLM540@mailout4.w1.samsung.com> for linaro-mm-sig@lists.linaro.org; Tue, 10 Apr 2012 11:11:45 +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 <0M2900K1VDND2K@spt2.w1.samsung.com> for linaro-mm-sig@lists.linaro.org; Tue, 10 Apr 2012 11:11:37 +0100 (BST) Received: from mcdsrvbld02.digital.local (unknown [106.116.37.23]) by linux.samsung.com (Postfix) with ESMTP id 36DC827005A; Tue, 10 Apr 2012 12:20:41 +0200 (CEST) Date: Tue, 10 Apr 2012 12:11:31 +0200 From: Tomasz Stanislawski In-reply-to: <1334052691-5145-1-git-send-email-t.stanislaws@samsung.com> To: linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org Message-id: <1334052691-5145-4-git-send-email-t.stanislaws@samsung.com> X-Mailer: git-send-email 1.7.9.1 References: <1334052691-5145-1-git-send-email-t.stanislaws@samsung.com> Cc: pawel@osciak.com, sumit.semwal@ti.com, mchehab@redhat.com, robdclark@gmail.com, linaro-mm-sig@lists.linaro.org, kyungmin.park@samsung.com, airlied@redhat.com Subject: [Linaro-mm-sig] [PATCH 3/3] 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: , Sender: linaro-mm-sig-bounces@lists.linaro.org Errors-To: linaro-mm-sig-bounces@lists.linaro.org X-Gm-Message-State: ALoCoQmDOoTC0l6IFSCOxcjWinmir9ANKn5L5DpM0P63+PrmY3aMXowTS/gRICPhzWlPHBWyEPaJ 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 deletions(-) diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig index f2479c5..d6294d6 100644 --- a/drivers/media/video/Kconfig +++ b/drivers/media/video/Kconfig @@ -625,6 +625,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 5e8b071..489d685 100644 --- a/drivers/media/video/vivi.c +++ b/drivers/media/video/vivi.c @@ -1289,7 +1289,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;