]> git.baikalelectronics.ru Git - kernel.git/commit
media: vb2: clear V4L2_BUF_FLAG_LAST when filling vb2_buffer
authorPhilipp Zabel <p.zabel@pengutronix.de>
Fri, 8 Dec 2017 14:01:28 +0000 (09:01 -0500)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Mon, 18 Dec 2017 20:00:33 +0000 (15:00 -0500)
commit53b1125ceee00a5769326ac6e69ed6877dce4bd7
tree7b2f99446ae015fb519848fd4f3eac46243efe02
parentadb2ea7164aed369303617cde618f9770013b97c
media: vb2: clear V4L2_BUF_FLAG_LAST when filling vb2_buffer

V4L2_BUF_FLAG_LAST is a signal from the driver to userspace for buffers
on the capture queue. When userspace queues back a capture buffer with
the flag set, we should clear it.

Otherwise, if userspace restarts streaming after EOS, without
reallocating the buffers, mem2mem devices will erroneously signal EOS
prematurely, as soon as the already flagged buffer is dequeued.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/v4l2-core/videobuf2-v4l2.c