linux/drivers/media/test-drivers/vivid
Hans Verkuil 6e8c09bb8d media: vivid: fix (partially) timing issues
The vivid driver is a bit flaky w.r.t. the kthread timing, esp. when
running inside a virtual machine.

This is caused by calling schedule_timeout_uninterruptible(1) which can
actually take more than one jiffie. A while loop with schedule() turns out
to be a lot more precise. Also, if mutex_trylock() fails, then just call
schedule() instead of schedule_timeout_uninterruptible(1). There is no need
to wait until the next jiffer, just schedule(), then try to get the lock
again.

This is still not precise enough, it is still relatively easy to get missed
frames. This really should be converted to use a proper timer, but for now
this solves the worst problems.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-11-16 10:31:08 +01:00
..
Kconfig
Makefile
vivid-cec.c
vivid-cec.h
vivid-core.c media: vivid: fix compile warning/error 2020-09-08 11:54:00 +02:00
vivid-core.h
vivid-ctrls.c
vivid-ctrls.h
vivid-kthread-cap.c media: vivid: fix (partially) timing issues 2020-11-16 10:31:08 +01:00
vivid-kthread-cap.h
vivid-kthread-out.c media: vivid: fix (partially) timing issues 2020-11-16 10:31:08 +01:00
vivid-kthread-out.h
vivid-kthread-touch.c media: vivid: fix (partially) timing issues 2020-11-16 10:31:08 +01:00
vivid-kthread-touch.h
vivid-meta-cap.c
vivid-meta-cap.h
vivid-meta-out.c media: vivid: Fix global-out-of-bounds read in precalculate_color() 2020-08-26 18:51:16 +02:00
vivid-meta-out.h
vivid-osd.c
vivid-osd.h
vivid-radio-common.c
vivid-radio-common.h
vivid-radio-rx.c
vivid-radio-rx.h
vivid-radio-tx.c
vivid-radio-tx.h
vivid-rds-gen.c
vivid-rds-gen.h
vivid-sdr-cap.c media: vivid: fix (partially) timing issues 2020-11-16 10:31:08 +01:00
vivid-sdr-cap.h
vivid-touch-cap.c
vivid-touch-cap.h
vivid-vbi-cap.c
vivid-vbi-cap.h
vivid-vbi-gen.c media: Use fallthrough pseudo-keyword 2020-08-29 08:35:27 +02:00
vivid-vbi-gen.h
vivid-vbi-out.c
vivid-vbi-out.h
vivid-vid-cap.c media: v4l2: allocate v4l2_clip objects early 2020-11-16 10:31:06 +01:00
vivid-vid-cap.h
vivid-vid-common.c media: vivid: Add support to the CSC API 2020-09-26 10:21:34 +02:00
vivid-vid-common.h
vivid-vid-out.c media: v4l2: allocate v4l2_clip objects early 2020-11-16 10:31:06 +01:00
vivid-vid-out.h