linux/drivers/media/common/videobuf2
Hans Verkuil f729ef5796 media: videobuf2-v4l2.c: add vb2_video_unregister_device helper function
If a driver calls (_)vb2_fop_release(), then such a driver should also
call vb2_video_unregister_device() instead of video_unregister_device().
This helper will call vb2_queue_release() if a filehandle is marked as
owner of the queue. This ensures that at unregister time any streaming
is cancelled and all buffers are returned to userspace.

This is very useful for complex drivers since this stops all streaming
in all subdevs in the pipeline controlled by this video device. Otherwise
this would be delayed until the owner filehandle is closed, which can be
quite some time later.

Bonus points for ordering the includes :-)

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-08-28 14:58:48 +02:00
..
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile media: vb2: Makefile: place vb2-trace together with vb2-core 2018-02-26 11:39:04 -05:00
vb2-trace.c media: videobuf2: fix build issues with vb2-trace 2018-02-23 05:13:53 -05:00
videobuf2-core.c media: videobuf2: Print videobuf2 buffer state by name 2020-07-19 14:25:36 +02:00
videobuf2-dma-contig.c media: videobuf2: remove redundant if-statement 2020-06-23 13:40:10 +02:00
videobuf2-dma-sg.c media: videobuf2: don't test db_attach in dma-contig prepare and finish 2020-06-23 13:39:41 +02:00
videobuf2-dvb.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
videobuf2-memops.c media: videobuf2-vmalloc: get_userptr: buffers are always writable 2019-05-29 08:05:58 -04:00
videobuf2-v4l2.c media: videobuf2-v4l2.c: add vb2_video_unregister_device helper function 2020-08-28 14:58:48 +02:00
videobuf2-vmalloc.c mm: remove the prot argument from vm_map_ram 2020-06-02 10:59:11 -07:00