From: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>
To: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Cc: tomm.merciai@gmail.com, linux-renesas-soc@vger.kernel.org,
biju.das.jz@bp.renesas.com,
Sakari Ailus <sakari.ailus@linux.intel.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>,
Philipp Zabel <p.zabel@pengutronix.de>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 5/9] media: rzg2l-cru: Move active_slot reset into rzg2l_cru_set_stream()
Date: Mon, 27 Jul 2026 21:34:41 +0200 [thread overview]
Message-ID: <amey0f0rZAY96k3H@tom-desktop> (raw)
In-Reply-To: <amcrr7__3gNxZzxW@zed>
Hi Jacopo,
Thanks for your review.
On Mon, Jul 27, 2026 at 12:11:43PM +0200, Jacopo Mondi wrote:
> Hi Tommaso
>
> On Tue, Jun 16, 2026 at 07:05:35PM +0200, Tommaso Merciai wrote:
> > active_slot tracks the current DMA slot index and must always be reset
> > to zero before starting a new stream. Previously callers were responsible
> > for this reset before each rzg2l_cru_set_stream(cru, 1) invocation.
> >
> > Move the reset inside rzg2l_cru_set_stream() so the invariant is
> > enforced in a single place and future callers cannot accidentally omit
> > it.
> >
> > Signed-off-by: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>
> > ---
> > drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c b/drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c
> > index e283d9b69342..71d9c671f739 100644
> > --- a/drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c
> > +++ b/drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c
> > @@ -559,6 +559,7 @@ static int rzg2l_cru_set_stream(struct rzg2l_cru_dev *cru, int on)
> > return stream_off_ret;
> > }
> >
> > + cru->active_slot = 0;
>
> Maybe one emtpy line here ?
Ok, will fix in v2.
Kind Regards,
Tommaso
>
> > pipe = media_entity_pipeline(&sd->entity) ? : &cru->vdev.pipe;
> > ret = video_device_pipeline_start(&cru->vdev, pipe);
> > if (ret)
> > @@ -698,7 +699,6 @@ static int rzg2l_cru_start_streaming_vq(struct vb2_queue *vq, unsigned int count
> > goto err_assert_resets;
> > }
> >
> > - cru->active_slot = 0;
> > cru->sequence = 0;
>
> I think it's fine de-coupling the two. The end result shouldn't be any
> different after this change.
>
> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
>
> >
> > ret = rzg2l_cru_set_stream(cru, 1);
> > --
> > 2.54.0
> >
next prev parent reply other threads:[~2026-07-27 19:34 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-16 17:05 [PATCH 0/9] media: rzg2l-cru: Add suspend/resume support Tommaso Merciai
2026-06-16 17:05 ` [PATCH 1/9] media: rzg2l-cru: Add device_link from CRU to CSI-2 Tommaso Merciai
2026-07-27 9:45 ` Jacopo Mondi
2026-07-27 15:02 ` Tommaso Merciai
2026-07-27 9:50 ` Jacopo Mondi
2026-07-27 15:17 ` Tommaso Merciai
2026-06-16 17:05 ` [PATCH 2/9] media: rzg2l-cru: csi2: Add device_link from CSI-2 to sensor Tommaso Merciai
2026-07-27 9:48 ` Jacopo Mondi
2026-07-27 15:41 ` Tommaso Merciai
2026-06-16 17:05 ` [PATCH 3/9] media: rzg2l-cru: Use bulk reset API in rzg2l_cru_start_streaming_vq() Tommaso Merciai
2026-07-27 9:55 ` Jacopo Mondi
2026-07-27 19:32 ` Tommaso Merciai
2026-06-16 17:05 ` [PATCH 4/9] media: rzg2l-cru: Drop stop streaming function Tommaso Merciai
2026-07-27 9:55 ` Jacopo Mondi
2026-06-16 17:05 ` [PATCH 5/9] media: rzg2l-cru: Move active_slot reset into rzg2l_cru_set_stream() Tommaso Merciai
2026-07-27 10:11 ` Jacopo Mondi
2026-07-27 19:34 ` Tommaso Merciai [this message]
2026-06-16 17:05 ` [PATCH 6/9] media: rzg2l-cru: Add suspend/resume support Tommaso Merciai
2026-07-27 10:20 ` Jacopo Mondi
2026-06-16 17:05 ` [PATCH 7/9] media: rzg2l-cru: csi2: Add system sleep PM support Tommaso Merciai
2026-06-16 17:05 ` [PATCH 8/9] media: i2c: ov5645: Switch to RUNTIME_PM_OPS() and pm_ptr() Tommaso Merciai
2026-06-16 17:05 ` [PATCH 9/9] media: i2c: ov5645: Add suspend/resume support Tommaso Merciai
2026-07-15 8:47 ` [PATCH 0/9] media: rzg2l-cru: " Tommaso Merciai
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=amey0f0rZAY96k3H@tom-desktop \
--to=tommaso.merciai.xr@bp.renesas.com \
--cc=biju.das.jz@bp.renesas.com \
--cc=jacopo.mondi@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=p.zabel@pengutronix.de \
--cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
--cc=sakari.ailus@linux.intel.com \
--cc=tomm.merciai@gmail.com \
/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