summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRishabh Garg2018-11-29 12:27:06 -0600
committerRishabh Garg2018-11-30 00:41:28 -0600
commitc9358b07fa7ac7c9fc4b1227b30d8c9e97337e66 (patch)
tree3e2035cdf9036ffd9ea01c9cac293eb2698df718
parent226a9b5f167dd1162e45dcc24ad368d63308f04e (diff)
downloadcal-lld-c9358b07fa7ac7c9fc4b1227b30d8c9e97337e66.tar.gz
cal-lld-c9358b07fa7ac7c9fc4b1227b30d8c9e97337e66.tar.xz
cal-lld-c9358b07fa7ac7c9fc4b1227b30d8c9e97337e66.zip
PDK-3406 Fixed CAL driver due to FVID2 change
Signed-off-by: Rishabh Garg <rishabh@ti.com>
-rwxr-xr-x[-rw-r--r--]examples/cal_capture_test/src/CaptureCal_main.c2
-rwxr-xr-x[-rw-r--r--]examples/utils/src/calutils_mem.c8
-rwxr-xr-x[-rw-r--r--]src/core/cal_core.h2
-rwxr-xr-x[-rw-r--r--]src/drv/cal_drvProc.c8
4 files changed, 10 insertions, 10 deletions
diff --git a/examples/cal_capture_test/src/CaptureCal_main.c b/examples/cal_capture_test/src/CaptureCal_main.c
index c34a7fb..6f17e40 100644..100755
--- a/examples/cal_capture_test/src/CaptureCal_main.c
+++ b/examples/cal_capture_test/src/CaptureCal_main.c
@@ -771,7 +771,7 @@ static int32_t appCaptAllocAndQFrames(appCaptObj_t *appObj)
771 (unsigned int) appObj->testPrms.width, 771 (unsigned int) appObj->testPrms.width,
772 (unsigned int) appObj->testPrms.height); 772 (unsigned int) appObj->testPrms.height);
773 CalUtils_memFrameGetSize(&fmt, &bufSize, NULL); 773 CalUtils_memFrameGetSize(&fmt, &bufSize, NULL);
774 CacheP_wbInv(pFrm[0].addr[0], (CAPT_APP_FRAMES_PER_STREAM * bufSize)); 774 CacheP_wbInv((void *)pFrm[0].addr[0], (CAPT_APP_FRAMES_PER_STREAM * bufSize));
775 GT_3trace( 775 GT_3trace(
776 CalTrace, GT_INFO, 776 CalTrace, GT_INFO,
777 "saveRaw(0, 0x%.8x, \"D:\\\\%s\", %d, " 777 "saveRaw(0, 0x%.8x, \"D:\\\\%s\", %d, "
diff --git a/examples/utils/src/calutils_mem.c b/examples/utils/src/calutils_mem.c
index 521a9e0..0955d23 100644..100755
--- a/examples/utils/src/calutils_mem.c
+++ b/examples/utils/src/calutils_mem.c
@@ -253,7 +253,7 @@ int32_t CalUtils_memFrameAlloc(Fvid2_Format *pFormat,
253 253
254 /* copy chNum to Fvid2_Frame from Fvid2_Format */ 254 /* copy chNum to Fvid2_Frame from Fvid2_Format */
255 pFrame->chNum = pFormat->chNum; 255 pFrame->chNum = pFormat->chNum;
256 pFrame->addr[0] = pBaseAddr; 256 pFrame->addr[0] = (uint64_t) pBaseAddr;
257 257
258 switch (pFormat->dataFormat) 258 switch (pFormat->dataFormat)
259 { 259 {
@@ -290,7 +290,7 @@ int32_t CalUtils_memFrameAlloc(Fvid2_Format *pFormat,
290 case FVID2_DF_YUV422SP_UV: 290 case FVID2_DF_YUV422SP_UV:
291 case FVID2_DF_YUV420SP_UV: 291 case FVID2_DF_YUV420SP_UV:
292 /* assign pointer for C plane */ 292 /* assign pointer for C plane */
293 pFrame->addr[3] = (uint8_t *) pFrame->addr[0] + cOffset; 293 pFrame->addr[3] = (uint64_t) pFrame->addr[0] + cOffset;
294 break; 294 break;
295 default: 295 default:
296 /* illegal data format */ 296 /* illegal data format */
@@ -323,10 +323,10 @@ int32_t CalUtils_memFrameFree(const Fvid2_Format *pFormat,
323 { 323 {
324 /* free the frame buffer memory */ 324 /* free the frame buffer memory */
325 325
326 /* for all 'numFrames' memory is allocated contigously during alloc, 326 /* for all 'numFrames' memory is allocated contiguously during alloc,
327 * so first frame memory pointer points to the complete 327 * so first frame memory pointer points to the complete
328 * memory block for all frames */ 328 * memory block for all frames */
329 CalUtils_memFree(pFrame->addr[0], (size * numFrames)); 329 CalUtils_memFree((void *)pFrame->addr[0], (size * numFrames));
330 } 330 }
331 331
332 return (FVID2_SOK); 332 return (FVID2_SOK);
diff --git a/src/core/cal_core.h b/src/core/cal_core.h
index 5f58c3a..263a7b5 100644..100755
--- a/src/core/cal_core.h
+++ b/src/core/cal_core.h
@@ -110,7 +110,7 @@ typedef struct
110 * or for anc-data in multi-channel. */ 110 * or for anc-data in multi-channel. */
111 uint32_t chId; 111 uint32_t chId;
112 /**< 0-15 maps to actual VPDMA-channel – used in multi-channel. */ 112 /**< 0-15 maps to actual VPDMA-channel – used in multi-channel. */
113 void *addr[FVID2_MAX_PLANES]; 113 uint64_t addr[FVID2_MAX_PLANES];
114 /**< Array of frame buffer pointers for given stream. 114 /**< Array of frame buffer pointers for given stream.
115 * Size of array shall be "numFrames" 115 * Size of array shall be "numFrames"
116 * Each entry is equivalent to "addr" in #Fvid2_Frame. */ 116 * Each entry is equivalent to "addr" in #Fvid2_Frame. */
diff --git a/src/drv/cal_drvProc.c b/src/drv/cal_drvProc.c
index c602e35..39f19e1 100644..100755
--- a/src/drv/cal_drvProc.c
+++ b/src/drv/cal_drvProc.c
@@ -111,7 +111,7 @@ Cal_CoreFrame *calDrvCaptCoreReqFrameCb(void *drvData,
111 qObj->coreFrm.rtParams = qObj->frm->perFrameCfg; 111 qObj->coreFrm.rtParams = qObj->frm->perFrameCfg;
112 qObj->coreFrm.dropFrm = (uint32_t) FALSE; 112 qObj->coreFrm.dropFrm = (uint32_t) FALSE;
113 /* If app passes NULL pointer, then drop the frame */ 113 /* If app passes NULL pointer, then drop the frame */
114 if (NULL == qObj->coreFrm.addr[0]) 114 if (0x0U == qObj->coreFrm.addr[0])
115 { 115 {
116 qObj->coreFrm.dropFrm = (uint32_t) TRUE; 116 qObj->coreFrm.dropFrm = (uint32_t) TRUE;
117 } 117 }
@@ -285,9 +285,9 @@ int32_t calDrvCaptCoreFrameDoneCb(void *drvData, const Cal_CoreFrame *coreFrm)
285 "CaptDrv: Dequeued buffer 0x%0.8x\r\n", 285 "CaptDrv: Dequeued buffer 0x%0.8x\r\n",
286 coreFrm->addr[0]); 286 coreFrm->addr[0]);
287 287
288 qObj->coreFrm.addr[0] = NULL; 288 qObj->coreFrm.addr[0] = 0x0U;
289 qObj->coreFrm.addr[1] = NULL; 289 qObj->coreFrm.addr[1] = 0x0U;
290 qObj->coreFrm.addr[2] = NULL; 290 qObj->coreFrm.addr[2] = 0x0U;
291 qObj->coreFrm.dropFrm = (uint32_t) FALSE; 291 qObj->coreFrm.dropFrm = (uint32_t) FALSE;
292 292
293 /* Updated runtime parameters */ 293 /* Updated runtime parameters */