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: 1323471 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 F2EF93FC71 for ; Tue, 14 Aug 2012 21:20:02 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D98EB9F310 for ; Tue, 14 Aug 2012 14:20:01 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mailout1.samsung.com (mailout1.samsung.com [203.254.224.24]) by gabe.freedesktop.org (Postfix) with ESMTP id 459E59EAFD for ; Tue, 14 Aug 2012 08:36:54 -0700 (PDT) Received: from epcpsbgm1.samsung.com (mailout1.samsung.com [203.254.224.24]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0M8R003Y94PHBPE0@mailout1.samsung.com> for dri-devel@lists.freedesktop.org; Wed, 15 Aug 2012 00:36:53 +0900 (KST) X-AuditID: cbfee61a-b7fc66d0000043b7-56-502a7095dbfb Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 05.7D.17335.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 dri-devel@lists.freedesktop.org; Wed, 15 Aug 2012 00:36:53 +0900 (KST) From: Tomasz Stanislawski To: linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: [PATCHv8 13/26] v4l: vivi: support for dmabuf importing 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+t9jAd2pBVoBBtO/ylpc+fqezYHR4373 caYAxigum5TUnMyy1CJ9uwSujCeLvrMX3OWq6No0hbWBsZGzi5GTQ0LAROJn7z4mCFtM4sK9 9WxdjFwcQgKLGCXWftnOAuGsY5KY+vImI0gVG1DHsSWfwWwRAQeJ03dnMYMUMQscYpbY3/ua HSQhDJR4OukAWBGLgKrEulm7WEFsXgEPiRv/rzJCrJOXeHq/jw3E5gSKv9zUDRTnANrmLrHw p/8ERt4FjAyrGEVTC5ILipPScw31ihNzi0vz0vWS83M3MYK9/kxqB+PKBotDjAIcjEo8vApp mgFCrIllxZW5hxglOJiVRHiLgrQChHhTEiurUovy44tKc1KLDzFKc7AoifMae3/1FxJITyxJ zU5NLUgtgskycXBKNTAqcDYXcsQczrq9LfPPhArWrTndn2o6V6mvFFe+dTzm80b1rREsElL7 JWISmZXvGFx9Evgry8NWgTNDLmlG6tPDC33/JLvZx0Z8ztpc6/F6Wt+/yE/Omyc/COIQVXxV ectJ1qaOacONGO711+uCthy6MsnLxH7fpf40Lj39uedjOVY5VR5dmaXEUpyRaKjFXFScCACe enTD9gEAAA== 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 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;