Skip to content

Commit

Permalink
media: uapi: v4l: subdev: Enable streams API
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sakari Ailus authored and Jacopo Mondi committed Oct 24, 2024
1 parent d42965d commit 31804e2
Showing 1 changed file with 0 additions and 30 deletions.
30 changes: 0 additions & 30 deletions drivers/media/v4l2-core/v4l2-subdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,6 @@
#include <media/v4l2-fh.h>
#include <media/v4l2-ioctl.h>

#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.
Expand Down Expand Up @@ -565,13 +556,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;
Expand Down Expand Up @@ -913,9 +897,6 @@ static long subdev_do_ioctl(struct file *file, unsigned int cmd, void *arg,
struct v4l2_subdev_krouting krouting = {};
unsigned int i;

if (!v4l2_subdev_enable_streams_api)
return -ENOIOCTLCMD;

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

Expand Down Expand Up @@ -986,9 +967,6 @@ static long subdev_do_ioctl(struct file *file, unsigned int cmd, void *arg,
struct v4l2_subdev_routing *routing = arg;
struct v4l2_subdev_krouting *krouting;

if (!v4l2_subdev_enable_streams_api)
return -ENOIOCTLCMD;

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

Expand Down Expand Up @@ -1016,14 +994,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;

Expand Down

0 comments on commit 31804e2

Please sign in to comment.