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] [thread-next>] [day] [month] [year] [list]
Message-ID: <iowx7ej5qfkwhoqvdocpuvjzytihukephb7lpuazll754e45kf@yo22sxya5n36>
Date: Thu, 6 Mar 2025 10:14:51 +0200
From: Laurentiu Palcu <laurentiu.palcu@....nxp.com>
To: Julien Massot <julien.massot@...labora.com>
Cc: Mauro Carvalho Chehab <mchehab@...nel.org>, 
	linux-kernel@...r.kernel.org, linux-media@...r.kernel.org
Subject: Re: [PATCH 2/5] media/i2c: max96717: implement the .get_frame_desc()
 operation

Hi,

On Tue, Feb 18, 2025 at 02:29:30PM +0100, Julien Massot wrote:
> Hi,
> 
> On Fri, 2025-02-07 at 13:29 +0200, Laurentiu Palcu wrote:
> > Since the max96717 serializer can work with various sensors, we need to
> > implement the .get_frame_desc() callback to get the VCs and DTs for the
> > incoming stream(s).
> > 
> > Signed-off-by: Laurentiu Palcu <laurentiu.palcu@....nxp.com>
> > ---
> >  drivers/media/i2c/max96717.c | 21 +++++++++++++++++++++
> >  1 file changed, 21 insertions(+)
> > 
> > diff --git a/drivers/media/i2c/max96717.c b/drivers/media/i2c/max96717.c
> > index b1116aade0687..6a668a004c717 100644
> > --- a/drivers/media/i2c/max96717.c
> > +++ b/drivers/media/i2c/max96717.c
> > @@ -575,12 +575,33 @@ static int max96717_disable_streams(struct v4l2_subdev *sd,
> >  	return 0;
> >  }
> >  
> > +static int max96717_get_frame_desc(struct v4l2_subdev *sd, unsigned int pad,
> > +				   struct v4l2_mbus_frame_desc *fd)
> > +{
> > +	struct max96717_priv *priv = sd_to_max96717(sd);
> > +	int ret;
> > +	struct v4l2_mbus_frame_desc source_fd;
> > +
> > +	if (pad != MAX96717_PAD_SOURCE)
> > +		return -EINVAL;
> > +
> Please check priv->source_sd first, we support the case where we only have a test pattern from
> the serializer. Then we can simply return the result of v4l2_subdev_call.
> 
>         return v4l2_subdev_call(priv->source_sd, pad, get_frame_desc,
> 			       priv->source_sd_pad, fd);

Ok, I guess I missed the test pattern functionality completely.

Thanks,
Laurentiu

> 
> > +	ret = v4l2_subdev_call(priv->source_sd, pad, get_frame_desc,
> > +			       priv->source_sd_pad, &source_fd);
> > +	if (ret)
> > +		return ret;
> > +
> > +	*fd = source_fd;
> > +
> > +	return 0;
> > +}
> > +
> >  static const struct v4l2_subdev_pad_ops max96717_pad_ops = {
> >  	.enable_streams = max96717_enable_streams,
> >  	.disable_streams = max96717_disable_streams,
> >  	.set_routing = max96717_set_routing,
> >  	.get_fmt = v4l2_subdev_get_fmt,
> >  	.set_fmt = max96717_set_fmt,
> > +	.get_frame_desc = max96717_get_frame_desc,
> >  };
> >  
> >  static const struct v4l2_subdev_core_ops max96717_subdev_core_ops = {
> 
> Regards,
> -- 
> Julien

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ