Re: [PATCH v7 3/5] dma-buf: heaps: Add system heap to dmabuf heaps

2019-07-25 Thread John Stultz
On Thu, Jul 25, 2019 at 6:02 AM Christoph Hellwig wrote: > > > +struct system_heap { > > + struct dma_heap *heap; > > +} sys_heap; > > It seems like this structure could be removed and if would improve > the code flow. Good point. We actually keep a few things in the cma version of this, and

Re: [PATCH v7 3/5] dma-buf: heaps: Add system heap to dmabuf heaps

2019-07-25 Thread Andrew F. Davis
On 7/25/19 9:02 AM, Christoph Hellwig wrote: >> +struct system_heap { >> +struct dma_heap *heap; >> +} sys_heap; > > It seems like this structure could be removed and if would improve > the code flow. > >> +static struct dma_heap_ops system_heap_ops = { >> +.allocate =

Re: [PATCH v7 3/5] dma-buf: heaps: Add system heap to dmabuf heaps

2019-07-25 Thread Christoph Hellwig
> +struct system_heap { > + struct dma_heap *heap; > +} sys_heap; It seems like this structure could be removed and if would improve the code flow. > +static struct dma_heap_ops system_heap_ops = { > + .allocate = system_heap_allocate, > +}; > + > +static int system_heap_create(void) >

[PATCH v7 3/5] dma-buf: heaps: Add system heap to dmabuf heaps

2019-07-23 Thread John Stultz
This patch adds system heap to the dma-buf heaps framework. This allows applications to get a page-allocator backed dma-buf for non-contiguous memory. This code is an evolution of the Android ION implementation, so thanks to its original authors and maintainters: Rebecca Schultz Zavin, Colin