Re: [RFC PATCH 04/12] staging: android: ion: Call dma_map_sg for syncing and mapping

2017-03-03 Thread Laura Abbott
On 03/03/2017 08:37 AM, Laurent Pinchart wrote: > Hi Laura, > > Thank you for the patch. > > On Thursday 02 Mar 2017 13:44:36 Laura Abbott wrote: >> Technically, calling dma_buf_map_attachment should return a buffer >> properly dma_mapped. Add calls to dma_map_sg to begin_cpu_access to >> ensure

Re: [RFC PATCH 04/12] staging: android: ion: Call dma_map_sg for syncing and mapping

2017-03-03 Thread Laurent Pinchart
Hi Laura, Thank you for the patch. On Thursday 02 Mar 2017 13:44:36 Laura Abbott wrote: > Technically, calling dma_buf_map_attachment should return a buffer > properly dma_mapped. Add calls to dma_map_sg to begin_cpu_access to > ensure this happens. As a side effect, this lets Ion buffers take >

Re: [RFC PATCH 04/12] staging: android: ion: Call dma_map_sg for syncing and mapping

2017-03-03 Thread Eric Engestrom
On Friday, 2017-03-03 14:04:26 +0300, Dan Carpenter wrote: > On Thu, Mar 02, 2017 at 01:44:36PM -0800, Laura Abbott wrote: > > static struct sg_table *ion_map_dma_buf(struct dma_buf_attachment > > *attachment, > > enum dma_data_direction direction) > > { > >

Re: [RFC PATCH 04/12] staging: android: ion: Call dma_map_sg for syncing and mapping

2017-03-03 Thread Dan Carpenter
On Thu, Mar 02, 2017 at 01:44:36PM -0800, Laura Abbott wrote: > static struct sg_table *ion_map_dma_buf(struct dma_buf_attachment > *attachment, > enum dma_data_direction direction) > { > struct dma_buf *dmabuf = attachment->dmabuf; > struct ion_

[RFC PATCH 04/12] staging: android: ion: Call dma_map_sg for syncing and mapping

2017-03-02 Thread Laura Abbott
Technically, calling dma_buf_map_attachment should return a buffer properly dma_mapped. Add calls to dma_map_sg to begin_cpu_access to ensure this happens. As a side effect, this lets Ion buffers take advantage of the dma_buf sync ioctls. Signed-off-by: Laura Abbott --- drivers/staging/android/