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: <20231128072645.GA1435577@gnbcxd0016.gnb.st.com>
Date:   Tue, 28 Nov 2023 08:26:45 +0100
From:   Alain Volmat <alain.volmat@...s.st.com>
To:     Sakari Ailus <sakari.ailus@...ux.intel.com>
CC:     Mauro Carvalho Chehab <mchehab@...nel.org>,
        Benjamin Mugnier <benjamin.mugnier@...s.st.com>,
        Sylvain Petinot <sylvain.petinot@...s.st.com>,
        <linux-media@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 4/7] media: i2c: st-mipid02: use active state to store
 pad formats

Hi Sakari,

On Tue, Nov 28, 2023 at 06:40:02AM +0000, Sakari Ailus wrote:
> On Sat, Nov 25, 2023 at 07:20:52PM +0100, Alain Volmat wrote:
> > Store formats information within pad allowing to simplify further more
> > the driver (mutex / format store within the driver structure no more
> > necessary).
> > 
> > Signed-off-by: Alain Volmat <alain.volmat@...s.st.com>
> 
> Applied with the following diff:
> 
> diff --git a/drivers/media/i2c/st-mipid02.c b/drivers/media/i2c/st-mipid02.c
> index 7af209905d7b..2cc07b3ed0da 100644
> --- a/drivers/media/i2c/st-mipid02.c
> +++ b/drivers/media/i2c/st-mipid02.c
> @@ -563,8 +563,8 @@ static const struct v4l2_mbus_framefmt default_fmt = {
>  	.height = 480,
>  };
>  
> -static int mipid02_init_cfg(struct v4l2_subdev *sd,
> -			    struct v4l2_subdev_state *state)
> +static int mipid02_init_state(struct v4l2_subdev *sd,
> +			      struct v4l2_subdev_state *state)
>  {
>  	*v4l2_subdev_state_get_format(state, MIPID02_SINK_0) = default_fmt;
>  	/* MIPID02_SINK_1 isn't supported yet */
> @@ -642,7 +642,6 @@ static const struct v4l2_subdev_video_ops mipid02_video_ops = {
>  };
>  
>  static const struct v4l2_subdev_pad_ops mipid02_pad_ops = {
> -	.init_cfg = mipid02_init_cfg,
>  	.enum_mbus_code = mipid02_enum_mbus_code,
>  	.get_fmt = v4l2_subdev_get_fmt,
>  	.set_fmt = mipid02_set_fmt,
> @@ -653,6 +652,10 @@ static const struct v4l2_subdev_ops mipid02_subdev_ops = {
>  	.pad = &mipid02_pad_ops,
>  };
>  
> +static const struct v4l2_subdev_internal_ops mipid02_subdev_internal_ops = {
> +	.init_state = mipid02_init_state,
> +};
> +
>  static const struct media_entity_operations mipid02_subdev_entity_ops = {
>  	.link_validate = v4l2_subdev_link_validate,
>  };
> @@ -851,6 +854,7 @@ static int mipid02_probe(struct i2c_client *client)
>  
>  	bridge->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
>  	bridge->sd.entity.function = MEDIA_ENT_F_VID_IF_BRIDGE;
> +	bridge->sd.internal_ops = &mipid02_subdev_internal_ops;
>  	bridge->sd.entity.ops = &mipid02_subdev_entity_ops;
>  	bridge->pad[0].flags = MEDIA_PAD_FL_SINK;
>  	bridge->pad[1].flags = MEDIA_PAD_FL_SINK;
> 

Thanks a lot Sakari for taking care of that !!

Regards,
Alain

> -- 
> Sakari Ailus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ