mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jacopo Mondi <jacopo.mondi+renesas@ideasonboard.com>
To: "Laurent Pinchart" <laurent.pinchart@ideasonboard.com>,
	"Mauro Carvalho Chehab" <mchehab@kernel.org>,
	"Kieran Bingham" <kieran.bingham+renesas@ideasonboard.com>,
	"Niklas Söderlund" <niklas.soderlund@ragnatech.se>
Cc: linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
	 linux-kernel@vger.kernel.org,
	 Jacopo Mondi <jacopo.mondi+renesas@ideasonboard.com>,
	 Koji Matsuoka <koji.matsuoka.xm@renesas.com>,
	 LUU HOAI <hoai.luu.ub@renesas.com>
Subject: [PATCH v2 2/2] media: vsp1: Reset FCP after VSPD
Date: Mon, 16 Jun 2025 14:14:25 +0200	[thread overview]
Message-ID: <20250616-vspx-reset-v2-2-6cc12ed7e9bb@ideasonboard.com> (raw)
In-Reply-To: <20250616-vspx-reset-v2-0-6cc12ed7e9bb@ideasonboard.com>

From: Koji Matsuoka <koji.matsuoka.xm@renesas.com>

According to the R-Car Gen3 H/W manual v2.40, and R-Car Gen4 H/W manual
v1.20, the FCP must be reset after resetting the VSPD, except for the
VSPDL. Do so.

Signed-off-by: Koji Matsuoka <koji.matsuoka.xm@renesas.com>
Signed-off-by: LUU HOAI <hoai.luu.ub@renesas.com>
Signed-off-by: Jacopo Mondi <jacopo.mondi+renesas@ideasonboard.com>
---
 drivers/media/platform/renesas/vsp1/vsp1_drv.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/media/platform/renesas/vsp1/vsp1_drv.c b/drivers/media/platform/renesas/vsp1/vsp1_drv.c
index 8270a9d207cb19c3a08911a408f5039d7d2924b6..49ac3104291a63ca0a47947baaff78ac7ecce3ea 100644
--- a/drivers/media/platform/renesas/vsp1/vsp1_drv.c
+++ b/drivers/media/platform/renesas/vsp1/vsp1_drv.c
@@ -33,6 +33,7 @@
 #include "vsp1_lif.h"
 #include "vsp1_lut.h"
 #include "vsp1_pipe.h"
+#include "vsp1_regs.h"
 #include "vsp1_rwpf.h"
 #include "vsp1_sru.h"
 #include "vsp1_uds.h"
@@ -502,7 +503,9 @@ static int vsp1_create_entities(struct vsp1_device *vsp1)
 
 int vsp1_reset_wpf(struct vsp1_device *vsp1, unsigned int index)
 {
+	u32 version = vsp1->version & VI6_IP_VERSION_MODEL_MASK;
 	unsigned int timeout;
+	int ret = 0;
 	u32 status;
 
 	status = vsp1_read(vsp1, VI6_STATUS);
@@ -523,7 +526,11 @@ int vsp1_reset_wpf(struct vsp1_device *vsp1, unsigned int index)
 		return -ETIMEDOUT;
 	}
 
-	return 0;
+	if (version == VI6_IP_VERSION_MODEL_VSPD_GEN3 ||
+	    version == VI6_IP_VERSION_MODEL_VSPD_GEN4)
+		ret = rcar_fcp_soft_reset(vsp1->fcp);
+
+	return ret;
 }
 
 static int vsp1_device_init(struct vsp1_device *vsp1)

-- 
2.49.0


  parent reply	other threads:[~2025-06-16 12:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-16 12:14 [PATCH v2 0/2] media: vsp1: Add FCP soft reset procedure Jacopo Mondi
2025-06-16 12:14 ` [PATCH v2 1/2] media: rcar-fcp: Add rcar_fcp_soft_reset() Jacopo Mondi
2025-06-18  1:19   ` Laurent Pinchart
2025-06-16 12:14 ` Jacopo Mondi [this message]
2025-06-16 12:58   ` [PATCH v2 2/2] media: vsp1: Reset FCP after VSPD Laurent Pinchart

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=20250616-vspx-reset-v2-2-6cc12ed7e9bb@ideasonboard.com \
    --to=jacopo.mondi+renesas@ideasonboard.com \
    --cc=hoai.luu.ub@renesas.com \
    --cc=kieran.bingham+renesas@ideasonboard.com \
    --cc=koji.matsuoka.xm@renesas.com \
    --cc=laurent.pinchart@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®