summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/frontends/s5h1409.c
diff options
context:
space:
mode:
authorBrandon Philips <brandon@ifup.org>2008-04-02 11:10:59 -0700
committerBrandon Philips <brandon@ifup.org>2008-04-02 11:10:59 -0700
commite385e87fd1da4f48a906ba73fb5dc17f39de479c (patch)
treea1c086f49f733714875d36ebaede5d9aaf7d6de5 /linux/drivers/media/dvb/frontends/s5h1409.c
parentc42776d2207482af2672ee15320059527cbc779d (diff)
downloadmediapointer-dvb-s2-e385e87fd1da4f48a906ba73fb5dc17f39de479c.tar.gz
mediapointer-dvb-s2-e385e87fd1da4f48a906ba73fb5dc17f39de479c.tar.bz2
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 CC: Trent Piepho <xyzzy@speakeasy.org> CC: Carl Karsten <carl@personnelware.com> CC: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Brandon Philips <bphilips@suse.de> --- linux/drivers/media/video/videobuf-core.c | 96 +++++++++++++++++++++++------- linux/include/media/videobuf-core.h | 2 2 files changed, 78 insertions(+), 20 deletions(-)
Diffstat (limited to 'linux/drivers/media/dvb/frontends/s5h1409.c')
0 files changed, 0 insertions, 0 deletions