Re: Memory freeing when dmabuf fds are exported with VIDIOC_EXPBUF

2017-10-03 Thread Nicolas Dufresne
I'd like to revive this discussion. Le lundi 01 août 2016 à 12:56 +0200, Hans Verkuil a écrit : > > > > Hans, Marek, any opinion on this ? > > What is the use-case for this? What you are doing here is to either free all > existing buffers or reallocate buffers. We can decide to rely on

Re: Memory freeing when dmabuf fds are exported with VIDIOC_EXPBUF

2016-08-02 Thread Damian Hobson-Garcia
Hi Hans, On 2016-08-01 7:56 PM, Hans Verkuil wrote: > > > On 07/27/2016 02:57 PM, Laurent Pinchart wrote: >> Hello Kobayashi-san, >> >> (CC'ing Hans Verkuil and Marek Szyprowski) >> >> On Wednesday 27 Jul 2016 16:51:47 Kazunori Kobayashi wrote: >>> Hi, >>> >>> I have a question about memory

Re: Memory freeing when dmabuf fds are exported with VIDIOC_EXPBUF

2016-08-01 Thread Steven Toth
> That's a good question. On one extreme an application trying to allocate 32 > 50MB buffers would seem suspicious to me, but on the other hand it would be > difficult to answer the question in a way that can be translated into code. 8k video in the ARGB 8bit 4:4:4 colorspace, would need a 126MB

Re: Memory freeing when dmabuf fds are exported with VIDIOC_EXPBUF

2016-08-01 Thread Laurent Pinchart
On Monday 01 Aug 2016 12:16:25 Steven Toth wrote: > > That's a good question. On one extreme an application trying to allocate > > 32 50MB buffers would seem suspicious to me, but on the other hand it > > would be difficult to answer the question in a way that can be translated > > into code. > >

Re: Memory freeing when dmabuf fds are exported with VIDIOC_EXPBUF

2016-08-01 Thread Laurent Pinchart
Hi Hans, On Monday 01 Aug 2016 15:59:54 Hans Verkuil wrote: > On 08/01/2016 03:49 PM, Laurent Pinchart wrote: > > On Monday 01 Aug 2016 14:27:48 Hans Verkuil wrote: > >> On 08/01/2016 02:17 PM, Laurent Pinchart wrote: > >>> On Monday 01 Aug 2016 12:56:55 Hans Verkuil wrote: > On 07/27/2016

Re: Memory freeing when dmabuf fds are exported with VIDIOC_EXPBUF

2016-08-01 Thread Laurent Pinchart
Hi Hans, On Monday 01 Aug 2016 14:27:48 Hans Verkuil wrote: > On 08/01/2016 02:17 PM, Laurent Pinchart wrote: > > On Monday 01 Aug 2016 12:56:55 Hans Verkuil wrote: > >> On 07/27/2016 02:57 PM, Laurent Pinchart wrote: > >>> On Wednesday 27 Jul 2016 16:51:47 Kazunori Kobayashi wrote: > Hi, >

Re: Memory freeing when dmabuf fds are exported with VIDIOC_EXPBUF

2016-08-01 Thread Hans Verkuil
On 08/01/2016 03:49 PM, Laurent Pinchart wrote: > Hi Hans, > > On Monday 01 Aug 2016 14:27:48 Hans Verkuil wrote: >> On 08/01/2016 02:17 PM, Laurent Pinchart wrote: >>> On Monday 01 Aug 2016 12:56:55 Hans Verkuil wrote: On 07/27/2016 02:57 PM, Laurent Pinchart wrote: > On Wednesday 27

Re: Memory freeing when dmabuf fds are exported with VIDIOC_EXPBUF

2016-08-01 Thread Hans Verkuil
On 08/01/2016 02:17 PM, Laurent Pinchart wrote: > Hi Hans, > > On Monday 01 Aug 2016 12:56:55 Hans Verkuil wrote: >> On 07/27/2016 02:57 PM, Laurent Pinchart wrote: >>> On Wednesday 27 Jul 2016 16:51:47 Kazunori Kobayashi wrote: Hi, I have a question about memory freeing by

Re: Memory freeing when dmabuf fds are exported with VIDIOC_EXPBUF

2016-08-01 Thread Laurent Pinchart
Hi Hans, On Monday 01 Aug 2016 12:56:55 Hans Verkuil wrote: > On 07/27/2016 02:57 PM, Laurent Pinchart wrote: > > On Wednesday 27 Jul 2016 16:51:47 Kazunori Kobayashi wrote: > >> Hi, > >> > >> I have a question about memory freeing by calling REQBUF(0) before all > >> the dmabuf fds exported

Re: Memory freeing when dmabuf fds are exported with VIDIOC_EXPBUF

2016-08-01 Thread Hans Verkuil
On 07/27/2016 02:57 PM, Laurent Pinchart wrote: > Hello Kobayashi-san, > > (CC'ing Hans Verkuil and Marek Szyprowski) > > On Wednesday 27 Jul 2016 16:51:47 Kazunori Kobayashi wrote: >> Hi, >> >> I have a question about memory freeing by calling REQBUF(0) before all the >> dmabuf fds exported

Re: Memory freeing when dmabuf fds are exported with VIDIOC_EXPBUF

2016-07-27 Thread Laurent Pinchart
Hello Kobayashi-san, (CC'ing Hans Verkuil and Marek Szyprowski) On Wednesday 27 Jul 2016 16:51:47 Kazunori Kobayashi wrote: > Hi, > > I have a question about memory freeing by calling REQBUF(0) before all the > dmabuf fds exported with VIDIOC_EXPBUF are closed. > > In calling REQBUF(0),

Memory freeing when dmabuf fds are exported with VIDIOC_EXPBUF

2016-07-27 Thread Kazunori Kobayashi
Hi, I have a question about memory freeing by calling REQBUF(0) before all the dmabuf fds exported with VIDIOC_EXPBUF are closed. In calling REQBUF(0), videobuf2-core returns -EBUSY when the reference count of a vb2 buffer is more than 1. When dmabuf fds are not exported (usual V4L2_MEMORY_MMAP