From mboxrd@z Thu Jan 1 00:00:00 1970 From: "=?iso-8859-1?q?R=E9mi?= Denis-Courmont" Subject: Re: [PATCHv2 3/9] v4l: add buffer exporting via dmabuf Date: Wed, 1 Aug 2012 23:49:57 +0300 Message-ID: <201208012350.00207.remi@remlab.net> References: <1339684349-28882-1-git-send-email-t.stanislaws@samsung.com> <60c9f6aa1a35c476f6d3493aa24438ad@chewa.net> <1390726.ZQ58TDe5fq@avalon> Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: In-Reply-To: <1390726.ZQ58TDe5fq@avalon> Sender: linux-media-owner@vger.kernel.org To: Laurent Pinchart Cc: Hans Verkuil , Tomasz Stanislawski , linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org, airlied@redhat.com, m.szyprowski@samsung.com, kyungmin.park@samsung.com, sumit.semwal@ti.com, daeinki@gmail.com, daniel.vetter@ffwll.ch, robdclark@gmail.com, pawel@osciak.com, linaro-mm-sig@lists.linaro.org, subashrp@gmail.com, mchehab@redhat.com, g.liakhovetski@gmx.de List-Id: dri-devel@lists.freedesktop.org Le mercredi 1 ao=FBt 2012 14:35:03 Laurent Pinchart, vous avez =E9crit = : > > But in general, the V4L element in the pipeline does not know how f= ast > > the downstream element(s) will consume the buffers. Thus it has to = copy > > from the MMAP buffers into anonymous user memory pending processing= =2E > > Then any dequeued buffer can be requeued as soon as possible. In th= eory, > > it might also be that, even though the latency is known, the number= of > > required buffers exceeds the maximum MMAP buffers count of the V4L > > device. Either way, user space ends up doing memory copy from MMAP = to > > custom buffers. > >=20 > > This problem does not exist with USERBUF - the V4L2 element can sim= ply > > allocate a new buffer for each dequeued buffer. >=20 > What about using the CREATE_BUFS ioctl to add new MMAP buffers at run= time ? Does CREATE_BUFS always work while already streaming has already starte= d? If=20 it depends on the driver, it's kinda helpless. What's the guaranteed minimum buffer count? It seems in any case, MMAP = has a=20 hard limit of 32 buffers (at least videobuf2 has), though one might arg= ue this=20 should be more than enough. --=20 R=E9mi Denis-Courmont http://www.remlab.net/ http://fi.linkedin.com/in/remidenis