]> git.baikalelectronics.ru Git - kernel.git/commit
usb: gadget: uvc_video: add worker to handle the frame pumping
authorMichael Grzeschik <m.grzeschik@pengutronix.de>
Tue, 21 Apr 2020 13:28:14 +0000 (15:28 +0200)
committerFelipe Balbi <balbi@kernel.org>
Mon, 25 May 2020 08:09:38 +0000 (11:09 +0300)
commit7b8e69da657b647276156db46f8f129843d15f0e
treea021ccb119a17755c461ff41a28635f69b52a602
parent0434dee74a02606994263c94d9d7b9690bbffdd5
usb: gadget: uvc_video: add worker to handle the frame pumping

This patch changes the function uvc_video_pump to be a separate
scheduled worker. This way the completion handler of each usb request
and every direct caller of the pump has only to schedule the worker
instead of doing the request handling by itself.

Moving the request handling to one thread solves the locking problems
between the three queueing cases in the completion handler, v4l2_qbuf
and video_enable.

Many drivers handle the completion handlers directly in their interrupt
handlers. This patch also reduces the workload on each interrupt.

Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
drivers/usb/gadget/function/uvc.h
drivers/usb/gadget/function/uvc_v4l2.c
drivers/usb/gadget/function/uvc_video.c
drivers/usb/gadget/function/uvc_video.h