<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/include/media/videobuf2-core.h, branch linux-6.18.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.18.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.18.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2024-08-14T08:05:32Z</updated>
<entry>
<title>media: videobuf2-core: attach once if multiple planes share the same dbuf</title>
<updated>2024-08-14T08:05:32Z</updated>
<author>
<name>Yunke Cao</name>
<email>yunkec@chromium.org</email>
</author>
<published>2024-08-14T02:06:43Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=03a979b74dc1ad5aeed8026a84d8771842cb1631'/>
<id>urn:sha1:03a979b74dc1ad5aeed8026a84d8771842cb1631</id>
<content type='text'>
When multiple planes use the same dma buf, each plane will have its own dma
buf attachment and mapping. It is a waste of IOVA space.

This patch adds a dbuf_duplicated boolean in vb2_plane. If a plane's dbuf
is the same as an existing plane, do not create another attachment and
mapping.

Signed-off-by: Yunke Cao &lt;yunkec@chromium.org&gt;
Acked-by: Tomasz Figa &lt;tfiga@chromium.org&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
</content>
</entry>
<entry>
<title>media: v4l2: Add REMOVE_BUFS ioctl</title>
<updated>2024-03-25T11:00:44Z</updated>
<author>
<name>Benjamin Gaignard</name>
<email>benjamin.gaignard@collabora.com</email>
</author>
<published>2024-03-14T15:32:24Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=a3293a85381ec9680aa2929547fbc76c5d87a1b2'/>
<id>urn:sha1:a3293a85381ec9680aa2929547fbc76c5d87a1b2</id>
<content type='text'>
VIDIOC_REMOVE_BUFS ioctl allows to remove buffers from a queue.
The number of buffers to remove in given by count field of
struct v4l2_remove_buffers and the range start at the index
specified in the same structure.

Signed-off-by: Benjamin Gaignard &lt;benjamin.gaignard@collabora.com&gt;
Reviewed-by: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
[hverkuil: vidioc-remove-bufs.rst: mention no bufs are freed on error]
</content>
</entry>
<entry>
<title>media: core: Add bitmap manage bufs array entries</title>
<updated>2024-03-25T11:00:44Z</updated>
<author>
<name>Benjamin Gaignard</name>
<email>benjamin.gaignard@collabora.com</email>
</author>
<published>2024-03-14T15:32:22Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=a286b0837e1390c558aabebc4f10b25b1f05bdce'/>
<id>urn:sha1:a286b0837e1390c558aabebc4f10b25b1f05bdce</id>
<content type='text'>
Add a bitmap field to know which of bufs array entries are
used or not.
Remove no more used num_buffers field from queue structure.
Use bitmap_find_next_zero_area() to find the first possible
range when creating new buffers to fill the gaps.
If no suitable range is found try to allocate less buffers
than requested.

Signed-off-by: Benjamin Gaignard &lt;benjamin.gaignard@collabora.com&gt;
Acked-by: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
</content>
</entry>
<entry>
<title>media: core: Rework how create_buf index returned value is computed</title>
<updated>2024-03-25T11:00:44Z</updated>
<author>
<name>Benjamin Gaignard</name>
<email>benjamin.gaignard@collabora.com</email>
</author>
<published>2024-03-14T15:32:21Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=6e423b75d0492e82fa6f057c615427ebd7ebe76c'/>
<id>urn:sha1:6e423b75d0492e82fa6f057c615427ebd7ebe76c</id>
<content type='text'>
When REMOVE_BUFS will be introduced holes could created in bufs array.
To be able to reuse these unused indices reworking how create-&gt;index
is set is mandatory.
Let __vb2_queue_alloc() decide which first index is correct and
forward this to the caller.

Signed-off-by: Benjamin Gaignard &lt;benjamin.gaignard@collabora.com&gt;
Acked-by: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
</content>
</entry>
<entry>
<title>media: videobuf2: Add min_reqbufs_allocation field to vb2_queue structure</title>
<updated>2024-03-25T11:00:44Z</updated>
<author>
<name>Benjamin Gaignard</name>
<email>benjamin.gaignard@collabora.com</email>
</author>
<published>2024-03-14T15:32:19Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=6662edcd32ccf939849cd1cd4ff04733a20ef97a'/>
<id>urn:sha1:6662edcd32ccf939849cd1cd4ff04733a20ef97a</id>
<content type='text'>
Add 'min_reqbufs_allocation' field in the vb2_queue structure so drivers
can specify the minimum number of buffers to allocate when calling
VIDIOC_REQBUFS.
When initializing the queue, v4l2 core makes sure that the following
constraints are respected:
- the minimum number of buffers to allocate must be at least 2 because
one buffer is used by the hardware while the other is being processed
by userspace.
-if the driver needs 'min_queued_buffers' in the queue before calling
start_streaming(), then the minimum requirement is 'min_queued_buffers + 1'
to keep at least one buffer available for userspace.

Simplify __vb2_init_fileio() by using 'min_reqbufs_allocation' directly
to avoid duplicating the minimum number of buffers to allocate computation.

Signed-off-by: Benjamin Gaignard &lt;benjamin.gaignard@collabora.com&gt;
Reviewed-by: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
</content>
</entry>
<entry>
<title>media: videobuf2: Update vb2_is_busy() logic</title>
<updated>2024-03-25T11:00:44Z</updated>
<author>
<name>Benjamin Gaignard</name>
<email>benjamin.gaignard@collabora.com</email>
</author>
<published>2024-03-14T15:32:18Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=d7cdb5946f6394c92916ea9502393b7ffe11fed9'/>
<id>urn:sha1:d7cdb5946f6394c92916ea9502393b7ffe11fed9</id>
<content type='text'>
Do not rely on the number of allocated buffers to know if the
queue is busy but on a flag set when at least one buffer has been allocated
by REQBUFS or CREATE_BUFS ioctl.
The flag is reset when REQBUFS is called with count = 0 or the file
handle is closed.
This is needed because remove buffers feature will be able to remove
all the buffers from a queue while streaming so relying on the number
of allocated buffers in the queue won't be possible.

Signed-off-by: Benjamin Gaignard &lt;benjamin.gaignard@collabora.com&gt;
Reviewed-by: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
</content>
</entry>
<entry>
<title>media: videobuf2: Add missing doc comment for waiting_in_dqbuf</title>
<updated>2024-02-16T10:46:33Z</updated>
<author>
<name>Andrzej Pietrasiewicz</name>
<email>andrzej.p@collabora.com</email>
</author>
<published>2024-02-12T19:12:03Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=26a3a10342748862dcc8d22222563f6ca03d6ca3'/>
<id>urn:sha1:26a3a10342748862dcc8d22222563f6ca03d6ca3</id>
<content type='text'>
While at it rearrange other comments to match the order of struct members.

Fixes: d65842f7126a ("media: vb2: add waiting_in_dqbuf flag")

Signed-off-by: Andrzej Pietrasiewicz &lt;andrzej.p@collabora.com&gt;
Acked-by: Tomasz Figa &lt;tfiga@chromium.org&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
</content>
</entry>
<entry>
<title>media: videobuf2: Fix doc comment</title>
<updated>2024-02-05T11:57:44Z</updated>
<author>
<name>Andrzej Pietrasiewicz</name>
<email>andrzej.p@collabora.com</email>
</author>
<published>2024-01-05T12:54:37Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=8b9911e553e762ebbe626270ce11b008736f1848'/>
<id>urn:sha1:8b9911e553e762ebbe626270ce11b008736f1848</id>
<content type='text'>
The documented struct member is called "planes" rather than "vb2_plane".
While at it, make the comments order follow struct members order.

Fixes: 2b1413245550 ("media: vb2-core: Improve kernel-doc markups")
Signed-off-by: Andrzej Pietrasiewicz &lt;andrzej.p@collabora.com&gt;
Acked-by: Tomasz Figa &lt;tfiga@chromium.org&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
</content>
</entry>
<entry>
<title>media: videobuf2: core: Rename min_buffers_needed field in vb2_queue</title>
<updated>2023-12-13T16:31:27Z</updated>
<author>
<name>Benjamin Gaignard</name>
<email>benjamin.gaignard@collabora.com</email>
</author>
<published>2023-12-11T13:32:49Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=80c2b40a51393add616a1fd186a1cc10bd676a3f'/>
<id>urn:sha1:80c2b40a51393add616a1fd186a1cc10bd676a3f</id>
<content type='text'>
Rename min_buffers_needed into min_queued_buffers and update
the documentation about it.

Signed-off-by: Benjamin Gaignard &lt;benjamin.gaignard@collabora.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
[hverkuil: Drop the change where min_queued_buffers + 1 buffers would be]
[hverkuil: allocated. Now this patch only renames this field instead of making]
[hverkuil: a functional change as well.]
[hverkuil: Renamed 3 remaining min_buffers_needed occurrences.]
</content>
</entry>
<entry>
<title>media: media videobuf2: Be more flexible on the number of queue stored buffers</title>
<updated>2023-11-23T11:37:39Z</updated>
<author>
<name>Benjamin Gaignard</name>
<email>benjamin.gaignard@collabora.com</email>
</author>
<published>2023-11-09T16:34:59Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=c838530d230bc638d79b78737fc4488ffc28c1ee'/>
<id>urn:sha1:c838530d230bc638d79b78737fc4488ffc28c1ee</id>
<content type='text'>
Add 'max_num_buffers' field in vb2_queue struct to let drivers decide
how many buffers could be stored in a queue.
This require 'bufs' array to be allocated at queue init time and freed
when releasing the queue.
By default VB2_MAX_FRAME remains the limit.

Signed-off-by: Benjamin Gaignard &lt;benjamin.gaignard@collabora.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt;
</content>
</entry>
</feed>
