[PATCH v12 32/86] media: uapi: v4l: subdev: Enable streams API

Sakari Ailus
2026-04-09T20:15:29Z

Remove v4l2_subdev_enable_streams_api variable that was used to easily
enable streams API for development, and conditions that use the variable.

This patch enables the streams API for V4L2 sub-device interface which
allows transporting multiple streams on a single MC link.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Reviewed-by: Mirela Rabulea <mirela.rabulea@nxp.com>
---
drivers/media/v4l2-core/v4l2-subdev.c | 30 ---------------------------
1 file changed, 30 deletions(-)

diff --git a/drivers/media/v4l2-core/v4l2-subdev.c b/drivers/media/v4l2-core/v4l2-subdev.c
index 3f671282ee91..af9024b0f788 100644
--- a/drivers/media/v4l2-core/v4l2-subdev.c
+++ b/drivers/media/v4l2-core/v4l2-subdev.c
@@ -51,15 +51,6 @@ struct v4l2_subdev_stream_config {
struct v4l2_fract interval;
};

-#if defined(CONFIG_VIDEO_V4L2_SUBDEV_API)
-/*
- * The Streams API is an experimental feature. To use the Streams API, set
- * 'v4l2_subdev_enable_streams_api' to 1 below.
- */
-
-static bool v4l2_subdev_enable_streams_api;
-#endif
-
/*
* Maximum stream ID is 63 for now, as we use u64 bitmask to represent a set
* of streams.
@@ -720,13 +711,6 @@ static long subdev_do_ioctl(struct file *file, unsigned int cmd, void *arg,
V4L2_SUBDEV_CLIENT_CAP_STREAMS;
int rval;

- /*
- * If the streams API is not enabled, remove V4L2_SUBDEV_CAP_STREAMS.
- * Remove this when the API is no longer experimental.
- */
- if (!v4l2_subdev_enable_streams_api)
- streams_subdev = false;
-
switch (cmd) {
case VIDIOC_SUBDEV_QUERYCAP: {
struct v4l2_subdev_capability *cap = arg;
@@ -1081,9 +1065,6 @@ static long subdev_do_ioctl(struct file *file, unsigned int cmd, void *arg,
case VIDIOC_SUBDEV_G_ROUTING: {
struct v4l2_subdev_routing *routing = arg;

- if (!v4l2_subdev_enable_streams_api)
- return -ENOIOCTLCMD;
-
if (!(sd->flags & V4L2_SUBDEV_FL_STREAMS))
return -ENOIOCTLCMD;

@@ -1105,9 +1086,6 @@ static long subdev_do_ioctl(struct file *file, unsigned int cmd, void *arg,
unsigned int num_active_routes = 0;
unsigned int i;

- if (!v4l2_subdev_enable_streams_api)
- return -ENOIOCTLCMD;
-
if (!(sd->flags & V4L2_SUBDEV_FL_STREAMS))
return -ENOIOCTLCMD;

@@ -1193,14 +1171,6 @@ static long subdev_do_ioctl(struct file *file, unsigned int cmd, void *arg,
case VIDIOC_SUBDEV_S_CLIENT_CAP: {
struct v4l2_subdev_client_capability *client_cap = arg;

- /*
- * Clear V4L2_SUBDEV_CLIENT_CAP_STREAMS if streams API is not
- * enabled. Remove this when streams API is no longer
- * experimental.
- */
- if (!v4l2_subdev_enable_streams_api)
- client_cap->capabilities &= ~V4L2_SUBDEV_CLIENT_CAP_STREAMS;
-
/* Filter out unsupported capabilities */
client_cap->capabilities &= (V4L2_SUBDEV_CLIENT_CAP_STREAMS |
V4L2_SUBDEV_CLIENT_CAP_INTERVAL_USES_WHICH |
--
2.47.3