linux-stable/drivers/media/rc
Heiner Kallweit 74d47d75be [media] rc: refactor raw handler kthread
I think we can get rid of the spinlock protecting the kthread from being
interrupted by a wakeup in certain parts.
Even with the current implementation of the kthread the only lost wakeup
scenario could happen if the wakeup occurs between the kfifo_len check
and setting the state to TASK_INTERRUPTIBLE.

In the changed version we could lose a wakeup if it occurs between
processing the fifo content and setting the state to TASK_INTERRUPTIBLE.
This scenario is covered by an additional check for available events in
the fifo and setting the state to TASK_RUNNING in this case.

In addition the changed version flushes the kfifo before ending
when the kthread is stopped.

With this patch we gain:
- Get rid of the spinlock
- Simplify code
- Don't grep / release the mutex for each individual event but just once
  for the complete fifo content. This reduces overhead if a driver e.g.
  triggers processing after writing the content of a hw fifo to the kfifo.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-01-30 11:46:55 -02:00
..
img-ir [media] rc: split nec protocol into its three variants 2016-09-22 11:46:49 -03:00
keymaps [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
ati_remote.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
ene_ir.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
ene_ir.h [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
fintek-cir.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
fintek-cir.h [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
gpio-ir-recv.c
igorplugusb.c [media] rc: split nec protocol into its three variants 2016-09-22 11:46:49 -03:00
iguanair.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
imon.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
ir-hix5hd2.c [media] ir-hix5hd2: make hisilicon,power-syscon property deprecated 2016-11-22 16:20:31 -02:00
ir-jvc-decoder.c
ir-lirc-codec.c
ir-mce_kbd-decoder.c
ir-nec-decoder.c [media] rc: split nec protocol into its three variants 2016-09-22 11:46:49 -03:00
ir-rc5-decoder.c
ir-rc6-decoder.c [media] rc: rc6 decoder should report protocol correctly 2016-09-22 11:42:29 -03:00
ir-rx51.c ktime: Get rid of the union 2016-12-25 17:21:22 +01:00
ir-sanyo-decoder.c [media] sanyo decoder: address was being truncated 2016-11-22 10:34:55 -02:00
ir-sharp-decoder.c
ir-sony-decoder.c
ir-xmp-decoder.c
ite-cir.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
ite-cir.h [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
Kconfig [media] lirc_serial: move out of staging and rename to serial_ir 2016-11-22 06:11:46 -02:00
lirc_dev.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
Makefile [media] lirc_serial: move out of staging and rename to serial_ir 2016-11-22 06:11:46 -02:00
mceusb.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
meson-ir.c [media] rc: meson-ir: Fix module autoload 2016-11-16 13:20:11 -02:00
nuvoton-cir.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
nuvoton-cir.h [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
rc-core-priv.h [media] rc: refactor raw handler kthread 2017-01-30 11:46:55 -02:00
rc-ir-raw.c [media] rc: refactor raw handler kthread 2017-01-30 11:46:55 -02:00
rc-loopback.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
rc-main.c [media] rc-main: clear rc_map.name in ir_free_table() 2016-11-18 14:31:34 -02:00
redrat3.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
serial_ir.c [media] serial_ir: fix reference to 8250 serial code 2016-11-22 06:17:44 -02:00
st_rc.c
streamzap.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
sunxi-cir.c
ttusbir.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
winbond-cir.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00