]> git.baikalelectronics.ru Git - kernel.git/commit
media: vb2: add requires_requests bit for stateless codecs
authorHans Verkuil <hverkuil-cisco@xs4all.nl>
Wed, 6 Mar 2019 21:13:21 +0000 (16:13 -0500)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Mon, 25 Mar 2019 17:24:47 +0000 (13:24 -0400)
commita6352e540cb6cc7b511938e6ccf64d741773f317
treed2575cb8064666b5453bea364890eb9fd9170fef
parent65e74a1176f02f0661a40d6e0620bdd657b5f09e
media: vb2: add requires_requests bit for stateless codecs

Stateless codecs require the use of the Request API as opposed of it
being optional.

So add a bit to indicate this and let vb2 check for this.

If an attempt is made to queue a buffer without an associated request,
then the EBADR error is returned to userspace.

Doing this check in the vb2 core simplifies drivers, since they
don't have to check for this, they can just set this flag.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Reviewed-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Documentation/media/uapi/v4l/vidioc-qbuf.rst
drivers/media/common/videobuf2/videobuf2-core.c
drivers/media/common/videobuf2/videobuf2-v4l2.c
include/media/videobuf2-core.h