Re: [RFC PATCH v2] arm DMA: Fix allocation from CMA for coherent DMA

2015-06-11 Thread Lorenzo Nava
On Thu, Jun 11, 2015 at 4:26 PM, Catalin Marinas wrote: > On Wed, Jun 10, 2015 at 09:34:43PM +0200, Lorenzo Nava wrote: >> On Wed, Jun 10, 2015 at 6:28 PM, Catalin Marinas >> wrote: >> > On Wed, Jun 03, 2015 at 07:15:45PM +0200, Lorenzo Nava wrote: >> > > This

Re: [RFC PATCH v2] arm DMA: Fix allocation from CMA for coherent DMA

2015-06-11 Thread Lorenzo Nava
On Thu, Jun 11, 2015 at 4:26 PM, Catalin Marinas wrote: > On Wed, Jun 10, 2015 at 09:34:43PM +0200, Lorenzo Nava wrote: >> On Wed, Jun 10, 2015 at 6:28 PM, Catalin Marinas >> wrote: >> > On Wed, Jun 03, 2015 at 07:15:45PM +0200, Lorenzo Nava wrote: >> > > This

[RFC PATCH v2] arm DMA: Fix allocation from CMA for coherent DMA

2015-06-03 Thread Lorenzo Nava
This patch allows the use of CMA for DMA coherent memory allocation. At the moment if the input parameter "is_coherent" is set to true the allocation is not made using the CMA, which I think is not the desired behaviour. Signed-off-by: Lorenzo Nava --- Changes in v2: correct __ar

Re: [RFC PATCH v2] arm DMA: Fix allocation from CMA for coherent DMA

2015-06-10 Thread Lorenzo Nava
ping! On Wed, Jun 3, 2015 at 7:15 PM, Lorenzo Nava wrote: > This patch allows the use of CMA for DMA coherent memory allocation. > At the moment if the input parameter "is_coherent" is set to true > the allocation is not made using the CMA, which I think is not the

Re: [RFC PATCH v2] arm DMA: Fix allocation from CMA for coherent DMA

2015-06-10 Thread Lorenzo Nava
On Wed, Jun 10, 2015 at 6:28 PM, Catalin Marinas wrote: > > On Wed, Jun 03, 2015 at 07:15:45PM +0200, Lorenzo Nava wrote: > > This patch allows the use of CMA for DMA coherent memory allocation. > > At the moment if the input parameter "is_coherent" is set to true &g

[RFC PATCH v3] arm DMA: Fix allocation from CMA for coherent DMA

2015-06-18 Thread Lorenzo Nava
This patch allows the use of CMA for DMA coherent memory allocation. At the moment if the input parameter "is_coherent" is set to true the allocation is not made using the CMA, which I think is not the desired behaviour. Signed-off-by: Lorenzo Nava --- Changes in v2: correct __ar

Re: [PATCH v5] arm DMA: Fix allocation from CMA for coherent DMA

2015-07-18 Thread Lorenzo Nava
On Fri, Jul 3, 2015 at 11:03 AM, Russell King - ARM Linux wrote: > On Wed, Jul 01, 2015 at 12:12:51PM +0100, Catalin Marinas wrote: >> On Tue, Jun 30, 2015 at 11:29:06PM +0200, Lorenzo Nava wrote: >> > This patch allows the use of CMA for DMA coherent memory allocation. >>

Re: [RFC] arm: DMA-API contiguous cacheable memory

2015-05-20 Thread Lorenzo Nava
On Wed, May 20, 2015 at 12:34 AM, Russell King - ARM Linux wrote: > On Wed, May 20, 2015 at 12:14:48AM +0200, Arnd Bergmann wrote: >> With that memory, you should be able to use the normal streaming >> API (dma_sync_single_for_*). > > Wrong, as I've pointed out previously. The only memory which y

Re: [RFC] arm: DMA-API contiguous cacheable memory

2015-05-20 Thread Lorenzo Nava
On Wed, May 20, 2015 at 6:20 PM, Russell King - ARM Linux wrote: > On Wed, May 20, 2015 at 02:57:36PM +0200, Lorenzo Nava wrote: >> so probably currently is impossible to allocate a contiguous cachable >> DMA memory. You can't use CMA, and the only functions which allow you

[PATCH] arm DMA: Fix allocation from CMA for coherent DMA

2015-05-24 Thread Lorenzo Nava
This patch is to allow the use of CMA for DMA coherent memory allocation. At the moment if "is_coherent" is set to true the allocation can't use the CMA, which I think is not the desired behaviour. --- arch/arm/mm/dma-mapping.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

[RFC PATCH v2] arm DMA: Fix allocation from CMA for coherent DMA

2015-05-26 Thread Lorenzo Nava
This patch allows the use of CMA for DMA coherent memory allocation. At the moment if "is_coherent" is set to true the allocation can't use the CMA, which I think is not the desired behaviour. Changes in v2: correct __arm_dma_free() according to __dma_alloc() allocation --- arch/arm/mm/dma-map

DMA-API on ARM contiguous cacheable memory

2015-05-17 Thread Lorenzo Nava
Hello everybody, it's been a while since I've started working with DMA on ARM processor for a smart camera project. Typically the requirements is to have a large memory area which can be accessed by both DMA and user. I've already noticed that many people wonder about which would be the best way t

[RFC] arm: DMA-API contiguous cacheable memory

2015-05-18 Thread Lorenzo Nava
Hello, it's been a while since I've started working with DMA on ARM processor for a smart camera project. Typically the requirements is to have a large memory area which can be accessed by both DMA and user. I've already noticed that many people wonder about which would be the best way to have dat

Re: [RFC] arm: DMA-API contiguous cacheable memory

2015-05-19 Thread Lorenzo Nava
is case? Maybe my interpretation of dma_alloc_coherent() is not correct, and the coherency can be managed using the dma_sync_single_for_* functions and it doesn't require hardware mechanism. Thank you. Cheers On Tue, May 19, 2015 at 6:34 PM, Catalin Marinas wrote: > On Mon, May 18, 2015 at 10

Re: [RFC] arm: DMA-API contiguous cacheable memory

2015-05-19 Thread Lorenzo Nava
On Tue, May 19, 2015 at 6:34 PM, Catalin Marinas wrote: > On Mon, May 18, 2015 at 10:56:06PM +0200, Lorenzo Nava wrote: >> it's been a while since I've started working with DMA on ARM processor >> for a smart camera project. Typically the requirements is to have a >&

Re: [RFC] arm: DMA-API contiguous cacheable memory

2015-05-19 Thread Lorenzo Nava
On Wed, May 20, 2015 at 12:14 AM, Arnd Bergmann wrote: > On Wednesday 20 May 2015 00:05:54 Lorenzo Nava wrote: >> >> On Tue, May 19, 2015 at 6:34 PM, Catalin Marinas >> wrote: >> > On Mon, May 18, 2015 at 10:56:06PM +0200, Lorenzo Nava wrote: >> >> it

Re: [PATCH v4] arm DMA: Fix allocation from CMA for coherent DMA

2015-06-30 Thread Lorenzo Nava
On Tue, Jun 30, 2015 at 1:05 PM, Catalin Marinas wrote: > > On Mon, Jun 29, 2015 at 07:10:45PM +0200, Lorenzo Nava wrote: > > This patch allows the use of CMA for DMA coherent memory allocation. > > At the moment if the input parameter "is_coherent" is set to true &g

[PATCH v5] arm DMA: Fix allocation from CMA for coherent DMA

2015-06-30 Thread Lorenzo Nava
This patch allows the use of CMA for DMA coherent memory allocation. At the moment if the input parameter "is_coherent" is set to true the allocation is not made using the CMA, which I think is not the desired behaviour. Signed-off-by: Lorenzo Nava Reviewed-by: Catalin Marinas --- Cha

[PATCH v5] arm DMA: Fix allocation from CMA for coherent DMA

2015-06-30 Thread Lorenzo Nava
This patch allows the use of CMA for DMA coherent memory allocation. At the moment if the input parameter "is_coherent" is set to true the allocation is not made using the CMA, which I think is not the desired behaviour. Signed-off-by: Lorenzo Nava Reviewed-by: Catalin Marinas --- Cha

Re: [RFC PATCH v3] arm DMA: Fix allocation from CMA for coherent DMA

2015-06-28 Thread Lorenzo Nava
On Fri, Jun 26, 2015 at 6:25 PM, Catalin Marinas wrote: > On Thu, Jun 18, 2015 at 11:44:22PM +0200, Lorenzo Nava wrote: >> diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c >> index 7e7583d..8e7f402 100644 >> --- a/arch/arm/mm/dma-mapping.c >> +++

[PATCH v4] arm DMA: Fix allocation from CMA for coherent DMA

2015-06-29 Thread Lorenzo Nava
This patch allows the use of CMA for DMA coherent memory allocation. At the moment if the input parameter "is_coherent" is set to true the allocation is not made using the CMA, which I think is not the desired behaviour. Signed-off-by: Lorenzo Nava --- Changes in v2: correct __ar

Re: [PATCH v5] arm DMA: Fix allocation from CMA for coherent DMA

2015-07-03 Thread Lorenzo Nava
On Fri, Jul 3, 2015 at 11:03 AM, Russell King - ARM Linux wrote: > On Wed, Jul 01, 2015 at 12:12:51PM +0100, Catalin Marinas wrote: >> On Tue, Jun 30, 2015 at 11:29:06PM +0200, Lorenzo Nava wrote: >> > This patch allows the use of CMA for DMA coherent memory allocation. >>

Re: [PATCH v5] arm DMA: Fix allocation from CMA for coherent DMA

2015-07-03 Thread Lorenzo Nava
On Fri, Jul 3, 2015 at 11:03 AM, Russell King - ARM Linux wrote: > On Wed, Jul 01, 2015 at 12:12:51PM +0100, Catalin Marinas wrote: >> On Tue, Jun 30, 2015 at 11:29:06PM +0200, Lorenzo Nava wrote: >> > This patch allows the use of CMA for DMA coherent memory allocation. >>

Re: [PATCH v5] arm DMA: Fix allocation from CMA for coherent DMA

2015-07-06 Thread Lorenzo Nava
On Fri, Jul 3, 2015 at 11:03 AM, Russell King - ARM Linux wrote: > On Wed, Jul 01, 2015 at 12:12:51PM +0100, Catalin Marinas wrote: >> On Tue, Jun 30, 2015 at 11:29:06PM +0200, Lorenzo Nava wrote: >> > This patch allows the use of CMA for DMA coherent memory allocation. >>