diff options
Diffstat (limited to 'libdce.c')
-rw-r--r-- | libdce.c | 24 |
1 files changed, 12 insertions, 12 deletions
@@ -122,13 +122,13 @@ static inline void Fill_MmRpc_fxnCtx_Scalar_Params(MmRpc_Param *mmrpc_params, in | |||
122 | mmrpc_params->param.scalar.data = (size_t)data; | 122 | mmrpc_params->param.scalar.data = (size_t)data; |
123 | } | 123 | } |
124 | 124 | ||
125 | static inline void Fill_MmRpc_fxnCtx_Xlt_Array(MmRpc_Xlt *mmrpc_xlt, int index, int32_t base, int32_t addr, size_t handle) | 125 | static inline void Fill_MmRpc_fxnCtx_Xlt_Array(MmRpc_Xlt *mmrpc_xlt, int index, int32_t offset, size_t base, size_t handle) |
126 | { | 126 | { |
127 | /* index : index of params filled in FxnCtx */ | 127 | /* index : index of params filled in FxnCtx */ |
128 | /* offset : calculated from address of index */ | 128 | /* offset : calculated from address of index */ |
129 | mmrpc_xlt->index = index; | 129 | mmrpc_xlt->index = index; |
130 | mmrpc_xlt->offset = MmRpc_OFFSET(base, addr); | 130 | mmrpc_xlt->offset = offset; |
131 | mmrpc_xlt->base = handle; | 131 | mmrpc_xlt->base = base; |
132 | mmrpc_xlt->handle = handle; | 132 | mmrpc_xlt->handle = handle; |
133 | } | 133 | } |
134 | 134 | ||
@@ -440,7 +440,7 @@ static XDAS_Int32 get_version(void *codec, void *dynParams, void *status, dce_co | |||
440 | sizeof(MemHeader), memplugin_share(status)); | 440 | sizeof(MemHeader), memplugin_share(status)); |
441 | 441 | ||
442 | /* Address Translation needed for buffer for version Info */ | 442 | /* Address Translation needed for buffer for version Info */ |
443 | Fill_MmRpc_fxnCtx_Xlt_Array(fxnCtx.xltAry, 3, (int32_t)status, (int32_t)version_buf, memplugin_share(*version_buf)); | 443 | Fill_MmRpc_fxnCtx_Xlt_Array(fxnCtx.xltAry, 3, MmRpc_OFFSET((int32_t)status, (int32_t)version_buf), (size_t)P2H(*version_buf), memplugin_share(*version_buf)); |
444 | 444 | ||
445 | /* Invoke the Remote function through MmRpc */ | 445 | /* Invoke the Remote function through MmRpc */ |
446 | eError = MmRpc_call(MmRpcHandle, &fxnCtx, &fxnRet); | 446 | eError = MmRpc_call(MmRpcHandle, &fxnCtx, &fxnRet); |
@@ -521,12 +521,12 @@ static XDAS_Int32 process(void *codec, void *inBufs, void *outBufs, | |||
521 | for( count = 0, total_count = 0; count < numInBufs; count++, total_count++ ) { | 521 | for( count = 0, total_count = 0; count < numInBufs; count++, total_count++ ) { |
522 | if( codec_id == OMAP_DCE_VIDDEC3 ) { | 522 | if( codec_id == OMAP_DCE_VIDDEC3 ) { |
523 | data_buf = (void * *)(&(((XDM2_BufDesc *)inBufs)->descs[count].buf)); | 523 | data_buf = (void * *)(&(((XDM2_BufDesc *)inBufs)->descs[count].buf)); |
524 | Fill_MmRpc_fxnCtx_Xlt_Array(&(fxnCtx.xltAry[total_count]), INBUFS_INDEX, (int32_t)inBufs, | 524 | Fill_MmRpc_fxnCtx_Xlt_Array(&(fxnCtx.xltAry[total_count]), INBUFS_INDEX, MmRpc_OFFSET((int32_t)inBufs, (int32_t)data_buf), |
525 | (int32_t)data_buf, (size_t)*data_buf); | 525 | (size_t)*data_buf, (size_t)*data_buf); |
526 | } else if( codec_id == OMAP_DCE_VIDENC2 ) { | 526 | } else if( codec_id == OMAP_DCE_VIDENC2 ) { |
527 | data_buf = (void * *)(&(((IVIDEO2_BufDesc *)inBufs)->planeDesc[count].buf)); | 527 | data_buf = (void * *)(&(((IVIDEO2_BufDesc *)inBufs)->planeDesc[count].buf)); |
528 | Fill_MmRpc_fxnCtx_Xlt_Array(&(fxnCtx.xltAry[total_count]), INBUFS_INDEX, (int32_t)inBufs, | 528 | Fill_MmRpc_fxnCtx_Xlt_Array(&(fxnCtx.xltAry[total_count]), INBUFS_INDEX, MmRpc_OFFSET((int32_t)inBufs, (int32_t)data_buf), |
529 | (int32_t)data_buf, (size_t)*data_buf); | 529 | (size_t)*data_buf, (size_t)*data_buf); |
530 | } | 530 | } |
531 | } | 531 | } |
532 | 532 | ||
@@ -535,15 +535,15 @@ static XDAS_Int32 process(void *codec, void *inBufs, void *outBufs, | |||
535 | if(((XDM2_BufDesc *)outBufs)->descs[LUMA_BUF].buf != ((XDM2_BufDesc *)outBufs)->descs[CHROMA_BUF].buf ) { | 535 | if(((XDM2_BufDesc *)outBufs)->descs[LUMA_BUF].buf != ((XDM2_BufDesc *)outBufs)->descs[CHROMA_BUF].buf ) { |
536 | /* Either Encode usecase or MultiPlanar Buffers for Decode usecase */ | 536 | /* Either Encode usecase or MultiPlanar Buffers for Decode usecase */ |
537 | data_buf = (void * *)(&(((XDM2_BufDesc *)outBufs)->descs[count].buf)); | 537 | data_buf = (void * *)(&(((XDM2_BufDesc *)outBufs)->descs[count].buf)); |
538 | Fill_MmRpc_fxnCtx_Xlt_Array(&(fxnCtx.xltAry[total_count]), OUTBUFS_INDEX, (int32_t)outBufs, | 538 | Fill_MmRpc_fxnCtx_Xlt_Array(&(fxnCtx.xltAry[total_count]), OUTBUFS_INDEX, MmRpc_OFFSET((int32_t)outBufs, (int32_t)data_buf), |
539 | (int32_t)data_buf, (size_t)*data_buf); | 539 | (size_t)*data_buf, (size_t)*data_buf); |
540 | } | 540 | } |
541 | #if defined(BUILDOS_LINUX) | 541 | #if defined(BUILDOS_LINUX) |
542 | else { | 542 | else { |
543 | /* SinglePlanar Buffers for Decode usecase*/ | 543 | /* SinglePlanar Buffers for Decode usecase*/ |
544 | data_buf = (void * *)(&(((XDM2_BufDesc *)outBufs)->descs[count].buf)); | 544 | data_buf = (void * *)(&(((XDM2_BufDesc *)outBufs)->descs[count].buf)); |
545 | Fill_MmRpc_fxnCtx_Xlt_Array(&(fxnCtx.xltAry[total_count]), OUTBUFS_INDEX, (int32_t)outBufs, | 545 | Fill_MmRpc_fxnCtx_Xlt_Array(&(fxnCtx.xltAry[total_count]), OUTBUFS_INDEX, MmRpc_OFFSET((int32_t)outBufs, (int32_t)data_buf), |
546 | (int32_t)data_buf, (size_t)*data_buf); | 546 | (size_t)*data_buf, (size_t)*data_buf); |
547 | if( count == CHROMA_BUF ) { | 547 | if( count == CHROMA_BUF ) { |
548 | if(((XDM2_BufDesc *)outBufs)->descs[count].memType == XDM_MEMTYPE_RAW || | 548 | if(((XDM2_BufDesc *)outBufs)->descs[count].memType == XDM_MEMTYPE_RAW || |
549 | ((XDM2_BufDesc *)outBufs)->descs[count].memType == XDM_MEMTYPE_TILEDPAGE ) { | 549 | ((XDM2_BufDesc *)outBufs)->descs[count].memType == XDM_MEMTYPE_TILEDPAGE ) { |