]> git.baikalelectronics.ru Git - kernel.git/commit
usb: gadget: uvc: giveback vb2 buffer on req complete
authorMichael Grzeschik <m.grzeschik@pengutronix.de>
Sat, 2 Apr 2022 23:27:43 +0000 (01:27 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 21 Apr 2022 16:15:33 +0000 (18:15 +0200)
commit53d0f16123889e6b53d508760f7e32d1512aebd4
treed1c7ac5ef3211fde1a40221837a75acdd87248a9
parentbe2bc320a89be92ce64f1fe0c3d12d52b257d147
usb: gadget: uvc: giveback vb2 buffer on req complete

On uvc_video_encode_isoc_sg the mapped vb2 buffer is returned
to early. Only after the last usb_request worked with the buffer
it is allowed to give it back to vb2. This patch fixes that.

Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Link: https://lore.kernel.org/r/20220402232744.3622565-3-m.grzeschik@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/function/uvc.h
drivers/usb/gadget/function/uvc_queue.c
drivers/usb/gadget/function/uvc_video.c