[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20100826184231J.fujita.tomonori@lab.ntt.co.jp>
Date: Thu, 26 Aug 2010 18:43:22 +0900
From: FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>
To: mitov@...p.bas.bg
Cc: fujita.tomonori@....ntt.co.jp, linux-kernel@...r.kernel.org,
linux-media@...r.kernel.org, akpm@...ux-foundation.org
Subject: Re: [RFC][PATCH] add
dma_reserve_coherent_memory()/dma_free_reserved_memory() API
On Thu, 26 Aug 2010 10:01:52 +0300
Marin Mitov <mitov@...p.bas.bg> wrote:
> > If you add something to the videobuf-dma-contig API, that's fine by me
> > because drivers/media/video/videobuf-dma-contig.c uses the own
> > structure and plays with dma_alloc_coherent. As long as a driver
> > doesn't touch device->dma_mem directly, it's fine,
>
> Why, my understanding is that device->dma_mem is designed exactly for keeping
> some chunk of coherent memory for device's private use via dma_alloc_from_coherent()
> (and that is what dt3155v4l driver is using it for).
I don't think so. device->dma_mem can be accessed only via the
DMA-API. I think that the DMA-API says that
dma_declare_coherent_memory declares coherent memory that can be
access exclusively by a certain device. It's not for reserving
coherent memory that can be used for any device for a device.
Anway, you don't need coherent memory. So using the API for coherent
memory isn't a good idea.
> > There are already some workarounds for
> > contigous memory in several drivers anyway.
>
> Sure, can these workarounds be exposed as API for general use?
I don't think that's a good idea. Adding temporary workaround to the
generic API and removing it soon after that doesn't sound a good
developing maner.
--
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