Skip to contentSkip to conversation

DSPBRIDGE: Increased DMM size to 256MB

PATCH Superseded Omar Ramirez Luna 4 participants 8 messages Jan 8, 2010

Subsystems (2)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 3/8 DSPBRIDGE: Increased DMM size to 256MB

From: Hari Kanigeri <[email protected]>

This patch increases the DMM from 64MB to 256MB.

---
 arch/arm/plat-omap/include/dspbridge/dmm.h |    2 +-
 drivers/dsp/bridge/pmgr/dmm.c              |    8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)
arch/arm/plat-omap/include/dspbridge/dmm.h +1 -1
index 335edf8..af0c35a 100644
@@ -41,7 +41,7 @@
 		u32 reserved;
 	} ;
 
-#define DMMPOOLSIZE      0x4000000
+#define DMMPOOLSIZE      0x10000000
 
 /*
  *  ======== DMM_GetHandle ========
drivers/dsp/bridge/pmgr/dmm.c +4 -4
index 46c05c6..f878855 100644
@@ -103,10 +103,10 @@ static struct GT_Mask DMM_debugMask = { NULL, NULL };	/* GT trace variable */
 
 static u32 cRefs;		/* module reference count */
 struct MapPage {
-	u32   RegionSize:15;
-	u32   MappedSize:15;
-	u32   bReserved:1;
-	u32   bMapped:1;
+	u64   RegionSize:31;
+	u64   MappedSize:31;
+	u64   bReserved:1;
+	u64   bMapped:1;
 };
 
 /*  Create the free list */
Signature · 1 line
1.6.2.4
#1 lore raw

Ramirez Luna, Omar had written, on 01/07/2010 07:00 PM, the following:

Quoted 3 lines

From: Hari Kanigeri <[email protected]>

This patch increases the DMM from 64MB to 256MB.

begs the question: Why?

Quoted 41 lines
---
 arch/arm/plat-omap/include/dspbridge/dmm.h |    2 +-
 drivers/dsp/bridge/pmgr/dmm.c              |    8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)
arch/arm/plat-omap/include/dspbridge/dmm.h +1 -1
index 335edf8..af0c35a 100644
@@ -41,7 +41,7 @@
 		u32 reserved;
 	} ;
 
-#define DMMPOOLSIZE      0x4000000
+#define DMMPOOLSIZE      0x10000000
 
 /*
  *  ======== DMM_GetHandle ========
drivers/dsp/bridge/pmgr/dmm.c +4 -4
index 46c05c6..f878855 100644
@@ -103,10 +103,10 @@ static struct GT_Mask DMM_debugMask = { NULL, NULL };	/* GT trace variable */
 
 static u32 cRefs;		/* module reference count */
 struct MapPage {
-	u32   RegionSize:15;
-	u32   MappedSize:15;
-	u32   bReserved:1;
-	u32   bMapped:1;
+	u64   RegionSize:31;
+	u64   MappedSize:31;
+	u64   bReserved:1;
+	u64   bMapped:1;
 };
 
 /*  Create the free list */
Signature · 2 lines
Regards,
Nishanth Menon
#2 lore raw

Nishant,

With 64MB we were seeing cases of running out of DSP virtual memory when running multiple Multimedia use cases in parallel at a time.

Thank you,
Best regards,
Hari

-----Original Message-----
From: Menon, Nishanth
Sent: Friday, January 08, 2010 7:48 AM
To: Ramirez Luna, Omar
Cc: linux-omap; Hiroshi Doyu; Ameya Palande; Felipe Contreras; Guzman Lugo, Fernando; Ramos Falcon, Ernesto; Kanigeri, Hari; Aguilar Pena, Leed
Subject: Re: [PATCH 3/8] DSPBRIDGE: Increased DMM size to 256MB

Ramirez Luna, Omar had written, on 01/07/2010 07:00 PM, the following:

Quoted 3 lines

From: Hari Kanigeri <[email protected]>

This patch increases the DMM from 64MB to 256MB.

begs the question: Why?

Quoted 41 lines
---
 arch/arm/plat-omap/include/dspbridge/dmm.h |    2 +-
 drivers/dsp/bridge/pmgr/dmm.c              |    8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)
arch/arm/plat-omap/include/dspbridge/dmm.h +1 -1
index 335edf8..af0c35a 100644
@@ -41,7 +41,7 @@
 		u32 reserved;
 	} ;
 
-#define DMMPOOLSIZE      0x4000000
+#define DMMPOOLSIZE      0x10000000
 
 /*
  *  ======== DMM_GetHandle ========
drivers/dsp/bridge/pmgr/dmm.c +4 -4
index 46c05c6..f878855 100644
@@ -103,10 +103,10 @@ static struct GT_Mask DMM_debugMask = { NULL, NULL };	/* GT trace variable */
 
 static u32 cRefs;		/* module reference count */
 struct MapPage {
-	u32   RegionSize:15;
-	u32   MappedSize:15;
-	u32   bReserved:1;
-	u32   bMapped:1;
+	u64   RegionSize:31;
+	u64   MappedSize:31;
+	u64   bReserved:1;
+	u64   bMapped:1;
 };
 
 /*  Create the free list */
Signature · 2 lines
Regards,
Nishanth Menon
#3 lore raw

Kanigeri, Hari had written, on 01/07/2010 11:16 PM, the following:

Quoted 3 lines

Nishant,

With 64MB we were seeing cases of running out of DSP virtual memory when running multiple Multimedia use cases in parallel at a time.

Would it be better that we make this as a board specific memory requirement? not all boards will have the same needs right?

Quoted 45 lines

Thank you,
Best regards,
Hari

-----Original Message-----
From: Menon, Nishanth Sent: Friday, January 08, 2010 7:48 AM
To: Ramirez Luna, Omar
Cc: linux-omap; Hiroshi Doyu; Ameya Palande; Felipe Contreras; Guzman Lugo, Fernando; Ramos Falcon, Ernesto; Kanigeri, Hari; Aguilar Pena, Leed
Subject: Re: [PATCH 3/8] DSPBRIDGE: Increased DMM size to 256MB

Ramirez Luna, Omar had written, on 01/07/2010 07:00 PM, the following:

Quoted 3 lines

From: Hari Kanigeri <[email protected]>

This patch increases the DMM from 64MB to 256MB.

begs the question: Why?

Quoted 27 lines
---
 arch/arm/plat-omap/include/dspbridge/dmm.h |    2 +-
 drivers/dsp/bridge/pmgr/dmm.c              |    8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)
arch/arm/plat-omap/include/dspbridge/dmm.h +1 -1
index 335edf8..af0c35a 100644
@@ -41,7 +41,7 @@
 		u32 reserved;
 	} ;
 
-#define DMMPOOLSIZE      0x4000000
+#define DMMPOOLSIZE      0x10000000
 
 /*
  *  ======== DMM_GetHandle ========
drivers/dsp/bridge/pmgr/dmm.c +0 -0
index 46c05c6..f878855 100644
@@ -103,10 +103,10 @@ static struct GT_Mask DMM_debugMask = { NULL, NULL };	/* GT trace variable */
 
Quoted 10 lines

drivers/dsp/bridge/pmgr/dmm.c static struct GT_Mask DMM_debugMask = { NULL, NULL }; /* GT trace variable */ · line 109

Quoted 10 lines
drivers/dsp/bridge/pmgr/dmm.c +4 -4
 static u32 cRefs;		/* module reference count */
 struct MapPage {
-	u32   RegionSize:15;
-	u32   MappedSize:15;
-	u32   bReserved:1;
-	u32   bMapped:1;
+	u64   RegionSize:31;
+	u64   MappedSize:31;
+	u64   bReserved:1;
+	u64   bMapped:1;

this does not make much sense meanwhile.. what does this have to do with the dmmpool size increase and what are these unused fields being used for?

Quoted 5 lines
Quoted 3 lines
drivers/dsp/bridge/pmgr/dmm.c +0 -0
 };
 
 /*  Create the free list */
Signature · 2 lines
Regards,
Nishanth Menon
#4 lore raw

Nishant,

Quoted 2 lines

Would it be better that we make this as a board specific memory requirement? not all boards will have the same needs right?

For every 1MB of DSP Virtual address 1Kbytes of physical memory is required for house keeping. So, for 256MB we would be taking 256K as opposed to 64K when using 64MB DSP virtual memory.

The requirement comes more from Multimedia requirements, and with all the new phones having the requirement of running multiple multimedia applications in parallel 256K would be safe.

Thank you,
Best regards,
Hari

Quoted 91 lines

-----Original Message-----
From: Menon, Nishanth
Sent: Friday, January 08, 2010 8:28 AM
To: Kanigeri, Hari
Cc: Ramirez Luna, Omar; linux-omap; Hiroshi Doyu; Ameya Palande; Felipe Contreras; Guzman Lugo, Fernando; Ramos Falcon, Ernesto; Aguilar Pena, Leed
Subject: Re: [PATCH 3/8] DSPBRIDGE: Increased DMM size to 256MB

Kanigeri, Hari had written, on 01/07/2010 11:16 PM, the following:

Quoted 3 lines

Nishant,

With 64MB we were seeing cases of running out of DSP virtual memory when

running multiple Multimedia use cases in parallel at a time. Would it be better that we make this as a board specific memory requirement? not all boards will have the same needs right?

Quoted 10 lines

Thank you,
Best regards,
Hari

-----Original Message-----
From: Menon, Nishanth
Sent: Friday, January 08, 2010 7:48 AM
To: Ramirez Luna, Omar
Cc: linux-omap; Hiroshi Doyu; Ameya Palande; Felipe Contreras; Guzman

Lugo, Fernando; Ramos Falcon, Ernesto; Kanigeri, Hari; Aguilar Pena, Leed

Quoted 17 lines

Subject: Re: [PATCH 3/8] DSPBRIDGE: Increased DMM size to 256MB

Ramirez Luna, Omar had written, on 01/07/2010 07:00 PM, the following:

Quoted 3 lines

From: Hari Kanigeri <[email protected]>

This patch increases the DMM from 64MB to 256MB.

begs the question: Why?

Quoted 8 lines
---
 arch/arm/plat-omap/include/dspbridge/dmm.h |    2 +-
 drivers/dsp/bridge/pmgr/dmm.c              |    8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)
Quoted 1 line

Review

Quoted 1 line
(quoted diff) +0 -0

b/arch/arm/plat-omap/include/dspbridge/dmm.h

Quoted 7 lines
Quoted 7 lines

index 335edf8..af0c35a 100644

arch/arm/plat-omap/include/dspbridge/dmm.h +0 -0
@@ -41,7 +41,7 @@
 		u32 reserved;
 	} ;
 
Quoted 6 lines

Review

Quoted 6 lines
arch/arm/plat-omap/include/dspbridge/dmm.h +1 -1
-#define DMMPOOLSIZE      0x4000000
+#define DMMPOOLSIZE      0x10000000
 
 /*
  *  ======== DMM_GetHandle ========
(quoted diff) +0 -0

b/drivers/dsp/bridge/pmgr/dmm.c

Quoted 4 lines

drivers/dsp/bridge/pmgr/dmm.c static struct GT_Mask DMM_debugMask = { NULL,

Quoted 4 lines

index 46c05c6..f878855 100644

drivers/dsp/bridge/pmgr/dmm.c +0 -0
@@ -103,10 +103,10 @@ static struct GT_Mask DMM_debugMask = { NULL,

NULL }; /* GT trace variable */

Quoted 11 lines

drivers/dsp/bridge/pmgr/dmm.c static struct GT_Mask DMM_debugMask = { NULL, NULL }; /* GT trace variable */ · line 109

Quoted 11 lines
drivers/dsp/bridge/pmgr/dmm.c +4 -4
 static u32 cRefs;		/* module reference count */
 struct MapPage {
-	u32   RegionSize:15;
-	u32   MappedSize:15;
-	u32   bReserved:1;
-	u32   bMapped:1;
+	u64   RegionSize:31;
+	u64   MappedSize:31;
+	u64   bReserved:1;
+	u64   bMapped:1;

this does not make much sense meanwhile.. what does this have to do with the dmmpool size increase and what are these unused fields being used for?

Quoted 5 lines

drivers/dsp/bridge/pmgr/dmm.c static struct GT_Mask DMM_debugMask = { NULL, NULL }; /* GT trace variable */ · line 112

Quoted 3 lines
drivers/dsp/bridge/pmgr/dmm.c +0 -0
 };
 
 /*  Create the free list */

--
Regards,
Nishanth Menon

#5 lore raw

Kanigeri, Hari had written, on 01/08/2010 09:29 AM, the following:

Quoted 8 lines

Nishant,

Quoted 2 lines

Would it be better that we make this as a board specific memory requirement? not all boards will have the same needs right?

For every 1MB of DSP Virtual address 1Kbytes of physical memory is required for house keeping. So, for 256MB we would be taking 256K as opposed to 64K when using 64MB DSP virtual memory.

The requirement comes more from Multimedia requirements, and with all the new phones having the requirement of running multiple multimedia applications in parallel 256K would be safe.

the point is you are moving to 256MB today (Still not reaching 100% of virtual memory available if I am not mistaken). if you make this a configurable parameter (board based/kconfig based),:
a) old platforms(using old mm components) dont need to use a larger virtual memory to maintain "old compatibility"
b) newer platform (with newer multimedia) can use what ever it chooses to be
c) future platforms (with even newer and more bloated mm components) can increase it without having to change code.

in short - make it flexible please.

Quoted 89 lines

Thank you, Best regards,
Hari

Quoted 85 lines

-----Original Message-----
From: Menon, Nishanth
Sent: Friday, January 08, 2010 8:28 AM
To: Kanigeri, Hari
Cc: Ramirez Luna, Omar; linux-omap; Hiroshi Doyu; Ameya Palande; Felipe Contreras; Guzman Lugo, Fernando; Ramos Falcon, Ernesto; Aguilar Pena, Leed
Subject: Re: [PATCH 3/8] DSPBRIDGE: Increased DMM size to 256MB

Kanigeri, Hari had written, on 01/07/2010 11:16 PM, the following:

Quoted 3 lines

Nishant,

With 64MB we were seeing cases of running out of DSP virtual memory when

running multiple Multimedia use cases in parallel at a time. Would it be better that we make this as a board specific memory requirement? not all boards will have the same needs right?

Quoted 9 lines

Thank you,
Best regards,
Hari

-----Original Message-----
From: Menon, Nishanth
Sent: Friday, January 08, 2010 7:48 AM
To: Ramirez Luna, Omar
Cc: linux-omap; Hiroshi Doyu; Ameya Palande; Felipe Contreras; Guzman

Lugo, Fernando; Ramos Falcon, Ernesto; Kanigeri, Hari; Aguilar Pena, Leed

Quoted 16 lines

Subject: Re: [PATCH 3/8] DSPBRIDGE: Increased DMM size to 256MB

Ramirez Luna, Omar had written, on 01/07/2010 07:00 PM, the following:

Quoted 3 lines

From: Hari Kanigeri <[email protected]>

This patch increases the DMM from 64MB to 256MB.

begs the question: Why?

Quoted 8 lines
---
 arch/arm/plat-omap/include/dspbridge/dmm.h |    2 +-
 drivers/dsp/bridge/pmgr/dmm.c              |    8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)
Quoted 1 line

Review

Quoted 1 line
(quoted diff) +0 -0

b/arch/arm/plat-omap/include/dspbridge/dmm.h

Quoted 7 lines
Quoted 7 lines

index 335edf8..af0c35a 100644

arch/arm/plat-omap/include/dspbridge/dmm.h +0 -0
@@ -41,7 +41,7 @@
 		u32 reserved;
 	} ;
 
Quoted 6 lines

Review

Quoted 6 lines
arch/arm/plat-omap/include/dspbridge/dmm.h +1 -1
-#define DMMPOOLSIZE      0x4000000
+#define DMMPOOLSIZE      0x10000000
 
 /*
  *  ======== DMM_GetHandle ========
(quoted diff) +0 -0

b/drivers/dsp/bridge/pmgr/dmm.c

Quoted 4 lines

drivers/dsp/bridge/pmgr/dmm.c static struct GT_Mask DMM_debugMask = { NULL,

Quoted 4 lines

index 46c05c6..f878855 100644

drivers/dsp/bridge/pmgr/dmm.c +0 -0
@@ -103,10 +103,10 @@ static struct GT_Mask DMM_debugMask = { NULL,

NULL }; /* GT trace variable */

Quoted 10 lines

drivers/dsp/bridge/pmgr/dmm.c static struct GT_Mask DMM_debugMask = { NULL, NULL }; /* GT trace variable */ · line 109

Quoted 10 lines
drivers/dsp/bridge/pmgr/dmm.c +4 -4
 static u32 cRefs;		/* module reference count */
 struct MapPage {
-	u32   RegionSize:15;
-	u32   MappedSize:15;
-	u32   bReserved:1;
-	u32   bMapped:1;
+	u64   RegionSize:31;
+	u64   MappedSize:31;
+	u64   bReserved:1;
+	u64   bMapped:1;

this does not make much sense meanwhile.. what does this have to do with the dmmpool size increase and what are these unused fields being used for?

Quoted 4 lines

drivers/dsp/bridge/pmgr/dmm.c static struct GT_Mask DMM_debugMask = { NULL, NULL }; /* GT trace variable */ · line 112

Quoted 3 lines
drivers/dsp/bridge/pmgr/dmm.c +0 -0
 };
 
 /*  Create the free list */

--
Regards,
Nishanth Menon

Signature · 2 lines
Regards,
Nishanth Menon
#7 lore raw

Felipe,

Quoted 1 line

Will this work when shm_size=0x4000000?

It will. Increasing DMM pool size doesn't have any dependency on shm size. The SHM is used for IPC mechanism to exchange data and loading base images. The DMM is just the DSP virtual address pool that is used for dynamic memory mapping to the buffers allocated on ARM (this buffer is not coming from SHM).

Thank you,
Best regards,
Hari

-----Original Message-----
From: Felipe Contreras [mailto:[email protected]]
Sent: Friday, January 08, 2010 7:38 PM
To: Ramirez Luna, Omar
Cc: linux-omap; Hiroshi Doyu; Ameya Palande; Guzman Lugo, Fernando; Ramos Falcon, Ernesto; Kanigeri, Hari; Aguilar Pena, Leed
Subject: Re: [PATCH 3/8] DSPBRIDGE: Increased DMM size to 256MB

Quoted 3 lines · Omar Ramirez Luna

From: Hari Kanigeri <[email protected]>

This patch increases the DMM from 64MB to 256MB.

Will this work when shm_size=0x4000000?

Signature · 1 line
Felipe Contreras