From patchwork Fri Apr 13 15:47:56 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Stanislawski X-Patchwork-Id: 7805 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 03A1A23E42 for ; Fri, 13 Apr 2012 15:48:56 +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 C0265A183FE for ; Fri, 13 Apr 2012 15:48:55 +0000 (UTC) Received: by mail-iy0-f180.google.com with SMTP id e36so6011978iag.11 for ; Fri, 13 Apr 2012 08:48: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:date:from :in-reply-to:to:message-id:mime-version: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=jveFm8gscr08+nAKICCgY2aXmd4fs/4WMTG4xFPRYDI=; b=Q7q0McF2hdPnxtHLhsogrVm3vqURyP52EhLNoATYdA7Gq6frvZ3L6dJs37eXbEyZJ6 suqqw01OvKEETl9yQGzudUOFCeObQ+3pPvLvdFMylsEhSW+DlaTZZipO59X1IGHL/frr 2Q8bxwpgMesXZufomcSmbLvrZlGNzQjRPtxN/JopukzMPEUBrwc9NLcLt7Ny21+kUVSa Tj8hRaEqiLzY6aHTya5sfVpRAcI9eXd8dDMlhnqqwTiyQj44aIzy7BT4nHf5L9IJeS4d +TLh0rurhT9lePkhSHlAbDsit2uBjsvPQKXMji6PdUR+l6mb0kwe0yLkhVzSxdACq4v5 0uUg== Received: by 10.50.149.163 with SMTP id ub3mr2079747igb.30.1334332135571; Fri, 13 Apr 2012 08:48: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.70.69 with SMTP id c5csp38542ibj; Fri, 13 Apr 2012 08:48:54 -0700 (PDT) Received: by 10.216.134.2 with SMTP id r2mr1323825wei.31.1334332128666; Fri, 13 Apr 2012 08:48:48 -0700 (PDT) Received: from mombin.canonical.com (mombin.canonical.com. [91.189.95.16]) by mx.google.com with ESMTP id j57si9892028wed.37.2012.04.13.08.48.18; Fri, 13 Apr 2012 08:48: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 1SIijR-0006MO-LX; Fri, 13 Apr 2012 15:48:17 +0000 Received: from mailout2.w1.samsung.com ([210.118.77.12]) by mombin.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1SIijJ-0006HY-BJ for linaro-mm-sig@lists.linaro.org; Fri, 13 Apr 2012 15:48:09 +0000 Received: from euspt2 (mailout2.w1.samsung.com [210.118.77.12]) by mailout2.w1.samsung.com (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTP id <0M2F00CEQD83JM@mailout2.w1.samsung.com> for linaro-mm-sig@lists.linaro.org; Fri, 13 Apr 2012 16:48:03 +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 <0M2F00GJUD83DZ@spt2.w1.samsung.com> for linaro-mm-sig@lists.linaro.org; Fri, 13 Apr 2012 16:48:03 +0100 (BST) Received: from mcdsrvbld02.digital.local (unknown [106.116.37.23]) by linux.samsung.com (Postfix) with ESMTP id C7FC8270087; Fri, 13 Apr 2012 17:58:32 +0200 (CEST) Date: Fri, 13 Apr 2012 17:47:56 +0200 From: Tomasz Stanislawski In-reply-to: <1334332076-28489-1-git-send-email-t.stanislaws@samsung.com> To: linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org Message-id: <1334332076-28489-15-git-send-email-t.stanislaws@samsung.com> MIME-version: 1.0 X-Mailer: git-send-email 1.7.9.1 References: <1334332076-28489-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, remi@remlab.net Subject: [Linaro-mm-sig] [PATCH v4 14/14] v4l: 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: , Sender: linaro-mm-sig-bounces@lists.linaro.org Errors-To: linaro-mm-sig-bounces@lists.linaro.org X-Gm-Message-State: ALoCoQkR2/WZxxJdtv5wMDNmXTrUjoGv4yLlvQEFTGfta3JIzQqEqiragjPhLWsLb3+DR/RTNfcF 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/Kconfig | 1 + drivers/media/video/s5p-fimc/fimc-capture.c | 2 +- 2 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig index f2479c5..9de9ddc 100644 --- a/drivers/media/video/Kconfig +++ b/drivers/media/video/Kconfig @@ -1133,6 +1133,7 @@ config VIDEO_SAMSUNG_S5P_FIMC VIDEO_V4L2_SUBDEV_API && EXPERIMENTAL select VIDEOBUF2_DMA_CONTIG select V4L2_MEM2MEM_DEV + select DMA_SHARED_BUFFER ---help--- This is a v4l2 driver for Samsung S5P and EXYNOS4 camera host interface and video postprocessor. diff --git a/drivers/media/video/s5p-fimc/fimc-capture.c b/drivers/media/video/s5p-fimc/fimc-capture.c index b06efd2..38fb39e 100644 --- a/drivers/media/video/s5p-fimc/fimc-capture.c +++ b/drivers/media/video/s5p-fimc/fimc-capture.c @@ -1530,7 +1530,7 @@ 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;