<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/include/media/v4l2-subdev.h, branch v6.6.131</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6.131</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6.131'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2025-10-19T14:30:39+00:00</updated>
<entry>
<title>media: v4l2-subdev: Fix alloc failure check in v4l2_subdev_call_state_try()</title>
<updated>2025-10-19T14:30:39+00:00</updated>
<author>
<name>Tomi Valkeinen</name>
<email>tomi.valkeinen@ideasonboard.com</email>
</author>
<published>2025-08-08T08:59:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ed30811fbed40751deb952bde534aa2632dc0bf7'/>
<id>urn:sha1:ed30811fbed40751deb952bde534aa2632dc0bf7</id>
<content type='text'>
commit f37df9a0eb5e43fcfe02cbaef076123dc0d79c7e upstream.

v4l2_subdev_call_state_try() macro allocates a subdev state with
__v4l2_subdev_state_alloc(), but does not check the returned value. If
__v4l2_subdev_state_alloc fails, it returns an ERR_PTR, and that would
cause v4l2_subdev_call_state_try() to crash.

Add proper error handling to v4l2_subdev_call_state_try().

Signed-off-by: Tomi Valkeinen &lt;tomi.valkeinen@ideasonboard.com&gt;
Fixes: 982c0487185b ("media: subdev: Add v4l2_subdev_call_state_try() macro")
Reported-by: Dan Carpenter &lt;dan.carpenter@linaro.org&gt;
Closes: https://lore.kernel.org/all/aJTNtpDUbTz7eyJc%40stanley.mountain/
Cc: stable@vger.kernel.org
Reviewed-by: Dan Carpenter &lt;dan.carpenter@linaro.org&gt;
Signed-off-by: Sakari Ailus &lt;sakari.ailus@linux.intel.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil+cisco@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>media: v4l: Memset argument to 0 before calling get_mbus_config pad op</title>
<updated>2025-06-04T12:42:09+00:00</updated>
<author>
<name>Sakari Ailus</name>
<email>sakari.ailus@linux.intel.com</email>
</author>
<published>2024-12-16T08:48:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f8a9f45f75ab315553794e7cec8384546c33d281'/>
<id>urn:sha1:f8a9f45f75ab315553794e7cec8384546c33d281</id>
<content type='text'>
[ Upstream commit 91d6a99acfa5ce9f95ede775074b80f7193bd717 ]

Memset the config argument to get_mbus_config V4L2 sub-device pad
operation to zero before calling the operation. This ensures the callers
don't need to bother with it nor the implementations need to set all
fields that may not be relevant to them.

Signed-off-by: Sakari Ailus &lt;sakari.ailus@linux.intel.com&gt;
Reviewed-by: Tomi Valkeinen &lt;tomi.valkeinen@ideasonboard.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil@xs4all.nl&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: subdev: Add v4l2_subdev_is_streaming()</title>
<updated>2025-05-02T05:50:37+00:00</updated>
<author>
<name>Tomi Valkeinen</name>
<email>tomi.valkeinen@ideasonboard.com</email>
</author>
<published>2024-04-24T15:39:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a64a102e01eba9c09947a39732e9318d44df71f8'/>
<id>urn:sha1:a64a102e01eba9c09947a39732e9318d44df71f8</id>
<content type='text'>
[ Upstream commit 5f3ce14fae742d1d23061c3122d93edb879ebf53 ]

Add a helper function which returns whether the subdevice is streaming,
i.e. if .s_stream or .enable_streams has been called successfully.

Reviewed-by: Umang Jain &lt;umang.jain@ideasonboard.com&gt;
Reviewed-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Tested-by: Umang Jain &lt;umang.jain@ideasonboard.com&gt;
Signed-off-by: Tomi Valkeinen &lt;tomi.valkeinen@ideasonboard.com&gt;
Signed-off-by: Sakari Ailus &lt;sakari.ailus@linux.intel.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
Stable-dep-of: 36cef585e2a3 ("media: vimc: skip .s_stream() for stopped entities")
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: subdev: Improve v4l2_subdev_enable/disable_streams_fallback</title>
<updated>2025-05-02T05:50:37+00:00</updated>
<author>
<name>Tomi Valkeinen</name>
<email>tomi.valkeinen@ideasonboard.com</email>
</author>
<published>2024-04-24T15:39:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2b3dc697a46580b050e9bc00373a2860a77d67c2'/>
<id>urn:sha1:2b3dc697a46580b050e9bc00373a2860a77d67c2</id>
<content type='text'>
[ Upstream commit 61d6c8c896c1ccde350c281817847a32b0c6b83b ]

v4l2_subdev_enable/disable_streams_fallback() supports falling back to
.s_stream() for subdevs with a single source pad. It also tracks the
enabled streams for that one pad in the sd-&gt;enabled_streams field.

Tracking the enabled streams with sd-&gt;enabled_streams does not make
sense, as with .s_stream() there can only be a single stream per pad.
Thus, as the v4l2_subdev_enable/disable_streams_fallback() only supports
a single source pad, all we really need is a boolean which tells whether
streaming has been enabled on this pad or not.

However, as we only need a true/false state for a pad (instead of
tracking which streams have been enabled for a pad), we can easily
extend the fallback mechanism to support multiple source pads as we only
need to keep track of which pads have been enabled.

Change the sd-&gt;enabled_streams field to sd-&gt;enabled_pads, which is a
64-bit bitmask tracking the enabled source pads. With this change we can
remove the restriction that
v4l2_subdev_enable/disable_streams_fallback() only supports a single
source pad.

Reviewed-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Tested-by: Umang Jain &lt;umang.jain@ideasonboard.com&gt;
Signed-off-by: Tomi Valkeinen &lt;tomi.valkeinen@ideasonboard.com&gt;
Signed-off-by: Sakari Ailus &lt;sakari.ailus@linux.intel.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
Stable-dep-of: 36cef585e2a3 ("media: vimc: skip .s_stream() for stopped entities")
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: subdev: Fix use of sd-&gt;enabled_streams in call_s_stream()</title>
<updated>2025-05-02T05:50:37+00:00</updated>
<author>
<name>Tomi Valkeinen</name>
<email>tomi.valkeinen@ideasonboard.com</email>
</author>
<published>2024-04-24T15:39:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=beeeea11ee2a09230b3fd4863563d99b7b23c8f0'/>
<id>urn:sha1:beeeea11ee2a09230b3fd4863563d99b7b23c8f0</id>
<content type='text'>
[ Upstream commit 1d7804281df3f09f0a109d00406e859a00bae7ae ]

call_s_stream() uses sd-&gt;enabled_streams to track whether streaming has
already been enabled. However,
v4l2_subdev_enable/disable_streams_fallback(), which was the original
user of this field, already uses it, and
v4l2_subdev_enable/disable_streams_fallback() will call call_s_stream().

This leads to a conflict as both functions set the field. Afaics, both
functions set the field to the same value, so it won't cause a runtime
bug, but it's still wrong and if we, e.g., change how
v4l2_subdev_enable/disable_streams_fallback() operates we might easily
cause bugs.

Fix this by adding a new field, 's_stream_enabled', for
call_s_stream().

Reviewed-by: Umang Jain &lt;umang.jain@ideasonboard.com&gt;
Reviewed-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Tested-by: Umang Jain &lt;umang.jain@ideasonboard.com&gt;
Signed-off-by: Tomi Valkeinen &lt;tomi.valkeinen@ideasonboard.com&gt;
Signed-off-by: Sakari Ailus &lt;sakari.ailus@linux.intel.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
Stable-dep-of: 36cef585e2a3 ("media: vimc: skip .s_stream() for stopped entities")
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: v4l2-subdev: Document and enforce .s_stream() requirements</title>
<updated>2024-06-12T09:12:37+00:00</updated>
<author>
<name>Laurent Pinchart</name>
<email>laurent.pinchart@ideasonboard.com</email>
</author>
<published>2023-09-18T12:48:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=35556d0e1c61a25c737b9fc791a98add25464a8e'/>
<id>urn:sha1:35556d0e1c61a25c737b9fc791a98add25464a8e</id>
<content type='text'>
[ Upstream commit 009905ec50433259c05f474251000b040098564e ]

The subdev .s_stream() operation must not be called to start an already
started subdev, or stop an already stopped one. This requirement has
never been formally documented. Fix it, and catch possible offenders
with a WARN_ON() in the call_s_stream() wrapper.

Signed-off-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@xs4all.nl&gt;
Stable-dep-of: f2bf6cd8f447 ("media: v4l: Don't turn on privacy LED if streamon fails")
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: subdev: Constify v4l2_subdev_set_routing_with_fmt() param</title>
<updated>2023-08-10T05:58:38+00:00</updated>
<author>
<name>Tomi Valkeinen</name>
<email>tomi.valkeinen@ideasonboard.com</email>
</author>
<published>2023-06-19T11:27:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bb05820e87dc81469efc7262149d2b945a28527a'/>
<id>urn:sha1:bb05820e87dc81469efc7262149d2b945a28527a</id>
<content type='text'>
The routing parameter of v4l2_subdev_set_routing_with_fmt() is missing
'const'. Add it.

Signed-off-by: Tomi Valkeinen &lt;tomi.valkeinen@ideasonboard.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@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: v4l: async: Support fwnode endpoint list matching for subdevs</title>
<updated>2023-07-28T08:53:41+00:00</updated>
<author>
<name>Sakari Ailus</name>
<email>sakari.ailus@linux.intel.com</email>
</author>
<published>2023-04-28T13:58:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e74f7a96787c46e90b3c8519d4e0d127f5cc106d'/>
<id>urn:sha1:e74f7a96787c46e90b3c8519d4e0d127f5cc106d</id>
<content type='text'>
Support matching V4L2 async sub-devices based on particular fwnode
endpoint. This makes it possible to instantiate multiple V4L2 sub-devices
based on given fwnode endpoints from a single device, based on driver
needs.

Signed-off-by: Sakari Ailus &lt;sakari.ailus@linux.intel.com&gt;
Tested-by: Philipp Zabel &lt;p.zabel@pengutronix.de&gt; # imx6qp
Tested-by: Niklas Söderlund &lt;niklas.soderlund@ragnatech.se&gt; # rcar + adv746x
Tested-by: Aishwarya Kothari &lt;aishwarya.kothari@toradex.com&gt; # Apalis i.MX6Q with TC358743
Tested-by: Lad Prabhakar &lt;prabhakar.mahadev-lad.rj@bp.renesas.com&gt; # Renesas RZ/G2L SMARC
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: v4l: async: Allow multiple connections between entities</title>
<updated>2023-07-28T08:48:49+00:00</updated>
<author>
<name>Sakari Ailus</name>
<email>sakari.ailus@linux.intel.com</email>
</author>
<published>2023-05-19T11:44:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=28a1295795d85a25f2e7dd391c43969e95fcb341'/>
<id>urn:sha1:28a1295795d85a25f2e7dd391c43969e95fcb341</id>
<content type='text'>
When the v4l2-async framework was introduced, the use case for it was to
connect a camera sensor with a parallel receiver. Both tended to be rather
simple devices with a single connection between them.

The framework has been since improved in multiple ways but there are
limitations that have remained, for instance the assumption an async
sub-device is connected towards a single notifier and via a single link
only.

This patch enables connecting a sub-device to one or more notifiers
simultaneously, with one or more connections per notifier. The notifier
information is moved from the sub-device to the connection and the
connections in sub-device are no longer a pointer but a linked list.

Signed-off-by: Sakari Ailus &lt;sakari.ailus@linux.intel.com&gt;
Tested-by: Philipp Zabel &lt;p.zabel@pengutronix.de&gt; # imx6qp
Tested-by: Niklas Söderlund &lt;niklas.soderlund@ragnatech.se&gt; # rcar + adv746x
Tested-by: Aishwarya Kothari &lt;aishwarya.kothari@toradex.com&gt; # Apalis i.MX6Q with TC358743
Tested-by: Lad Prabhakar &lt;prabhakar.mahadev-lad.rj@bp.renesas.com&gt; # Renesas RZ/G2L SMARC
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: v4l: async: Rename v4l2_async_subdev as v4l2_async_connection</title>
<updated>2023-07-28T08:44:25+00:00</updated>
<author>
<name>Sakari Ailus</name>
<email>sakari.ailus@linux.intel.com</email>
</author>
<published>2023-02-16T13:54:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=adb2dcd5f2d49d3ba3171160fabd4be0d4b2a86c'/>
<id>urn:sha1:adb2dcd5f2d49d3ba3171160fabd4be0d4b2a86c</id>
<content type='text'>
Rename v4l2_async_subdev as v4l2_async_connection, in order to
differentiate between the sub-devices and their connections: one
sub-device can have many connections but the V4L2 async framework has so
far allowed just a single one. Connections in this context will later
translate into either MC ancillary or data links.

This patch prepares changing that relation by changing existing users of
v4l2_async_subdev to switch to v4l2_async_connection. Async sub-devices
themselves will not be needed anymore

Additionally, __v4l2_async_nf_add_subdev() has been renamed
__v4l2_async_nf_add_connection().

Signed-off-by: Sakari Ailus &lt;sakari.ailus@linux.intel.com&gt;
Tested-by: Philipp Zabel &lt;p.zabel@pengutronix.de&gt; # imx6qp
Tested-by: Niklas Söderlund &lt;niklas.soderlund@ragnatech.se&gt; # rcar + adv746x
Tested-by: Aishwarya Kothari &lt;aishwarya.kothari@toradex.com&gt; # Apalis i.MX6Q with TC358743
Tested-by: Lad Prabhakar &lt;prabhakar.mahadev-lad.rj@bp.renesas.com&gt; # Renesas RZ/G2L SMARC
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt;
</content>
</entry>
</feed>
