Videobuf2's vb2_dqbuf return (-EINVAL) error on streamoff

Chetan Nanda chetannanda at gmail.com
Wed Sep 9 05:09:50 EDT 2015


Hi,

I am working on a V4L2 based video decoder driver,

At user side there are two contexts.
One is queuing/dequeuing buffers from driver (in a separate thread) and
other is the main context, from where I am calling streamon, streamoff.

When I call a streamoff from main context and thread is blocking on dqbuf,
This cause the blocking thread to unblock from dqbuf with an error (EINVAL).

Seems this error coming from videobuf2-core, as streamoff will unblock the
waiting thread, and this thread will go and check (in
function __vb2_wait_for_done_vb) for q->streaming and will return error as
q->streaming will be set to false on streamoff.

Is it the right behavior of vb2_dqbuf to return error when streamoff is
called?

Or is it a right way to have this kind of mechanism i.e.on userside one
thread is queue/dequeue buffers while another is doing streamoff.

Thanks for your help and idea.

Thanks,
Chetan Nanda
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150909/08022b29/attachment.html 


More information about the Kernelnewbies mailing list