From patchwork Thu Jun 27 18:56:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 11020385 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 15EF31398 for ; Thu, 27 Jun 2019 19:04:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0CD56286FE for ; Thu, 27 Jun 2019 19:04:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0096928701; Thu, 27 Jun 2019 19:04:28 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A3BD1286F3 for ; Thu, 27 Jun 2019 19:04:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=gQ8DlXyrVCTt4Gjf9lnrqyh/5EnT3uKklJunqaot0dc=; b=XxFJFT5Zmvp/dWXRnXzr9luenZ kmiCiCRAZTi5qL2AQpovA6X7Gpaxwv0zSqI0P7+K05KR6nloAFGBF+Grt4FmfoawsgLwftjsuWSev pWvQnQ65nJsQLI7njajH0W8tKAShAXa+2jEqlLbBFuqqeUWLcCYDPx0s0cvwMlSlIyuc6VZs3H6S7 WWLpGmpKhR2xN8Dx/8lbeURm+y5Ma1S6aOsqny9Tz4NEOP7C9xjECtaZyNCJSw0nHnBR49XWgtwei iiGuWkt3e7xv9qAOB76ej4KxNW7MzZ5QBHQiemGCmXEvu0S9WzbqSZsk53oDRyteMmdYPyTd5OBQ0 qx7MY6jw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hgZh0-0000iT-FB; Thu, 27 Jun 2019 19:04:22 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hgZa2-0002Yg-V3; Thu, 27 Jun 2019 18:57:10 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:MIME-Version: Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=UlYEAB94tKg1JSkMFxMmT5mwl4Oe1E4VAwgAuTYl0Zk=; b=1MrfI8EKGXvNfNKg5h4nb7wNDp 61cS2yUUUDPDfGVRJgKkqd29PmJn3XrymrM5sGYFZ+YC8D0K9qDFYebd8I/29rW+oXCFLBxmEaoPK ozK5A7tvj8MNjYgUH671fY2ChXa9jPe7paiQgsaexX+aL7L3ofVfqRJkDc4GfbT7zvhyw066R6ZLZ R9bI9G9pRy3NMVL8lPd6XMKQ4q/jVegvGar+a5uhdBZxeOdoOPpT2avjApfmklY0FMLu7cto7n4wC bINH5yzXNhkLwee0YUv+ubw5Xm64K1se5CZTMDCac6beKYfnXtT3ORwVbZVVcfS6GJSgsDdK/KDLo SuqyHjlg==; Received: from mout.gmx.net ([212.227.15.19]) by merlin.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hgZZz-0002cG-K3; Thu, 27 Jun 2019 18:57:08 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1561661815; bh=8zy/CF8eq6vCciU1LYPKVRt1nppxuwPwBxjk8BgMHCI=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=OiMdz/sG7vnUhoMUouJV7XUASaR917O5b29ggMTZrpM+aNhu4zax4rINDSp1y5TAz i73CVq6TdG04Vx5YZSOzXzYS2SsMH5lDzBi7z046mTd0HStJHXmvlGxnvoc+3rmmyv qsF0nftIgZhok+qENMZFTeZ8EdX9Qze76+0MUf4o= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from localhost.localdomain ([37.4.249.111]) by mail.gmx.com (mrgmx002 [212.227.17.190]) with ESMTPSA (Nemesis) id 0LqQzp-1iBDQV3k81-00e1fu; Thu, 27 Jun 2019 20:56:55 +0200 From: Stefan Wahren To: Eric Anholt , Greg Kroah-Hartman , Dave Stevenson , Hans Verkuil , Mauro Carvalho Chehab Subject: [PATCH 16/31] staging: bcm2835-camera: Remove check of the number of buffers supplied Date: Thu, 27 Jun 2019 20:56:13 +0200 Message-Id: <1561661788-22744-17-git-send-email-wahrenst@gmx.net> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1561661788-22744-1-git-send-email-wahrenst@gmx.net> References: <1561661788-22744-1-git-send-email-wahrenst@gmx.net> X-Provags-ID: V03:K1:B9slWFuCxy+02ZPi3VQFLXOYRQyTHeed6m6D9LbksOSlspD/mcl lUiQc25qvasefD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jIy6 FgjJ4b3oliDcmKb5nnelSUgzMWYyP0Vcu487X6qho+2aHIIh9x/7dRwvT7dqvdp+IUwy0HEL4 ZIckcSqwQgbKofrC6zcjZtyjkXG65ijIkHFriSxhcVifpieV/WO5nPT6a4aQnsVTWZe8u8j+m fNKO9fqRzU/w4ew3oTmJkcSk0hsSLyfhIH49Pza4kLDBki5IBrCUC8tWATdTh8Na3Ff+TcUq7 7YoYkTGzEldgU8= X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devel@driverdev.osuosl.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-media@vger.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: Dave Stevenson Before commit "staging: bcm2835-camera: Remove V4L2/MMAL buffer remapping" there was a need to ensure that there were sufficient buffers supplied from the user to cover those being sent to the VPU (always 1). Now the buffers are linked 1:1 between MMAL and V4L2, therefore there is no need for that check, and indeed it is wrong as there is no need to submit all the buffers before starting streaming. Fixes: 938416707071 ("staging: bcm2835-camera: Remove V4L2/MMAL buffer remapping") Signed-off-by: Dave Stevenson --- drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c | 10 ---------- 1 file changed, 10 deletions(-) -- 2.7.4 diff --git a/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c b/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c index 4d63176..59eb812 100644 --- a/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c +++ b/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c @@ -1338,16 +1338,6 @@ static int port_enable(struct vchiq_mmal_instance *instance, if (port->enabled) return 0; - /* ensure there are enough buffers queued to cover the buffer headers */ - if (port->buffer_cb) { - hdr_count = 0; - list_for_each(buf_head, &port->buffers) { - hdr_count++; - } - if (hdr_count < port->current_buffer.num) - return -ENOSPC; - } - ret = port_action_port(instance, port, MMAL_MSG_PORT_ACTION_TYPE_ENABLE); if (ret)