From: Greg Kroah-Hartman Date: Sun, 21 Jan 2024 08:55:42 +0000 (+0100) Subject: drop queue-6.6/media-videobuf2-request-more-buffers-for-vb2_read.patch X-Git-Tag: v4.19.306~120 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2151d9a51b7165660bd186d5343509bfe8276c04;p=thirdparty%2Fkernel%2Fstable-queue.git drop queue-6.6/media-videobuf2-request-more-buffers-for-vb2_read.patch Broke the build :( --- diff --git a/queue-6.6/media-videobuf2-request-more-buffers-for-vb2_read.patch b/queue-6.6/media-videobuf2-request-more-buffers-for-vb2_read.patch deleted file mode 100644 index d70a4158b39..00000000000 --- a/queue-6.6/media-videobuf2-request-more-buffers-for-vb2_read.patch +++ /dev/null @@ -1,65 +0,0 @@ -From 02b0b5beb3db901d03987ed1c25f5b78a4869636 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Thu, 30 Nov 2023 13:58:12 +0100 -Subject: media: videobuf2: request more buffers for vb2_read - -From: Hans Verkuil - -[ Upstream commit 350ab13e1382f2afcc2285041a1e75b80d771c2c ] - -The vb2 read support requests 1 buffer, leaving it to the driver -to increase this number to something that works. - -Unfortunately, drivers do not deal with this reliably, and in fact -this caused problems for the bttv driver and reading from /dev/vbiX, -causing every other VBI frame to be all 0. - -Instead, request as the number of buffers whatever is the maximum of -2 and q->min_buffers_needed+1. - -In order to start streaming you need at least q->min_buffers_needed -queued buffers, so add 1 buffer for processing. And if that field -is 0, then choose 2 (again, one buffer is being filled while the -other one is being processed). - -This certainly makes more sense than requesting just 1 buffer, and -the VBI bttv support is now working again. - -It turns out that the old videobuf1 behavior of bttv was to allocate -8 (video) and 4 (vbi) buffers when used with read(). After the vb2 -conversion that changed to 2 for both. With this patch it is 3, which -is really all you need. - -Signed-off-by: Hans Verkuil -Fixes: b7ec3212a73a ("media: bttv: convert to vb2") -Tested-by: Dr. David Alan Gilbert -Signed-off-by: Mauro Carvalho Chehab -Signed-off-by: Sasha Levin ---- - drivers/media/common/videobuf2/videobuf2-core.c | 9 +++++++-- - 1 file changed, 7 insertions(+), 2 deletions(-) - -diff --git a/drivers/media/common/videobuf2/videobuf2-core.c b/drivers/media/common/videobuf2/videobuf2-core.c -index cf6727d9c81f..468191438849 100644 ---- a/drivers/media/common/videobuf2/videobuf2-core.c -+++ b/drivers/media/common/videobuf2/videobuf2-core.c -@@ -2648,9 +2648,14 @@ static int __vb2_init_fileio(struct vb2_queue *q, int read) - return -EBUSY; - - /* -- * Start with count 1, driver can increase it in queue_setup() -+ * Start with q->min_buffers_needed + 1, driver can increase it in -+ * queue_setup() -+ * -+ * 'min_buffers_needed' buffers need to be queued up before you -+ * can start streaming, plus 1 for userspace (or in this case, -+ * kernelspace) processing. - */ -- count = 1; -+ count = max(2, q->min_buffers_needed + 1); - - dprintk(q, 3, "setting up file io: mode %s, count %d, read_once %d, write_immediately %d\n", - (read) ? "read" : "write", count, q->fileio_read_once, --- -2.43.0 - diff --git a/queue-6.6/series b/queue-6.6/series index b2d214531dd..a9ffcf5a15a 100644 --- a/queue-6.6/series +++ b/queue-6.6/series @@ -268,7 +268,6 @@ rdma-hns-fix-memory-leak-in-free_mr_init.patch clk-qcom-gpucc-sm8150-update-the-gpu_cc_pll1-config.patch media-bttv-start_streaming-should-return-a-proper-er.patch media-bttv-add-back-vbi-hack.patch -media-videobuf2-request-more-buffers-for-vb2_read.patch media-imx-mipi-csis-fix-clock-handling-in-remove.patch media-imx-mipi-csis-drop-extra-clock-enable-at-probe.patch media-dt-bindings-media-rkisp1-fix-the-port-descript.patch