On Fri, 2010-07-30 at 19:39 +0800, Figo.zhang wrote:
> On Fri, 2010-07-30 at 11:31 +0200, Laurent Pinchart wrote:
> > Hi,
> > 
> > On Friday 30 July 2010 02:08:02 Figo.zhang wrote:
> > > a mmap issue for videobuf-dma-sg: it will alloc a new page for mmaping 
> > > when
> > > it encounter page fault at video_vm_ops->fault(). pls see
> > > http://www.spinics.net/lists/linux-media/msg21243.html
> > > 
> > > a new implementation for mmap, it translate to vmalloc to page at
> > > video_vm_ops->fault().
> > > 
> > > in v2, if mem->dma.vmalloc is NULL at video_vm_ops->fault(), it will alloc
> > > memory by vmlloc_32().
> > 
> > You're replacing allocation in videobuf_vm_fault by allocationg in 
> > videobuf_vm_fault. I don't see the point. videobuf_vm_fault needs to go 
> > away 
> > completely.
> in now videobuf code, the mmap alloc a new buf, the capture dma buffer
> using vmalloc() alloc buffer, how is
> relationship with them? in usrspace , the mmap region will not the
> actual capture dma data, how is work? 


hmm, I understand with some mistake before.for mmap in videobuf-sg, it
is not call vmalloc_32() to alloc memory, it call
videobuf_dma_init_user_locked()->get_user_pages(), and the end, it will
handle_mm_fault()-> vm_ops->fault(). Because in mmap(), it have assigned
vaule for "baddr" variable.

it is too obscure for videobuf-sg, hope for videbuf2. ~~


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to