Re: [PATCH v6 2/5] dma-buf: heaps: Add heap helpers

2019-07-25 Thread Rob Clark
On Thu, Jul 25, 2019 at 5:41 AM Christoph Hellwig wrote: > > On Wed, Jul 24, 2019 at 11:20:31AM -0400, Andrew F. Davis wrote: > > Well then lets think on this. A given buffer can have 3 owners states > > (CPU-owned, Device-owned, and Un-owned). These are based on the caching > > state from the CPU

Re: [PATCH v6 2/5] dma-buf: heaps: Add heap helpers

2019-07-25 Thread Christoph Hellwig
On Wed, Jul 24, 2019 at 11:20:31AM -0400, Andrew F. Davis wrote: > Well then lets think on this. A given buffer can have 3 owners states > (CPU-owned, Device-owned, and Un-owned). These are based on the caching > state from the CPU perspective. > > If a buffer is CPU-owned then we (Linux) can writ

Re: [PATCH v6 2/5] dma-buf: heaps: Add heap helpers

2019-07-24 Thread Andrew F. Davis
On 7/24/19 2:55 AM, Christoph Hellwig wrote: > On Tue, Jul 23, 2019 at 01:09:55PM -0700, Rob Clark wrote: >> On Mon, Jul 22, 2019 at 9:09 PM John Stultz wrote: >>> >>> On Thu, Jul 18, 2019 at 3:06 AM Christoph Hellwig >>> wrote: Is there any exlusion between mmap / vmap and the device

Re: [PATCH v6 2/5] dma-buf: heaps: Add heap helpers

2019-07-23 Thread Christoph Hellwig
On Mon, Jul 22, 2019 at 09:09:25PM -0700, John Stultz wrote: > On Thu, Jul 18, 2019 at 3:06 AM Christoph Hellwig wrote: > > > > > +void INIT_HEAP_HELPER_BUFFER(struct heap_helper_buffer *buffer, > > > + void (*free)(struct heap_helper_buffer *)) > > > > Please use a lower

Re: [PATCH v6 2/5] dma-buf: heaps: Add heap helpers

2019-07-23 Thread Christoph Hellwig
On Tue, Jul 23, 2019 at 01:09:55PM -0700, Rob Clark wrote: > On Mon, Jul 22, 2019 at 9:09 PM John Stultz wrote: > > > > On Thu, Jul 18, 2019 at 3:06 AM Christoph Hellwig > > wrote: > > > > > > Is there any exlusion between mmap / vmap and the device accessing > > > the data? Without that you ar

Re: [PATCH v6 2/5] dma-buf: heaps: Add heap helpers

2019-07-23 Thread Rob Clark
On Mon, Jul 22, 2019 at 9:09 PM John Stultz wrote: > > On Thu, Jul 18, 2019 at 3:06 AM Christoph Hellwig wrote: > > > > Is there any exlusion between mmap / vmap and the device accessing > > the data? Without that you are going to run into a lot of coherency > > problems. dma_fence is basically

Re: [PATCH v6 2/5] dma-buf: heaps: Add heap helpers

2019-07-22 Thread John Stultz
On Thu, Jul 18, 2019 at 3:06 AM Christoph Hellwig wrote: > > > +void INIT_HEAP_HELPER_BUFFER(struct heap_helper_buffer *buffer, > > + void (*free)(struct heap_helper_buffer *)) > > Please use a lower case naming following the naming scheme for the > rest of the file. Yes!

Re: [PATCH v6 2/5] dma-buf: heaps: Add heap helpers

2019-07-18 Thread Christoph Hellwig
> +void INIT_HEAP_HELPER_BUFFER(struct heap_helper_buffer *buffer, > + void (*free)(struct heap_helper_buffer *)) Please use a lower case naming following the naming scheme for the rest of the file. > +static void *dma_heap_map_kernel(struct heap_helper_buffer *buffer) >