diff mbox series

[1/2] media: staging/intel-ipu3: Reset imgu_video_device sequence

Message ID 20220318121826.877187-2-umang.jain@ideasonboard.com (mailing list archive)
State New, archived
Headers show
Series media: ipu3: Sequence number fix and improvements | expand

Commit Message

Umang Jain March 18, 2022, 12:18 p.m. UTC
Reset the sequence number of imgu_video_device on stream start.
Failing to do so results in sequence number getting incremented
for consecutive stream on/off cycles.

Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
---
 drivers/staging/media/ipu3/ipu3-v4l2.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Laurent Pinchart March 22, 2022, 11:22 p.m. UTC | #1
Hi Umang,

Thank you for the patch.

On Fri, Mar 18, 2022 at 05:48:25PM +0530, Umang Jain via libcamera-devel wrote:
> Reset the sequence number of imgu_video_device on stream start.
> Failing to do so results in sequence number getting incremented
> for consecutive stream on/off cycles.
> 
> Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>

Looks good to me.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  drivers/staging/media/ipu3/ipu3-v4l2.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/staging/media/ipu3/ipu3-v4l2.c b/drivers/staging/media/ipu3/ipu3-v4l2.c
> index 0473457b4e64..d1c539cefba8 100644
> --- a/drivers/staging/media/ipu3/ipu3-v4l2.c
> +++ b/drivers/staging/media/ipu3/ipu3-v4l2.c
> @@ -485,6 +485,7 @@ static int imgu_vb2_start_streaming(struct vb2_queue *vq, unsigned int count)
>  
>  	pipe = node->pipe;
>  	imgu_pipe = &imgu->imgu_pipe[pipe];
> +	atomic_set(&node->sequence, 0);
>  	r = media_pipeline_start(&node->vdev.entity, &imgu_pipe->pipeline);
>  	if (r < 0)
>  		goto fail_return_bufs;
diff mbox series

Patch

diff --git a/drivers/staging/media/ipu3/ipu3-v4l2.c b/drivers/staging/media/ipu3/ipu3-v4l2.c
index 0473457b4e64..d1c539cefba8 100644
--- a/drivers/staging/media/ipu3/ipu3-v4l2.c
+++ b/drivers/staging/media/ipu3/ipu3-v4l2.c
@@ -485,6 +485,7 @@  static int imgu_vb2_start_streaming(struct vb2_queue *vq, unsigned int count)
 
 	pipe = node->pipe;
 	imgu_pipe = &imgu->imgu_pipe[pipe];
+	atomic_set(&node->sequence, 0);
 	r = media_pipeline_start(&node->vdev.entity, &imgu_pipe->pipeline);
 	if (r < 0)
 		goto fail_return_bufs;