From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
Jacopo Mondi <jacopo+renesas@jmondi.org>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
niklas.soderlund+renesas@ragnatech.se,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Hans Verkuil <hverkuil-cisco@xs4all.nl>,
satish.nagireddy@getcruise.com, Tomasz Figa <tfiga@chromium.org>
Subject: Re: [PATCH v16 06/20] media: subdev: Require code change to enable [GS]_ROUTING
Date: Thu, 12 Jan 2023 13:35:26 +0000 [thread overview]
Message-ID: <Y8AMns140Eq3S7ER@paasikivi.fi.intel.com> (raw)
In-Reply-To: <20221215121634.287100-7-tomi.valkeinen@ideasonboard.com>
Moi,
On Thu, Dec 15, 2022 at 02:16:20PM +0200, Tomi Valkeinen wrote:
> Streams API is an experimental feature. To use Streams API, the user
> needs to change a variable in v4l2-subdev.c and recompile the kernel.
>
> This commit should be reverted when the Streams API is deemed ready for
> production use.
>
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
> ---
> drivers/media/v4l2-core/v4l2-subdev.c | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
>
> diff --git a/drivers/media/v4l2-core/v4l2-subdev.c b/drivers/media/v4l2-core/v4l2-subdev.c
> index 61b429016a2f..c31b44800e39 100644
> --- a/drivers/media/v4l2-core/v4l2-subdev.c
> +++ b/drivers/media/v4l2-core/v4l2-subdev.c
> @@ -23,6 +23,13 @@
> #include <media/v4l2-fh.h>
> #include <media/v4l2-ioctl.h>
>
> +/*
> + * Streams API is an experimental feature. To use Streams API, set
> + * 'v4l2_subdev_enable_streams_api' to 1 below.
> + */
> +
> +static bool v4l2_subdev_enable_streams_api = 0;
Static variables shouldn't be explicitly assigned to zero. I'll address
this while applying.
> +
> /*
> * Maximum stream ID is 63 for now, as we use u64 bitmask to represent a set
> * of streams.
> @@ -751,6 +758,9 @@ 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;
>
> @@ -778,6 +788,9 @@ 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;
>
--
Terveisin,
Sakari Ailus
next prev parent reply other threads:[~2023-01-12 13:36 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-15 12:16 [PATCH v16 00/20] v4l: routing and streams support Tomi Valkeinen
2022-12-15 12:16 ` [PATCH v16 01/20] media: v4l2-subdev: Sort includes Tomi Valkeinen
2022-12-15 12:16 ` [PATCH v16 02/20] media: add V4L2_SUBDEV_FL_STREAMS Tomi Valkeinen
2023-01-09 11:56 ` Laurent Pinchart
2022-12-15 12:16 ` [PATCH v16 03/20] media: add V4L2_SUBDEV_CAP_STREAMS Tomi Valkeinen
2022-12-15 12:16 ` [PATCH v16 04/20] media: Documentation: Add GS_ROUTING documentation Tomi Valkeinen
2022-12-15 12:16 ` [PATCH v16 05/20] media: subdev: Add [GS]_ROUTING subdev ioctls and operations Tomi Valkeinen
2022-12-15 12:16 ` [PATCH v16 06/20] media: subdev: Require code change to enable [GS]_ROUTING Tomi Valkeinen
2023-01-12 13:35 ` Sakari Ailus [this message]
2023-01-15 12:40 ` [PATCH v16.1] " Tomi Valkeinen
2023-01-15 15:34 ` Laurent Pinchart
2023-01-15 15:34 ` Laurent Pinchart
2022-12-15 12:16 ` [PATCH v16 07/20] media: subdev: add v4l2_subdev_has_pad_interdep() Tomi Valkeinen
2022-12-15 12:16 ` [PATCH v16 08/20] media: subdev: add v4l2_subdev_set_routing helper() Tomi Valkeinen
2022-12-15 12:16 ` [PATCH v16 09/20] media: subdev: Add for_each_active_route() macro Tomi Valkeinen
2022-12-15 12:16 ` [PATCH v16 10/20] media: Documentation: add multiplexed streams documentation Tomi Valkeinen
2022-12-15 12:16 ` [PATCH v16 11/20] media: subdev: add stream based configuration Tomi Valkeinen
2022-12-15 12:16 ` [PATCH v16 12/20] media: subdev: use streams in v4l2_subdev_link_validate() Tomi Valkeinen
2022-12-15 12:16 ` [PATCH v16 13/20] media: subdev: add "opposite" stream helper funcs Tomi Valkeinen
2022-12-15 12:16 ` [PATCH v16 14/20] media: subdev: add streams to v4l2_subdev_get_fmt() helper function Tomi Valkeinen
2022-12-15 12:16 ` [PATCH v16 15/20] media: subdev: add v4l2_subdev_set_routing_with_fmt() helper Tomi Valkeinen
2022-12-15 12:16 ` [PATCH v16 16/20] media: subdev: add v4l2_subdev_routing_validate() helper Tomi Valkeinen
2022-12-15 12:16 ` [PATCH v16 17/20] media: v4l2-subdev: Add v4l2_subdev_state_xlate_streams() helper Tomi Valkeinen
2022-12-15 12:16 ` [PATCH v16 18/20] media: v4l2-subdev: Add subdev .(enable|disable)_streams() operations Tomi Valkeinen
2022-12-15 12:16 ` [PATCH v16 19/20] media: v4l2-subdev: Add v4l2_subdev_s_stream_helper() function Tomi Valkeinen
2022-12-15 12:16 ` [PATCH v16 20/20] media: Add stream to frame descriptor Tomi Valkeinen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y8AMns140Eq3S7ER@paasikivi.fi.intel.com \
--to=sakari.ailus@linux.intel.com \
--cc=hverkuil-cisco@xs4all.nl \
--cc=jacopo+renesas@jmondi.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=niklas.soderlund+renesas@ragnatech.se \
--cc=satish.nagireddy@getcruise.com \
--cc=tfiga@chromium.org \
--cc=tomi.valkeinen@ideasonboard.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®