mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 10:58:48 +09:00
Merge commit '92f11a005627a76ba464841a9981b7e0df7c2d8d'
* commit '92f11a005627a76ba464841a9981b7e0df7c2d8d': usb: gadget: uvc: Fix frame size for framebase format UPSTREAM: usb: gadget: uvc: dont call usb_composite_setup_continue when not streaming BACKPORT: usb: gadget: uvc: wake pump everytime we update the free list BACKPORT: usb: gadget: uvc: configfs: Add frame-based frame format support UPSTREAM: usb: gadget: uvc: queue pump work in uvcg_video_enable() UPSTREAM: usb: gadget: uvc: Remove nested locking UPSTREAM: usb: gadget: uvc: Fix use are free during STREAMOFF BACKPORT: Revert "usb: gadget: f_uvc: change endpoint allocation in uvc_function_bind()" UPSTREAM: usb:gadget:uvc Do not use worker thread to pump isoc usb requests UPSTREAM: usb: gadget: uvc: Fix use-after-free for inflight usb_requests UPSTREAM: usb: gadget: uvc: move video disable logic to its own function UPSTREAM: usb: gadget: uvc: Allocate uvc_requests one at a time BACKPORT: usb: gadget: uvc: prevent use of disabled endpoint UPSTREAM: usb: gadget: function: Remove unused declarations UPSTREAM: usb: gadget: uvc: clean up comments and styling in video_pump UPSTREAM: usb: gadget: uvc: Add missing initialization of ssp config descriptor BACKPORT: usb: gadget: unconditionally allocate hs/ss descriptor in bind operation UPSTREAM: usb: gadget: uvc: default the ctrl request interface offsets UPSTREAM: usb: gadget: uvc: Rename bmInterfaceFlags -> bmInterlaceFlags Revert "usb: gadget: uvc: wait for req complete before free req" Change-Id: I2a346dbe4fd3dc5084ae0f9b1ea95ddb578f7c74
This commit is contained in:
@@ -78,6 +78,16 @@ static int uvc_get_frame_size(struct uvcg_format *uformat,
|
||||
{
|
||||
unsigned int bpl = uvc_v4l2_get_bytesperline(uformat, uframe);
|
||||
|
||||
if (uformat->type == UVCG_FRAMEBASED && !bpl) {
|
||||
struct uvcg_framebased *u;
|
||||
|
||||
u = to_uvcg_framebased(&uformat->group.cg_item);
|
||||
if (u) {
|
||||
bpl = u->desc.bBitsPerPixel * uframe->frame.w_width / 8;
|
||||
pr_info("%s: set bpl to %d for framebased format\n", __func__, bpl);
|
||||
}
|
||||
}
|
||||
|
||||
return bpl ? bpl * uframe->frame.w_height :
|
||||
uframe->frame.dw_max_video_frame_buffer_size;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user