diff options
| author | Michael Grzeschik <m.grzeschik@pengutronix.de> | 2024-10-16 15:58:11 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-10-17 08:42:22 +0200 |
| commit | 98ad0329156094a63c5191bb0f57b7bae9659f18 (patch) | |
| tree | 60bafe80aa8439fd09cdb2366d2151adb3699e49 /drivers/usb/gadget/function/uvc_queue.h | |
| parent | 48dbe731171e425611290f5b6d3058f86efb16bd (diff) | |
| download | linux-next-98ad0329156094a63c5191bb0f57b7bae9659f18.tar.gz linux-next-98ad0329156094a63c5191bb0f57b7bae9659f18.zip | |
usb: gadget: uvc: set req_length based on payload by nreqs instead of req_size
Compressed formats generate content depending amount of data that is set
in the vb2 buffer by the payload_size. When streaming those formats it
is better to scatter that smaller data over all requests. This patch is
doing that by introducing the calculated req_payload_size which is
updated by each frame. It the uses this amount of data to fill the
isoc requests instead of the video->req_size.
For uncompressed formats it will not make a difference since the payload
size will be equal to the imagesize. Therefore the code will have no
effecta as req_payload_size will be equal to req_size.
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Link: https://lore.kernel.org/r/20240403-uvc_request_length_by_interval-v7-6-e224bb1035f0@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/gadget/function/uvc_queue.h')
| -rw-r--r-- | drivers/usb/gadget/function/uvc_queue.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/gadget/function/uvc_queue.h b/drivers/usb/gadget/function/uvc_queue.h index 41f87b917f6b..b54becc570a3 100644 --- a/drivers/usb/gadget/function/uvc_queue.h +++ b/drivers/usb/gadget/function/uvc_queue.h @@ -39,6 +39,8 @@ struct uvc_buffer { unsigned int offset; unsigned int length; unsigned int bytesused; + /* req_payload_size: only used with isoc */ + unsigned int req_payload_size; }; #define UVC_QUEUE_DISCONNECTED (1 << 0) |
