media: vb2: vb2_find_timestamp: drop restriction on buffer state
There really is no reason why vb2_find_timestamp can't just find buffers in any state. Drop that part of the test. This also means that vb->timestamp should only be set to 0 when the driver doesn't copy timestamps. This change allows for more efficient pipelining (i.e. you can use a buffer for a reference frame even when it is queued). Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Reviewed-by: Tomasz Figa <tfiga@chromium.org> Reviewed-by: Alexandre Courbot <acourbot@chromium.org> Reviewed-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
This commit is contained in:
committed by
Mauro Carvalho Chehab
parent
04bde67410
commit
03535e7a3a
@@ -59,8 +59,7 @@ struct vb2_v4l2_buffer {
|
||||
* vb2_find_timestamp() - Find buffer with given timestamp in the queue
|
||||
*
|
||||
* @q: pointer to &struct vb2_queue with videobuf2 queue.
|
||||
* @timestamp: the timestamp to find. Only buffers in state DEQUEUED or DONE
|
||||
* are considered.
|
||||
* @timestamp: the timestamp to find.
|
||||
* @start_idx: the start index (usually 0) in the buffer array to start
|
||||
* searching from. Note that there may be multiple buffers
|
||||
* with the same timestamp value, so you can restart the search
|
||||
|
||||
Reference in New Issue
Block a user