Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp845702ybi; Fri, 12 Jul 2019 05:36:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqx6wjpoG7TAMJ36y18PXv02+NyNrRlUv68Yp4eNx9tFhZ8ybeCUox0iyt5XkITMV7zmrFQY X-Received: by 2002:a17:902:8c83:: with SMTP id t3mr11145297plo.93.1562935007040; Fri, 12 Jul 2019 05:36:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562935007; cv=none; d=google.com; s=arc-20160816; b=yYwQmuu624wDxEh7jB2EDtoU9IJGPSAv0ZG+WZ4D8A0EedQn8xI2KDbElluk0rl9ce ZwHczA+pbS6dNpn7Gofi++sWOIvJ2BhRViP6u+HnBGNRHcT8Rl/bAFww9PP+F0+xOLvd iQjnl+5MJJUVwHPQNHH9Mv6GMYgrV3fQRpFYLNRf9dB+VvuElQvRpED/fNvar4DaZ96u 1JSwe6EexIldtHYX61d26zUx0F1jjaXIaiqyZ7qecZIM6p7cLb5h71ALTYvv5FDfdWpz 3zaQzrPE1Ue7rYbbQjWU5oiOQ30p4BfU2YAI+ZfINuG9R/5avxK0NDOwQCDEfpOpm8nH FYiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=JYDTut+4u/DHSufEySc8qKZ2e01QSnR7NFKYCGtB0eA=; b=vJ/aKvOXUghxTlm5VXJIb6jUF2HIa7GibB2PrlNVtQeGVHAVRzrJrgipwm25Gqw71K ZOEpY8+v8ofj0au36Kr50tfVVCnt3x18mtZepD2VbrftRNcQ10PD40svdH5tUhmyWBtY Rcd9NP1vse09UvM7Is3YBh3n7rvmWII6CKVlKqiUatp/4KY1R9rHcWSsdDzHb6ed6RaA hZBGnqRVnVzB9LR4s+i9h6NQVwzCAekP0ih9S7wzNsBcrynGR6hKN4ai+Uq7XOCyZrp7 7PQ6TeGAeSRBcH5wxzz01FCozc0ndJ6bGVPjz6EqaKgYGGK8/ie8y14BFM6CHLp3qF9Y vXjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=DIEbhXCk; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e5si4076942pgc.29.2019.07.12.05.36.31; Fri, 12 Jul 2019 05:36:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=DIEbhXCk; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728197AbfGLMf3 (ORCPT + 99 others); Fri, 12 Jul 2019 08:35:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:54494 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729748AbfGLMee (ORCPT ); Fri, 12 Jul 2019 08:34:34 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id F148720645; Fri, 12 Jul 2019 12:34:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1562934873; bh=MSPgBwwjCbXeXXZrUmdqZApuH6gsttF8DqwzR4eoduQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DIEbhXCkRfENYqkKKZZUv2ArlHMxXKuFuoujeX+ZgLM1lnrRMs0E3qnEJza3+M/47 ZasRjy0rQD4+tRRVOei3tb+l8p6D3nbdiXqoTTrZ9h3whtjTjB+f9Xj2a6h3UXwXw0 KRkkPl6Dh2uAj5kP0dsVphrQ160R9H2MfkUGv02o= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dave Stevenson , Stefan Wahren , Hans Verkuil , Mauro Carvalho Chehab Subject: [PATCH 5.2 59/61] staging: bcm2835-camera: Remove check of the number of buffers supplied Date: Fri, 12 Jul 2019 14:20:12 +0200 Message-Id: <20190712121624.000598444@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190712121620.632595223@linuxfoundation.org> References: <20190712121620.632595223@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dave Stevenson commit bb8e97006d701ae725a177f8f322e5a75fa761b7 upstream. 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 Signed-off-by: Stefan Wahren Acked-by: Hans Verkuil Acked-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman --- drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c | 10 ---------- 1 file changed, 10 deletions(-) --- a/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c +++ b/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c @@ -1328,16 +1328,6 @@ static int port_enable(struct vchiq_mmal 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)