linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ming Lei <ming.lei@canonical.com>
To: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>,
	Tony Lindgren <tony@atomide.com>,
	Sylwester Nawrocki <snjw23@gmail.com>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-media@vger.kernel.org,
	Pawel Osciak <p.osciak@gmail.com>
Subject: Re: [RFC PATCH v2 4/8] media: videobuf2: introduce VIDEOBUF2_PAGE memops
Date: Tue, 10 Jan 2012 19:55:25 +0800	[thread overview]
Message-ID: <CACVXFVMUfGCMGReJqoD5ap1QxiDMPEwnd9Sq2FZQRjCRxugEng@mail.gmail.com> (raw)
In-Reply-To: <013701cccf81$7c0cdb90$742692b0$%szyprowski@samsung.com>

Hi,

On Tue, Jan 10, 2012 at 6:20 PM, Marek Szyprowski
<m.szyprowski@samsung.com> wrote:

>> Sorry, could you describe the abuse problem in a bit detail?
>
> Videobuf2 requires memory module handlers to provide vaddr method to provide a pointer in
> kernel virtual address space to video data (buffer content). It is used for example by

Yes, this is what the patch is doing, __get_free_pages just  returns
the kernel virtual
address which will be passed to driver.

> read()/write() io method emulator. Memory allocator/handler should not be specific to any
> particular use case in the device driver. That's the design. Simple.

Most of the patch is copied from videobuf-vmalloc.c, and the
interfaces are totally same
with videobuf-vmalloc.c.

>
> I your case you want to give pointer to struct page from the memory allocator to the

In my case, the pointer to struct page is not required to the driver
at all, so I think you
have misunderstood the patch, don't I?

> driver. The cookie method has been introduced exactly for this purpose. Memory allocator
> also provides a simple inline function to convert generic 'void *' return type from cookie
> method to allocator specific structure/pointer. vb2_dma_contig_plane_dma_addr() and
> vb2_dma_sg_plane_desc() were examples how does passing allocator specific type though the
> cookie method works.

thanks,
--
Ming Lei

  reply	other threads:[~2012-01-10 11:55 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-14 14:00 [RFC PATCH v2 0/7] media: introduce object detection(OD) driver Ming Lei
2011-12-14 14:00 ` [RFC PATCH v2 1/8] omap4: introduce fdif(face detect module) hwmod Ming Lei
2011-12-16  5:53   ` Paul Walmsley
2011-12-16 14:54     ` Cousson, Benoit
2011-12-19 21:48       ` Paul Walmsley
2011-12-14 14:00 ` [RFC PATCH v2 2/8] omap4: build fdif omap device from hwmod Ming Lei
2011-12-14 14:00 ` [RFC PATCH v2 3/8] media: videobuf2: move out of setting pgprot_noncached from vb2_mmap_pfn_range Ming Lei
2011-12-14 14:00 ` [RFC PATCH v2 4/8] media: videobuf2: introduce VIDEOBUF2_PAGE memops Ming Lei
2011-12-22  9:28   ` Marek Szyprowski
2011-12-23  9:22     ` Ming Lei
2011-12-23  9:34       ` Marek Szyprowski
2011-12-23  9:51         ` Ming Lei
2011-12-23 10:38           ` Marek Szyprowski
2011-12-23 12:20             ` Ming Lei
2012-01-10 10:20               ` Marek Szyprowski
2012-01-10 11:55                 ` Ming Lei [this message]
2011-12-14 14:00 ` [RFC PATCH v2 5/8] media: v4l2-ioctl: support 64/32 compatible array parameter Ming Lei
2011-12-14 14:00 ` [RFC PATCH v2 6/8] media: v4l2: introduce two IOCTLs for object detection Ming Lei
2012-01-13 21:16   ` Sylwester Nawrocki
2011-12-14 14:00 ` [RFC PATCH v2 7/8] media: video: introduce object detection driver module Ming Lei
2011-12-29 17:16   ` Sylwester Nawrocki
2012-01-04  8:13     ` Ming Lei
2012-01-17 21:05       ` Sylwester Nawrocki
2011-12-14 14:00 ` [RFC PATCH v2 8/8] media: video: introduce omap4 face detection module driver Ming Lei

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=CACVXFVMUfGCMGReJqoD5ap1QxiDMPEwnd9Sq2FZQRjCRxugEng@mail.gmail.com \
    --to=ming.lei@canonical.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=mchehab@infradead.org \
    --cc=p.osciak@gmail.com \
    --cc=snjw23@gmail.com \
    --cc=tony@atomide.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).