Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
media: videobuf2-core: update vb2_thread if wait_finish/prepare are NULL
The vb2_thread is used for DVB support. This will queue and dequeue buffers automatically. It calls wait_finish/prepare around vb2_core_dqbuf() and vb2_core_qbuf(), but that assumes all drivers have these ops set. But that will change due to commit 8878598 ("media: vb2: use lock if wait_prepare/finish are NULL"). So instead just check if the callback is available, and if not, use q->lock, just as __vb2_wait_for_done_vb() does. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
- Loading branch information