kernel_optimize_test/drivers/usb/gadget
Hans Verkuil f1e393de38 [media] v4l2-event/ctrls/fh: allocate events per fh and per type instead of just per-fh
The driver had to decide how many events to allocate when the v4l2_fh struct
was created. It was possible to add more events afterwards, but there was no
way to ensure that you wouldn't miss important events if the event queue
would fill up for that filehandle.

In addition, once there were no more free events, any new events were simply
dropped on the floor.

For the control event in particular this made life very difficult since
control status/value changes could just be missed if the number of allocated
events and the speed at which the application read events was too low to keep
up with the number of generated events. The application would have no idea
what the latest state was for a control since it could have missed the latest
control change.

So this patch makes some major changes in how events are allocated. Instead
of allocating events per-filehandle they are now allocated when subscribing an
event. So for that particular event type N events (determined by the driver)
are allocated. Those events are reserved for that particular event type.
This ensures that you will not miss events for a particular type altogether.

In addition, if there are N events in use and a new event is raised, then
the oldest event is dropped and the new one is added. So the latest event
is always available.

This can be further improved by adding the ability to merge the state of
two events together, ensuring that no data is lost at all. This will be
added in the next patch.

This also makes it possible to allow the user to determine the number of
events that will be allocated. This is not implemented at the moment, but
would be trivial.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27 17:53:31 -03:00
..
amd5536udc.c usb: gadget: include <linux/prefetch.h> to fix compiling error 2011-06-06 16:27:00 -07:00
amd5536udc.h Fix common misspellings 2011-03-31 11:26:23 -03:00
at91_udc.c usb: gadget: include <linux/prefetch.h> to fix compiling error 2011-06-06 16:27:00 -07:00
at91_udc.h
atmel_usba_udc.c Haavard Skinnemoen has left Atmel 2011-05-18 23:24:50 +02:00
atmel_usba_udc.h
audio.c
cdc2.c
ci13xxx_msm.c USB: gadget: Implement runtime PM for MSM bus glue driver 2010-12-10 14:23:34 -08:00
ci13xxx_pci.c USB: gadget: Introduce ci13xxx_udc_driver struct 2010-12-10 14:23:33 -08:00
ci13xxx_udc.c USB: OTG: msm: Implement charger detection 2011-05-06 18:27:48 -07:00
ci13xxx_udc.h USB: gadget: Add test mode support for ci13xxx_udc 2011-02-25 11:33:57 -08:00
composite.c usb: gadget: composite: Allow function drivers to pause control transfers 2011-05-10 14:14:57 -07:00
config.c
dbgp.c USB: dbpg gadget: dont mask out direction bit 2011-04-29 17:24:30 -07:00
dummy_hcd.c USB: dummy-hcd needs the has_tt flag 2011-06-07 09:05:43 -07:00
epautoconf.c USB: Gadget: Initialize wMaxPacketSize if not already set 2011-02-04 11:42:52 -08:00
ether.c
f_acm.c
f_audio.c USB: gadget: f_audio: Fix invalid dereference of initdata 2011-05-17 11:20:24 -07:00
f_ecm.c
f_eem.c usb: gadget: eem: fix echo command processing 2011-04-13 15:44:01 -07:00
f_fs.c USB: gadget: f_fs: even zero-length packets require a buffer 2011-02-04 11:57:22 -08:00
f_hid.c BKL: remove extraneous #include <smp_lock.h> 2010-11-17 08:59:32 -08:00
f_loopback.c
f_mass_storage.c usb: gadget: Remove the LUN checks which are always true 2011-05-10 14:14:59 -07:00
f_ncm.c Fix common misspellings 2011-03-31 11:26:23 -03:00
f_obex.c
f_phonet.c f_phonet: avoid pskb_pull(), fix OOPS with CONFIG_HIGHMEM 2011-02-28 12:36:39 -08:00
f_rndis.c usb: gadget: rndis: don't test against req->length 2011-05-13 15:51:09 -07:00
f_serial.c
f_sourcesink.c
f_subset.c
f_uvc.c
f_uvc.h
file_storage.c usb: gadget: Remove the LUN checks which are always true 2011-05-10 14:14:59 -07:00
fsl_mxc_udc.c usb: gadget/fsl_mxc_udc: Detect the CPU type in run-time 2011-02-04 11:42:52 -08:00
fsl_qe_udc.c drivercore: revert addition of of_match to struct device 2011-05-18 12:32:23 -06:00
fsl_qe_udc.h usb: fix a typo in a comment 2011-04-13 16:41:00 -07:00
fsl_udc_core.c USB: fsl_udc_core: fix build breakage when building for ARM arch 2011-07-01 14:20:39 -07:00
fsl_usb2_udc.h USB: extend ehci-fsl and fsl_udc_core driver for OTG operation 2011-05-02 16:59:38 -07:00
fusb300_udc.c usb: fusb300_udc: add more "ep%d" names 2011-02-17 10:47:55 -08:00
fusb300_udc.h usb: udc: add Faraday fusb300 driver 2011-01-22 19:45:36 -08:00
g_ffs.c usb: gadget: g_fs: Fix compilation warning 2010-11-17 13:24:46 -08:00
g_zero.h
gadget_chips.h USB: Gadget: Add Samsung S3C24XX USB High-Speed controller driver 2011-05-10 14:16:55 -07:00
gmidi.c Fix common misspellings 2011-03-31 11:26:23 -03:00
goku_udc.c sanitize <linux/prefetch.h> usage 2011-05-20 12:50:29 -07:00
goku_udc.h
hid.c
imx_udc.c sanitize <linux/prefetch.h> usage 2011-05-20 12:50:29 -07:00
imx_udc.h
inode.c usb-gadget: unlock data->lock mutex on error path in ep_write() 2011-06-06 15:59:40 -07:00
Kconfig USB: CONFIG_USB_GADGET_DUALSPEED is not user-configurable 2011-06-07 09:05:44 -07:00
langwell_udc.c Fix common misspellings 2011-03-31 11:26:23 -03:00
langwell_udc.h
m66592-udc.c usb: m66592-udc: Fixed bufnum of Bulk 2011-02-25 11:33:00 -08:00
m66592-udc.h
Makefile USB: Gadget: Add Samsung S3C24XX USB High-Speed controller driver 2011-05-10 14:16:55 -07:00
mass_storage.c
multi.c
mv_udc_core.c usb/mv_udc_core: fix compile 2011-06-06 16:28:02 -07:00
mv_udc_phy.c USB: pxa: Add USB client support for Marvell PXA9xx/PXA168 chips 2010-11-30 16:51:21 -08:00
mv_udc.h USB: pxa: Add USB client support for Marvell PXA9xx/PXA168 chips 2010-11-30 16:51:21 -08:00
ncm.c usb: gadget: g_ncm added 2010-12-10 14:29:43 -08:00
ndis.h
net2280.c usb: gadget: include <linux/prefetch.h> to fix compiling error 2011-06-06 16:27:00 -07:00
net2280.h
nokia.c Fix common misspellings 2011-03-31 11:26:23 -03:00
omap_udc.c sanitize <linux/prefetch.h> usage 2011-05-20 12:50:29 -07:00
omap_udc.h
pch_udc.c usb: pch_udc: unlock on allocation failure 2011-04-13 15:44:05 -07:00
printer.c USB: g_printer required set interface request 2011-04-29 17:24:31 -07:00
pxa25x_udc.c usb/pxa25x_udc: cleanup the LUBBOCK err path 2011-06-06 16:28:03 -07:00
pxa25x_udc.h
pxa27x_udc.c sanitize <linux/prefetch.h> usage 2011-05-20 12:50:29 -07:00
pxa27x_udc.h
r8a66597-udc.c usb: r8a66597-udc: fix spinlock usage 2011-04-13 15:44:00 -07:00
r8a66597-udc.h
rndis.c
rndis.h
s3c2410_udc.c usb: gadget: include <linux/prefetch.h> to fix compiling error 2011-06-06 16:27:00 -07:00
s3c2410_udc.h
s3c-hsotg.c USB: s3c-hsotg: Tone down debugging 2011-06-06 16:26:59 -07:00
s3c-hsudc.c usb/s3c-hsudc: fix error path 2011-06-06 16:28:03 -07:00
serial.c
storage_common.c usb: gadget: storage_common: use kstrto*() [bug fix] 2011-04-29 17:24:36 -07:00
u_audio.c usb: g_audio: Fix crash at driver removal 2010-12-03 12:05:35 -08:00
u_audio.h
u_ether.c usb-gadget: fix warning in ethernet 2011-03-02 19:52:29 -05:00
u_ether.h usb: gadget: f_ncm.c added 2010-12-10 14:29:43 -08:00
u_phonet.h
u_serial.c
u_serial.h
usbstring.c
uvc_queue.c
uvc_queue.h
uvc_v4l2.c [media] v4l2-event/ctrls/fh: allocate events per fh and per type instead of just per-fh 2011-07-27 17:53:31 -03:00
uvc_video.c
uvc.h
webcam.c
zero.c