summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJacob Stiffler2014-08-19 13:28:24 -0500
committerChris Ring2014-08-19 15:53:09 -0500
commitbde6b3fa72617361d2883bfda0c7f35504007ae2 (patch)
treee70ec516c1e1b5f6592e8272496fc9ee4b7c4e83
parent4009056bef8c13cbbc7b06580c80173bd4b35e2c (diff)
downloadfcdev-fc-3.30-next.tar.gz
fcdev-fc-3.30-next.tar.xz
fcdev-fc-3.30-next.zip
EdmaMgr : Fix logic in Large xfer APIs to detect when chaining is necessary.3.30.01.08fc-3.30-next3.30
* Previous logic attempted to simplify detection using bit-wise logic on the pitch size, but was incorrect due wrong assumptions on the size of integers. * New log explicitly check whether or not the pitch size is on the interval [-32768,32767].
-rw-r--r--packages/ti/sdo/fc/edmamgr/edmamgr_xfer.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/ti/sdo/fc/edmamgr/edmamgr_xfer.h b/packages/ti/sdo/fc/edmamgr/edmamgr_xfer.h
index c57459f..ae1b655 100644
--- a/packages/ti/sdo/fc/edmamgr/edmamgr_xfer.h
+++ b/packages/ti/sdo/fc/edmamgr/edmamgr_xfer.h
@@ -734,7 +734,7 @@ int32_t EdmaMgr_copy1D2DLarge
734 /* Setting up the parameters for the transfer */ 734 /* Setting up the parameters for the transfer */
735 memset(&p, 0, sizeof(ECPY_Params)); 735 memset(&p, 0, sizeof(ECPY_Params));
736 736
737 if ( (pitch & (~0xFFFF)) == 0 ) { 737 if ( (pitch < 32768) && (pitch >= -32768) ) {
738 /* If pitch fits in HW reg, fall back on basic 1D2D transfer */ 738 /* If pitch fits in HW reg, fall back on basic 1D2D transfer */
739 p.transferType = ECPY_1D2D; 739 p.transferType = ECPY_1D2D;
740 p.numFrames = 1; 740 p.numFrames = 1;
@@ -915,7 +915,7 @@ int32_t EdmaMgr_copy2D1DLarge
915 /* Setting up the parameters for the first transfer (data grp 1) */ 915 /* Setting up the parameters for the first transfer (data grp 1) */
916 memset(&p, 0, sizeof(ECPY_Params)); 916 memset(&p, 0, sizeof(ECPY_Params));
917 917
918 if ( (pitch & (~0xFFFF)) == 0 ) { 918 if ( (pitch < 32768) && (pitch >= -32768) ) {
919 /* If pitch fits in HW reg, fall back on basic 1D2D transfer */ 919 /* If pitch fits in HW reg, fall back on basic 1D2D transfer */
920 p.transferType = ECPY_2D1D; 920 p.transferType = ECPY_2D1D;
921 p.numFrames = 1; 921 p.numFrames = 1;