From patchwork Tue Aug 14 15:34:43 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Stanislawski X-Patchwork-Id: 10742 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 0D00D23F34 for ; Tue, 14 Aug 2012 15:37:02 +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 C1CD4A18A30 for ; Tue, 14 Aug 2012 15:37:01 +0000 (UTC) Received: by mail-yx0-f180.google.com with SMTP id l8so622964yen.11 for ; Tue, 14 Aug 2012 08:37: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: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=f617790Tt2drxCkqUpgD16BWvqN7xY7yqm52C9RyKvw=; b=S9XAD/jpEE1BCQxjCt1Dng4g9DhgHrD5jTey7aUxf/QW5Dpknw+383KDSkqh7Dpbfo 60z4JFroeWbgZVFliHr57EyqSUyJM55c+o9VT2y0diWro3/hKNy45cA89Kum/bitHxoA J9F1fyVcTDspd06NTJmeo37wtWD/ILtVeWfcTsDRlYuLTYtr3zGa8ZxI8vdva93C9/w7 lYZGoGVIg+9rty43OCg9SRuUM5RvWaPKVAYd/Kgi90wAn0dvkdPPm3VfMBiEVGfH/Y8p jPbEMbh1tyS2xYZ4biI2rJmuTGD9KFv7TwiAE7fmfyWrxt+YBl9Q/9XeoVB7fL3R+HVC x8SQ== Received: by 10.50.6.229 with SMTP id e5mr12627638iga.9.1344958621208; Tue, 14 Aug 2012 08:37: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.184.200 with SMTP id ew8csp20622igc; Tue, 14 Aug 2012 08:37:00 -0700 (PDT) Received: by 10.204.157.6 with SMTP id z6mr6436844bkw.25.1344958619660; Tue, 14 Aug 2012 08:36:59 -0700 (PDT) Received: from mombin.canonical.com (mombin.canonical.com. [91.189.95.16]) by mx.google.com with ESMTP id hc17si4083324bkc.18.2012.08.14.08.36.58; Tue, 14 Aug 2012 08:36: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 1T1JAv-0008DU-8N; Tue, 14 Aug 2012 15:36:57 +0000 Received: from mailout4.samsung.com ([203.254.224.34]) by mombin.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1T1JAs-0008DH-O7 for linaro-mm-sig@lists.linaro.org; Tue, 14 Aug 2012 15:36:55 +0000 Received: from epcpsbgm2.samsung.com (mailout4.samsung.com [203.254.224.34]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0M8R000FH4PH3Z20@mailout4.samsung.com> for linaro-mm-sig@lists.linaro.org; Wed, 15 Aug 2012 00:36:53 +0900 (KST) X-AuditID: cbfee61b-b7faf6d00000476a-6f-502a7095d94b Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id E4.F9.18282.5907A205; Wed, 15 Aug 2012 00:36:53 +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:36:53 +0900 (KST) From: Tomasz Stanislawski To: linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org Date: Tue, 14 Aug 2012 17:34:43 +0200 Message-id: <1344958496-9373-14-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+t9jAd2pBVoBBjf75Sy+XHnI5MDocfvf Y+YAxigum5TUnMyy1CJ9uwSujCeLvrMX3OWq6No0hbWBsZGzi5GTQ0LAROLDq4PsELaYxIV7 69m6GLk4hAQWMUos3XaEHcJZyyRx8N0RJpAqNqCOY0s+M4LYIgIOEqfvzmIGKWIWOMQssb/3 NdgoYaDE00kHwIpYBFQl1s3axQpi8wp4SNz4f5URYp28xNP7fWwgNidQ/OWmbqA4B9A2d4mF P/0nMPIuYGRYxSiaWpBcUJyUnmukV5yYW1yal66XnJ+7iRHs9WfSOxhXNVgcYhTgYFTi4S1M 1AwQYk0sK67MPcQowcGsJMJbFKQVIMSbklhZlVqUH19UmpNafIhRmoNFSZzXxPurv5BAemJJ anZqakFqEUyWiYNTChg+B/wOvzR6aPlG8tXUzoatB3POiKofvdmaY31D6mXGu2+M2poR7958 PZG9usVIYvFKdqm+plSmE6z5ZQltSlnLd+5QUDxmPPX0attSsSdlqSqrSlbr2bAwik8sn6S/ yThk7tFVXk9ZZSUYjXW4N3bVblSYWsYesV2v8tfhhVxMBh2ak/w5OpRYijMSDbWYi4oTAX/D 3aj2AQAA 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 13/26] 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: ALoCoQlOT1VGg10vqjOGXBc4LVtF41MWd5/9+r+71ZhyXjj5NM2uEho5n8eSq8T3IJWUsSWkP/uV 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 966954d..8fa81be 100644 --- a/drivers/media/video/Kconfig +++ b/drivers/media/video/Kconfig @@ -653,6 +653,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 a6351c4..37d8fd4 100644 --- a/drivers/media/video/vivi.c +++ b/drivers/media/video/vivi.c @@ -1308,7 +1308,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;