]> git.karo-electronics.de Git - karo-tx-linux.git/commit
[media] vb2: Improve file I/O emulation to handle buffers in any order
authorHans Verkuil <hans.verkuil@cisco.com>
Fri, 13 Dec 2013 16:13:45 +0000 (13:13 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Tue, 7 Jan 2014 09:14:25 +0000 (07:14 -0200)
commit88e268702bfba78448abd20a31129458707383aa
treea008036986dd5827c1883754e33ce6a744db8a44
parent79aeb3f3083a8a795467eae429cb2d6faf482f32
[media] vb2: Improve file I/O emulation to handle buffers in any order

videobuf2 file I/O emulation assumed that buffers dequeued from the
driver would return in the order they were enqueued in the driver.

Improve the file I/O emulator's book-keeping to remove this assumption.

Also set the buf->size properly if a write() dequeues a buffer and the
VB2_FILEIO_WRITE_IMMEDIATELY flag is set.

Based on an initial patch by Andy Walls.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reviewed-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/v4l2-core/videobuf2-core.c