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. > > Best regards, > Tomasz > -- regards, Stan