Re: [PATCH 5/9] media: rzg2l-cru: Move active_slot reset into rzg2l_cru_set_stream()
Tommaso Merciai <[email protected]> Mon, 27 Jul 2026 21:34:41 +0200
| Newsgroups | org.kernel.vger.linux-renesas-soc,org.kernel.vger.linux-kernel,org.kernel.vger.linux-media |
|---|---|
| Message-ID | <amey0f0rZAY96k3H@tom-desktop> |
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 <[email protected]> > > --- > > 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 <[email protected]> > > > > > ret = rzg2l_cru_set_stream(cru, 1); > > -- > > 2.54.0 > >