linux/drivers
Michael Grzeschik b92ac32536 FROMGIT: usb: gadget: uvc: calculate the number of request depending on framesize
The current limitation of possible number of requests being handled is
dependent on the gadget speed. It makes more sense to depend on the
typical frame size when calculating the number of requests. This patch
is changing this and is using the previous limits as boundaries for
reasonable minimum and maximum number of requests.

For a 1080p jpeg encoded video stream with a maximum imagesize of
e.g. 800kB with a maxburst of 8 and an multiplier of 1 the resulting
number of requests is calculated to 49.

        800768         1
nreqs = ------ * -------------- ~= 49
          2      (1024 * 8 * 1)

Tested-by: Dan Vacura <w36195@motorola.com>
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Link: https://lore.kernel.org/r/20220529223848.105914-2-m.grzeschik@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Bug: 234757296
(cherry picked from commit 87d76b5f1d
 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-next)
Change-Id: I0228cbaa56d4e75bed33e1ef721ae3127d779faf
Signed-off-by: Dan Vacura <w36195@motorola.com>
2022-06-14 08:40:53 -05:00
..
accessibility speakup-dectlk: Restore pitch setting 2022-02-16 12:54:30 +01:00
acpi This is the 5.10.110 stable release 2022-04-18 17:41:18 +02:00
amba amba: Make the remove callback return void 2022-04-08 14:40:02 +02:00
android ANDROID: vendor_hooks: Add hooks for mutex 2022-05-21 07:57:12 +00:00
ata ata: pata_hpt37x: fix PCI clock detection 2022-03-08 19:09:31 +01:00
atm atm: eni: Add check for dma_map_single 2022-03-23 09:13:27 +01:00
auxdisplay auxdisplay: ht16k33: Fix frame buffer device blanking 2021-11-18 14:04:24 +01:00
base This is the 5.10.110 stable release 2022-04-18 17:41:18 +02:00
bcma
block Merge tag 'android12-5.10.110_r01' into android12-5.10 2022-05-27 09:24:14 -07:00
bluetooth This is the 5.10.110 stable release 2022-04-18 17:41:18 +02:00
bus mips: cdmm: Fix refcount leak in mips_cdmm_phys_base 2022-04-08 14:40:20 +02:00
cdrom
char This is the 5.10.110 stable release 2022-04-18 17:41:18 +02:00
clk This is the 5.10.110 stable release 2022-04-18 17:41:18 +02:00
clocksource This is the 5.10.110 stable release 2022-04-18 17:41:18 +02:00
connector
counter counter: stm32-lptimer-cnt: remove iio counter abi 2022-01-27 10:54:08 +01:00
cpufreq This is the 5.10.110 stable release 2022-04-18 17:41:18 +02:00
cpuidle This is the 5.10.80 stable release 2021-11-19 11:50:41 +01:00
crypto This is the 5.10.110 stable release 2022-04-18 17:41:18 +02:00
dax dax: make sure inodes are flushed before destroy cache 2022-04-08 14:40:16 +02:00
dca
devfreq
dio
dma dmaengine: hisi_dma: fix MSI allocate fail when reload hisi_dma 2022-04-08 14:40:26 +02:00
dma-buf This is the 5.10.110 stable release 2022-04-18 17:41:18 +02:00
edac EDAC: Fix calculation of returned address and next offset in edac_align_ptr() 2022-02-23 12:01:07 +01:00
eisa
extcon
firewire
firmware Revert "pstore: Don't use semaphores in always-atomic-context code" 2022-04-20 16:09:57 +02:00
fpga
fsi fsi: Aspeed: Fix a potential double free 2022-04-08 14:40:23 +02:00
gnss
gpio Revert "gpio: Revert regression in sysfs-gpio (gpiolib.c)" 2022-04-08 14:39:48 +02:00
gpu This is the 5.10.110 stable release 2022-04-18 17:41:18 +02:00
greybus greybus: svc: fix an error handling bug in gb_svc_hello() 2022-04-08 14:39:50 +02:00
hid This is the 5.10.110 stable release 2022-04-18 17:41:18 +02:00
hsi HSI: core: Fix return freed object in hsi_new_client 2022-01-27 10:54:12 +01:00
hv hv_balloon: rate-limit "Unhandled message" warning 2022-04-08 14:40:19 +02:00
hwmon This is the 5.10.110 stable release 2022-04-18 17:41:18 +02:00
hwspinlock
hwtracing This is the 5.10.110 stable release 2022-04-18 17:41:18 +02:00
i2c This is the 5.10.110 stable release 2022-04-18 17:41:18 +02:00
i3c
ide
idle
iio iio: adc: Add check for devm_request_threaded_irq 2022-04-08 14:40:25 +02:00
infiniband This is the 5.10.110 stable release 2022-04-18 17:41:18 +02:00
input amba: Make the remove callback return void 2022-04-08 14:40:02 +02:00
interconnect
iommu Merge tag 'android12-5.10.110_r01' into android12-5.10 2022-05-27 09:24:14 -07:00
ipack
irqchip This is the 5.10.110 stable release 2022-04-18 17:41:18 +02:00
isdn isdn: hfcpci: check the return value of dma_set_mask() in setup_hw() 2022-03-16 14:15:57 +01:00
leds
lightnvm
macintosh
mailbox mailbox: imx: fix wakeup failure from freeze mode 2022-04-08 14:40:41 +02:00
mcb
md Merge tag 'android12-5.10.110_r01' into android12-5.10 2022-05-27 09:24:14 -07:00
media BACKPORT: media: v4l2-mem2mem: Apply DST_QUEUE_OFF_BASE on MMAP buffers across ioctls 2022-04-22 07:38:57 +00:00
memory This is the 5.10.110 stable release 2022-04-18 17:41:18 +02:00
memstick memstick: jmb38x_ms: use appropriate free function in jmb38x_ms_alloc_host() 2021-11-18 14:04:07 +01:00
message
mfd mfd: asic3: Add missing iounmap() on error asic3_mfd_probe 2022-04-08 14:40:23 +02:00
misc This is the 5.10.110 stable release 2022-04-18 17:41:18 +02:00
mmc This is the 5.10.110 stable release 2022-04-18 17:41:18 +02:00
most most: fix control-message timeouts 2021-11-18 14:03:51 +01:00
mtd This is the 5.10.110 stable release 2022-04-18 17:41:18 +02:00
mux
net BACKPORT: can: ems_usb: ems_usb_start_xmit(): fix double dev_kfree_skb() in error path 2022-05-16 15:42:16 +01:00
nfc nfc: st21nfca: Fix potential buffer overflows in EVT_TRANSACTION 2022-03-28 09:57:07 +02:00
ntb ntb: intel: fix port config status offset for SPR 2022-03-08 19:09:32 +01:00
nubus
nvdimm nvdimm/region: Fix default alignment for small regions 2022-04-08 14:40:26 +02:00
nvme This is the 5.10.110 stable release 2022-04-18 17:41:18 +02:00
nvmem nvmem: core: set size for sysfs bin file 2022-01-27 10:54:22 +01:00
of This is the 5.10.94 stable release 2022-01-27 11:49:22 +01:00
opp This is the 5.10.80 stable release 2021-11-19 11:50:41 +01:00
oprofile
parisc parisc: Fix sglist access in ccio-dma.c 2022-02-23 12:00:57 +01:00
parport
pci Revert "PCI: Reduce warnings on possible RW1C corruption" 2022-04-20 16:09:51 +02:00
pcmcia pcmcia: fix setting of kthread task states 2022-01-27 10:54:03 +01:00
perf
phy phy: dphy: Correct lpx parameter and its derivatives(ta_{get,go,sure}) 2022-04-08 14:40:24 +02:00
pinctrl This is the 5.10.110 stable release 2022-04-18 17:41:18 +02:00
platform This is the 5.10.110 stable release 2022-04-18 17:41:18 +02:00
pnp
power This is the 5.10.110 stable release 2022-04-18 17:41:18 +02:00
powercap
pps
ps3
ptp
pwm This is the 5.10.110 stable release 2022-04-18 17:41:18 +02:00
rapidio
ras
regulator This is the 5.10.110 stable release 2022-04-18 17:41:18 +02:00
remoteproc FROMLIST: remoteproc: Fix dma_mem leak after rproc_shutdown 2022-05-31 17:47:14 +00:00
reset This is the 5.10.80 stable release 2021-11-19 11:50:41 +01:00
rpmsg This is the 5.10.96 stable release 2022-02-07 11:17:58 +01:00
rtc rtc: check if __rtc_read_time was successful 2022-04-08 14:40:40 +02:00
s390 This is the 5.10.96 stable release 2022-02-07 11:17:58 +01:00
sbus
scsi This is the 5.10.110 stable release 2022-04-18 17:41:18 +02:00
sfi
sh maple: fix wrong return value of maple_bus_init(). 2021-11-26 10:39:12 +01:00
siox
slimbus
soc This is the 5.10.110 stable release 2022-04-18 17:41:18 +02:00
soundwire soundwire: intel: fix wrong register name in intel_shim_wake 2022-04-08 14:40:24 +02:00
spi This is the 5.10.110 stable release 2022-04-18 17:41:18 +02:00
spmi
ssb
staging Merge tag 'android12-5.10.110_r01' into android12-5.10 2022-05-27 09:24:14 -07:00
target This is the 5.10.101 stable release 2022-02-16 15:16:06 +01:00
tc
tee optee: use driver internal tee_context for some rpc 2022-03-02 11:42:47 +01:00
thermal This is the 5.10.110 stable release 2022-04-18 17:41:18 +02:00
thunderbolt thunderbolt: Runtime PM activate both ends of the device link 2022-01-27 10:54:14 +01:00
tty This is the 5.10.110 stable release 2022-04-18 17:41:18 +02:00
uio
usb FROMGIT: usb: gadget: uvc: calculate the number of request depending on framesize 2022-06-14 08:40:53 -05:00
vdpa vdpa/mlx5: should verify CTRL_VQ feature exists for MQ 2022-04-08 14:39:47 +02:00
vfio amba: Make the remove callback return void 2022-04-08 14:40:02 +02:00
vhost Revert "vsock: each transport cycles only on its own sockets" 2022-03-23 14:30:38 +01:00
video video: fbdev: sm712fb: Fix crash in smtcfb_write() 2022-04-08 14:40:36 +02:00
virt
virtio This is the 5.10.106 stable release 2022-03-18 15:02:31 +01:00
visorbus
vlynq
vme
w1 w1: Misuse of get_user()/put_user() reported by sparse 2022-01-27 10:54:22 +01:00
watchdog watchdog: rti-wdt: Add missing pm_runtime_disable() in probe function 2022-04-08 14:40:41 +02:00
xen xen/gnttab: fix gnttab_end_foreign_access() without page specified 2022-03-11 12:11:54 +01:00
zorro
Kconfig
Makefile