Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp834331ybi; Fri, 12 Jul 2019 05:25:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqx3OzbDaG2LqNwHGLX9Ej2F1JtsC92jYZyyJPFttXILbsJNdn9olOnDsoTjNqqVuQcBAly9 X-Received: by 2002:a63:7455:: with SMTP id e21mr4741451pgn.439.1562934348529; Fri, 12 Jul 2019 05:25:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562934348; cv=none; d=google.com; s=arc-20160816; b=WVOqpCeaJSrRh8eG0EcRqJ+58wUjI56izhP3ZE/Tw87KCmtOz+4JqlSzB7VkiGPqDD U8lcmMp7biHbp5OwyuDjpEiwAXWTos48yD1gRQvn8yBBEoMZ5zSC/pxlAzJQ6ZST79Jz bC5WoEOcCOk0bhSX26BrnmFAJWwnu+ZwKLMFsm3QC4ewkFEdLOpcPYwuaTzMhzPeMlak fV4mT3OC8RMCfXLOoW5c41kwa9Y7MVAX+QuiN1dCR0h+wWcmdGLVT51M1xHOSoEOM0Ll 2jqRjJUB7aukSMzZzr9QIT1HdDHR0cWSbY0oREEbiTnRBRHEepHf33RASSW2wB7Hk0gv hEuA== 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=vhWIgnpMCvzBzS2e0spf49akO2ciM4s0bf1ObmqkLz0=; b=g5Q340yKFJd1v/FA/PLNKrA9Yi+uOSGKZ3rfEDkNs4Hfie0q2HejvlPxkAiDaiwn6F yDQt3EASgygqiIAAFDQFRbScvNNn7Obi2xr6VbO+6mPE9r+KruGOZXge/YJe0nxz73M8 7zuzBKVzyu8ZHE5Ft5oAzEgsUBqfF3b23hcIUnoADPhHI6I3FVAJop3ettX7R4hRkFBh Tqw0emDpp2tZ3tIafkgklgCpxbCYb6XH5LvCjc0nd4cm6nTJSFc9R8jOpxwaN5zBsANQ 7PAobk6f0WtfX6/G/Uh2fQYPsJ8TjFV3jouvl/PBk4JY4ziI/wx+1bO8b1YsvG4Kt8Qn k9Sg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=OcZ7fFru; 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 6si8197525pgb.201.2019.07.12.05.25.32; Fri, 12 Jul 2019 05:25:48 -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=OcZ7fFru; 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 S1728132AbfGLMYa (ORCPT + 99 others); Fri, 12 Jul 2019 08:24:30 -0400 Received: from mail.kernel.org ([198.145.29.99]:33082 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728116AbfGLMY2 (ORCPT ); Fri, 12 Jul 2019 08:24:28 -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 182622084B; Fri, 12 Jul 2019 12:24:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1562934267; bh=I6SLxy3JxmLRF8Y/fRbe5of/Af9MI5t5AuY12Ql3XQA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OcZ7fFruPFpR32tWGexbZa/qOMMaZAl8d/a3Xb8YpkcHh6v1eZ0V51QQL/4QV5ENY Y/i7uI016xqIgEW0kP5DwEbHh32az7Svqyzu3n6IUSHqwQ5GgCVDjwiYaqNMSkRfAm N6qi5T+DyqGVAoZ2Rq3R0S8v8NGTXD8JzYv42gsw= 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 4.19 89/91] staging: bcm2835-camera: Remove check of the number of buffers supplied Date: Fri, 12 Jul 2019 14:19:32 +0200 Message-Id: <20190712121626.482469113@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190712121621.422224300@linuxfoundation.org> References: <20190712121621.422224300@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 @@ -1329,16 +1329,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)