All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARM: i.mx35 increase dma consistent region size
@ 2012-04-11 18:01 ` Alex Gershgorin
  0 siblings, 0 replies; 8+ messages in thread
From: Alex Gershgorin @ 2012-04-11 18:01 UTC (permalink / raw)
  To: Sascha Hauer
  Cc: g.liakhovetski, linux-arm-kernel, linux-kernel, Alex Gershgorin

The default size of the consistent DMA region is 2MB
without this patch, attempt to allocate more than 2MB
is causing allocation failure

Signed-off-by: Alex Gershgorin <alexg@meprolight.com>
---
 arch/arm/mach-imx/mm-imx3.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-imx/mm-imx3.c b/arch/arm/mach-imx/mm-imx3.c
index 7412738..a2c0c7d 100644
--- a/arch/arm/mach-imx/mm-imx3.c
+++ b/arch/arm/mach-imx/mm-imx3.c
@@ -201,6 +201,7 @@ static struct map_desc mx35_io_desc[] __initdata = {
 void __init mx35_map_io(void)
 {
 	iotable_init(mx35_io_desc, ARRAY_SIZE(mx35_io_desc));
+	init_consistent_dma_size(SZ_8M);
 }
 
 void __init imx35_init_early(void)
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH] ARM: i.mx35 increase dma consistent region size
@ 2012-04-11 18:01 ` Alex Gershgorin
  0 siblings, 0 replies; 8+ messages in thread
From: Alex Gershgorin @ 2012-04-11 18:01 UTC (permalink / raw)
  To: linux-arm-kernel

The default size of the consistent DMA region is 2MB
without this patch, attempt to allocate more than 2MB
is causing allocation failure

Signed-off-by: Alex Gershgorin <alexg@meprolight.com>
---
 arch/arm/mach-imx/mm-imx3.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-imx/mm-imx3.c b/arch/arm/mach-imx/mm-imx3.c
index 7412738..a2c0c7d 100644
--- a/arch/arm/mach-imx/mm-imx3.c
+++ b/arch/arm/mach-imx/mm-imx3.c
@@ -201,6 +201,7 @@ static struct map_desc mx35_io_desc[] __initdata = {
 void __init mx35_map_io(void)
 {
 	iotable_init(mx35_io_desc, ARRAY_SIZE(mx35_io_desc));
+	init_consistent_dma_size(SZ_8M);
 }
 
 void __init imx35_init_early(void)
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] ARM: i.mx35 increase dma consistent region size
  2012-04-11 18:01 ` Alex Gershgorin
@ 2012-04-13 14:40   ` Sascha Hauer
  -1 siblings, 0 replies; 8+ messages in thread
From: Sascha Hauer @ 2012-04-13 14:40 UTC (permalink / raw)
  To: Alex Gershgorin; +Cc: g.liakhovetski, linux-arm-kernel, linux-kernel

On Wed, Apr 11, 2012 at 09:01:14PM +0300, Alex Gershgorin wrote:
> The default size of the consistent DMA region is 2MB
> without this patch, attempt to allocate more than 2MB
> is causing allocation failure
> 
> Signed-off-by: Alex Gershgorin <alexg@meprolight.com>
> ---
>  arch/arm/mach-imx/mm-imx3.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-imx/mm-imx3.c b/arch/arm/mach-imx/mm-imx3.c
> index 7412738..a2c0c7d 100644
> --- a/arch/arm/mach-imx/mm-imx3.c
> +++ b/arch/arm/mach-imx/mm-imx3.c
> @@ -201,6 +201,7 @@ static struct map_desc mx35_io_desc[] __initdata = {
>  void __init mx35_map_io(void)
>  {
>  	iotable_init(mx35_io_desc, ARRAY_SIZE(mx35_io_desc));
> +	init_consistent_dma_size(SZ_8M);

I don't know what to think about this. You probably have a board with
camera support and thus need bigger buffers, right? Nevertheless this
patch affects all i.MX35 users, even the ones without camera support.

Another possibility would be to make this board specific.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH] ARM: i.mx35 increase dma consistent region size
@ 2012-04-13 14:40   ` Sascha Hauer
  0 siblings, 0 replies; 8+ messages in thread
From: Sascha Hauer @ 2012-04-13 14:40 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Apr 11, 2012 at 09:01:14PM +0300, Alex Gershgorin wrote:
> The default size of the consistent DMA region is 2MB
> without this patch, attempt to allocate more than 2MB
> is causing allocation failure
> 
> Signed-off-by: Alex Gershgorin <alexg@meprolight.com>
> ---
>  arch/arm/mach-imx/mm-imx3.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-imx/mm-imx3.c b/arch/arm/mach-imx/mm-imx3.c
> index 7412738..a2c0c7d 100644
> --- a/arch/arm/mach-imx/mm-imx3.c
> +++ b/arch/arm/mach-imx/mm-imx3.c
> @@ -201,6 +201,7 @@ static struct map_desc mx35_io_desc[] __initdata = {
>  void __init mx35_map_io(void)
>  {
>  	iotable_init(mx35_io_desc, ARRAY_SIZE(mx35_io_desc));
> +	init_consistent_dma_size(SZ_8M);

I don't know what to think about this. You probably have a board with
camera support and thus need bigger buffers, right? Nevertheless this
patch affects all i.MX35 users, even the ones without camera support.

Another possibility would be to make this board specific.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] ARM: i.mx35 increase dma consistent region size
  2012-04-13 14:40   ` Sascha Hauer
@ 2012-04-13 15:11     ` Guennadi Liakhovetski
  -1 siblings, 0 replies; 8+ messages in thread
From: Guennadi Liakhovetski @ 2012-04-13 15:11 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: Alex Gershgorin, linux-arm-kernel, linux-kernel

On Fri, 13 Apr 2012, Sascha Hauer wrote:

> On Wed, Apr 11, 2012 at 09:01:14PM +0300, Alex Gershgorin wrote:
> > The default size of the consistent DMA region is 2MB
> > without this patch, attempt to allocate more than 2MB
> > is causing allocation failure
> > 
> > Signed-off-by: Alex Gershgorin <alexg@meprolight.com>
> > ---
> >  arch/arm/mach-imx/mm-imx3.c |    1 +
> >  1 files changed, 1 insertions(+), 0 deletions(-)
> > 
> > diff --git a/arch/arm/mach-imx/mm-imx3.c b/arch/arm/mach-imx/mm-imx3.c
> > index 7412738..a2c0c7d 100644
> > --- a/arch/arm/mach-imx/mm-imx3.c
> > +++ b/arch/arm/mach-imx/mm-imx3.c
> > @@ -201,6 +201,7 @@ static struct map_desc mx35_io_desc[] __initdata = {
> >  void __init mx35_map_io(void)
> >  {
> >  	iotable_init(mx35_io_desc, ARRAY_SIZE(mx35_io_desc));
> > +	init_consistent_dma_size(SZ_8M);
> 
> I don't know what to think about this. You probably have a board with
> camera support and thus need bigger buffers, right? Nevertheless this
> patch affects all i.MX35 users, even the ones without camera support.
> 
> Another possibility would be to make this board specific.

Isn't this what other (including i.MX3*) boards use arm_memblock_steal() 
for?

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH] ARM: i.mx35 increase dma consistent region size
@ 2012-04-13 15:11     ` Guennadi Liakhovetski
  0 siblings, 0 replies; 8+ messages in thread
From: Guennadi Liakhovetski @ 2012-04-13 15:11 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, 13 Apr 2012, Sascha Hauer wrote:

> On Wed, Apr 11, 2012 at 09:01:14PM +0300, Alex Gershgorin wrote:
> > The default size of the consistent DMA region is 2MB
> > without this patch, attempt to allocate more than 2MB
> > is causing allocation failure
> > 
> > Signed-off-by: Alex Gershgorin <alexg@meprolight.com>
> > ---
> >  arch/arm/mach-imx/mm-imx3.c |    1 +
> >  1 files changed, 1 insertions(+), 0 deletions(-)
> > 
> > diff --git a/arch/arm/mach-imx/mm-imx3.c b/arch/arm/mach-imx/mm-imx3.c
> > index 7412738..a2c0c7d 100644
> > --- a/arch/arm/mach-imx/mm-imx3.c
> > +++ b/arch/arm/mach-imx/mm-imx3.c
> > @@ -201,6 +201,7 @@ static struct map_desc mx35_io_desc[] __initdata = {
> >  void __init mx35_map_io(void)
> >  {
> >  	iotable_init(mx35_io_desc, ARRAY_SIZE(mx35_io_desc));
> > +	init_consistent_dma_size(SZ_8M);
> 
> I don't know what to think about this. You probably have a board with
> camera support and thus need bigger buffers, right? Nevertheless this
> patch affects all i.MX35 users, even the ones without camera support.
> 
> Another possibility would be to make this board specific.

Isn't this what other (including i.MX3*) boards use arm_memblock_steal() 
for?

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: [PATCH] ARM: i.mx35 increase dma consistent region size
  2012-04-13 14:40   ` Sascha Hauer
@ 2012-04-15 14:15     ` Alex Gershgorin
  -1 siblings, 0 replies; 8+ messages in thread
From: Alex Gershgorin @ 2012-04-15 14:15 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: g.liakhovetski, linux-arm-kernel, linux-kernel

Hi Sascha,

Sorry was not possible to respond to you earlier. 

On Wed, Apr 11, 2012 at 09:01:14PM +0300, Alex Gershgorin wrote:
> The default size of the consistent DMA region is 2MB
> without this patch, attempt to allocate more than 2MB
> is causing allocation failure
>
> Signed-off-by: Alex Gershgorin <alexg@meprolight.com>
> ---
>  arch/arm/mach-imx/mm-imx3.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-imx/mm-imx3.c b/arch/arm/mach-imx/mm-imx3.c
> index 7412738..a2c0c7d 100644
> --- a/arch/arm/mach-imx/mm-imx3.c
> +++ b/arch/arm/mach-imx/mm-imx3.c
> @@ -201,6 +201,7 @@ static struct map_desc mx35_io_desc[] __initdata = {
>  void __init mx35_map_io(void)
>  {
>       iotable_init(mx35_io_desc, ARRAY_SIZE(mx35_io_desc));
> +     init_consistent_dma_size(SZ_8M);

> > I don't know what to think about this. You probably have a board with
> > camera support and thus need bigger buffers, right? Nevertheless this
> > patch affects all i.MX35 users, even the ones without camera support.

Camera support is not an issue, this patch belongs only to those I.MX35 drivers who are using 
the dma coherent/writecombine allocations.

For example,  mx3fb currently uses only once DMA allocation for the framebuffer,
In the case of adding overlay support, we need an additional allocation for the overlay 
buffer as a resulting in the total request more than 2 MB

I have already started work on the mx3fb overlay support, about this we spoke with Guennadi,
My current kernel mx3fb successfully registered with support overlay buffer allocation.

Please see my cat /proc/dma-mappings: 

btw as you can see below there is no allocation for the camera

0xffa00000-0xffb77000 1536000 __set_par+0xc8/0x7f8
0xffc00000-0xffd77000 1536000 __set_par+0xc8/0x7f8
0xffdfa000-0xffdfb000    4096 ehci_mxc_setup+0x194/0x574
0xffdfb000-0xffdfc000    4096 dma_pool_alloc+0x9c/0x1f0
0xffdfc000-0xffdfd000    4096 dma_pool_alloc+0x9c/0x1f0
0xffdfd000-0xffdfe000    4096 fec_probe+0x248/0x71c
0xffdfe000-0xffdff000    4096 sdma_request_channel+0x2c/0xd8
0xffdff000-0xffe00000    4096 sdma_probe+0x2cc/0x61c

> > Another possibility would be to make this board specific.

I think this needed adapted for all i.mx3x, maybe need to use. 
  
#ifdef CONFIG_FB_MX3
        init_consistent_dma_size(SZ_8M);
#endif

Regards,
Alex Gershgorin

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH] ARM: i.mx35 increase dma consistent region size
@ 2012-04-15 14:15     ` Alex Gershgorin
  0 siblings, 0 replies; 8+ messages in thread
From: Alex Gershgorin @ 2012-04-15 14:15 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Sascha,

Sorry was not possible to respond to you earlier. 

On Wed, Apr 11, 2012 at 09:01:14PM +0300, Alex Gershgorin wrote:
> The default size of the consistent DMA region is 2MB
> without this patch, attempt to allocate more than 2MB
> is causing allocation failure
>
> Signed-off-by: Alex Gershgorin <alexg@meprolight.com>
> ---
>  arch/arm/mach-imx/mm-imx3.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-imx/mm-imx3.c b/arch/arm/mach-imx/mm-imx3.c
> index 7412738..a2c0c7d 100644
> --- a/arch/arm/mach-imx/mm-imx3.c
> +++ b/arch/arm/mach-imx/mm-imx3.c
> @@ -201,6 +201,7 @@ static struct map_desc mx35_io_desc[] __initdata = {
>  void __init mx35_map_io(void)
>  {
>       iotable_init(mx35_io_desc, ARRAY_SIZE(mx35_io_desc));
> +     init_consistent_dma_size(SZ_8M);

> > I don't know what to think about this. You probably have a board with
> > camera support and thus need bigger buffers, right? Nevertheless this
> > patch affects all i.MX35 users, even the ones without camera support.

Camera support is not an issue, this patch belongs only to those I.MX35 drivers who are using 
the dma coherent/writecombine allocations.

For example,  mx3fb currently uses only once DMA allocation for the framebuffer,
In the case of adding overlay support, we need an additional allocation for the overlay 
buffer as a resulting in the total request more than 2 MB

I have already started work on the mx3fb overlay support, about this we spoke with Guennadi,
My current kernel mx3fb successfully registered with support overlay buffer allocation.

Please see my cat /proc/dma-mappings: 

btw as you can see below there is no allocation for the camera

0xffa00000-0xffb77000 1536000 __set_par+0xc8/0x7f8
0xffc00000-0xffd77000 1536000 __set_par+0xc8/0x7f8
0xffdfa000-0xffdfb000    4096 ehci_mxc_setup+0x194/0x574
0xffdfb000-0xffdfc000    4096 dma_pool_alloc+0x9c/0x1f0
0xffdfc000-0xffdfd000    4096 dma_pool_alloc+0x9c/0x1f0
0xffdfd000-0xffdfe000    4096 fec_probe+0x248/0x71c
0xffdfe000-0xffdff000    4096 sdma_request_channel+0x2c/0xd8
0xffdff000-0xffe00000    4096 sdma_probe+0x2cc/0x61c

> > Another possibility would be to make this board specific.

I think this needed adapted for all i.mx3x, maybe need to use. 
  
#ifdef CONFIG_FB_MX3
        init_consistent_dma_size(SZ_8M);
#endif

Regards,
Alex Gershgorin

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-04-15 14:16 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-11 18:01 [PATCH] ARM: i.mx35 increase dma consistent region size Alex Gershgorin
2012-04-11 18:01 ` Alex Gershgorin
2012-04-13 14:40 ` Sascha Hauer
2012-04-13 14:40   ` Sascha Hauer
2012-04-13 15:11   ` Guennadi Liakhovetski
2012-04-13 15:11     ` Guennadi Liakhovetski
2012-04-15 14:15   ` Alex Gershgorin
2012-04-15 14:15     ` Alex Gershgorin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.