media: vb2: vb2_find_timestamp: drop restriction on buffer state
authorHans Verkuil <hverkuil@xs4all.nl>
Thu, 24 Jan 2019 08:47:49 +0000 (06:47 -0200)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Thu, 31 Jan 2019 11:26:55 +0000 (09:26 -0200)
commit03535e7a3a9937da99ee18304309e0574d2504fc
treed6fe727fbb0b3905844e7fd1aac29bb19220c9d6
parent04bde67410bfff52958298e831fc5c7db04abe2d
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>
drivers/media/common/videobuf2/videobuf2-v4l2.c
include/media/videobuf2-v4l2.h