From patchwork Fri Dec 16 11:48:34 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pankaj Dubey X-Patchwork-Id: 9477797 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B7E0C607EE for ; Fri, 16 Dec 2016 11:48:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AD338285EB for ; Fri, 16 Dec 2016 11:48:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A1C7F2862A; Fri, 16 Dec 2016 11:48:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B5649285EB for ; Fri, 16 Dec 2016 11:48:18 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1cHqyQ-0005fF-MD; Fri, 16 Dec 2016 11:46:50 +0000 Received: from mailout1.samsung.com ([203.254.224.24]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1cHqy7-0005Xz-DB for linux-arm-kernel@lists.infradead.org; Fri, 16 Dec 2016 11:46:32 +0000 Received: from epcpsbgm2new.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OIA02TML0OTD2E0@mailout1.samsung.com> for linux-arm-kernel@lists.infradead.org; Fri, 16 Dec 2016 20:46:07 +0900 (KST) X-AuditID: cbfee61b-f796f6d000004092-4e-5853d3ff862c Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2new.samsung.com (EPCPMTA) with SMTP id EF.72.16530.FF3D3585; Fri, 16 Dec 2016 20:46:07 +0900 (KST) Received: from pankaj.sisodomain.com ([107.108.83.125]) by mmp2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OIA005QB0OMSDA0@mmp2.samsung.com>; Fri, 16 Dec 2016 20:46:07 +0900 (KST) From: Pankaj Dubey To: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/2] media: s5p-mfc: convert drivers to use the new vb2_queue dev field Date: Fri, 16 Dec 2016 17:18:34 +0530 Message-id: <1481888915-19624-2-git-send-email-pankaj.dubey@samsung.com> X-Mailer: git-send-email 2.7.4 In-reply-to: <1481888915-19624-1-git-send-email-pankaj.dubey@samsung.com> References: <1481888915-19624-1-git-send-email-pankaj.dubey@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprMIsWRmVeSWpSXmKPExsVy+t9jQd3/l4MjDPoPSlos+bmLyeLN2zVM FkfWXmWy6H/8mtni/PkN7BZnm96wW2x6fI3V4vKuOWwWPRu2slrMOL+PyWLZpj9MFqufVVgs 2vqF3eLunm2MDnweU35vZPXYtKqTzWPzknqPLf132T36tqxi9Pi8SS6ALcrNJiM1MSW1SCE1 Lzk/JTMv3VYpNMRN10JJIS8xN9VWKULXNyRISaEsMacUyDMyQAMOzgHuwUr6dgluGad2HmUs OCBY8b+zn6WB8RtfFyMnh4SAicTGneuZIWwxiQv31rN1MXJxCAnMYpR49KydGcL5ySjx89oV NpAqNgFdiSfv54IlRAQ6GCUudzSxgySYBbqYJPov54LYwgKREvO2LgaLswioSryas4EFxOYV 8JD4/+YpO8Q6OYmb5zrBVnMKeEosXXEPyOYA2uYhcbtTcwIj7wJGhlWMEqkFyQXFSem5Rnmp 5XrFibnFpXnpesn5uZsYwRHyTHoH4+Fd7ocYBTgYlXh4f2wLihBiTSwrrsw9xCjBwawkwrv0 UnCEEG9KYmVValF+fFFpTmrxIUZToLsmMkuJJucDozevJN7QxNzE3NjAwtzS0sRISZy3cfaz cCGB9MSS1OzU1ILUIpg+Jg5OqQbGyfGrlMKUnF5J57hUfHy7w2z6ckPNL7qP9A4ViNSeORj+ +qS+puDbtIVPWOafzD7E+EaVSYJ78/U6prPTPjcr3nGU3dJev0fl7ZZns7q/siXP3BUh83dy Y2X2zjvdr645Sp5+I7beSyDTfsLdDbcZ7HefMq9WT+mu/yr+/MK8O48Ftp+TaQiuUmIpzkg0 1GIuKk4EAMkZRL+mAgAA X-MTR: 20000000000000000@CPGS X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161216_034631_691436_BDBBACF1 X-CRM114-Status: UNSURE ( 9.82 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: javier@osg.samsung.com, mchehab@osg.samsung.com, Smitha T Murthy , krzk@kernel.org, jtp.park@samsung.com, kyungmin.park@samsung.com, kgene@kernel.org, hans.verkuil@cisco.com, Pankaj Dubey , mchehab@kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Smitha T Murthy commit 2548fee63d9e ("[media] media/platform: convert drivers to use the new vb2_queue dev field") has missed to set dev pointer of vb2_queue which will be used in reqbufs of mfc driver. Without this change following error is observed: --------------------------------------------------------------- V4L2 Codec decoding example application Kamil Debski Copyright 2012 Samsung Electronics Co., Ltd. Opening MFC. (mfc.c:mfc_open:58): MFC Info (/dev/video0): driver="s5p-mfc" \ bus_info="platform:12c30000.mfc0" card="s5p-mfc-dec" fd=0x4[ 42.339165] Remapping memory failed, error: -6 MFC Open Success. (main.c:main:711): Successfully opened all necessary files and devices (mfc.c:mfc_dec_setup_output:103): Setup MFC decoding OUTPUT buffer \ size=4194304 (requested=4194304) (mfc.c:mfc_dec_setup_output:120): Number of MFC OUTPUT buffers is 2 \ (requested 2) [App] Out buf phy : 0x00000000, virt : 0xffffffff Output Length is = 0x300000 Error (mfc.c:mfc_dec_setup_output:145): Failed to MMAP MFC OUTPUT buffer ------------------------------------------------------- Signed-off-by: Smitha T Murthy [pankaj.dubey: debugging issue and formatting commit message] Signed-off-by: Pankaj Dubey --- drivers/media/platform/s5p-mfc/s5p_mfc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c b/drivers/media/platform/s5p-mfc/s5p_mfc.c index 0a5b8f5..6ea8246 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc.c +++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c @@ -838,6 +838,7 @@ static int s5p_mfc_open(struct file *file) q->type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE; q->drv_priv = &ctx->fh; q->lock = &dev->mfc_mutex; + q->dev = &dev->plat_dev->dev; if (vdev == dev->vfd_dec) { q->io_modes = VB2_MMAP; q->ops = get_dec_queue_ops(); @@ -861,6 +862,7 @@ static int s5p_mfc_open(struct file *file) q->io_modes = VB2_MMAP; q->drv_priv = &ctx->fh; q->lock = &dev->mfc_mutex; + q->dev = &dev->plat_dev->dev; if (vdev == dev->vfd_dec) { q->io_modes = VB2_MMAP; q->ops = get_dec_queue_ops();