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: <20250609-vspx-reset-v1-3-9f17277ff1e2@ideasonboard.com>
Date: Mon, 09 Jun 2025 21:01:44 +0200
From: Jacopo Mondi <jacopo.mondi+renesas@...asonboard.com>
To: Laurent Pinchart <laurent.pinchart@...asonboard.com>, 
 Mauro Carvalho Chehab <mchehab@...nel.org>, 
 Kieran Bingham <kieran.bingham+renesas@...asonboard.com>, 
 Niklas Söderlund <niklas.soderlund@...natech.se>
Cc: linux-media@...r.kernel.org, linux-renesas-soc@...r.kernel.org, 
 linux-kernel@...r.kernel.org, 
 Jacopo Mondi <jacopo.mondi+renesas@...asonboard.com>
Subject: [PATCH 3/3] media: vsp1: Reset FCP for VSPX

According section "62.3.7.1 "Operation Control Setting
IP set VSPX+FCPVX" of the R-Car Gen4 Hardware Manual, FCPX has to
be reset when stopping the image processing.

Softawre reset the FCPX after the vsp1 pipe has stopped.

Signed-off-by: Jacopo Mondi <jacopo.mondi+renesas@...asonboard.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) {

-- 
2.49.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ