Re: [PATCH] dma-buf: mmap support

2012-05-17 Thread Sumit Semwal
Hi Daniel, Rob, On 11 May 2012 21:00, Rob Clark wrote: > On Tue, Apr 24, 2012 at 4:08 AM, Daniel Vetter wrote: >> Compared to Rob Clark's RFC I've ditched the prepare/finish hooks >> >> Cc: Rob Clark >> Cc: Rebecca Schultz Zavin >> Signed-Off-by: Daniel Vetter > > Acked-by: Rob Clark Thanks

Re: [PATCH] dma-buf: mmap support

2012-05-11 Thread Rob Clark
On Tue, Apr 24, 2012 at 4:08 AM, Daniel Vetter wrote: > Compared to Rob Clark's RFC I've ditched the prepare/finish hooks > and corresponding ioctls on the dma_buf file. The major reason for > that is that many people seem to be under the impression that this is > also for synchronization with out

Re: [PATCH] dma-buf: mmap support

2012-04-24 Thread InKi Dae
2012/4/25, Daniel Vetter : > On Wed, Apr 25, 2012 at 01:37:51AM +0900, InKi Dae wrote: >> Hi, >> >> > >> > +static int dma_buf_mmap_internal(struct file *file, struct >> > vm_area_struct *vma) >> > +{ >> > + struct dma_buf *dmabuf; >> > + >> > + if (!is_dma_buf_file(file)) >> > +

Re: [PATCH] dma-buf: mmap support

2012-04-24 Thread Daniel Vetter
On Wed, Apr 25, 2012 at 01:37:51AM +0900, InKi Dae wrote: > Hi, > > > > > +static int dma_buf_mmap_internal(struct file *file, struct vm_area_struct > > *vma) > > +{ > > +       struct dma_buf *dmabuf; > > + > > +       if (!is_dma_buf_file(file)) > > +               return -EINVAL; > > + > > +  

Re: [PATCH] dma-buf: mmap support

2012-04-24 Thread InKi Dae
Hi, > > +static int dma_buf_mmap_internal(struct file *file, struct vm_area_struct > *vma) > +{ > +       struct dma_buf *dmabuf; > + > +       if (!is_dma_buf_file(file)) > +               return -EINVAL; > + > +       dmabuf = file->private_data; > + > +       /* check for overflowing the buffe

Re: [PATCH] dma-buf: mmap support

2012-04-23 Thread Rebecca Schultz Zavin
I'd still rather see some form of explicit cache flusing api, but I can do that through my exporter (and probably will to get started). Otherwise this looks good to me except for comment inline. On Wed, Apr 18, 2012 at 6:52 AM, Daniel Vetter wrote: > Compared to Rob Clark's RFC I've ditched the p

Re: [PATCH] dma-buf: mmap support

2012-04-18 Thread Alan Cox
> How do you ensure that no device can do DMA on the buffer while it's mapped > into user space in a noncoherent manner? Why do we want to enforce that ? We provide the appropriate base service but you need to know what you are doing. In reality a lot of use cases are going to need far more than a

Re: [PATCH] dma-buf: mmap support

2012-04-18 Thread Daniel Vetter
On Wed, Apr 18, 2012 at 02:06:13PM +, Arnd Bergmann wrote: > On Wednesday 18 April 2012, Daniel Vetter wrote: > > + Because existing importing subsystems might presume coherent mappings > > for > > + userspace, the exporter needs to set up a coherent mapping. If that's > > not > > + pos

Re: [PATCH] dma-buf: mmap support

2012-04-18 Thread Rob Clark
On Wed, Apr 18, 2012 at 9:06 AM, Arnd Bergmann wrote: > On Wednesday 18 April 2012, Daniel Vetter wrote: >> +   Because existing importing subsystems might presume coherent mappings for >> +   userspace, the exporter needs to set up a coherent mapping. If that's not >> +   possible, it needs to fa

Re: [PATCH] dma-buf: mmap support

2012-04-18 Thread Arnd Bergmann
On Wednesday 18 April 2012, Daniel Vetter wrote: > + Because existing importing subsystems might presume coherent mappings for > + userspace, the exporter needs to set up a coherent mapping. If that's not > + possible, it needs to fake coherency by manually shooting down ptes when > + leavi