Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp2717878rdb; Mon, 4 Dec 2023 05:53:14 -0800 (PST) X-Google-Smtp-Source: AGHT+IEynKUByoTm1brOro4/jgxnhrx473YC2AHnhUAakyqIVfrqN8pAT7+Tkr5vax5luqfbK/V5 X-Received: by 2002:a05:6a20:9189:b0:18f:97c:5b88 with SMTP id v9-20020a056a20918900b0018f097c5b88mr1368711pzd.86.1701697994072; Mon, 04 Dec 2023 05:53:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701697994; cv=none; d=google.com; s=arc-20160816; b=F3O5SOeWROAC8IFQrVV1HxoWuEGJQoRoK5cG7HG8rbmq6xe347JnXk5f1JhfNPAEgX TSyrC8O4GUrYi+d9UVdeh0FLqJfIwEpAYVM0i/8sLTuTw+IdJPjfAjq90f8s+AoywwOF /GitRaXzcGCcgj8YL2NPLJM8eHtfpir90i2CtA+t6zSBFbszIrcA69s2LkO2XrpY7iI+ uawZQZsP17XcswRUhVWwWJI3HFuMRWi4N0aKEr9OJXfMYb/Z0kffxgChCCLjWCYrCKnl LHrACWwPVKoBYl9yp6e7uFOXbVDknVib1FdK3I8EgS/FaoDrYOE2NmvMBWQqijiQSPlP CRbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id; bh=wZyupqBMU3VbbtAJaaP1N+xDs6ssu8qTPnBEMeMj5uw=; fh=c3nerFMFqnxab57TbMEM5yO9UdsSJCoGiVavsX0WskQ=; b=Ql/LYqS/J20HqmmZ9fGrhxblOcR46jF/oBt/xHSeD/6w/4KHOGF00IwAnoer9E+Mhu wxPVsRg3o24Oq+nNE/m2cAYMZkx4A/wMkSRFceVELnVc/AEcqHZjMevQw0zZWiTIveuP vt1EdfE+3cv//W35rLM2wtEsrAq4dVIomYkWRns+cwwQyYLRKiu+ufGDl/pmLIu2UsSK qKl97JkZ6C+J91/blJtLPut6jWJkXWDKLkmELIkF2t1WoNQr3PuL+z8N5iVXTCO+BLef 0QqAvgjU7me/Z+Bsk23JeNXlHQTtxH/Rs7GgIku8mCn3fcCLfCuBBibV22qdg/tHmcUG PgSg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id u14-20020a056a00158e00b0069026254582si6858847pfk.98.2023.12.04.05.53.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 05:53:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id BD9EA8065EEF; Mon, 4 Dec 2023 05:53:11 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233875AbjLDNwn convert rfc822-to-8bit (ORCPT + 99 others); Mon, 4 Dec 2023 08:52:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53098 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234455AbjLDNwc (ORCPT ); Mon, 4 Dec 2023 08:52:32 -0500 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [IPv6:2a0a:edc0:2:b01:1d::104]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BC051D2 for ; Mon, 4 Dec 2023 05:52:35 -0800 (PST) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rA9NB-0001MR-FQ; Mon, 04 Dec 2023 14:52:33 +0100 Received: from [2a0a:edc0:0:900:1d::4e] (helo=lupine) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rA9NA-00DX4I-Py; Mon, 04 Dec 2023 14:52:32 +0100 Received: from pza by lupine with local (Exim 4.96) (envelope-from ) id 1rA9NA-000HGj-2K; Mon, 04 Dec 2023 14:52:32 +0100 Message-ID: Subject: Re: [PATCH v2 30/36] media: imx: Fix misuse of min_buffers_needed field From: Philipp Zabel To: Benjamin Gaignard , hverkuil@xs4all.nl, mchehab@kernel.org, tfiga@chromium.org, m.szyprowski@samsung.com, matt.ranostay@konsulko.com Cc: linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-staging@lists.linux.dev, kernel@collabora.com, Steve Longerbeam , Greg Kroah-Hartman , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team Date: Mon, 04 Dec 2023 14:52:32 +0100 In-Reply-To: <20231204132323.22811-31-benjamin.gaignard@collabora.com> References: <20231204132323.22811-1-benjamin.gaignard@collabora.com> <20231204132323.22811-31-benjamin.gaignard@collabora.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT User-Agent: Evolution 3.46.4-2 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: p.zabel@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Mon, 04 Dec 2023 05:53:11 -0800 (PST) Hi Benjamin, On Mo, 2023-12-04 at 14:23 +0100, Benjamin Gaignard wrote: > 'min_buffers_needed' is suppose to be used to indicate the number > of buffers needed by DMA engine to start streaming. > imx-media-capture driver doesn't use DMA engine and just want to specify > the minimum number of buffers to allocate when calling VIDIOC_REQBUFS. This is used by imx-media-csi and imx-ic-prpencvf. Both expect two buffers to setup the IDMAC DMA engine double buffer (see csi_idmac_setup_vb2_buf()/prp_setup_vb2_buf()). These functions can cope with less than two buffers queued, by using a special "underrun" buffer as a workaround, but the hardware does require two buffer addresses, so I'm not sure whether this really should be called a misuse of min_buffers_needed. regards Philipp