mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Jacopo Mondi <jacopo.mondi+renesas@ideasonboard.com>
Cc: "Mauro Carvalho Chehab" <mchehab@kernel.org>,
	"Kieran Bingham" <kieran.bingham+renesas@ideasonboard.com>,
	"Niklas Söderlund" <niklas.soderlund@ragnatech.se>,
	linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] media: vsp1: Reset FCP for VSPX
Date: Thu, 12 Jun 2025 02:36:11 +0300	[thread overview]
Message-ID: <20250611233611.GR24465@pendragon.ideasonboard.com> (raw)
In-Reply-To: <20250609-vspx-reset-v1-3-9f17277ff1e2@ideasonboard.com>

Hi Jacopo,

Thank you for the patch.

On Mon, Jun 09, 2025 at 09:01:44PM +0200, Jacopo Mondi wrote:
> According section "62.3.7.1 "Operation Control Setting

"According to"

> IP set VSPX+FCPVX" of the R-Car Gen4 Hardware Manual, FCPX has to
> be reset when stopping the image processing.

That's only when stopping "image process of VSPX+FCPVX immediately".
Note the "immediately", which involves resetting the VSP too. The code
below waits for the pipeline to stop at the end of the frame. Resetting
the FCP doesn't seem to be required in that case.

> Softawre reset the FCPX after the vsp1 pipe has stopped.

s/Softawre/Software/

> Signed-off-by: Jacopo Mondi <jacopo.mondi+renesas@ideasonboard.com>
> ---
>  drivers/media/platform/renesas/vsp1/vsp1_pipe.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/media/platform/renesas/vsp1/vsp1_pipe.c b/drivers/media/platform/renesas/vsp1/vsp1_pipe.c
> index a6e5e10f3ef275c1b081c3d957e6cf356332afce..c6f2417aabc479384012ab8ab99556029ede1f44 100644
> --- a/drivers/media/platform/renesas/vsp1/vsp1_pipe.c
> +++ b/drivers/media/platform/renesas/vsp1/vsp1_pipe.c
> @@ -499,6 +499,7 @@ bool vsp1_pipeline_stopped(struct vsp1_pipeline *pipe)
>  int vsp1_pipeline_stop(struct vsp1_pipeline *pipe)
>  {
>  	struct vsp1_device *vsp1 = pipe->output->entity.vsp1;
> +	u32 version = vsp1->version & VI6_IP_VERSION_MODEL_MASK;
>  	struct vsp1_entity *entity;
>  	unsigned long flags;
>  	int ret;
> @@ -515,8 +516,7 @@ int vsp1_pipeline_stop(struct vsp1_pipeline *pipe)
>  			spin_unlock_irqrestore(&pipe->irqlock, flags);
>  		}
>  
> -		if ((vsp1->version & VI6_IP_VERSION_MODEL_MASK) ==
> -		    VI6_IP_VERSION_MODEL_VSPD_GEN3)
> +		if (version == VI6_IP_VERSION_MODEL_VSPD_GEN3)
>  			ret |= rcar_fcp_soft_reset(vsp1->fcp);
>  
>  	} else {
> @@ -529,6 +529,9 @@ int vsp1_pipeline_stop(struct vsp1_pipeline *pipe)
>  		ret = wait_event_timeout(pipe->wq, vsp1_pipeline_stopped(pipe),
>  					 msecs_to_jiffies(500));
>  		ret = ret == 0 ? -ETIMEDOUT : 0;
> +
> +		if (version == VI6_IP_VERSION_MODEL_VSPX_GEN4)
> +			ret |= rcar_fcp_soft_reset(vsp1->fcp);
>  	}
>  
>  	list_for_each_entry(entity, &pipe->entities, list_pipe) {

-- 
Regards,

Laurent Pinchart

  reply	other threads:[~2025-06-11 23:36 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-09 19:01 [PATCH 0/3] media: vsp1: Add FCP soft reset procedure Jacopo Mondi
2025-06-09 19:01 ` [PATCH 1/3] media: rcar-fcp: Add rcar_fcp_soft_reset() Jacopo Mondi
2025-06-11 23:20   ` Laurent Pinchart
2025-06-09 19:01 ` [PATCH 2/3] media: vsp1: Reset FCP for VSPD Jacopo Mondi
2025-06-11 23:29   ` Laurent Pinchart
2025-06-11 23:34     ` Laurent Pinchart
2025-06-12  9:33     ` Geert Uytterhoeven
2025-06-12  9:37       ` Laurent Pinchart
2025-06-12  9:46         ` Jacopo Mondi
2025-06-12  9:36     ` Geert Uytterhoeven
2025-06-09 19:01 ` [PATCH 3/3] media: vsp1: Reset FCP for VSPX Jacopo Mondi
2025-06-11 23:36   ` Laurent Pinchart [this message]
2025-06-12  9:48     ` Jacopo Mondi
2025-06-12 10:12       ` Laurent Pinchart
2025-06-12 10:20         ` Jacopo Mondi
2025-06-12 17:55           ` Niklas Söderlund
2025-06-12 18:05             ` Jacopo Mondi
2025-06-13 14:04               ` Niklas Söderlund
2025-06-11 14:42 ` [PATCH 0/3] media: vsp1: Add FCP soft reset procedure Niklas Söderlund

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250611233611.GR24465@pendragon.ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=jacopo.mondi+renesas@ideasonboard.com \
    --cc=kieran.bingham+renesas@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=niklas.soderlund@ragnatech.se \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®