Re: [RFC][PATCH 1/5 v2] dma-buf: Add dma-buf heaps framework

2019-03-27 Thread John Stultz
On Wed, Mar 27, 2019 at 11:25 AM Greg KH wrote: > > On Tue, Mar 05, 2019 at 12:54:29PM -0800, John Stultz wrote: > > From: "Andrew F. Davis" > > > > This framework allows a unified userspace interface for dma-buf > > exporters, allowing userland to allocate specific types of > > memory for use in

Re: [RFC][PATCH 1/5 v2] dma-buf: Add dma-buf heaps framework

2019-03-27 Thread Greg KH
On Tue, Mar 05, 2019 at 12:54:29PM -0800, John Stultz wrote: > From: "Andrew F. Davis" > > This framework allows a unified userspace interface for dma-buf > exporters, allowing userland to allocate specific types of > memory for use in dma-buf sharing. > > Each heap is given its own device node,

Re: [RFC][PATCH 1/5 v2] dma-buf: Add dma-buf heaps framework

2019-03-21 Thread John Stultz
On Tue, Mar 19, 2019 at 5:08 AM Brian Starkey wrote: > > Hi John, > > On Tue, Mar 05, 2019 at 12:54:29PM -0800, John Stultz wrote: > > From: "Andrew F. Davis" > > [snip] > > > + > > +#define NUM_HEAP_MINORS 128 > > +static DEFINE_IDR(dma_heap_idr); > > +static DEFINE_MUTEX(minor_lock); /* Protect

Re: [RFC][PATCH 1/5 v2] dma-buf: Add dma-buf heaps framework

2019-03-19 Thread Andrew F. Davis
On 3/19/19 7:08 AM, Brian Starkey wrote: > Hi John, > > On Tue, Mar 05, 2019 at 12:54:29PM -0800, John Stultz wrote: >> From: "Andrew F. Davis" > > [snip] > >> + >> +#define NUM_HEAP_MINORS 128 >> +static DEFINE_IDR(dma_heap_idr); >> +static DEFINE_MUTEX(minor_lock); /* Protect idr accesses */

Re: [RFC][PATCH 1/5 v2] dma-buf: Add dma-buf heaps framework

2019-03-19 Thread Brian Starkey
Hi John, On Tue, Mar 05, 2019 at 12:54:29PM -0800, John Stultz wrote: > From: "Andrew F. Davis" [snip] > + > +#define NUM_HEAP_MINORS 128 > +static DEFINE_IDR(dma_heap_idr); > +static DEFINE_MUTEX(minor_lock); /* Protect idr accesses */ I saw that Matthew Wilcox is trying to nuke idr: https://

Re: [RFC][PATCH 1/5 v2] dma-buf: Add dma-buf heaps framework

2019-03-17 Thread Sumit Semwal
On Sat, 16 Mar 2019 at 04:15, Laura Abbott wrote: > > On 3/15/19 2:29 PM, John Stultz wrote: > > On Fri, Mar 15, 2019 at 1:18 PM Laura Abbott wrote: > >> > >> On 3/5/19 12:54 PM, John Stultz wrote: > >>> +DMA-BUF HEAPS FRAMEWORK > >>> +M: Laura Abbott > >>> +R: Liam Mark > >>> +R: Brian Sta

Re: [RFC][PATCH 1/5 v2] dma-buf: Add dma-buf heaps framework

2019-03-17 Thread Sumit Semwal
On Sat, 16 Mar 2019 at 04:15, Laura Abbott wrote: > On 3/15/19 2:29 PM, John Stultz wrote: > > On Fri, Mar 15, 2019 at 1:18 PM Laura Abbott wrote: > >> > >> On 3/5/19 12:54 PM, John Stultz wrote: > >>> +DMA-BUF HEAPS FRAMEWORK > >>> +M: Laura Abbott > >>> +R: Liam Mark > >>> +R: Brian Star

Re: [RFC][PATCH 1/5 v2] dma-buf: Add dma-buf heaps framework

2019-03-15 Thread Laura Abbott
On 3/15/19 2:29 PM, John Stultz wrote: On Fri, Mar 15, 2019 at 1:18 PM Laura Abbott wrote: On 3/5/19 12:54 PM, John Stultz wrote: +DMA-BUF HEAPS FRAMEWORK +M: Laura Abbott +R: Liam Mark +R: Brian Starkey +R: "Andrew F. Davis" +R: John Stultz +S: Maintained +L: linux-me...@vger.k

Re: [RFC][PATCH 1/5 v2] dma-buf: Add dma-buf heaps framework

2019-03-15 Thread John Stultz
On Fri, Mar 15, 2019 at 1:18 PM Laura Abbott wrote: > > On 3/5/19 12:54 PM, John Stultz wrote: > > +DMA-BUF HEAPS FRAMEWORK > > +M: Laura Abbott > > +R: Liam Mark > > +R: Brian Starkey > > +R: "Andrew F. Davis" > > +R: John Stultz > > +S: Maintained > > +L: linux-me...@vger.kernel.or

Re: [RFC][PATCH 1/5 v2] dma-buf: Add dma-buf heaps framework

2019-03-15 Thread Andrew F. Davis
On 3/15/19 3:18 PM, Laura Abbott wrote: > On 3/5/19 12:54 PM, John Stultz wrote: >> +DMA-BUF HEAPS FRAMEWORK >> +M:    Laura Abbott >> +R:    Liam Mark >> +R:    Brian Starkey >> +R:    "Andrew F. Davis" >> +R:    John Stultz >> +S:    Maintained >> +L:    linux-me...@vger.kernel.org >> +L:    dri-

Re: [RFC][PATCH 1/5 v2] dma-buf: Add dma-buf heaps framework

2019-03-15 Thread Andrew F. Davis
On 3/15/19 3:54 AM, Christoph Hellwig wrote: >> +static int dma_heap_release(struct inode *inode, struct file *filp) >> +{ >> +filp->private_data = NULL; >> + >> +return 0; >> +} > > No point in clearing ->private_data, the file is about to be freed. > This was leftover from when release

Re: [RFC][PATCH 1/5 v2] dma-buf: Add dma-buf heaps framework

2019-03-15 Thread Laura Abbott
On 3/5/19 12:54 PM, John Stultz wrote: +DMA-BUF HEAPS FRAMEWORK +M: Laura Abbott +R: Liam Mark +R: Brian Starkey +R: "Andrew F. Davis" +R: John Stultz +S: Maintained +L: linux-me...@vger.kernel.org +L: dri-devel@lists.freedesktop.org +L: linaro-mm-...@lists.lin

Re: [RFC][PATCH 1/5 v2] dma-buf: Add dma-buf heaps framework

2019-03-06 Thread Andrew F. Davis
On 3/6/19 1:03 PM, John Stultz wrote: > On Wed, Mar 6, 2019 at 10:18 AM Andrew F. Davis wrote: >> >> On 3/5/19 2:54 PM, John Stultz wrote: >>> From: "Andrew F. Davis" >>> >>> This framework allows a unified userspace interface for dma-buf >>> exporters, allowing userland to allocate specific type

Re: [RFC][PATCH 1/5 v2] dma-buf: Add dma-buf heaps framework

2019-03-06 Thread John Stultz
On Wed, Mar 6, 2019 at 10:18 AM Andrew F. Davis wrote: > > On 3/5/19 2:54 PM, John Stultz wrote: > > From: "Andrew F. Davis" > > > > This framework allows a unified userspace interface for dma-buf > > exporters, allowing userland to allocate specific types of > > memory for use in dma-buf sharing

Re: [RFC][PATCH 1/5 v2] dma-buf: Add dma-buf heaps framework

2019-03-06 Thread John Stultz
On Wed, Mar 6, 2019 at 8:12 AM Benjamin Gaignard wrote: > Le mar. 5 mars 2019 à 21:54, John Stultz a écrit : > > +/** > > + * DOC: DMABUF Heaps Userspace API > > + * > > + */ > > + > > +/* Currently no flags */ > > +#define DMA_HEAP_VALID_FLAGS (0) > > I think here you need to allow flags like O_

Re: [RFC][PATCH 1/5 v2] dma-buf: Add dma-buf heaps framework

2019-03-06 Thread Andrew F. Davis
On 3/5/19 2:54 PM, John Stultz wrote: > From: "Andrew F. Davis" > > This framework allows a unified userspace interface for dma-buf > exporters, allowing userland to allocate specific types of > memory for use in dma-buf sharing. > > Each heap is given its own device node, which a user can > all

Re: [RFC][PATCH 1/5 v2] dma-buf: Add dma-buf heaps framework

2019-03-06 Thread Benjamin Gaignard
Le mar. 5 mars 2019 à 21:54, John Stultz a écrit : > > From: "Andrew F. Davis" > > This framework allows a unified userspace interface for dma-buf > exporters, allowing userland to allocate specific types of > memory for use in dma-buf sharing. > > Each heap is given its own device node, which a

[RFC][PATCH 1/5 v2] dma-buf: Add dma-buf heaps framework

2019-03-05 Thread John Stultz
From: "Andrew F. Davis" This framework allows a unified userspace interface for dma-buf exporters, allowing userland to allocate specific types of memory for use in dma-buf sharing. Each heap is given its own device node, which a user can allocate a dma-buf fd from using the DMA_HEAP_IOC_ALLOC.