Re: [PATCH 1/3] vb2: Buffers returned to videobuf2 from start_streaming in QUEUED state

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

 



Hi Hans,

On Fri, Sep 19, 2014 at 10:13:57AM +0200, Hans Verkuil wrote:
> On 09/18/2014 11:57 PM, Sakari Ailus wrote:
> > Patch "[media] v4l: vb2: Fix stream start and buffer completion race" has a
> > sets q->start_streaming_called before calling queue op start_streaming() in
> > order to fix a bug. This has the side effect that buffers returned to
> > videobuf2 in VB2_BUF_STATE_QUEUED will cause a WARN_ON() to be called.
> > 
> > Add a new field called done_buffers_queued_state to struct vb2_queue, which
> > must be set if the new state of buffers returned to videobuf2 must be
> > VB2_BUF_STATE_QUEUED, i.e. buffers returned in start_streaming op.
> 
> I posted a fix for this over a month ago:
> 
> https://www.mail-archive.com/linux-media@xxxxxxxxxxxxxxx/msg77871.html
> 
> Unfortunately, the pull request with that patch (https://patchwork.linuxtv.org/patch/25162/)
> fell through the cracks as I discovered yesterday. Hopefully Mauro will pick
> up that pull request quickly.
> 
> I prefer my patch since that avoids introducing yet another state variable.

Using less state variables is good, but with your patch returning buffers
back to videobuf2 to state VB2_BUF_STATE_QUEUED is possible also after
start_stream() has finished. That's probably a lesser problem, though.

I'm fine with your patch as well.

-- 
Cheers,

Sakari Ailus
e-mail: sakari.ailus@xxxxxx	XMPP: sailus@xxxxxxxxxxxxxx
--
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