[media] vb2: call buf_finish from __queue_cancel
If a queue was canceled, then the buf_finish op was never called for the pending buffers. So add this call to queue_cancel. Before calling buf_finish set the buffer state to PREPARED, which is the correct state. That way the states DONE and ERROR will only be seen in buf_finish if streaming is in progress. Since buf_finish can now be called from non-streaming state we need to adapt the handful of drivers that actually need to know this. Signed-off-by:Hans Verkuil <hans.verkuil@cisco.com> Acked-by:
Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by:
Mauro Carvalho Chehab <m.chehab@samsung.com>
Showing
- drivers/media/parport/bw-qcam.c 3 additions, 0 deletionsdrivers/media/parport/bw-qcam.c
- drivers/media/pci/sta2x11/sta2x11_vip.c 2 additions, 1 deletiondrivers/media/pci/sta2x11/sta2x11_vip.c
- drivers/media/usb/uvc/uvc_queue.c 2 additions, 1 deletiondrivers/media/usb/uvc/uvc_queue.c
- drivers/media/v4l2-core/videobuf2-core.c 15 additions, 2 deletionsdrivers/media/v4l2-core/videobuf2-core.c
- include/media/videobuf2-core.h 9 additions, 1 deletioninclude/media/videobuf2-core.h
Please register or sign in to comment