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: Thu, 2 Aug 2012 09:56:43 +0300 Message-ID: <201208020956.45291.remi@remlab.net> References: <1339684349-28882-1-git-send-email-t.stanislaws@samsung.com> <201208012350.00207.remi@remlab.net> <201208020835.58332.hverkuil@xs4all.nl> Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: In-Reply-To: <201208020835.58332.hverkuil@xs4all.nl> Sender: linux-media-owner@vger.kernel.org To: Hans Verkuil Cc: Laurent Pinchart , 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 jeudi 2 ao=FBt 2012 09:35:58 Hans Verkuil, vous avez =E9crit : > On Wed August 1 2012 22:49:57 R=E9mi Denis-Courmont wrote: > > > What about using the CREATE_BUFS ioctl to add new MMAP buffers at > > > runtime ? > >=20 > > Does CREATE_BUFS always work while already streaming has already st= arted? > > If it depends on the driver, it's kinda helpless. >=20 > Yes, it does. It's one of the reasons it exists in the first place. B= ut > there are currently only a handful of drivers that implement it. I ho= pe > that as more and more drivers are converted to vb2 that the availabil= ity > of create_bufs will increase. That's contradictory. If most drivers do not support it, then it won't = work=20 during streaming. > > What's the guaranteed minimum buffer count? It seems in any case, M= MAP > > has a hard limit of 32 buffers (at least videobuf2 has), though one > > might argue this should be more than enough. >=20 > Minimum or maximum? The maximum is 32, that's hardcoded in the V4L2 c= ore. > Although drivers may force a lower maximum if they want. I have no id= ea > whether there are drivers that do that. There probably are. The smallest of the maxima of all drivers. > The minimum is usually between 1 and 3, depending on hardware limitat= ions. And that's clearly insufficient without memory copy to userspace buffer= s. It does not seem to me that CREATE_BUFS+MMAP is a useful replacement fo= r=20 REQBUFS+USERBUF then. --=20 R=E9mi Denis-Courmont http://www.remlab.net/ http://fi.linkedin.com/in/remidenis