summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget/function/uvc.h
diff options
context:
space:
mode:
authorMichael Grzeschik <m.grzeschik@pengutronix.de>2021-06-28 17:53:11 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-07-27 15:59:19 +0200
commitfc78941d8169cba40e420eb24a88789b0406c738 (patch)
treef2778995fc0993797696a4d44962404dae39b89b /drivers/usb/gadget/function/uvc.h
parente81e7f9a0eb9536d5976acf5d95290338032a198 (diff)
downloadlwn-fc78941d8169cba40e420eb24a88789b0406c738.tar.gz
lwn-fc78941d8169cba40e420eb24a88789b0406c738.zip
usb: gadget: uvc: decrease the interrupt load to a quarter
With usb3 we handle many more requests. Decrease the interrupt load by only enabling the interrupt every quarter of the allocated requests. Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> -- v1 -> v2: - edited patch description - removed extra parantheses - added a comment for the logic - using unsigned int instead of int - reinitializing req_int_count in uvcg_video_enable v2 -> v3: - Link: https://lore.kernel.org/r/20210628155311.16762-6-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.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/gadget/function/uvc.h b/drivers/usb/gadget/function/uvc.h
index 36b78f8b3cd4..255a61bd6a6a 100644
--- a/drivers/usb/gadget/function/uvc.h
+++ b/drivers/usb/gadget/function/uvc.h
@@ -101,6 +101,8 @@ struct uvc_video {
struct list_head req_free;
spinlock_t req_lock;
+ unsigned int req_int_count;
+
void (*encode) (struct usb_request *req, struct uvc_video *video,
struct uvc_buffer *buf);