lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Y8QdHs6p+NAx/mX8@pendragon.ideasonboard.com>
Date:   Sun, 15 Jan 2023 17:34:54 +0200
From:   Laurent Pinchart <laurent.pinchart@...asonboard.com>
To:     Tomi Valkeinen <tomi.valkeinen@...asonboard.com>
Cc:     linux-media@...r.kernel.org, linux-kernel@...r.kernel.org,
        sakari.ailus@...ux.intel.com,
        Jacopo Mondi <jacopo+renesas@...ndi.org>,
        niklas.soderlund+renesas@...natech.se,
        Mauro Carvalho Chehab <mchehab@...nel.org>,
        Hans Verkuil <hverkuil-cisco@...all.nl>,
        satish.nagireddy@...cruise.com, Tomasz Figa <tfiga@...omium.org>
Subject: Re: [PATCH v16.1] media: subdev: Require code change to enable
 [GS]_ROUTING

On Sun, Jan 15, 2023 at 05:34:23PM +0200, Laurent Pinchart wrote:
> Hi Tomi,
> 
> Thank you for the patch.
> 
> On Sun, Jan 15, 2023 at 02:40:08PM +0200, Tomi Valkeinen wrote:
> > Streams API is an experimental feature. To use Streams API, the user
> 
> Nitpicking, I'd write "The Streams API" and "To use the Streams API".
> 
> I'm sure Sakari can handle this in the second version of the pull
> request.
> 
> > 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@...asonboard.com>
> 
> Reviewed-by: Laurent Pinchart <laurent.pinchart@...asonboard.com>
> 
> > ---
> > 
> > Here's a minor update to the patch:
> > - Fix unused var warning
> > - Don't initialize the static var to 0
> > 
> >  drivers/media/v4l2-core/v4l2-subdev.c | 15 +++++++++++++++
> >  1 file changed, 15 insertions(+)
> > 
> > diff --git a/drivers/media/v4l2-core/v4l2-subdev.c b/drivers/media/v4l2-core/v4l2-subdev.c
> > index 61b429016a2f..a576b22164b0 100644
> > --- a/drivers/media/v4l2-core/v4l2-subdev.c
> > +++ b/drivers/media/v4l2-core/v4l2-subdev.c
> > @@ -23,6 +23,15 @@
> >  #include <media/v4l2-fh.h>
> >  #include <media/v4l2-ioctl.h>
> >  
> > +#if defined(CONFIG_VIDEO_V4L2_SUBDEV_API)
> > +/*
> > + * Streams API is an experimental feature. To use Streams API, set

Oh, and here too.

> > + * '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.
> > @@ -751,6 +760,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 +790,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;
> >  

-- 
Regards,

Laurent Pinchart

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ