<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/media/platform/broadcom, branch master</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=master</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2026-03-24T10:58:02Z</updated>
<entry>
<title>media: bcm2835-unicam: Fix RGB format / mbus code association</title>
<updated>2026-03-24T10:58:02Z</updated>
<author>
<name>Maxime Ripard</name>
<email>mripard@redhat.com</email>
</author>
<published>2026-03-09T15:07:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=08f9794d9b799b56b301d7537e8771f0d41f51a1'/>
<id>urn:sha1:08f9794d9b799b56b301d7537e8771f0d41f51a1</id>
<content type='text'>
The Unicam driver is a MIPI-CSI2 Receiver, that can capture RGB 4:4:4,
YCbCr 4:2:2, and raw formats.

RGB 4:4:4 is converted to the MIPI-CSI2 RGB888 video format, and
associated to the MEDIA_BUS_FMT_RGB888_1X24 media bus code.

However, V4L2_PIX_FMT_RGB24 is defined as having its color components in
the R, G and B order, from left to right. MIPI-CSI2 however defines the
RGB888 format with blue first, and that's what MEDIA_BUS_FMT_RGB888_1X24
defines too.

This essentially means that the R and B will be swapped compared to what
V4L2_PIX_FMT_RGB24 defines. The same situation occurs with
V4L2_PIX_FMT_BGR24 being associated to MEDIA_BUS_FMT_BGR888_1X24.

In order to fix the swapped components, we need to change the
association of V4L2_PIX_FMT_BGR24 to MEDIA_BUS_FMT_RGB888_1X24, and of
V4L2_PIX_FMT_RGB24 to MEDIA_BUS_FMT_BGR888_1X24.

Since the media bus code is exposed to userspace, and validated by
unicam's link_validate implementation, we need to explicitly accept (and
warn) the old association still to preserve backward compatibility.

Signed-off-by: Maxime Ripard &lt;mripard@redhat.com&gt;
Reviewed-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Sakari Ailus &lt;sakari.ailus@linux.intel.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil+cisco@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: bcm2835-unicam: remove reference to dropped driver in Kconfig</title>
<updated>2026-03-16T10:51:55Z</updated>
<author>
<name>Gaston Gonzalez</name>
<email>gascoar@gmail.com</email>
</author>
<published>2026-01-30T20:45:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ca511311479d7985da50900488d802412887ef28'/>
<id>urn:sha1:ca511311479d7985da50900488d802412887ef28</id>
<content type='text'>
The bcm2835-camera driver was dropped in commit &lt;90204a38a760&gt;.
Remove the paragraph in Kconfig making reference to it.

Signed-off-by: Gaston Gonzalez &lt;gascoar@gmail.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil+cisco@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: bcm2835-unicam: remove obsolete comment</title>
<updated>2026-03-16T10:51:55Z</updated>
<author>
<name>Gaston Gonzalez</name>
<email>gascoar@gmail.com</email>
</author>
<published>2026-01-30T20:45:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b8db6cf0c2e27dab6f4bc66b2cbf2cdedc07d35f'/>
<id>urn:sha1:b8db6cf0c2e27dab6f4bc66b2cbf2cdedc07d35f</id>
<content type='text'>
The bcm2835-camera driver was dropped in commit &lt;90204a38a760&gt;, but it
is still mentioned as a current driver in a comment section.

Remove the comment making reference to it.

Signed-off-by: Gaston Gonzalez &lt;gascoar@gmail.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil+cisco@kernel.org&gt;
</content>
</entry>
<entry>
<title>Convert 'alloc_obj' family to use the new default GFP_KERNEL argument</title>
<updated>2026-02-22T01:09:51Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2026-02-22T00:37:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43'/>
<id>urn:sha1:bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43</id>
<content type='text'>
This was done entirely with mindless brute force, using

    git grep -l '\&lt;k[vmz]*alloc_objs*(.*, GFP_KERNEL)' |
        xargs sed -i 's/\(alloc_objs*(.*\), GFP_KERNEL)/\1)/'

to convert the new alloc_obj() users that had a simple GFP_KERNEL
argument to just drop that argument.

Note that due to the extreme simplicity of the scripting, any slightly
more complex cases spread over multiple lines would not be triggered:
they definitely exist, but this covers the vast bulk of the cases, and
the resulting diff is also then easier to check automatically.

For the same reason the 'flex' versions will be done as a separate
conversion.

Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>treewide: Replace kmalloc with kmalloc_obj for non-scalar types</title>
<updated>2026-02-21T09:02:28Z</updated>
<author>
<name>Kees Cook</name>
<email>kees@kernel.org</email>
</author>
<published>2026-02-21T07:49:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=69050f8d6d075dc01af7a5f2f550a8067510366f'/>
<id>urn:sha1:69050f8d6d075dc01af7a5f2f550a8067510366f</id>
<content type='text'>
This is the result of running the Coccinelle script from
scripts/coccinelle/api/kmalloc_objs.cocci. The script is designed to
avoid scalar types (which need careful case-by-case checking), and
instead replace kmalloc-family calls that allocate struct or union
object instances:

Single allocations:	kmalloc(sizeof(TYPE), ...)
are replaced with:	kmalloc_obj(TYPE, ...)

Array allocations:	kmalloc_array(COUNT, sizeof(TYPE), ...)
are replaced with:	kmalloc_objs(TYPE, COUNT, ...)

Flex array allocations:	kmalloc(struct_size(PTR, FAM, COUNT), ...)
are replaced with:	kmalloc_flex(*PTR, FAM, COUNT, ...)

(where TYPE may also be *VAR)

The resulting allocations no longer return "void *", instead returning
"TYPE *".

Signed-off-by: Kees Cook &lt;kees@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: bcm2835-unicam: Fix for possible dummy buffer overrun</title>
<updated>2024-12-19T11:50:18Z</updated>
<author>
<name>Naushir Patuck</name>
<email>naush@raspberrypi.com</email>
</author>
<published>2024-11-27T11:15:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7b1ec3e38906224c2b201e3317d2b6c7fdbeff9b'/>
<id>urn:sha1:7b1ec3e38906224c2b201e3317d2b6c7fdbeff9b</id>
<content type='text'>
The Unicam hardware has been observed to cause a buffer overrun when
using the dummy buffer as a circular buffer. The conditions that cause
the overrun are not fully known, but it seems to occur when the memory
bus is heavily loaded.

To avoid the overrun, program the hardware with a buffer size of 0 when
using the dummy buffer. This will cause overrun into the allocated dummy
buffer, but avoid out of bounds writes.

Signed-off-by: Naushir Patuck &lt;naush@raspberrypi.com&gt;
Reviewed-by: Jacopo Mondi &lt;jacopo.mondi@ideasonboard.com&gt;
Signed-off-by: Sakari Ailus &lt;sakari.ailus@linux.intel.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+huawei@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: bcm2835-unicam: Disable trigger mode operation</title>
<updated>2024-12-19T11:50:18Z</updated>
<author>
<name>Naushir Patuck</name>
<email>naush@raspberrypi.com</email>
</author>
<published>2024-11-27T11:15:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=697a252bb2ea414cc1c0b4cf4e3d94a879eaf162'/>
<id>urn:sha1:697a252bb2ea414cc1c0b4cf4e3d94a879eaf162</id>
<content type='text'>
The imx219/imx708 sensors frequently generate a single corrupt frame
(image or embedded data) when the sensor first starts. This can either
be a missing line, or invalid samples within the line. This only occurrs
using the upstream Unicam kernel driver.

Disabling trigger mode elimiates this corruption. Since trigger mode is
a legacy feature copied from the firmware driver and not expected to be
needed, remove it. Tested on the Raspberry Pi cameras and shows no ill
effects.

Signed-off-by: Naushir Patuck &lt;naush@raspberrypi.com&gt;
Reviewed-by: Jacopo Mondi &lt;jacopo.mondi@ideasonboard.com&gt;
Signed-off-by: Sakari Ailus &lt;sakari.ailus@linux.intel.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+huawei@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: bcm2835-unicam: Allow setting of unpacked formats</title>
<updated>2024-12-19T11:50:18Z</updated>
<author>
<name>Naushir Patuck</name>
<email>naush@raspberrypi.com</email>
</author>
<published>2024-11-27T11:15:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a4781bf807052e04c7f22f7f9c2ae7d18d4639eb'/>
<id>urn:sha1:a4781bf807052e04c7f22f7f9c2ae7d18d4639eb</id>
<content type='text'>
When matching formats via try_fmt/set_fmt ioctls, test for the unpacked
formats as well as packed formats. This allows userland clients setup
unpacking to 16-bits from the 10/12/14-packed CSI2 formats.

Signed-off-by: Naushir Patuck &lt;naush@raspberrypi.com&gt;
Reviewed-by: Jacopo Mondi &lt;jacopo.mondi@ideasonboard.com&gt;
Signed-off-by: Sakari Ailus &lt;sakari.ailus@linux.intel.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+huawei@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: bcm2835-unicam: Improve frame sequence count handling</title>
<updated>2024-12-19T11:50:18Z</updated>
<author>
<name>Naushir Patuck</name>
<email>naush@raspberrypi.com</email>
</author>
<published>2024-11-27T11:15:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f21ebe2c7defed9f9287778c0ff540be29fe2ce6'/>
<id>urn:sha1:f21ebe2c7defed9f9287778c0ff540be29fe2ce6</id>
<content type='text'>
Ensure that the frame sequence counter is incremented only if a previous
frame start interrupt has occurred, or a frame start + frame end has
occurred simultaneously.

This corresponds the sequence number with the actual number of frames
produced by the sensor, not the number of frame buffers dequeued back
to userland.

Signed-off-by: Naushir Patuck &lt;naush@raspberrypi.com&gt;
Reviewed-by: Jacopo Mondi &lt;jacopo.mondi@ideasonboard.com&gt;
Signed-off-by: Sakari Ailus &lt;sakari.ailus@linux.intel.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+huawei@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: platform: drop vb2_ops_wait_prepare/finish</title>
<updated>2024-10-28T08:20:07Z</updated>
<author>
<name>Hans Verkuil</name>
<email>hverkuil@xs4all.nl</email>
</author>
<published>2024-10-14T15:06:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4bf194e10e42aa0759eb5cc0173b76d3523654b4'/>
<id>urn:sha1:4bf194e10e42aa0759eb5cc0173b76d3523654b4</id>
<content type='text'>
Since commit 88785982a19d ("media: vb2: use lock if wait_prepare/finish
are NULL") it is no longer needed to set the wait_prepare/finish
vb2_ops callbacks as long as the lock field in vb2_queue is set.

Since the vb2_ops_wait_prepare/finish callbacks already rely on that field,
we can safely drop these callbacks.

This simplifies the code and this is a step towards the goal of deleting
these callbacks.

Signed-off-by: Hans Verkuil &lt;hverkuil@xs4all.nl&gt;
Reviewed-by: Neil Armstrong &lt;neil.armstrong@linaro.org&gt; # for meson-ge2d
Acked-by: Andrzej Pietrasiewicz &lt;andrzejtp2010@gmail.com&gt;
</content>
</entry>
</feed>
