diff mbox series

[3/4] media: platform: rzg2l-cru: rzg2l-video: Fix image processing initialization

Message ID 20240123115821.292787-4-biju.das.jz@bp.renesas.com (mailing list archive)
State Superseded
Delegated to: Kieran Bingham
Headers show
Series RZ/G2L CSI/CRU Improvements | expand

Commit Message

Biju Das Jan. 23, 2024, 11:58 a.m. UTC
As per section 35.3.1 Starting Reception for the MIPI CSI-2 Input on the
latest hardware manual(R01UH0914EJ0140 Rev.1.40) it is mentioned that
initialize the AXI master first and then initialize the image processing.
Fix the start procedure as per the hardware manual.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
---
 .../media/platform/renesas/rzg2l-cru/rzg2l-video.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

Comments

Laurent Pinchart Jan. 23, 2024, 3:33 p.m. UTC | #1
Hi Biju,

Thank you for the patch.

On Tue, Jan 23, 2024 at 11:58:20AM +0000, Biju Das wrote:
> As per section 35.3.1 Starting Reception for the MIPI CSI-2 Input on the
> latest hardware manual(R01UH0914EJ0140 Rev.1.40) it is mentioned that

s/manual/manual /

> initialize the AXI master first and then initialize the image processing.
> Fix the start procedure as per the hardware manual.
> 
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>

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

> ---
>  .../media/platform/renesas/rzg2l-cru/rzg2l-video.c | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c b/drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c
> index d0ffa90bc656..a7d6fe831d54 100644
> --- a/drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c
> +++ b/drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c
> @@ -430,13 +430,6 @@ int rzg2l_cru_start_image_processing(struct rzg2l_cru_dev *cru)
>  
>  	spin_lock_irqsave(&cru->qlock, flags);
>  
> -	/* Initialize image convert */
> -	ret = rzg2l_cru_initialize_image_conv(cru, fmt);
> -	if (ret) {
> -		spin_unlock_irqrestore(&cru->qlock, flags);
> -		return ret;
> -	}
> -
>  	/* Select a video input */
>  	rzg2l_cru_write(cru, CRUnCTRL, CRUnCTRL_VINSEL(0));
>  
> @@ -450,6 +443,13 @@ int rzg2l_cru_start_image_processing(struct rzg2l_cru_dev *cru)
>  	/* Initialize the AXI master */
>  	rzg2l_cru_initialize_axi(cru);
>  
> +	/* Initialize image convert */
> +	ret = rzg2l_cru_initialize_image_conv(cru, fmt);
> +	if (ret) {
> +		spin_unlock_irqrestore(&cru->qlock, flags);
> +		return ret;
> +	}
> +
>  	/* Enable interrupt */
>  	rzg2l_cru_write(cru, CRUnIE, CRUnIE_EFE);
>
Biju Das Jan. 23, 2024, 6:39 p.m. UTC | #2
Hi Laurent Pinchart,

Thanks for the feedback.

> -----Original Message-----
> From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Sent: Tuesday, January 23, 2024 3:33 PM
> Subject: Re: [PATCH 3/4] media: platform: rzg2l-cru: rzg2l-video: Fix
> image processing initialization
> 
> Hi Biju,
> 
> Thank you for the patch.
> 
> On Tue, Jan 23, 2024 at 11:58:20AM +0000, Biju Das wrote:
> > As per section 35.3.1 Starting Reception for the MIPI CSI-2 Input on
> > the latest hardware manual(R01UH0914EJ0140 Rev.1.40) it is mentioned
> > that
> 
> s/manual/manual /

OK, will fix this in next version.

Cheers,
Biju

> 
> > initialize the AXI master first and then initialize the image
> processing.
> > Fix the start procedure as per the hardware manual.
> >
> > Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> 
> Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> 
> > ---
> >  .../media/platform/renesas/rzg2l-cru/rzg2l-video.c | 14
> > +++++++-------
> >  1 file changed, 7 insertions(+), 7 deletions(-)
> >
> > diff --git a/drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c
> > b/drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c
> > index d0ffa90bc656..a7d6fe831d54 100644
> > --- a/drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c
> > +++ b/drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c
> > @@ -430,13 +430,6 @@ int rzg2l_cru_start_image_processing(struct
> > rzg2l_cru_dev *cru)
> >
> >  	spin_lock_irqsave(&cru->qlock, flags);
> >
> > -	/* Initialize image convert */
> > -	ret = rzg2l_cru_initialize_image_conv(cru, fmt);
> > -	if (ret) {
> > -		spin_unlock_irqrestore(&cru->qlock, flags);
> > -		return ret;
> > -	}
> > -
> >  	/* Select a video input */
> >  	rzg2l_cru_write(cru, CRUnCTRL, CRUnCTRL_VINSEL(0));
> >
> > @@ -450,6 +443,13 @@ int rzg2l_cru_start_image_processing(struct
> rzg2l_cru_dev *cru)
> >  	/* Initialize the AXI master */
> >  	rzg2l_cru_initialize_axi(cru);
> >
> > +	/* Initialize image convert */
> > +	ret = rzg2l_cru_initialize_image_conv(cru, fmt);
> > +	if (ret) {
> > +		spin_unlock_irqrestore(&cru->qlock, flags);
> > +		return ret;
> > +	}
> > +
> >  	/* Enable interrupt */
> >  	rzg2l_cru_write(cru, CRUnIE, CRUnIE_EFE);
> >
> 
> --
> Regards,
> 
> Laurent Pinchart
diff mbox series

Patch

diff --git a/drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c b/drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c
index d0ffa90bc656..a7d6fe831d54 100644
--- a/drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c
+++ b/drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c
@@ -430,13 +430,6 @@  int rzg2l_cru_start_image_processing(struct rzg2l_cru_dev *cru)
 
 	spin_lock_irqsave(&cru->qlock, flags);
 
-	/* Initialize image convert */
-	ret = rzg2l_cru_initialize_image_conv(cru, fmt);
-	if (ret) {
-		spin_unlock_irqrestore(&cru->qlock, flags);
-		return ret;
-	}
-
 	/* Select a video input */
 	rzg2l_cru_write(cru, CRUnCTRL, CRUnCTRL_VINSEL(0));
 
@@ -450,6 +443,13 @@  int rzg2l_cru_start_image_processing(struct rzg2l_cru_dev *cru)
 	/* Initialize the AXI master */
 	rzg2l_cru_initialize_axi(cru);
 
+	/* Initialize image convert */
+	ret = rzg2l_cru_initialize_image_conv(cru, fmt);
+	if (ret) {
+		spin_unlock_irqrestore(&cru->qlock, flags);
+		return ret;
+	}
+
 	/* Enable interrupt */
 	rzg2l_cru_write(cru, CRUnIE, CRUnIE_EFE);