From fca161865b239d1658dc17d110e4eb4c2ebe2729 Mon Sep 17 00:00:00 2001 From: Brad Stein Date: Fri, 23 Jan 2026 16:39:48 -0300 Subject: [PATCH] kernel: fix uvc debug patch format --- scripts/kernel/uvc-debug.patch | 45 +++++++++++++++++----------------- 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/scripts/kernel/uvc-debug.patch b/scripts/kernel/uvc-debug.patch index 3e5cba1..f40feb2 100644 --- a/scripts/kernel/uvc-debug.patch +++ b/scripts/kernel/uvc-debug.patch @@ -1,5 +1,26 @@ --- a/drivers/usb/gadget/function/uvc_video.c +++ b/drivers/usb/gadget/function/uvc_video.c +@@ -528,7 +528,20 @@ + if (req_size > max_req_size) { + /* The prepared interval length and expected buffer size + * is not possible to stream with the currently configured + * isoc bandwidth. Fallback to the maximum. + */ + req_size = max_req_size; + } + video->req_size = req_size; ++ ++ if (!req_size || !video->max_payload_size || !video->imagesize || !nreq) { ++ uvcg_info(&uvc->func, ++ "Video prep requests: imagesize=%u interval=%u interval_dur=%u nreq=%u header=%u req_size=%u max_req=%u max_payload=%u ep_maxpacket=%u maxburst=%u mult=%u bInterval=%u speed=%u\n", ++ video->imagesize, video->interval, interval_duration, nreq, ++ header_size, req_size, max_req_size, ++ video->max_payload_size, video->ep->maxpacket, ++ video->ep->maxburst, video->ep->mult, ++ video->ep->desc->bInterval, cdev->gadget->speed); ++ } + + /* We need to compensate the amount of requests to be @@ -763,17 +763,60 @@ { int ret; @@ -12,7 +33,7 @@ + if (!video->uvc || !video->uvc->func.config || + !video->uvc->func.config->cdev) { + pr_err("uvcg_video_enable: missing uvc/func/config video=%p uvc=%p\n", -+ video, video->uvc); ++ video, video->uvc); + return -ENODEV; + } + @@ -60,25 +81,3 @@ /* * Safe to access request related fields without req_lock because * this is the only thread currently active, and no other - -@@ -510,6 +532,19 @@ - if (req_size > max_req_size) { - /* The prepared interval length and expected buffer size - * is not possible to stream with the currently configured - * isoc bandwidth. Fallback to the maximum. - */ - req_size = max_req_size; - } - video->req_size = req_size; - - if (!req_size || !video->max_payload_size || !video->imagesize || !nreq) { - uvcg_info(&uvc->func, - "Video prep requests: imagesize=%u interval=%u interval_dur=%u nreq=%u header=%u req_size=%u max_req=%u max_payload=%u ep_maxpacket=%u maxburst=%u mult=%u bInterval=%u speed=%u\n", - video->imagesize, video->interval, interval_duration, nreq, - header_size, req_size, max_req_size, - video->max_payload_size, video->ep->maxpacket, - video->ep->maxburst, video->ep->mult, - video->ep->desc->bInterval, cdev->gadget->speed); - } - - /* We need to compensate the amount of requests to be