All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Gaignard <benjamin.gaignard@collabora.com>
To: 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,
	Benjamin Gaignard <benjamin.gaignard@collabora.com>
Subject: [PATCH v2 01/36] media: usb: cx231xx: Remove useless setting of min_buffers_needed
Date: Mon,  4 Dec 2023 14:22:48 +0100	[thread overview]
Message-ID: <20231204132323.22811-2-benjamin.gaignard@collabora.com> (raw)
In-Reply-To: <20231204132323.22811-1-benjamin.gaignard@collabora.com>

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>
---
 drivers/media/usb/cx231xx/cx231xx-417.c   | 1 -
 drivers/media/usb/cx231xx/cx231xx-video.c | 2 --
 2 files changed, 3 deletions(-)

diff --git a/drivers/media/usb/cx231xx/cx231xx-417.c b/drivers/media/usb/cx231xx/cx231xx-417.c
index 45973fe690b2..24c94cfb5268 100644
--- a/drivers/media/usb/cx231xx/cx231xx-417.c
+++ b/drivers/media/usb/cx231xx/cx231xx-417.c
@@ -1782,7 +1782,6 @@ int cx231xx_417_register(struct cx231xx *dev)
 	q->ops = &cx231xx_video_qops;
 	q->mem_ops = &vb2_vmalloc_memops;
 	q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
-	q->min_buffers_needed = 1;
 	q->lock = &dev->lock;
 	err = vb2_queue_init(q);
 	if (err)
diff --git a/drivers/media/usb/cx231xx/cx231xx-video.c b/drivers/media/usb/cx231xx/cx231xx-video.c
index c8eb4222319d..ce44114e2188 100644
--- a/drivers/media/usb/cx231xx/cx231xx-video.c
+++ b/drivers/media/usb/cx231xx/cx231xx-video.c
@@ -1811,7 +1811,6 @@ int cx231xx_register_analog_devices(struct cx231xx *dev)
 	q->ops = &cx231xx_video_qops;
 	q->mem_ops = &vb2_vmalloc_memops;
 	q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
-	q->min_buffers_needed = 1;
 	q->lock = &dev->lock;
 	ret = vb2_queue_init(q);
 	if (ret)
@@ -1871,7 +1870,6 @@ int cx231xx_register_analog_devices(struct cx231xx *dev)
 	q->ops = &cx231xx_vbi_qops;
 	q->mem_ops = &vb2_vmalloc_memops;
 	q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
-	q->min_buffers_needed = 1;
 	q->lock = &dev->lock;
 	ret = vb2_queue_init(q);
 	if (ret)
-- 
2.39.2


  reply	other threads:[~2023-12-04 13:23 UTC|newest]

Thread overview: 54+ 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 ` Benjamin Gaignard [this message]
2023-12-04 13:22 ` [PATCH v2 02/36] media: chips-media: coda: Remove useless setting of min_buffers_needed 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
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   ` 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 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=20231204132323.22811-2-benjamin.gaignard@collabora.com \
    --to=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.