On Mon Jun 16 14:14:25 2025 +0200, Koji Matsuoka wrote:
> 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...@renesas.com>
> Signed-off-by: LUU HOAI <hoai.luu...@renesas.com>
> Signed-off-by: Jacopo Mondi <jacopo.mondi+rene...@ideasonboard.com>
> Reviewed-by: Laurent Pinchart <laurent.pinchart+rene...@ideasonboard.com>
> Link: 
> https://lore.kernel.org/r/20250616-vspx-reset-v2-2-6cc12ed7e...@ideasonboard.com
> Signed-off-by: Laurent Pinchart <laurent.pinch...@ideasonboard.com>
> Signed-off-by: Hans Verkuil <hverk...@xs4all.nl>

Patch committed.

Thanks,
Hans Verkuil

 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 8270a9d207cb..49ac3104291a 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 @@ done:
 
 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)

Reply via email to