public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 7/7][OMAP 3/4+] BRIDGE: set 0 for phys_mempool_* as default
@ 2008-09-13  4:20 Ramirez Luna, Omar
  2008-09-13  4:27 ` Ramirez Luna, Omar
  0 siblings, 1 reply; 7+ messages in thread
From: Ramirez Luna, Omar @ 2008-09-13  4:20 UTC (permalink / raw)
  To: Pandita, Vikram, linux-omap@vger.kernel.org

From: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
Date: Fri, 12 Sep 2008 22:09:45 -0500
Subject: [PATCH] BRIDGE: set 0 for phys_mempool_* as default

The default values of these parameters shouldn't expect a
certain amount of ram size and its reservation, otherwise
it will result in kernel crash.

Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
---
 drivers/dsp/bridge/rmgr/drv_interface.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/dsp/bridge/rmgr/drv_interface.c b/drivers/dsp/bridge/rmgr/drv_interface.c
index 64fdba4..effc9df 100644
--- a/drivers/dsp/bridge/rmgr/drv_interface.c
+++ b/drivers/dsp/bridge/rmgr/drv_interface.c
@@ -146,8 +146,8 @@ static char *base_img;
 char *iva_img;
 static char *num_procs = "C55=1";
 static s32 shm_size = 0x400000;	/* 4 MB */
-static u32 phys_mempool_base = 0x87000000;
-static u32 phys_mempool_size = 0x600000;
+static u32 phys_mempool_base;
+static u32 phys_mempool_size;
 
 #if !defined(CONFIG_ARCH_OMAP2430) && !defined(CONFIG_ARCH_OMAP3430)
 static int tc_wordswapon = 1;	/* Default value is always TRUE */
-- 
1.5.5.4


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

* RE: [PATCH 7/7][OMAP 3/4+] BRIDGE: set 0 for phys_mempool_* as default
  2008-09-13  4:20 [PATCH 7/7][OMAP 3/4+] BRIDGE: set 0 for phys_mempool_* as default Ramirez Luna, Omar
@ 2008-09-13  4:27 ` Ramirez Luna, Omar
  2008-09-13  4:48   ` Hiroshi DOYU
  0 siblings, 1 reply; 7+ messages in thread
From: Ramirez Luna, Omar @ 2008-09-13  4:27 UTC (permalink / raw)
  To: linux-omap@vger.kernel.org


>From: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
>Date: Fri, 12 Sep 2008 22:09:45 -0500
>Subject: [PATCH] BRIDGE: set 0 for phys_mempool_* as default

For this to work, we have observed that you must increase the size of Consistent DMA memory up to 14 MB, this is what we consider to be a safe standard size for bridge to work along with other OMAP components.

You can find this on menuconfig:
	-> Device Drivers                                                                                 
		-> Graphics support
		FB_OMAP_CONSISTENT_DMA_SIZE [=14]

Regards,

- omar

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

* Re: [PATCH 7/7][OMAP 3/4+] BRIDGE: set 0 for phys_mempool_* as default
  2008-09-13  4:27 ` Ramirez Luna, Omar
@ 2008-09-13  4:48   ` Hiroshi DOYU
  2008-09-13  8:47     ` Felipe Balbi
  0 siblings, 1 reply; 7+ messages in thread
From: Hiroshi DOYU @ 2008-09-13  4:48 UTC (permalink / raw)
  To: x00omar; +Cc: linux-omap

Hi Omar,

From: "ext Ramirez Luna, Omar" <x00omar@ti.com>
Subject: RE: [PATCH 7/7][OMAP 3/4+] BRIDGE: set 0 for phys_mempool_* as default
Date: Fri, 12 Sep 2008 23:27:01 -0500

> 
> >From: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
> >Date: Fri, 12 Sep 2008 22:09:45 -0500
> >Subject: [PATCH] BRIDGE: set 0 for phys_mempool_* as default
> 
> For this to work, we have observed that you must increase the size of Consistent DMA memory up to 14 MB, this is what we consider to be a safe standard size for bridge to work along with other OMAP components.
> 
> You can find this on menuconfig:
> 	-> Device Drivers                                                                                 
> 		-> Graphics support
> 		FB_OMAP_CONSISTENT_DMA_SIZE [=14]

Right.

I think that this configuration name "FB_OMAP_CONSISTENT_DMA_SIZE"
sounds a bit strange because it is not specific to framebuffer.

So how about renaming this more generic name like
"OMAP_CONSISTENT_DMA_SIZE"? Or making "CONSISTENT_DMA_SIZE" itself
configurable in menuconfig?

	Hiroshi DOYU

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

* Re: [PATCH 7/7][OMAP 3/4+] BRIDGE: set 0 for phys_mempool_* as default
  2008-09-13  4:48   ` Hiroshi DOYU
@ 2008-09-13  8:47     ` Felipe Balbi
  2008-09-13  9:53       ` Hiroshi DOYU
  0 siblings, 1 reply; 7+ messages in thread
From: Felipe Balbi @ 2008-09-13  8:47 UTC (permalink / raw)
  To: Hiroshi DOYU; +Cc: x00omar, linux-omap

Hi Hiroshi,

On Sat, Sep 13, 2008 at 07:48:44AM +0300, Hiroshi DOYU wrote:
> I think that this configuration name "FB_OMAP_CONSISTENT_DMA_SIZE"
> sounds a bit strange because it is not specific to framebuffer.

I agree here, it's really not fb specific.

> So how about renaming this more generic name like
> "OMAP_CONSISTENT_DMA_SIZE"? Or making "CONSISTENT_DMA_SIZE" itself
> configurable in menuconfig?

For me it sounds like that value would change depending on the board, no?
So maybe that size should be set up during board init. Maybe bundled
inside omapX_globals ??

-- 
balbi

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

* Re: [PATCH 7/7][OMAP 3/4+] BRIDGE: set 0 for phys_mempool_* as default
  2008-09-13  8:47     ` Felipe Balbi
@ 2008-09-13  9:53       ` Hiroshi DOYU
  2008-09-13 18:18         ` Hiroshi DOYU
  0 siblings, 1 reply; 7+ messages in thread
From: Hiroshi DOYU @ 2008-09-13  9:53 UTC (permalink / raw)
  To: me; +Cc: x00omar, linux-omap

Hi Felipe,

From: "ext Felipe Balbi" <me@felipebalbi.com>
Subject: Re: [PATCH 7/7][OMAP 3/4+] BRIDGE: set 0 for phys_mempool_* as default
Date: Sat, 13 Sep 2008 11:47:40 +0300

> Hi Hiroshi,
> 
> On Sat, Sep 13, 2008 at 07:48:44AM +0300, Hiroshi DOYU wrote:
> > I think that this configuration name "FB_OMAP_CONSISTENT_DMA_SIZE"
> > sounds a bit strange because it is not specific to framebuffer.
> 
> I agree here, it's really not fb specific.
> 
> > So how about renaming this more generic name like
> > "OMAP_CONSISTENT_DMA_SIZE"? Or making "CONSISTENT_DMA_SIZE" itself
> > configurable in menuconfig?
> 
> For me it sounds like that value would change depending on the board, no?

Hm...this can be considered as a board specific, yes.

> So maybe that size should be set up during board init. Maybe bundled
> inside omapX_globals ??

This sounds reasonable to me. Since FB and IVA are the only modules
which depend on this size so far, expanding flexibility in menuconfig
may no be necessary.

    Hiroshi DOYU


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

* Re: [PATCH 7/7][OMAP 3/4+] BRIDGE: set 0 for phys_mempool_* as default
  2008-09-13  9:53       ` Hiroshi DOYU
@ 2008-09-13 18:18         ` Hiroshi DOYU
  2008-09-13 18:38           ` Hiroshi DOYU
  0 siblings, 1 reply; 7+ messages in thread
From: Hiroshi DOYU @ 2008-09-13 18:18 UTC (permalink / raw)
  To: linux-omap; +Cc: me, x00omar

From: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
Subject: Re: [PATCH 7/7][OMAP 3/4+] BRIDGE: set 0 for phys_mempool_* as default
Date: Sat, 13 Sep 2008 12:53:42 +0300 (EEST)

> Hi Felipe,
> 
> From: "ext Felipe Balbi" <me@felipebalbi.com>
> Subject: Re: [PATCH 7/7][OMAP 3/4+] BRIDGE: set 0 for phys_mempool_* as default
> Date: Sat, 13 Sep 2008 11:47:40 +0300
> 
> > Hi Hiroshi,
> > 
> > On Sat, Sep 13, 2008 at 07:48:44AM +0300, Hiroshi DOYU wrote:
> > > I think that this configuration name "FB_OMAP_CONSISTENT_DMA_SIZE"
> > > sounds a bit strange because it is not specific to framebuffer.
> > 
> > I agree here, it's really not fb specific.
> > 
> > > So how about renaming this more generic name like
> > > "OMAP_CONSISTENT_DMA_SIZE"? Or making "CONSISTENT_DMA_SIZE" itself
> > > configurable in menuconfig?
> > 
> > For me it sounds like that value would change depending on the board, no?
> 
> Hm...this can be considered as a board specific, yes.
> 
> > So maybe that size should be set up during board init. Maybe bundled
> > inside omapX_globals ??
> 
> This sounds reasonable to me. Since FB and IVA are the only modules
> which depend on this size so far, expanding flexibility in menuconfig
> may no be necessary.

"omapX_globals" seems to be a structure to keep information specific
to omap CPU types, like:

    282:static struct omap_globals omap242x_globals = {
    301:static struct omap_globals omap243x_globals = {
    320:static struct omap_globals omap343x_globals = {

Since "CONSISTENT_DMA_SIZE" is configurable and doesn't always depend
on omap CPU type, but can depend on the system requirement in some
cases, it cannot be set in a member of h/w information structure,
"struct omap_globals".

Although this may be considered as a board specific from framebuffer
perspective, it's a multimedia system requirement from IVA
perspective. So it may be better not to bind this to a
board. Considering the current situation that TI dspbridge hasn't been
integrated in l-o, it would be better to leave this for the meanwhile.

Instead, I did small clean-up with FB_OMAP_CONSISTENT_DMA_SIZE;)
Inlined below:
-----

>From 6d5737a000c78db4fa14315845c1a98683dc44ee Mon Sep 17 00:00:00 2001
From: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
Date: Sat, 13 Sep 2008 20:18:11 +0300
Subject: [PATCH 1/1] ARM: OMAP: Clean up FB_OMAP_CONSISTENT_DMA_SIZE

Since this value can be limited by "range" in Kconfig, unnecessary
value checking is removed.

Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
---
 arch/arm/plat-omap/include/mach/memory.h |    9 +--------
 drivers/video/omap/Kconfig               |    4 ++--
 2 files changed, 3 insertions(+), 10 deletions(-)

diff --git a/arch/arm/plat-omap/include/mach/memory.h b/arch/arm/plat-omap/include/mach/memory.h
index 2d80fa2..28b9644 100644
--- a/arch/arm/plat-omap/include/mach/memory.h
+++ b/arch/arm/plat-omap/include/mach/memory.h
@@ -89,15 +89,8 @@
 
 /* Override the ARM default */
 #ifdef CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE
-
-#if (CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE == 0)
-#undef CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE
-#define CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE 2
-#endif
-
 #define CONSISTENT_DMA_SIZE \
-	(((CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE + 1) & ~1) * 1024 * 1024)
-
+	(DIV_ROUND_UP((CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE, 2) * SZ_1M)
 #endif
 
 #endif
diff --git a/drivers/video/omap/Kconfig b/drivers/video/omap/Kconfig
index 5ebd591..4526a1d 100644
--- a/drivers/video/omap/Kconfig
+++ b/drivers/video/omap/Kconfig
@@ -77,13 +77,13 @@ config FB_OMAP_BOOTLOADER_INIT
 config FB_OMAP_CONSISTENT_DMA_SIZE
 	int "Consistent DMA memory size (MB)"
 	depends on FB_OMAP
-	range 1 14
+	range 2 14
 	default 2
 	help
 	  Increase the DMA consistent memory size according to your video
 	  memory needs, for example if you want to use multiple planes.
 	  The size must be 2MB aligned.
-	  If unsure say 1.
+	  If unsure say 2.
 
 config FB_OMAP_DMA_TUNE
         bool "Set DMA SDRAM access priority high"
-- 
1.6.0.rc2


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

* Re: [PATCH 7/7][OMAP 3/4+] BRIDGE: set 0 for phys_mempool_* as default
  2008-09-13 18:18         ` Hiroshi DOYU
@ 2008-09-13 18:38           ` Hiroshi DOYU
  0 siblings, 0 replies; 7+ messages in thread
From: Hiroshi DOYU @ 2008-09-13 18:38 UTC (permalink / raw)
  To: linux-omap; +Cc: me, x00omar, tony

This is the correct one;p

From: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
Subject: Re: [PATCH 7/7][OMAP 3/4+] BRIDGE: set 0 for phys_mempool_* as default
Date: Sat, 13 Sep 2008 21:18:07 +0300 (EEST)

<snip> 

> Instead, I did small clean-up with FB_OMAP_CONSISTENT_DMA_SIZE;)
> Inlined below:

>From cd35e28092f3830354536c08929d725f5fe99a5e Mon Sep 17 00:00:00 2001
From: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
Date: Sat, 13 Sep 2008 20:18:11 +0300
Subject: [PATCH 1/1] ARM: OMAP: Clean up FB_OMAP_CONSISTENT_DMA_SIZE

Since this value can be limited by "range" in Kconfig and its
alignment check is done in "consistent.c", unnecessary adjustments are
removed.

Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
---
 arch/arm/plat-omap/include/mach/memory.h |    9 +--------
 drivers/video/omap/Kconfig               |    4 ++--
 2 files changed, 3 insertions(+), 10 deletions(-)

diff --git a/arch/arm/plat-omap/include/mach/memory.h b/arch/arm/plat-omap/include/mach/memory.h
index 2d80fa2..bb96da2 100644
--- a/arch/arm/plat-omap/include/mach/memory.h
+++ b/arch/arm/plat-omap/include/mach/memory.h
@@ -89,15 +89,8 @@
 
 /* Override the ARM default */
 #ifdef CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE
-
-#if (CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE == 0)
-#undef CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE
-#define CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE 2
-#endif
-
 #define CONSISTENT_DMA_SIZE \
-	(((CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE + 1) & ~1) * 1024 * 1024)
-
+	(CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE * SZ_1M)
 #endif
 
 #endif
diff --git a/drivers/video/omap/Kconfig b/drivers/video/omap/Kconfig
index 5ebd591..4526a1d 100644
--- a/drivers/video/omap/Kconfig
+++ b/drivers/video/omap/Kconfig
@@ -77,13 +77,13 @@ config FB_OMAP_BOOTLOADER_INIT
 config FB_OMAP_CONSISTENT_DMA_SIZE
 	int "Consistent DMA memory size (MB)"
 	depends on FB_OMAP
-	range 1 14
+	range 2 14
 	default 2
 	help
 	  Increase the DMA consistent memory size according to your video
 	  memory needs, for example if you want to use multiple planes.
 	  The size must be 2MB aligned.
-	  If unsure say 1.
+	  If unsure say 2.
 
 config FB_OMAP_DMA_TUNE
         bool "Set DMA SDRAM access priority high"
-- 
1.6.0.2.229.g1293c



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

end of thread, other threads:[~2008-09-13 18:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-13  4:20 [PATCH 7/7][OMAP 3/4+] BRIDGE: set 0 for phys_mempool_* as default Ramirez Luna, Omar
2008-09-13  4:27 ` Ramirez Luna, Omar
2008-09-13  4:48   ` Hiroshi DOYU
2008-09-13  8:47     ` Felipe Balbi
2008-09-13  9:53       ` Hiroshi DOYU
2008-09-13 18:18         ` Hiroshi DOYU
2008-09-13 18:38           ` Hiroshi DOYU

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox