Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp847562ybi; Fri, 12 Jul 2019 05:38:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqyH0xaoUo20wX9YzZrwi6BIXGxIcTj5vSIea+5Ofcqf8korTR9E3clrhaOwGTfTKBC7n5X8 X-Received: by 2002:a17:90a:8a84:: with SMTP id x4mr11337936pjn.105.1562935117987; Fri, 12 Jul 2019 05:38:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562935117; cv=none; d=google.com; s=arc-20160816; b=SiyXs2sc8RP5Ox6pgsYZP044K7KDY7hGyE5ILqirIq1bS+Xnb4vZlI9g8TyP4IpRxH z/zXf/tXp63K8CaQY7U8RnlcSYnj0PCYavaeV5CPzJAUyrIyJnu0il4KyuvSVXVgekkU ykbOyavpz4MQikLNc+PcCodA+cxxR3Ty70e0OYy+CsCftFp3+PIy5AX2jh5x4svW9HTi 5VkjQvoJHexFhfOucAcuIhWg6ZZGZIXEhsSPgRM+wLr+XUOIwTzBO9uDdD4lF2MdhA39 bQ0D/AMMBT70sFcymAYcPJLpG8m4BlAVnSrJui3U/mAAVCBjv/CbpGwvjMiglupE6jxE iNLQ== 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=N1zOasMtjLBRtbCYiZDV8lWFO4KtqxDKsG4rouSdFTzoWpxsjAKo1wfVksAgN1O8W1 PdzIi/gFkdJnRM+YYL9hICK69AAPP978ptnvZcHPOGiFVLHFHyRo7JdqEF6dugF5yEIT nv3wi9p4z6V8qG6yEFll1+nr2OGIoOTn4AHcu26TKarNWfoqRanxUHs9tExKQWJp1E26 MNQi6Ij7mWz3GxA1O8YG52NhY5L7CnMXiGszlpofq8X3kL5ecsOJHQmYwmbMOfTpbsJB SOO6byC7elZphZABJC2lQ6xwmlH+NR8gsNXHazQQJa5ZZQtql9ccW1+a4l4Cuvvkjgmu RjYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=YlncjxuA; 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 q13si8265950pgr.514.2019.07.12.05.38.22; Fri, 12 Jul 2019 05:38:37 -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=YlncjxuA; 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 S1729154AbfGLMb2 (ORCPT + 99 others); Fri, 12 Jul 2019 08:31:28 -0400 Received: from mail.kernel.org ([198.145.29.99]:48090 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728961AbfGLMbX (ORCPT ); Fri, 12 Jul 2019 08:31:23 -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 AD2C2208E4; Fri, 12 Jul 2019 12:31:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1562934683; bh=MSPgBwwjCbXeXXZrUmdqZApuH6gsttF8DqwzR4eoduQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YlncjxuAmJEFasaCBotP4mBPVtFfM7A13W1KDMd+McqChwWIv7TA7JFUx9pmOnzKf Alj38EfLDHmSp+1do7E+3xmck/20tgMxRxkNSL2UflKKvgUZYGERNRANXpaOQD0Zr1 pEs9mz+7xquKmNUPRioEtp/WReW3G+cVc5Eya6t4= 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.1 136/138] staging: bcm2835-camera: Remove check of the number of buffers supplied Date: Fri, 12 Jul 2019 14:20:00 +0200 Message-Id: <20190712121633.926594793@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190712121628.731888964@linuxfoundation.org> References: <20190712121628.731888964@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)