All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Figo.zhang" <figo1802@gmail.com>
To: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: linux-media <linux-media@vger.kernel.org>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Subject: Re: [PATCH v2]Resend:videobuf_dma_sg: a new implementation for mmap
Date: Mon, 02 Aug 2010 23:08:51 +0800	[thread overview]
Message-ID: <1280761731.2664.12.camel@localhost.localdomain> (raw)
In-Reply-To: <1280489980.2648.12.camel@localhost.localdomain>

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. ~~



      reply	other threads:[~2010-08-02 15:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-30  0:08 [PATCH v2]Resend:videobuf_dma_sg: a new implementation for mmap Figo.zhang
2010-07-30  9:31 ` Laurent Pinchart
2010-07-30 11:38   ` Figo.zhang
2010-07-30 11:39   ` Figo.zhang
2010-08-02 15:08     ` Figo.zhang [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1280761731.2664.12.camel@localhost.localdomain \
    --to=figo1802@gmail.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.