[media] videobuf2: return -EPIPE from DQBUF after the last buffer
authorPhilipp Zabel <p.zabel@pengutronix.de>
Mon, 4 May 2015 10:51:06 +0000 (07:51 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Tue, 12 May 2015 06:53:06 +0000 (03:53 -0300)
commitc16218402a000bb25c1277c43ae98c11bcb59bd1
treecccdee965d974306a2ad6e67aeb0cc0ae356bc40
parentdc199241624a2fd85d9b0d8303babd60feadd0e6
[media] videobuf2: return -EPIPE from DQBUF after the last buffer

If the last buffer was dequeued from a capture queue, let poll return
immediately and let DQBUF return -EPIPE to signal there will no more
buffers to dequeue until STREAMOFF.
The driver signals the last buffer by setting the V4L2_BUF_FLAG_LAST.
To reenable dequeuing on the capture queue, the driver must explicitly
call vb2_clear_last_buffer_queued. The last buffer queued flag is
cleared automatically during STREAMOFF.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/v4l2-core/v4l2-mem2mem.c
drivers/media/v4l2-core/videobuf2-core.c
include/media/videobuf2-core.h
This page took 0.025074 seconds and 5 git commands to generate.