Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp3711220rdh; Tue, 28 Nov 2023 01:28:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IEfCpA70ie00Q+yWXJ/TdeH0eQumb0zL88jk2wBsf83UYzmBrfr4MoGcDc1bnwtWZyU9zog X-Received: by 2002:a17:903:1212:b0:1cc:70dd:62c3 with SMTP id l18-20020a170903121200b001cc70dd62c3mr14807391plh.30.1701163691235; Tue, 28 Nov 2023 01:28:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701163691; cv=none; d=google.com; s=arc-20160816; b=PX32dFa01fpDhjmlskiBaUW3fjoTDjE4lS5S91SPrJJ5Nz5esymkFnHc3hgOatrSb8 8Lvmx5Fsl0g3KcVvxds2ZefjkMPmG3B/2aAI0nKD0BoSva3bxhh4DoBMmzCzdMjGVYFF HFW7664j571e0ErMTQLLV4eQagPesMMmIS4dBeLs51800reBLLV0nhkwQZ461rC1kRRW kZ7U401CIGKu/oFivDLQuX+19+tUrfHL2xZpyoLc2tUEztSrkTJaoDVituA0zD3W3qOk 6KHqAGUzq4X8ppEynfLBz3KZZztYrD243pxzXm2+/lx2sExsoXIBFv6r9AyQ+8AGZ2xo QBlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=Z5GZ1cB9pKK23OqS6OplSteBYe8gnO0cBoeNPG8Ac0c=; fh=S06uDi72FpqSgcyGqgrV4CZxLbriXPeBr3IMlhPmqvg=; b=QEBeGhVTGT3O2TZ8KE3gFgYlu2ZsAcuQmiCY6/N6iMm+uK9+8wR936XUJDp0qNngia 3N1JIJpkplK+POAsGBpUvSpWkNc1D0E1BM5iUQwI6O9lVRKG7ieGEh+2IcuvNuaNg87c OK5ONU+PleAF5vAXU3MDv77CQpZBhkxU2wsrBfYQ1gTOY0AlePmnH/xgLDmSg5IhBrW4 ONceJbR6k/N2dByW1JKIQf/hgIoiFLRzPig+OBsNT708FgywNQBlWVPKGBiUJWrUBn06 I83ac975SbGTHEHRMOLzX/flffPuqqluLIZ8ed/dLz60vBHWLZqw6X8jIHWcX6gkpGAj S1og== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=i5RnCMTB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id bj4-20020a170902850400b001cc53dbf53dsi11189169plb.648.2023.11.28.01.28.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Nov 2023 01:28:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=i5RnCMTB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id B5FD9809B75A; Tue, 28 Nov 2023 01:28:06 -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 S231316AbjK1J1w (ORCPT + 99 others); Tue, 28 Nov 2023 04:27:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45312 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229994AbjK1J1v (ORCPT ); Tue, 28 Nov 2023 04:27:51 -0500 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 00C26CC; Tue, 28 Nov 2023 01:27:57 -0800 (PST) Received: from [100.122.216.38] (ec2-34-240-57-77.eu-west-1.compute.amazonaws.com [34.240.57.77]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: benjamin.gaignard) by madras.collabora.co.uk (Postfix) with ESMTPSA id 3351366072A7; Tue, 28 Nov 2023 09:27:55 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1701163675; bh=Z5GZ1cB9pKK23OqS6OplSteBYe8gnO0cBoeNPG8Ac0c=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=i5RnCMTBTHvS1nFSTQxvTB1oI3D/D8BZLy5P1ETi5ooitBjJKYfaOtGRyv3aH7TxM yT9Ue/rJLT7cUpYByL10KqK4iJoTHNFYl4Fwgqw9vH3BbpqgSF1QLUefMll7kiGq18 +07u33xFwmf/Z2nbeY/23JZD+XKRF2sYf1QshZNJsZPPuSWbzh6wO77FyRI410ZIIJ uWs2TtPS6szMZCYRhRvVIFtZxKgAvnxwH8RcaZ1de1YDfPFuhDuBwN3MmsiHI4xsUt BOpkmtJi1xKR6iK7fPIw1VsA0YzaQibavK8i4oeVw7rxhd7gdZ+Meomef+VHIaLChE od1fkkrUgVbOA== Message-ID: <7aa0e48b-6ddc-4af3-9b42-aa48c29be2e1@collabora.com> Date: Tue, 28 Nov 2023 10:27:52 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 02/55] media: test-drivers: Stop abusing of min_buffers_needed field To: Shuah Khan , 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, Kieran Bingham References: <20231127165454.166373-1-benjamin.gaignard@collabora.com> <20231127165454.166373-3-benjamin.gaignard@collabora.com> Content-Language: en-US From: Benjamin Gaignard In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,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]); Tue, 28 Nov 2023 01:28:06 -0800 (PST) Le 27/11/2023 à 18:00, Shuah Khan a écrit : > On 11/27/23 09:54, Benjamin Gaignard wrote: >> 'min_buffers_needed' is suppose to be used to indicate the number >> of buffers needed by DMA engine to start streaming. >> Obvious test-drivers don't use DMA engine and just want to specify >> the minimum number of buffers to allocate when calling VIDIOC_REQBUFS. >> That 'min_reqbufs_allocation' field purpose so use it. >> While at it rename function parameter. >> > > So how ate the test-drivers currently abusing this field > and how does this change benefit? In videobuf2-core.h min_buffers_needed is documemented as: "the minimum number of buffers needed before @start_streaming can be called. Used when a DMA engine cannot be started unless at least this number of buffers have been queued into the driver." Test-drivers don't use DMA engine so they (ab)use of this variable, like Hans said in this RFC: https://www.spinics.net/lists/linux-media/msg244455.html The goal of this series is to distinguish the minimum number of buffers to be allocated in VIDIOC_REQBUF versus the minimum numbers of buffers needed before start streaming. Regards, Benjamin > > I don't have objections to this change, I want to understand > it a bit more. I would like to see more details on why this > change is needed. > > thanks, > -- Shuah