Re: [RFC][PATCH] add dma_reserve_coherent_memory()/dma_free_reserved_memory() API

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Marin Mitov
Date: Thursday, August 26, 2010 - 12:01 am

On Thursday, August 26, 2010 09:24:19 am FUJITA Tomonori wrote:

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


If you mean that allocating some coherent memory (4MB in case of dt3155v4l) during
pci probe() (during system booting) for device's latter use (that is dead for the rest
of the system) you are right. But this gives me at least 8 full size buffers warranted for 
latter use. Without this hack the hardware will not work on strongly fragmented system.
With this hack even if the system is strongly fragmented, this chunk of 4MB is available 
for use (though videobuf-dma-contig APIs and dma_alloc_from_coherent()) __transparently__
for users of videobuf-dma-contig (that is the gain - the transparency).


Sure, can these workarounds be exposed as API for general use?

Thanks,

Marin Mitov

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [RFC][PATCH] add dma_reserve_coherent_memory()/dma_fre ..., Guennadi Liakhovetski, (Fri Aug 20, 1:05 pm)
Re: [RFC][PATCH] add dma_reserve_coherent_memory()/dma_fre ..., Marin Mitov, (Thu Aug 26, 12:01 am)
Re: [RFC][PATCH] add dma_reserve_coherent_memory()/dma_fre ..., Guennadi Liakhovetski, (Thu Aug 26, 2:06 am)
Re: [RFC][PATCH] add dma_reserve_coherent_memory()/dma_fre ..., Uwe Kleine-König, (Thu Aug 26, 2:17 am)
Re: [RFC][PATCH] add dma_reserve_coherent_memory()/dma_fre ..., Guennadi Liakhovetski, (Thu Aug 26, 2:45 am)
Re: [RFC][PATCH] add dma_reserve_coherent_memory()/dma_fre ..., Uwe Kleine-König, (Thu Aug 26, 2:53 am)
Re: [RFC][PATCH] add dma_reserve_coherent_memory()/dma_fre ..., Russell King - ARM Linux, (Thu Aug 26, 10:49 am)
Re: [RFC][PATCH] add dma_reserve_coherent_memory()/dma_fre ..., Russell King - ARM Linux, (Thu Aug 26, 10:54 am)
Re: [RFC][PATCH] add dma_reserve_coherent_memory()/dma_fre ..., Uwe Kleine-König, (Thu Aug 26, 9:41 pm)
Re: [RFC][PATCH] add dma_reserve_coherent_memory()/dma_fre ..., Uwe Kleine-König, (Thu Aug 26, 10:19 pm)
Re: [RFC][PATCH] add dma_reserve_coherent_memory()/dma_fre ..., Uwe Kleine-König, (Thu Aug 26, 11:13 pm)
Re: [RFC][PATCH] add dma_reserve_coherent_memory()/dma_fre ..., Uwe Kleine-König, (Thu Aug 26, 11:38 pm)
Re: [RFC][PATCH] add dma_reserve_coherent_memory()/dma_fre ..., Guennadi Liakhovetski, (Sun Oct 10, 11:21 am)
Re: [RFC][PATCH] add dma_reserve_coherent_memory()/dma_fre ..., KAMEZAWA Hiroyuki, (Wed Oct 13, 1:04 am)