[RFC][PATCH 0/2] media: fix polling not to wait if a buffer is available

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



As poll behavior described in following link, polling needs to just return if
already some buffer is in done list.
Link: http://www.spinics.net/lists/linux-media/msg34759.html

But in current vb2 and v4l2_m2m, poll function always calls poll_wait(), so it
needs to wait until next vb2_buffer_done() or queue is cancelled.

So I add check routine for done_list before calling poll_wait().
But I'm not sure that locking for done_lock of queue is also needed in this
case or not because done_list of queue is checked without locking in some
other parts of vb2.

Seung-Woo Kim (2):
  media: vb2: return for polling if a buffer is available
  media: v4l2-mem2mem: return for polling if a buffer is available

 drivers/media/v4l2-core/v4l2-mem2mem.c   |    6 ++++--
 drivers/media/v4l2-core/videobuf2-core.c |    3 ++-
 2 files changed, 6 insertions(+), 3 deletions(-)

-- 
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux