Skip to content

Commit 83d0d4f

Browse files
Sakari Ailusjailuthra
Sakari Ailus
authored andcommitted
media: uapi: v4l: subdev: Enable streams API
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 <[email protected]>
1 parent 1891e89 commit 83d0d4f

File tree

1 file changed

+0
-30
lines changed

1 file changed

+0
-30
lines changed

drivers/media/v4l2-core/v4l2-subdev.c

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,6 @@
2626
#include <media/v4l2-fh.h>
2727
#include <media/v4l2-ioctl.h>
2828

29-
#if defined(CONFIG_VIDEO_V4L2_SUBDEV_API)
30-
/*
31-
* The Streams API is an experimental feature. To use the Streams API, set
32-
* 'v4l2_subdev_enable_streams_api' to 1 below.
33-
*/
34-
35-
static bool v4l2_subdev_enable_streams_api;
36-
#endif
37-
3829
/*
3930
* Maximum stream ID is 63 for now, as we use u64 bitmask to represent a set
4031
* of streams.
@@ -565,13 +556,6 @@ static long subdev_do_ioctl(struct file *file, unsigned int cmd, void *arg,
565556
V4L2_SUBDEV_CLIENT_CAP_STREAMS;
566557
int rval;
567558

568-
/*
569-
* If the streams API is not enabled, remove V4L2_SUBDEV_CAP_STREAMS.
570-
* Remove this when the API is no longer experimental.
571-
*/
572-
if (!v4l2_subdev_enable_streams_api)
573-
streams_subdev = false;
574-
575559
switch (cmd) {
576560
case VIDIOC_SUBDEV_QUERYCAP: {
577561
struct v4l2_subdev_capability *cap = arg;
@@ -913,9 +897,6 @@ static long subdev_do_ioctl(struct file *file, unsigned int cmd, void *arg,
913897
struct v4l2_subdev_krouting krouting = {};
914898
unsigned int i;
915899

916-
if (!v4l2_subdev_enable_streams_api)
917-
return -ENOIOCTLCMD;
918-
919900
if (!(sd->flags & V4L2_SUBDEV_FL_STREAMS))
920901
return -ENOIOCTLCMD;
921902

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

989-
if (!v4l2_subdev_enable_streams_api)
990-
return -ENOIOCTLCMD;
991-
992970
if (!(sd->flags & V4L2_SUBDEV_FL_STREAMS))
993971
return -ENOIOCTLCMD;
994972

@@ -1016,14 +994,6 @@ static long subdev_do_ioctl(struct file *file, unsigned int cmd, void *arg,
1016994
case VIDIOC_SUBDEV_S_CLIENT_CAP: {
1017995
struct v4l2_subdev_client_capability *client_cap = arg;
1018996

1019-
/*
1020-
* Clear V4L2_SUBDEV_CLIENT_CAP_STREAMS if streams API is not
1021-
* enabled. Remove this when streams API is no longer
1022-
* experimental.
1023-
*/
1024-
if (!v4l2_subdev_enable_streams_api)
1025-
client_cap->capabilities &= ~V4L2_SUBDEV_CLIENT_CAP_STREAMS;
1026-
1027997
/* Filter out unsupported capabilities */
1028998
client_cap->capabilities &= V4L2_SUBDEV_CLIENT_CAP_STREAMS;
1029999

0 commit comments

Comments
 (0)