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: <20240927224127.GG12322@pendragon.ideasonboard.com>
Date: Sat, 28 Sep 2024 01:41:27 +0300
From: Laurent Pinchart <laurent.pinchart@...asonboard.com>
To: Prabhakar <prabhakar.csengg@...il.com>
Cc: Sakari Ailus <sakari.ailus@...ux.intel.com>,
	Mauro Carvalho Chehab <mchehab@...nel.org>,
	Hans Verkuil <hverkuil-cisco@...all.nl>,
	linux-media@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-renesas-soc@...r.kernel.org,
	Biju Das <biju.das.jz@...renesas.com>,
	Fabrizio Castro <fabrizio.castro.jz@...esas.com>,
	Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>
Subject: Re: [PATCH v2 07/16] media: platform: rzg2l-cru: Remove `channel`
 member from `struct rzg2l_cru_csi`

Hi Prabhakar,

Thank you for the patch.

On Tue, Sep 10, 2024 at 06:53:48PM +0100, Prabhakar wrote:
> From: Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>
> 
> Remove the CSI virtual channel number from `struct rzg2l_cru_csi`.
> Instead, pass the CSI virtual channel number as an argument to
> `rzg2l_cru_csi2_setup()`.
> 
> Suggested-by: Laurent Pinchart <laurent.pinchart+renesas@...asonboard.com>
> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>

Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@...asonboard.com>

> ---
>  .../media/platform/renesas/rzg2l-cru/rzg2l-core.c  |  1 -
>  .../media/platform/renesas/rzg2l-cru/rzg2l-cru.h   |  1 -
>  .../media/platform/renesas/rzg2l-cru/rzg2l-video.c | 14 ++++++++------
>  3 files changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/media/platform/renesas/rzg2l-cru/rzg2l-core.c b/drivers/media/platform/renesas/rzg2l-cru/rzg2l-core.c
> index 69cd45b26951..b21a66e2ce5c 100644
> --- a/drivers/media/platform/renesas/rzg2l-cru/rzg2l-core.c
> +++ b/drivers/media/platform/renesas/rzg2l-cru/rzg2l-core.c
> @@ -72,7 +72,6 @@ static int rzg2l_cru_group_notify_complete(struct v4l2_async_notifier *notifier)
>  			source->name, sink->name);
>  		return ret;
>  	}
> -	cru->csi.channel = 0;
>  	cru->ip.remote = cru->csi.subdev;
>  
>  	/* Create media device link between CRU IP <-> CRU OUTPUT */
> diff --git a/drivers/media/platform/renesas/rzg2l-cru/rzg2l-cru.h b/drivers/media/platform/renesas/rzg2l-cru/rzg2l-cru.h
> index 8fbd45c43763..4fe24bdde5b2 100644
> --- a/drivers/media/platform/renesas/rzg2l-cru/rzg2l-cru.h
> +++ b/drivers/media/platform/renesas/rzg2l-cru/rzg2l-cru.h
> @@ -53,7 +53,6 @@ enum rzg2l_cru_dma_state {
>  struct rzg2l_cru_csi {
>  	struct v4l2_async_connection *asd;
>  	struct v4l2_subdev *subdev;
> -	u32 channel;
>  };
>  
>  struct rzg2l_cru_ip {
> diff --git a/drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c b/drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c
> index 7cd33eb1939c..9ab7ef33c9da 100644
> --- a/drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c
> +++ b/drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c
> @@ -301,7 +301,7 @@ static void rzg2l_cru_initialize_axi(struct rzg2l_cru_dev *cru)
>  }
>  
>  static void rzg2l_cru_csi2_setup(struct rzg2l_cru_dev *cru, bool *input_is_yuv,
> -				 struct v4l2_mbus_framefmt *ip_sd_fmt)
> +				 struct v4l2_mbus_framefmt *ip_sd_fmt, u8 csi_vc)
>  {
>  	u32 icnmc;
>  
> @@ -319,19 +319,20 @@ static void rzg2l_cru_csi2_setup(struct rzg2l_cru_dev *cru, bool *input_is_yuv,
>  	icnmc |= (rzg2l_cru_read(cru, ICnMC) & ~ICnMC_INF_MASK);
>  
>  	/* Set virtual channel CSI2 */
> -	icnmc |= ICnMC_VCSEL(cru->csi.channel);
> +	icnmc |= ICnMC_VCSEL(csi_vc);
>  
>  	rzg2l_cru_write(cru, ICnMC, icnmc);
>  }
>  
>  static int rzg2l_cru_initialize_image_conv(struct rzg2l_cru_dev *cru,
> -					   struct v4l2_mbus_framefmt *ip_sd_fmt)
> +					   struct v4l2_mbus_framefmt *ip_sd_fmt,
> +					   u8 csi_vc)
>  {
>  	bool output_is_yuv = false;
>  	bool input_is_yuv = false;
>  	u32 icndmr;
>  
> -	rzg2l_cru_csi2_setup(cru, &input_is_yuv, ip_sd_fmt);
> +	rzg2l_cru_csi2_setup(cru, &input_is_yuv, ip_sd_fmt, csi_vc);
>  
>  	/* Output format */
>  	switch (cru->format.pixelformat) {
> @@ -466,12 +467,13 @@ int rzg2l_cru_start_image_processing(struct rzg2l_cru_dev *cru)
>  {
>  	struct v4l2_mbus_framefmt *fmt = rzg2l_cru_ip_get_src_fmt(cru);
>  	unsigned long flags;
> +	u8 csi_vc;
>  	int ret;
>  
>  	ret = rzg2l_cru_get_virtual_channel(cru);
>  	if (ret < 0)
>  		return ret;
> -	cru->csi.channel = ret;
> +	csi_vc = ret;
>  
>  	spin_lock_irqsave(&cru->qlock, flags);
>  
> @@ -489,7 +491,7 @@ int rzg2l_cru_start_image_processing(struct rzg2l_cru_dev *cru)
>  	rzg2l_cru_initialize_axi(cru);
>  
>  	/* Initialize image convert */
> -	ret = rzg2l_cru_initialize_image_conv(cru, fmt);
> +	ret = rzg2l_cru_initialize_image_conv(cru, fmt, csi_vc);
>  	if (ret) {
>  		spin_unlock_irqrestore(&cru->qlock, flags);
>  		return ret;

-- 
Regards,

Laurent Pinchart

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ