]> www.infradead.org Git - users/jedix/linux-maple.git/commit
media: vivid: add module option to set request support mode
authorHans Verkuil <hverkuil-cisco@xs4all.nl>
Thu, 29 Jul 2021 13:36:26 +0000 (15:36 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Fri, 6 Aug 2021 08:45:06 +0000 (10:45 +0200)
commit92852963f78ef383effe0ce262b0e403ecd6a277
treefcb6420fa0692564e9c16dfc943284efc4dfee14
parent65da1fc4c325c767db502f2f4f4c2c0eb3527357
media: vivid: add module option to set request support mode

Currently vivid supports the Request API, but it also sets
min_buffers_needed in the vb2 queue. But the combination of
support_requests and min_buffers_needed is not allowed due to
the fact that vb2_core_qbuf() isn't supposed to fail when called
from the request framework. And if min_buffers_needed > 0, then
is can call start_streaming() which definitely can fail.

With the new module option you can control if requests are not
allowed (min_buffers_needed is 2 in that case), optionally allowed
or are required. In the latter two cases min_buffers_needed is set
to 0.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/test-drivers/vivid/vivid-core.c