]> git.baikalelectronics.ru Git - kernel.git/commit
media: vb2: keep track of timestamp status
authorHans Verkuil <hverkuil-cisco@xs4all.nl>
Mon, 4 Feb 2019 10:11:33 +0000 (05:11 -0500)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Mon, 18 Feb 2019 19:44:20 +0000 (14:44 -0500)
commitf2077f6473fe3c217bd7f1ad4237dda49d28ba70
tree9783e7926080cdfdad2b53d7c582eea07f0d7c56
parentaa34255f91319e45a44a91572cab1931012ff2a7
media: vb2: keep track of timestamp status

If a stream is stopped, or if a USERPTR/DMABUF buffer is queued
backed by a different user address or dmabuf fd, then the timestamp
should be skipped by vb2_find_timestamp since the memory it refers
to is no longer valid.

So keep track of a 'copied_timestamp' state: it is set when the
timestamp is copied from an output to a capture buffer, and is
cleared when it is no longer valid.

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>
drivers/media/common/videobuf2/videobuf2-core.c
drivers/media/common/videobuf2/videobuf2-v4l2.c
drivers/media/v4l2-core/v4l2-mem2mem.c
include/media/videobuf2-core.h