diff options
author | Marcus Glocker <mglocker@cvs.openbsd.org> | 2021-02-16 13:50:47 +0000 |
---|---|---|
committer | Marcus Glocker <mglocker@cvs.openbsd.org> | 2021-02-16 13:50:47 +0000 |
commit | e6022f2143f80a689b6c67ecaed952d5ac81f62d (patch) | |
tree | 217b6678be8b9e4ab3b0be48a86d82b08a0bc101 /sys/tmpfs/tmpfs_mem.c | |
parent | 11c6522fa0bc4270221b9d632cdcd8f1d58d2512 (diff) |
Enable multiple opens of a video(4) device as described in the V4L2
specification:
https://www.kernel.org/doc/html/v5.10/userspace-api/media/v4l/open.html#f1
The discussion has been started by jca@, who has implemented this
behavior recently, but limited to the same process. This diff extends
this behavior to any process. The first process which opens a stream
will become the device owner. Other processes are still allowed to call
certain ioctls, but none which are related to the start/stop of a
stream, or manipulation of the streaming buffers. At the moment only
VIDIOC_G_CTRL and VIDIOC_S_CTRL are supported to be called by non-
device owner processes, which should be extended further in the future.
There is no additional kernel locking implemented at the moment, since
video(4) already runs under the KERNEL_LOCK(), which we expect to be
sufficient for now (as discussed with claudio@).
A lot of improvement input received from anton@.
ok anton@
Diffstat (limited to 'sys/tmpfs/tmpfs_mem.c')
0 files changed, 0 insertions, 0 deletions