]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - mfp/fcdev.git/commitdiff
Overrides RMAN.maxAlgs with a value of 1 3.30.00.04_eng
authorJacob Stiffler <j-stiffler@ti.com>
Tue, 10 Dec 2013 19:29:50 +0000 (14:29 -0500)
committerChris Ring <cring@ti.com>
Tue, 10 Dec 2013 23:25:40 +0000 (15:25 -0800)
Internal memory usage scales with the value of RMAN.maxAlgs. This
change is to reduce the memory usage for users of EdmaMgr. As a
consequence, EdmaMgr_Alloc needed to be changed to provide a single
requestID to all RMAN requests.

packages/ti/sdo/fc/edmamgr/edmamgr.c
packages/ti/sdo/fc/edmamgr/package.xs

index af55610e0020d7bf4fe5346fa96b7b3164546b90..1c54f14cc8706c96b118af52dfba07eb305c1bf4 100644 (file)
@@ -180,7 +180,7 @@ EdmaMgr_Handle EdmaMgr_alloc(int32_t max_linked_transfers)
   resDesc.handle       = (IRES_Handle)EdmaMgr_channels[i].edmaHandle;
 
   /* Allocate EDMA Resources */
-  ires_status = RMAN_allocateResources( i, &resDesc, 1, scratchId);
+  ires_status = RMAN_allocateResources( (Int)EdmaMgr_channels, &resDesc, 1, scratchId);
   if (ires_status != IRES_OK)
   {
     EdmaMgr_channels[i].edmaArgs.numPaRams = 0;
@@ -192,7 +192,7 @@ EdmaMgr_Handle EdmaMgr_alloc(int32_t max_linked_transfers)
   EdmaMgr_channels[i].ecpyHandle = ECPY_createHandle((IRES_EDMA3CHAN2_Handle)resDesc.handle, (IALG_Handle)&EdmaMgr_channels[i]);
   if(EdmaMgr_channels[i].ecpyHandle == NULL)
   {
-    RMAN_freeAllocatedResources( i, &resDesc, 1, scratchId);
+    RMAN_freeAllocatedResources( (Int)EdmaMgr_channels, &resDesc, 1, scratchId);
     EdmaMgr_channels[i].edmaHandle = NULL;
     EdmaMgr_channels[i].edmaArgs.numPaRams = 0;
     return ((EdmaMgr_Handle)NULL);
@@ -243,7 +243,7 @@ int32_t EdmaMgr_free(EdmaMgr_Handle h)
 
   ECPY_deleteHandle(chan->ecpyHandle);
 
-  ires_status = RMAN_freeAllocatedResources( i, &resDesc, 1, scratchId);
+  ires_status = RMAN_freeAllocatedResources( (Int)EdmaMgr_channels, &resDesc, 1, scratchId);
   if (ires_status != IRES_OK) {
     ret_val = EdmaMgr_ERROR_FREE;
   }
index 1d5016eef92b9bdb7092a9453a3e99e0df448334..95a930563cd7d564c593a445e5eaccfc7ea90484 100644 (file)
@@ -86,4 +86,8 @@ function close() {
     if (this.profile == undefined) {
         this.profile = xdc.useModule('ti.sdo.fc.global.Settings').profile;
     }
+
+    var RMAN = xdc.useModule("ti.sdo.fc.rman.RMAN");
+    RMAN.maxAlgs = 1;
+    print("Override RMAN.maxAlgs = " + RMAN.maxAlgs);
 }