linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 12/36] input: touchscreen: atmel: Remove useless setting of min_buffers_needed
       [not found] <20231204132323.22811-1-benjamin.gaignard@collabora.com>
@ 2023-12-04 13:22 ` Benjamin Gaignard
  2023-12-04 13:23 ` [PATCH v2 35/36] input: touchscreen: sur40: Fix misuse of min_buffers_needed field Benjamin Gaignard
  1 sibling, 0 replies; 2+ messages in thread
From: Benjamin Gaignard @ 2023-12-04 13:22 UTC (permalink / raw)
  To: hverkuil, mchehab, tfiga, m.szyprowski, matt.ranostay
  Cc: linux-kernel, linux-media, linux-staging, kernel,
	Benjamin Gaignard, Nick Dyer, Dmitry Torokhov, linux-input

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: Nick Dyer <nick@shmanahar.org>
CC: Dmitry Torokhov <dmitry.torokhov@gmail.com>
CC: linux-input@vger.kernel.org
---
 drivers/input/touchscreen/atmel_mxt_ts.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c
index 20094b9899f0..d98cf9560511 100644
--- a/drivers/input/touchscreen/atmel_mxt_ts.c
+++ b/drivers/input/touchscreen/atmel_mxt_ts.c
@@ -2546,7 +2546,6 @@ static const struct vb2_queue mxt_queue = {
 	.ops = &mxt_queue_ops,
 	.mem_ops = &vb2_vmalloc_memops,
 	.timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC,
-	.min_buffers_needed = 1,
 };
 
 static int mxt_vidioc_querycap(struct file *file, void *priv,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH v2 35/36] input: touchscreen: sur40: Fix misuse of min_buffers_needed field
       [not found] <20231204132323.22811-1-benjamin.gaignard@collabora.com>
  2023-12-04 13:22 ` [PATCH v2 12/36] input: touchscreen: atmel: Remove useless setting of min_buffers_needed Benjamin Gaignard
@ 2023-12-04 13:23 ` Benjamin Gaignard
  1 sibling, 0 replies; 2+ messages in thread
From: Benjamin Gaignard @ 2023-12-04 13:23 UTC (permalink / raw)
  To: hverkuil, mchehab, tfiga, m.szyprowski, matt.ranostay
  Cc: linux-kernel, linux-media, linux-staging, kernel,
	Benjamin Gaignard, Dmitry Torokhov, linux-input

'min_buffers_needed' is suppose to be used to indicate the number
of buffers needed by DMA engine to start streaming.
sur40 touchscreen driver doesn'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.

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
CC: Dmitry Torokhov <dmitry.torokhov@gmail.com>
CC: linux-input@vger.kernel.org
---
 drivers/input/touchscreen/sur40.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/input/touchscreen/sur40.c b/drivers/input/touchscreen/sur40.c
index e7d2a52169a0..4da3063c352e 100644
--- a/drivers/input/touchscreen/sur40.c
+++ b/drivers/input/touchscreen/sur40.c
@@ -1124,7 +1124,7 @@ static const struct vb2_queue sur40_queue = {
 	.ops = &sur40_queue_ops,
 	.mem_ops = &vb2_dma_sg_memops,
 	.timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC,
-	.min_buffers_needed = 3,
+	.min_reqbufs_allocation = 3,
 };
 
 static const struct v4l2_file_operations sur40_video_fops = {
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-12-04 13:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20231204132323.22811-1-benjamin.gaignard@collabora.com>
2023-12-04 13:22 ` [PATCH v2 12/36] input: touchscreen: atmel: Remove useless setting of min_buffers_needed Benjamin Gaignard
2023-12-04 13:23 ` [PATCH v2 35/36] input: touchscreen: sur40: Fix misuse of min_buffers_needed field Benjamin Gaignard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).