public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
To: "Daniel Scally" <dan.scally@ideasonboard.com>,
	"Barnabás Pőcze" <barnabas.pocze@ideasonboard.com>,
	"Mauro Carvalho Chehab" <mchehab@kernel.org>,
	"Hans Verkuil" <hverkuil+cisco@kernel.org>
Cc: linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	"Jacopo Mondi" <jacopo.mondi+renesas@ideasonboard.com>,
	"Barnabás Pőcze" <barnabas.pocze+renesas@ideasonboard.com>,
	stable@vger.kernel.org
Subject: [PATCH 4/7] media: rzv2h-ivc: Fix FM_STOP register write
Date: Fri, 13 Mar 2026 12:14:00 +0100	[thread overview]
Message-ID: <20260313-mali-ivc-fixes-v7-0-v1-4-cb0714cd1279@ideasonboard.com> (raw)
In-Reply-To: <20260313-mali-ivc-fixes-v7-0-v1-0-cb0714cd1279@ideasonboard.com>

From: Barnabás Pőcze <barnabas.pocze+renesas@ideasonboard.com>

Bit 20 should be written in this register to stop frame processing.
So fix that, as well as the poll condition.

Cc: stable@vger.kernel.org
Fixes: f0b3984d821b ("media: platform: Add Renesas Input Video Control block driver")
Signed-off-by: Barnabás Pőcze <barnabas.pocze+renesas@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo.mondi+renesas@ideasonboard.com>
---
 drivers/media/platform/renesas/rzv2h-ivc/rzv2h-ivc-video.c | 5 +++--
 drivers/media/platform/renesas/rzv2h-ivc/rzv2h-ivc.h       | 1 +
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/media/platform/renesas/rzv2h-ivc/rzv2h-ivc-video.c b/drivers/media/platform/renesas/rzv2h-ivc/rzv2h-ivc-video.c
index d894a880c33f..9b75e4b10e99 100644
--- a/drivers/media/platform/renesas/rzv2h-ivc/rzv2h-ivc-video.c
+++ b/drivers/media/platform/renesas/rzv2h-ivc/rzv2h-ivc-video.c
@@ -297,9 +297,10 @@ static void rzv2h_ivc_stop_streaming(struct vb2_queue *q)
 	struct rzv2h_ivc *ivc = vb2_get_drv_priv(q);
 	u32 val = 0;
 
-	rzv2h_ivc_write(ivc, RZV2H_IVC_REG_FM_STOP, 0x1);
+	rzv2h_ivc_write(ivc, RZV2H_IVC_REG_FM_STOP, RZV2H_IVC_REG_FM_STOP_FSTOP);
 	readl_poll_timeout(ivc->base + RZV2H_IVC_REG_FM_STOP,
-			   val, !val, 10 * USEC_PER_MSEC, 250 * USEC_PER_MSEC);
+			   val, !(val & RZV2H_IVC_REG_FM_STOP_FSTOP),
+			   10 * USEC_PER_MSEC, 250 * USEC_PER_MSEC);
 
 	rzv2h_ivc_return_buffers(ivc, VB2_BUF_STATE_ERROR);
 	video_device_pipeline_stop(&ivc->vdev.dev);
diff --git a/drivers/media/platform/renesas/rzv2h-ivc/rzv2h-ivc.h b/drivers/media/platform/renesas/rzv2h-ivc/rzv2h-ivc.h
index 54c70de31c1e..049f223200e3 100644
--- a/drivers/media/platform/renesas/rzv2h-ivc/rzv2h-ivc.h
+++ b/drivers/media/platform/renesas/rzv2h-ivc/rzv2h-ivc.h
@@ -46,6 +46,7 @@
 #define RZV2H_IVC_REG_FM_MCON				0x0104
 #define RZV2H_IVC_REG_FM_FRCON				0x0108
 #define RZV2H_IVC_REG_FM_STOP				0x010c
+#define RZV2H_IVC_REG_FM_STOP_FSTOP			BIT(20)
 #define RZV2H_IVC_REG_FM_INT_EN				0x0120
 #define RZV2H_IVC_VVAL_IFPE				BIT(0)
 #define RZV2H_IVC_REG_FM_INT_STA			0x0124

-- 
2.53.0


  parent reply	other threads:[~2026-03-13 11:14 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-13 11:13 [PATCH 0/7] media: renesas: rzv2h-ivc: Fix concurrent job scheduling Jacopo Mondi
2026-03-13 11:13 ` [PATCH 1/7] media: rzv2h-ivc: Revise default VBLANK formula Jacopo Mondi
2026-03-13 11:13 ` [PATCH 2/7] media: rzv2h-ivc: Fix AXIRX_VBLANK register write Jacopo Mondi
2026-03-13 16:15   ` Dan Scally
2026-03-18  8:24   ` Barnabás Pőcze
2026-03-13 11:13 ` [PATCH 3/7] media: rzv2h-ivc: Write AXIRX_PIXFMT once Jacopo Mondi
2026-03-13 16:07   ` Dan Scally
2026-03-13 16:12     ` Jacopo Mondi
2026-03-13 16:14       ` Dan Scally
2026-03-13 11:14 ` Jacopo Mondi [this message]
2026-03-13 20:39   ` [PATCH 4/7] media: rzv2h-ivc: Fix FM_STOP register write Dan Scally
2026-03-13 11:14 ` [PATCH 5/7] media: rzv2h-ivc: Fix concurrent buffer list access Jacopo Mondi
2026-03-13 22:11   ` Dan Scally
2026-03-13 11:14 ` [PATCH 6/7] media: rzv2h-ivc: Avoid double job scheduling Jacopo Mondi
2026-03-18  8:00   ` Dan Scally
2026-03-18  8:18   ` Barnabás Pőcze
2026-03-13 11:14 ` [PATCH 7/7] media: rzv2h-ivc: Replace workqueue with direct function call Jacopo Mondi
2026-03-13 22:42   ` Dan Scally
2026-03-20 17:16 ` [PATCH 0/7] media: renesas: rzv2h-ivc: Fix concurrent job scheduling Lad, Prabhakar

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=20260313-mali-ivc-fixes-v7-0-v1-4-cb0714cd1279@ideasonboard.com \
    --to=jacopo.mondi@ideasonboard.com \
    --cc=barnabas.pocze+renesas@ideasonboard.com \
    --cc=barnabas.pocze@ideasonboard.com \
    --cc=dan.scally@ideasonboard.com \
    --cc=hverkuil+cisco@kernel.org \
    --cc=jacopo.mondi+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=stable@vger.kernel.org \
    /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