[media] omap3isp: Cancel all queued buffers when stopping the video stream
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Sun, 20 Apr 2014 23:59:03 +0000 (20:59 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Sun, 25 May 2014 14:34:03 +0000 (11:34 -0300)
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>
drivers/media/platform/omap3isp/ispvideo.c

index e1f998366ba410203a96919c7d8341679295626e..ffe56ad4726a63cac98cd59b48bcbda82760c420 100644 (file)
@@ -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);
This page took 0.028012 seconds and 5 git commands to generate.