diff options
author | Hans Verkuil | 2014-02-14 06:46:50 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab | 2014-03-11 06:56:36 -0300 |
commit | 4e5a4d8a8e970bd6b96c1c710cd636770b776697 (patch) | |
tree | 02703ca35b4d013548c287dd204d3c1e5f146cf6 /include/asm-generic/irq.h | |
parent | 249f5a58bc844506fef2e9d5d55a88fbc708c5fa (diff) |
[media] vb2: fix read/write regression
Commit 88e268702bfba78448abd20a31129458707383aa ("vb2: Improve file I/O
emulation to handle buffers in any order") broke read/write support if
the size of the buffer being read/written is less than the size of the
image.
When the commit was tested originally I used qv4l2, which calls read()
with exactly the size of the image. But if you try 'cat /dev/video0'
then it will fail and typically hang after reading two buffers.
This patch fixes the behavior by adding a new cur_index field that
contains the index of the field currently being filled/read, or it
is num_buffers in which case a new buffer needs to be dequeued.
The old index field has been renamed to initial_index in order to be
a bit more descriptive.
This has been tested with both read and write.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Tested-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'include/asm-generic/irq.h')
0 files changed, 0 insertions, 0 deletions