summaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/function/uvc.h
diff options
context:
space:
mode:
authorMichael Grzeschik <m.grzeschik@pengutronix.de>2022-04-03 01:27:43 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-04-21 18:15:33 +0200
commit9b969f93bcef9b3d9e92f1810e22bbd6c344a0e5 (patch)
treed1c7ac5ef3211fde1a40221837a75acdd87248a9 /drivers/usb/gadget/function/uvc.h
parentusb: gadget: uvc: rework uvcg_queue_next_buffer to uvcg_complete_buffer (diff)
downloadlinux-9b969f93bcef9b3d9e92f1810e22bbd6c344a0e5.tar.xz
linux-9b969f93bcef9b3d9e92f1810e22bbd6c344a0e5.zip
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>
Diffstat (limited to 'drivers/usb/gadget/function/uvc.h')
-rw-r--r--drivers/usb/gadget/function/uvc.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/gadget/function/uvc.h b/drivers/usb/gadget/function/uvc.h
index c3607a32b986..9eec104b3666 100644
--- a/drivers/usb/gadget/function/uvc.h
+++ b/drivers/usb/gadget/function/uvc.h
@@ -79,6 +79,7 @@ struct uvc_request {
struct uvc_video *video;
struct sg_table sgt;
u8 header[UVCG_REQUEST_HEADER_LEN];
+ struct uvc_buffer *last_buf;
};
struct uvc_video {