diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2018-05-23 07:51:25 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2018-08-31 11:22:56 -0400 |
commit | 61add367dda6309ee1702d85344b5fcbd6ede9a1 (patch) | |
tree | bf739b58b8bc1f89f456867732aa164faa739cda /include/media | |
parent | 86f6bd3cf1222c62bcccd76daf1c831f22e595bf (diff) | |
download | linux-61add367dda6309ee1702d85344b5fcbd6ede9a1.tar.bz2 |
media: videobuf2-core: add uses_requests/qbuf flags
Set the first time a buffer from a request is queued to vb2
(uses_requests) or directly queued (uses_qbuf).
Cleared when the queue is canceled.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reviewed-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'include/media')
-rw-r--r-- | include/media/videobuf2-core.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/media/videobuf2-core.h b/include/media/videobuf2-core.h index a9f2a7eae49a..881f53b38b26 100644 --- a/include/media/videobuf2-core.h +++ b/include/media/videobuf2-core.h @@ -472,6 +472,12 @@ struct vb2_buf_ops { * @quirk_poll_must_check_waiting_for_buffers: Return %EPOLLERR at poll when QBUF * has not been called. This is a vb1 idiom that has been adopted * also by vb2. + * @uses_qbuf: qbuf was used directly for this queue. Set to 1 the first + * time this is called. Set to 0 when the queue is canceled. + * If this is 1, then you cannot queue buffers from a request. + * @uses_requests: requests are used for this queue. Set to 1 the first time + * a request is queued. Set to 0 when the queue is canceled. + * If this is 1, then you cannot queue buffers directly. * @lock: pointer to a mutex that protects the &struct vb2_queue. The * driver can set this to a mutex to let the v4l2 core serialize * the queuing ioctls. If the driver wants to handle locking @@ -539,6 +545,8 @@ struct vb2_queue { unsigned fileio_write_immediately:1; unsigned allow_zero_bytesused:1; unsigned quirk_poll_must_check_waiting_for_buffers:1; + unsigned uses_qbuf:1; + unsigned uses_requests:1; struct mutex *lock; void *owner; |