public inbox for linux-staging@lists.linux.dev
 help / color / mirror / Atom feed
From: Eugen Hristev <eugen.hristev@collabora.com>
To: Hans Verkuil <hverkuil@xs4all.nl>,
	Benjamin Gaignard <benjamin.gaignard@collabora.com>,
	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
Subject: Re: [PATCH v2 03/36] media: microchip: Remove useless setting of min_buffers_needed
Date: Mon, 4 Dec 2023 16:25:39 +0200	[thread overview]
Message-ID: <1823eb2d-49bf-40b1-8952-c084fe2f8a88@collabora.com> (raw)
In-Reply-To: <ab06b2c0-a290-46cd-9d97-3f9f6e3bbb36@xs4all.nl>

On 12/4/23 16:03, Hans Verkuil wrote:
> On 04/12/2023 14:22, Benjamin Gaignard wrote:
>> This driver uses min_buffers_needed which vb2 uses to ensure
>> start_streaming is called when at least 'min_buffers_needed'
>> buffers are queued. However, this driver doesn't need this,
>> it can stream fine without any buffers queued.
>> Just drop this unnecessary restriction.
>>
>> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
>> CC: Eugen Hristev <eugen.hristev@collabora.com>
>> ---
>>  drivers/media/platform/microchip/microchip-isc-base.c | 1 -
>>  1 file changed, 1 deletion(-)
>>
>> diff --git a/drivers/media/platform/microchip/microchip-isc-base.c b/drivers/media/platform/microchip/microchip-isc-base.c
>> index 3fba0e2844b6..63c39981f47a 100644
>> --- a/drivers/media/platform/microchip/microchip-isc-base.c
>> +++ b/drivers/media/platform/microchip/microchip-isc-base.c
>> @@ -1821,7 +1821,6 @@ static int isc_async_complete(struct v4l2_async_notifier *notifier)
>>  	q->mem_ops		= &vb2_dma_contig_memops;
>>  	q->timestamp_flags	= V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
>>  	q->lock			= &isc->lock;
>> -	q->min_buffers_needed	= 1;
> 
> I don't think this can be dropped. Looking at the isc_start_streaming() function
> it expects to have at least one buffer queued.

Stream goes frame by frame with DMA directly into the buffers.
Will this still work without any buffers queued ?

> 
> Regards,
> 
> 	Hans
> 
>>  	q->dev			= isc->dev;
>>  
>>  	ret = vb2_queue_init(q);
> 


  reply	other threads:[~2023-12-04 14:25 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-04 13:22 [PATCH v2 00/36] Clean up min_buffers_needed misusages Benjamin Gaignard
2023-12-04 13:22 ` [PATCH v2 01/36] media: usb: cx231xx: Remove useless setting of min_buffers_needed Benjamin Gaignard
2023-12-04 13:22 ` [PATCH v2 02/36] media: chips-media: coda: " Benjamin Gaignard
2023-12-04 13:45   ` Philipp Zabel
2023-12-04 13:22 ` [PATCH v2 03/36] media: microchip: " Benjamin Gaignard
2023-12-04 14:03   ` Hans Verkuil
2023-12-04 14:25     ` Eugen Hristev [this message]
2023-12-04 13:22 ` [PATCH v2 04/36] media: amphion: " Benjamin Gaignard
2023-12-04 13:22 ` [PATCH v2 05/36] media: qcom: venus: " Benjamin Gaignard
2023-12-04 13:22 ` [PATCH v2 06/36] media: i2c: video-i2c: " Benjamin Gaignard
2023-12-04 13:22 ` [PATCH v2 07/36] media: dvb-core: " Benjamin Gaignard
2023-12-04 14:23   ` Hans Verkuil
2023-12-04 13:22 ` [PATCH v2 08/36] media: atmel: " Benjamin Gaignard
2023-12-04 14:24   ` Hans Verkuil
2023-12-04 13:22 ` [PATCH v2 09/36] media: ipu3: " Benjamin Gaignard
2023-12-04 13:22 ` [PATCH v2 10/36] media: ti: am437x: " Benjamin Gaignard
2023-12-04 14:29   ` Hans Verkuil
2023-12-04 13:22 ` [PATCH v2 11/36] media: ti: davinci: " Benjamin Gaignard
2023-12-04 14:30   ` Hans Verkuil
2023-12-04 13:22 ` [PATCH v2 12/36] input: touchscreen: atmel: " Benjamin Gaignard
2023-12-04 13:23 ` [PATCH v2 13/36] media: ti: j721e-csi2rx: " Benjamin Gaignard
2023-12-04 14:31   ` Hans Verkuil
2023-12-04 13:23 ` [PATCH v2 14/36] media: ti: omap: " Benjamin Gaignard
2023-12-04 14:32   ` Hans Verkuil
2023-12-04 13:23 ` [PATCH v2 15/36] media: pci: intel: ipu3: " Benjamin Gaignard
2023-12-04 14:36   ` Hans Verkuil
2023-12-04 13:23 ` [PATCH v2 16/36] videobuf2: Add min_reqbufs_allocation field to vb2_queue structure Benjamin Gaignard
2023-12-04 13:23 ` [PATCH v2 17/36] media: test-drivers: Fix misuse of min_buffers_needed field Benjamin Gaignard
2023-12-04 14:42   ` Hans Verkuil
2023-12-04 13:23 ` [PATCH v2 18/36] media: usb: dvb-usb: cxusb-analog: " Benjamin Gaignard
2023-12-04 13:23 ` [PATCH v2 19/36] media: usb: gspca: " Benjamin Gaignard
2023-12-04 13:23 ` [PATCH v2 20/36] media: atmel: " Benjamin Gaignard
2023-12-04 14:52   ` Hans Verkuil
2023-12-04 13:23 ` [PATCH v2 21/36] media: imx7-media-csi: " Benjamin Gaignard
2023-12-04 13:23 ` [PATCH v2 22/36] media: nuvoton: " Benjamin Gaignard
2023-12-04 13:23 ` [PATCH v2 23/36] media: sti: hva: " Benjamin Gaignard
2023-12-04 13:23 ` [PATCH v2 24/36] media: rockchip: rkisp1: " Benjamin Gaignard
2023-12-04 13:23 ` [PATCH v2 25/36] media: aspeed: " Benjamin Gaignard
2023-12-04 14:59   ` Hans Verkuil
2023-12-04 13:23 ` [PATCH v2 26/36] media: sun4i-csi: " Benjamin Gaignard
2023-12-04 13:23 ` [PATCH v2 27/36] media: sunxi: sun8i-di: " Benjamin Gaignard
2023-12-04 13:23 ` [PATCH v2 28/36] media: sun8i-rotate: " Benjamin Gaignard
2023-12-04 13:23 ` [PATCH v2 29/36] media: sunxi: sun6i-csi: " Benjamin Gaignard
2023-12-04 13:23 ` [PATCH v2 30/36] media: imx: " Benjamin Gaignard
2023-12-04 13:52   ` Philipp Zabel
2023-12-04 13:23 ` [PATCH v2 31/36] media: starfive: " Benjamin Gaignard
2023-12-04 15:07   ` Hans Verkuil
2023-12-04 13:23 ` [PATCH v2 32/36] media: tegra-video: " Benjamin Gaignard
2023-12-04 13:23 ` [PATCH v2 33/36] media: ti: cal: " Benjamin Gaignard
2023-12-04 15:10   ` Hans Verkuil
2023-12-04 13:23 ` [PATCH v2 34/36] media: saa7146: " Benjamin Gaignard
2023-12-04 13:23 ` [PATCH v2 35/36] input: touchscreen: sur40: " Benjamin Gaignard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1823eb2d-49bf-40b1-8952-c084fe2f8a88@collabora.com \
    --to=eugen.hristev@collabora.com \
    --cc=benjamin.gaignard@collabora.com \
    --cc=hverkuil@xs4all.nl \
    --cc=kernel@collabora.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=m.szyprowski@samsung.com \
    --cc=matt.ranostay@konsulko.com \
    --cc=mchehab@kernel.org \
    --cc=tfiga@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox