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: 1323491 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork1.kernel.org (Postfix) with ESMTP id 4DEB63FC71 for ; Tue, 14 Aug 2012 21:22:31 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 594EBA0957 for ; Tue, 14 Aug 2012 14:22:31 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mailout4.samsung.com (mailout4.samsung.com [203.254.224.34]) by gabe.freedesktop.org (Postfix) with ESMTP id 038779E76E for ; Tue, 14 Aug 2012 08:37:09 -0700 (PDT) Received: from epcpsbgm1.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 <0M8R000FS4PW3Z20@mailout4.samsung.com> for dri-devel@lists.freedesktop.org; Wed, 15 Aug 2012 00:37:08 +0900 (KST) X-AuditID: cbfee61a-b7fc66d0000043b7-7a-502a70a48df2 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id AC.7D.17335.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 dri-devel@lists.freedesktop.org; Wed, 15 Aug 2012 00:37:08 +0900 (KST) From: Tomasz Stanislawski To: linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: [PATCHv8 15/26] v4l: s5p-fimc: support for dmabuf importing 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+t9jAd0lBVoBBjenqFhc+fqezYHR4373 caYAxigum5TUnMyy1CJ9uwSujC9vzjIW7OGp+PHIvIHxKlcXIweHhICJxMdGqy5GTiBTTOLC vfVsXYxcHEICixglZj1axQjhrGOSuP7rJDtIFRtQw7ElnxlBbBEBB4nTd2cxgxQxCxxiltjf +xqsSFjAReL9pTWsIDaLgKrEmSuHwGxeAQ+Jnc8bmSDWyUs8vd/HBmJzAsVfbupmBLlISMBd YuFP/wmMvAsYGVYxiqYWJBcUJ6XnGuoVJ+YWl+al6yXn525iBHv8mdQOxpUNFocYBTgYlXh4 FdI0A4RYE8uKK3MPMUpwMCuJ8BYFaQUI8aYkVlalFuXHF5XmpBYfYpTmYFES5zX2/uovJJCe WJKanZpakFoEk2Xi4JRqYKw4t8P47+rzj0uDdETmXP0wo0v7+rIkgx5mpmMfNXQOCRlmh7bu 5XF9zyrN+XVHRv6dZue0u9Olr6fOPbio9O7Bf6uMWviWy52o3378yr0NF/mSjwQLzBbdZ3V3 zm9hhlY5ByaVg4u022LSo0tVNQRa5QSnTnWe3vpN8chd3eXzOW2Nmw7ydSuxFGckGmoxFxUn AgCsNPiO9AEAAA== X-TM-AS-MML: No Cc: t.stanislaws@samsung.com, pawel@osciak.com, mchehab@redhat.com, daniel.vetter@ffwll.ch, subashrp@gmail.com, linaro-mm-sig@lists.linaro.org, kyungmin.park@samsung.com, laurent.pinchart@ideasonboard.com, s.nawrocki@samsung.com, airlied@redhat.com, remi@remlab.net, g.liakhovetski@gmx.de, m.szyprowski@samsung.com X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org 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;