From patchwork Tue Aug 14 15:34:45 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Stanislawski X-Patchwork-Id: 10743 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 46EB023E00 for ; Tue, 14 Aug 2012 15:37:16 +0000 (UTC) Received: from mail-we0-f180.google.com (mail-we0-f180.google.com [74.125.82.180]) by fiordland.canonical.com (Postfix) with ESMTP id 3F1DEA18A32 for ; Tue, 14 Aug 2012 15:37:16 +0000 (UTC) Received: by weyt11 with SMTP id t11so377046wey.11 for ; Tue, 14 Aug 2012 08:37:16 -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=gFvFVpAJ956NwHkbdhKIE2DX9iSKngk8pSgFe2DBkMg=; b=T0nRdm7f6th307HzRZn7UDKXqyvhftuqyVLi+z/cK0vBwsAthuWAg1iqbPOJr3qIWk DZnWesyT5plpoGGb1PrCW0h5UnmndKFOOLqKfxPUoeqjH0Bm1Tda8XF+oxvICFNPW/wk rjnd+nnp9QMCt05GYTfO3L0s68Bh8DBE22M/40z1GS1zCEU6tL4gqIjxHL3R/VQi8bdw PertgTNAMFS7FXgWUJUSHAqJFbCK9ecEsgiNnJaT3fO9ZGaVNqvNRawst3AwOrDYQc5+ KpdoMtD9V9hbQerUvGGO7ywZFq+yKty4Jra+ajQol//WqySAW4xyKibuAEvg3zeN46ZR Besw== Received: by 10.50.186.131 with SMTP id fk3mr12637350igc.31.1344958635473; Tue, 14 Aug 2012 08:37:15 -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 ew8csp20633igc; Tue, 14 Aug 2012 08:37:14 -0700 (PDT) Received: by 10.204.136.215 with SMTP id s23mr6417597bkt.32.1344958634096; Tue, 14 Aug 2012 08:37:14 -0700 (PDT) Received: from mombin.canonical.com (mombin.canonical.com. [91.189.95.16]) by mx.google.com with ESMTP id ic15si4037303bkc.71.2012.08.14.08.37.12; Tue, 14 Aug 2012 08:37:14 -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 1T1JB9-0008Pa-Nn; Tue, 14 Aug 2012 15:37:11 +0000 Received: from mailout3.samsung.com ([203.254.224.33]) by mombin.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1T1JB8-0008PP-3E for linaro-mm-sig@lists.linaro.org; Tue, 14 Aug 2012 15:37:10 +0000 Received: from epcpsbgm2.samsung.com (mailout3.samsung.com [203.254.224.33]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0M8R00JK74PWWF20@mailout3.samsung.com> for linaro-mm-sig@lists.linaro.org; Wed, 15 Aug 2012 00:37:08 +0900 (KST) X-AuditID: cbfee61b-b7faf6d00000476a-93-502a70a497fa Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id AF.F9.18282.4A07A205; Wed, 15 Aug 2012 00:37:08 +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:37:08 +0900 (KST) From: Tomasz Stanislawski To: linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org Date: Tue, 14 Aug 2012 17:34:45 +0200 Message-id: <1344958496-9373-16-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+NgFnrIJMWRmVeSWpSXmKPExsVy+t9jAd0lBVoBBlfmqVh8ufKQyYHR4/a/ x8wBjFFcNimpOZllqUX6dglcGV/enGUs2MNT8eOReQPjVa4uRk4OCQETiX/9XewQtpjEhXvr 2boYuTiEBBYxSvw/1cwMkhASWMskMX+VEojNBtRwbMlnRhBbRMBB4vTdWcwgDcwCh5gl9ve+ BpskLOAi8f7SGlYQm0VAVeLMlUNgNq+Ah8TO541MENvkJZ7e72MDsTmB4i83dQMN5QBa5i6x 8Kf/BEbeBYwMqxhFUwuSC4qT0nON9IoTc4tL89L1kvNzNzGCPf5MegfjqgaLQ4wCHIxKPLyF iZoBQqyJZcWVuYcYJTiYlUR4i4K0AoR4UxIrq1KL8uOLSnNSiw8xSnOwKInzmnh/9RcSSE8s Sc1OTS1ILYLJMnFwSjUwdhhuXP/uYsVWg2JXuxVtjrvrGALf5oZphJ4UFGafc1czIZspUELO a3sI5yXh0+G/8jIqNzk/Fzoq7qWZ1aT2717e7OL9ibKT/uyx+7NMptnD0LTcPmfpZ3nd519W XmpaG/84dk3g4+SHtVp7vk69c1Y95qTJomq1VqUNvHsOCZ61/5D4IkJZiaU4I9FQi7moOBEA NZI7KPQBAAA= 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 15/26] v4l: s5p-fimc: 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: ALoCoQno9OQA1X4TCMpofNkgQUAYY4lTnM6cS5RAqZiYusQ5QgRSKukEni/IxG47eDLCADiuzCnY This patch enhances s5p-fimc with support for DMABUF importing via V4L2_MEMORY_DMABUF memory type. Signed-off-by: Tomasz Stanislawski Signed-off-by: Kyungmin Park Acked-by: Sylwester Nawrocki --- drivers/media/video/s5p-fimc/Kconfig | 1 + drivers/media/video/s5p-fimc/fimc-capture.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/media/video/s5p-fimc/Kconfig b/drivers/media/video/s5p-fimc/Kconfig index a564f7e..3106026 100644 --- a/drivers/media/video/s5p-fimc/Kconfig +++ b/drivers/media/video/s5p-fimc/Kconfig @@ -14,6 +14,7 @@ config VIDEO_S5P_FIMC depends on I2C select VIDEOBUF2_DMA_CONTIG select V4L2_MEM2MEM_DEV + select DMA_SHARED_BUFFER help This is a V4L2 driver for Samsung S5P and EXYNOS4 SoC camera host interface and video postprocessor (FIMC and FIMC-LITE) devices. diff --git a/drivers/media/video/s5p-fimc/fimc-capture.c b/drivers/media/video/s5p-fimc/fimc-capture.c index 8e413dd..3fcaf7d 100644 --- a/drivers/media/video/s5p-fimc/fimc-capture.c +++ b/drivers/media/video/s5p-fimc/fimc-capture.c @@ -1634,7 +1634,7 @@ static int fimc_register_capture_device(struct fimc_dev *fimc, q = &fimc->vid_cap.vbq; memset(q, 0, sizeof(*q)); q->type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE; - q->io_modes = VB2_MMAP | VB2_USERPTR; + q->io_modes = VB2_MMAP | VB2_USERPTR | VB2_DMABUF; q->drv_priv = fimc->vid_cap.ctx; q->ops = &fimc_capture_qops; q->mem_ops = &vb2_dma_contig_memops;