Skip to content

Commit

Permalink
[media] omap3isp: Cancel all queued buffers when stopping the video s…
Browse files Browse the repository at this point in the history
…tream

When stopping a video stream the driver waits for ongoing DMA opeations
to complete for the currently active buffer, but doesn't release the
non-active queued buffers. This isn't a problem in most cases as the
video device is usually closed after the stream is stopped, which will
release all the buffers. However the problem would generate a warning
when switching to videobuf2. Fix it by cancelling all buffers after DMA
operations have completed.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
  • Loading branch information
Laurent Pinchart authored and Mauro Carvalho Chehab committed May 25, 2014
1 parent eb2c00d commit 0834449
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/media/platform/omap3isp/ispvideo.c
Original file line number Diff line number Diff line change
Expand Up @@ -1115,6 +1115,8 @@ isp_video_streamoff(struct file *file, void *fh, enum v4l2_buf_type type)

/* Stop the stream. */
omap3isp_pipeline_set_stream(pipe, ISP_PIPELINE_STREAM_STOPPED);
omap3isp_video_cancel_stream(video);

mutex_lock(&video->queue_lock);
omap3isp_video_queue_streamoff(&vfh->queue);
mutex_unlock(&video->queue_lock);
Expand Down

0 comments on commit 0834449

Please sign in to comment.