diff options
author | Brandon Philips <brandon@ifup.org> | 2008-04-02 18:10:59 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-04-24 14:07:57 -0300 |
commit | 137d1cb19d9da163ce6cb57a6fa1e6a3468af6a4 (patch) | |
tree | 197f2548c82390d9c0a730c26d548752fdca12ad /include/asm-ppc/md.h | |
parent | 78718e5d44cd450431d5b16ee36d3a7de1db6dfa (diff) |
V4L/DVB (7493): videobuf: Avoid deadlock with QBUF and bring up to spec for empty queue
Add a waitqueue to wait on when there are no buffers in the buffer queue.
DQBUF waits on this queue without holding vb_lock to allow a QBUF to happen.
Once a buffer has been queued we recheck that the queue is still streaming and
wait on the new buffer's waitqueue while holding the vb_lock. The driver
should come along in a timely manner and put the buffer into its next state
finishing the DQBUF.
By implementing this waitqueue it also brings the videobuf DQBUF up to spec and
it now blocks on O_NONBLOCK even when no buffers have been queued via QBUF:
"By default VIDIOC_DQBUF blocks when no buffer is in the outgoing queue."
- V4L2 spec
Signed-off-by: Brandon Philips <bphilips@suse.de>
CC: Trent Piepho <xyzzy@speakeasy.org>
CC: Carl Karsten <carl@personnelware.com>
CC: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'include/asm-ppc/md.h')
0 files changed, 0 insertions, 0 deletions