Re: reqbuf(count=0), new vb2 op or something else

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

 



On Fri, Jun 12, 2020 at 8:42 PM Stanimir Varbanov
<stanimir.varbanov@xxxxxxxxxx> wrote:
>
> Hi Tomasz,
>
> On 6/12/20 9:33 PM, Tomasz Figa wrote:
> > Hi Stanimir,
> >
> > On Fri, Jun 12, 2020 at 5:20 PM Stanimir Varbanov
> > <stanimir.varbanov@xxxxxxxxxx> wrote:
> >>
> >> I failed to found previous discussion on the subject, maybe it was on IRC.
> >>
> >> I stuck with fixing of issues which depends on this reqbuf(count=0).
> >> Currently I'm counting the buffers in vb2::buf_init and vb2::buf_cleanup
> >> but I don't want to rely on that implicit way anymore.
> >>
> >> If someone of you can remember let me know so that I can prepare an RFC.
> >>
> >> I can think of two options:
> >>  - change vb2::queue_setup so it could be called with num_buffers=0
> >>  - add new vb2::queue_release op
> >>
> >> More options?
> >
> > Just to make sure we're on the same page: Are you looking for a way to
> > handle some operation only when all buffers on the queue are being
> > freed?
>
> Exactly :)
>
> Presently I'm counting capture and output buffers in vb2::buf_init and
> vb2::buf_cleanup and release/reinit internal driver resources on the
> last .buf_cleanup. And this is a workaround of the problem which I want
> to solve properly.

Got it.

I suppose queue_release() could be a good idea to keep things
symmetrical, but for now, wouldn't it be still possible to hook
directly into .vidioc_reqbufs and do whatever necessary when count ==
0?

Best regards,
Tomasz



[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