[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACVXFVMUfGCMGReJqoD5ap1QxiDMPEwnd9Sq2FZQRjCRxugEng@mail.gmail.com>
Date: Tue, 10 Jan 2012 19:55:25 +0800
From: Ming Lei <ming.lei@...onical.com>
To: Marek Szyprowski <m.szyprowski@...sung.com>
Cc: Mauro Carvalho Chehab <mchehab@...radead.org>,
Tony Lindgren <tony@...mide.com>,
Sylwester Nawrocki <snjw23@...il.com>,
Alan Cox <alan@...rguk.ukuu.org.uk>,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux-media@...r.kernel.org, Pawel Osciak <p.osciak@...il.com>
Subject: Re: [RFC PATCH v2 4/8] media: videobuf2: introduce VIDEOBUF2_PAGE memops
Hi,
On Tue, Jan 10, 2012 at 6:20 PM, Marek Szyprowski
<m.szyprowski@...sung.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists