Commit 70432e8b authored by Michael Grzeschik's avatar Michael Grzeschik Committed by Neill Kapron
Browse files

FROMGIT: usb: gadget: uvc: only enqueue zero length requests in potential underrun



The complete handler will at least be called after 16 requests have
completed, but will still handle all finisher requests. Since we have
to maintain a costant filling in the isoc queue we ensure this by
adding zero length requests.

By counting the amount enqueued requests we can ensure that the queue is
never underrun and only need to get active if the queue is running
critical. This patch is setting 32 as the critical level, which
is twice the request amount that is needed to create interrupts.

To properly solve the amount of zero length requests that needs to
be held in the hardware after one interrupt needs to be measured
and depends on the runtime of the first enqueue run after the interrupt
triggered. For now we just use twice the amount of requests between an
interrupt.

Signed-off-by: default avatarMichael Grzeschik <m.grzeschik@pengutronix.de>
Link: https://lore.kernel.org/r/20240403-uvc_request_length_by_interval-v7-2-e224bb1035f0@pengutronix.de


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>

Bug: 379236348
(cherry picked from commit dc97c956 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git/

 usb-next)
Change-Id: If65f36318e4a576ca5c2cb1ed52fd4367daa943d
Signed-off-by: default avatarSelvarasu Ganesan <selvarasu.g@samsung.com>
parent e2900cc6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment