aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSaurabh Bipin Chandra2013-08-29 04:21:50 -0500
committerSaurabh Bipin Chandra2013-09-04 07:05:24 -0500
commitbd95703493320275efe5b3d0db6d75e783a88414 (patch)
tree98209857e2b74554917d947aa71766201f4aa8fd /libdce.c
parent6163ea9eb894f3d88562e31ea442f848a6e8a568 (diff)
downloadrepo-libdce-bd95703493320275efe5b3d0db6d75e783a88414.tar.gz
repo-libdce-bd95703493320275efe5b3d0db6d75e783a88414.tar.xz
repo-libdce-bd95703493320275efe5b3d0db6d75e783a88414.zip
[DCE] Align MmRpc offset setting with GLP Rpmsg_rpc
This patch aligns setting translation[i].offset field of MmRpc Translation Array (XltAry) with the understanding of rpmsg_rpc of GLP. Rpmsg_rpc of GLP calculates: primary_offset as mmrpc_params.addr - mmprc_params.base and secondary_offset as translation[i].offset and sums both to get to the location of the address to be translated. Whereas in QNX rpmsg_rpc, the primary offset was subtracted from the secondary offset. This logic has now been modified in IPC_03_10_00_07_eng to align with the rpmsg_rpc of GLP. Change-Id: Ied11e78891119312f35162e336cd3dded9e8997a Signed-off-by: Saurabh Bipin Chandra <a0131926@ti.com>
Diffstat (limited to 'libdce.c')
-rw-r--r--libdce.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libdce.c b/libdce.c
index f83aeb5..655f8a1 100644
--- a/libdce.c
+++ b/libdce.c
@@ -184,7 +184,7 @@ static int dce_init(void)
184#if defined(BUILDOS_LINUX) 184#if defined(BUILDOS_LINUX)
185 /* Open omapdrm device */ 185 /* Open omapdrm device */
186 186
187 if(fd == -1) { 187 if( fd == -1 ) {
188 printf("Open omapdrm device \n"); 188 printf("Open omapdrm device \n");
189 fd = drmOpen("omapdrm", "platform:omapdrm:00"); 189 fd = drmOpen("omapdrm", "platform:omapdrm:00");
190 } 190 }
@@ -471,7 +471,7 @@ static XDAS_Int32 get_version(void *codec, void *dynParams, void *status, dce_co
471 sizeof(MemHeader), memplugin_share(status)); 471 sizeof(MemHeader), memplugin_share(status));
472 472
473 /* Address Translation needed for buffer for version Info */ 473 /* Address Translation needed for buffer for version Info */
474 Fill_MmRpc_fxnCtx_Xlt_Array(fxnCtx.xltAry, 3, (int32_t)P2H(status), (int32_t)version_buf, memplugin_share(*version_buf)); 474 Fill_MmRpc_fxnCtx_Xlt_Array(fxnCtx.xltAry, 3, (int32_t)status, (int32_t)version_buf, memplugin_share(*version_buf));
475 475
476 /* Invoke the Remote function through MmRpc */ 476 /* Invoke the Remote function through MmRpc */
477 eError = MmRpc_call(MmRpcHandle, &fxnCtx, &fxnRet); 477 eError = MmRpc_call(MmRpcHandle, &fxnCtx, &fxnRet);
@@ -552,11 +552,11 @@ static XDAS_Int32 process(void *codec, void *inBufs, void *outBufs,
552 for( count = 0, total_count = 0; count < numInBufs; count++, total_count++ ) { 552 for( count = 0, total_count = 0; count < numInBufs; count++, total_count++ ) {
553 if( codec_id == OMAP_DCE_VIDDEC3 ) { 553 if( codec_id == OMAP_DCE_VIDDEC3 ) {
554 data_buf = (void * *)(&(((XDM2_BufDesc *)inBufs)->descs[count].buf)); 554 data_buf = (void * *)(&(((XDM2_BufDesc *)inBufs)->descs[count].buf));
555 Fill_MmRpc_fxnCtx_Xlt_Array(&(fxnCtx.xltAry[total_count]), INBUFS_INDEX, (int32_t)P2H(inBufs), 555 Fill_MmRpc_fxnCtx_Xlt_Array(&(fxnCtx.xltAry[total_count]), INBUFS_INDEX, (int32_t)inBufs,
556 (int32_t)data_buf, (size_t)*data_buf); 556 (int32_t)data_buf, (size_t)*data_buf);
557 } else if( codec_id == OMAP_DCE_VIDENC2 ) { 557 } else if( codec_id == OMAP_DCE_VIDENC2 ) {
558 data_buf = (void * *)(&(((IVIDEO2_BufDesc *)inBufs)->planeDesc[count].buf)); 558 data_buf = (void * *)(&(((IVIDEO2_BufDesc *)inBufs)->planeDesc[count].buf));
559 Fill_MmRpc_fxnCtx_Xlt_Array(&(fxnCtx.xltAry[total_count]), INBUFS_INDEX, (int32_t)P2H(inBufs), 559 Fill_MmRpc_fxnCtx_Xlt_Array(&(fxnCtx.xltAry[total_count]), INBUFS_INDEX, (int32_t)inBufs,
560 (int32_t)data_buf, (size_t)*data_buf); 560 (int32_t)data_buf, (size_t)*data_buf);
561 } 561 }
562 } 562 }
@@ -565,14 +565,14 @@ static XDAS_Int32 process(void *codec, void *inBufs, void *outBufs,
565 if(((XDM2_BufDesc *)outBufs)->descs[LUMA_BUF].buf != ((XDM2_BufDesc *)outBufs)->descs[CHROMA_BUF].buf ) { 565 if(((XDM2_BufDesc *)outBufs)->descs[LUMA_BUF].buf != ((XDM2_BufDesc *)outBufs)->descs[CHROMA_BUF].buf ) {
566 /* MultiPlanar Buffers */ 566 /* MultiPlanar Buffers */
567 data_buf = (void * *)(&(((XDM2_BufDesc *)outBufs)->descs[count].buf)); 567 data_buf = (void * *)(&(((XDM2_BufDesc *)outBufs)->descs[count].buf));
568 Fill_MmRpc_fxnCtx_Xlt_Array(&(fxnCtx.xltAry[total_count]), OUTBUFS_INDEX, (int32_t)P2H(outBufs), 568 Fill_MmRpc_fxnCtx_Xlt_Array(&(fxnCtx.xltAry[total_count]), OUTBUFS_INDEX, (int32_t)outBufs,
569 (int32_t)data_buf, (size_t)*data_buf); 569 (int32_t)data_buf, (size_t)*data_buf);
570 } 570 }
571#if defined(BUILDOS_LINUX) 571#if defined(BUILDOS_LINUX)
572 else { 572 else {
573 /* SinglePlanar Buffers */ 573 /* SinglePlanar Buffers */
574 data_buf = (void * *)(&(((XDM2_BufDesc *)outBufs)->descs[count].buf)); 574 data_buf = (void * *)(&(((XDM2_BufDesc *)outBufs)->descs[count].buf));
575 Fill_MmRpc_fxnCtx_Xlt_Array(&(fxnCtx.xltAry[total_count]), OUTBUFS_INDEX, (int32_t)P2H(outBufs), 575 Fill_MmRpc_fxnCtx_Xlt_Array(&(fxnCtx.xltAry[total_count]), OUTBUFS_INDEX, (int32_t)outBufs,
576 (int32_t)data_buf, (size_t)*data_buf); 576 (int32_t)data_buf, (size_t)*data_buf);
577 if( count == CHROMA_BUF ) { 577 if( count == CHROMA_BUF ) {
578 if(((XDM2_BufDesc *)outBufs)->descs[count].memType == XDM_MEMTYPE_RAW || 578 if(((XDM2_BufDesc *)outBufs)->descs[count].memType == XDM_MEMTYPE_RAW ||