summaryrefslogtreecommitdiff
path: root/drivers/media/common/videobuf2/videobuf2-v4l2.c
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2018-05-21 11:54:47 +0300
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-08-31 18:18:35 +0300
commitfd89e0bb6ebff6481b9b8dd73729f5d62984490a (patch)
tree71157c3daf10469b97fdedc1eb61e4bdfa5e2da7 /drivers/media/common/videobuf2/videobuf2-v4l2.c
parent1cf96dcc6e79a860d2216a4d1c3edb1676a5798e (diff)
downloadlinux-fd89e0bb6ebff6481b9b8dd73729f5d62984490a.tar.xz
media: videobuf2-core: integrate with media requests
Buffers can now be prepared or queued for a request. A buffer is unbound from the request at vb2_buffer_done time or when the queue is cancelled. 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 'drivers/media/common/videobuf2/videobuf2-v4l2.c')
-rw-r--r--drivers/media/common/videobuf2/videobuf2-v4l2.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/media/common/videobuf2/videobuf2-v4l2.c b/drivers/media/common/videobuf2/videobuf2-v4l2.c
index 64905d87465c..ea9db4b3f59a 100644
--- a/drivers/media/common/videobuf2/videobuf2-v4l2.c
+++ b/drivers/media/common/videobuf2/videobuf2-v4l2.c
@@ -441,6 +441,8 @@ static void __fill_v4l2_buffer(struct vb2_buffer *vb, void *pb)
case VB2_BUF_STATE_ACTIVE:
b->flags |= V4L2_BUF_FLAG_QUEUED;
break;
+ case VB2_BUF_STATE_IN_REQUEST:
+ break;
case VB2_BUF_STATE_ERROR:
b->flags |= V4L2_BUF_FLAG_ERROR;
/* fall through */
@@ -619,7 +621,7 @@ int vb2_qbuf(struct vb2_queue *q, struct v4l2_buffer *b)
}
ret = vb2_queue_or_prepare_buf(q, b, "qbuf");
- return ret ? ret : vb2_core_qbuf(q, b->index, b);
+ return ret ? ret : vb2_core_qbuf(q, b->index, b, NULL);
}
EXPORT_SYMBOL_GPL(vb2_qbuf);