linux/drivers/usb/gadget
Xu Yang b52a07e07d usb: gadget: uvc: queue pump work in uvcg_video_enable()
Since commit "6acba0345b68 usb:gadget:uvc Do not use worker thread to pump
isoc usb requests", pump work could only be queued in uvc_video_complete()
and uvc_v4l2_qbuf(). If VIDIOC_QBUF is executed before VIDIOC_STREAMON,
we can only depend on uvc_video_complete() to queue pump work. However,
this requires some free requests in req_ready list. If req_ready list is
empty all the time, pump work will never be queued and video datas will
never be pumped to usb controller. Actually, this situation could happen
when run uvc-gadget with static image:

$ ./uvc-gadget -i 1080p.jpg uvc.0

When capture image from this device, the user app will always block there.

The issue is uvc driver has queued video buffer before streamon, but the
req_ready list is empty all the time after streamon. This will queue pump
work in uvcg_video_enable() to fill some request to req_ready list so the
uvc device could work properly.

Fixes: 6acba0345b ("usb:gadget:uvc Do not use worker thread to pump isoc usb requests")
Cc: stable@vger.kernel.org
Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
Link: https://lore.kernel.org/r/20240814112537.2608949-1-xu.yang_2@nxp.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-08-22 17:28:39 +08:00
..
function usb: gadget: uvc: queue pump work in uvcg_video_enable() 2024-08-22 17:28:39 +08:00
legacy usb: gadget: add missing MODULE_DESCRIPTION() macros 2024-06-20 19:18:19 +02:00
udc usb: gadget: core: Check for unset descriptor 2024-07-31 10:39:21 +02:00
composite.c usb: gadget: add missing MODULE_DESCRIPTION() macros 2024-06-20 19:18:19 +02:00
config.c usb: gadget: config: remove max speed check in usb_assign_descriptors() 2023-08-22 14:48:33 +02:00
configfs.c usb: gadget: configfs: Prevent OOB read/write in usb_string_copy() 2024-07-05 09:57:24 +02:00
configfs.h
epautoconf.c usb: gadget: fix for a typo that conveys logically-inverted information. 2021-09-14 10:27:54 +02:00
functions.c
Kconfig usb: gadget: functionfs: Add DMABUF import interface 2024-02-17 17:00:09 +01:00
Makefile usb: gadget: Makefile: remove ccflags-y 2022-03-18 12:56:08 +01:00
u_f.c
u_f.h
u_os_desc.h
usbstring.c