diff options
author | Prasanna Kumar M.R <prasanna.kumarmr@ti.com> | 2012-06-28 13:25:24 -0500 |
---|---|---|
committer | Brijesh Nekkare <b-nekkare@ti.com> | 2012-07-02 16:30:51 +0530 |
commit | 1c2be685f9d735dc6731526625978fd44179e3f4 (patch) | |
tree | f0fe7894db66504bd090eafd2774e32a23015695 /domx | |
parent | 599477ec4f8165a28333a576b14b6ed716589bf8 (diff) | |
download | hardware_ti_omap4-1c2be685f9d735dc6731526625978fd44179e3f4.zip hardware_ti_omap4-1c2be685f9d735dc6731526625978fd44179e3f4.tar.gz hardware_ti_omap4-1c2be685f9d735dc6731526625978fd44179e3f4.tar.bz2 |
DOMX: Changes for secure playback ION handle mapping
In secure playback case, we dont map the ion buffers. When we pass
the Ion handle, the Rpmsg fails in buffer registration. Hence
we need to share the ion buffer and then pass it to Rpmsg/Ducati.
Change-Id: I2bea9323aa557d340c2a2c2d653fd5f0480160a4
Signed-off-by: Prasanna Kumar M.R. <prasanna.kumarmr@ti.com>
Ported-by: Bryan Buckley <bryan.buckley@ti.com>
Diffstat (limited to 'domx')
-rw-r--r-- | domx/omx_proxy_common/src/omx_proxy_common.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/domx/omx_proxy_common/src/omx_proxy_common.c b/domx/omx_proxy_common/src/omx_proxy_common.c index 119cf04..f45aa28 100644 --- a/domx/omx_proxy_common/src/omx_proxy_common.c +++ b/domx/omx_proxy_common/src/omx_proxy_common.c @@ -232,11 +232,10 @@ static OMX_ERRORTYPE PROXY_AllocateBufferIonCarveout(PROXY_COMPONENT_PRIVATE *pC } if (ret) - return OMX_ErrorInsufficientResources; + return OMX_ErrorInsufficientResources; *handle = temp; return OMX_ErrorNone; } - #endif /* ===========================================================================*/ @@ -746,6 +745,13 @@ OMX_ERRORTYPE PROXY_AllocateBuffer(OMX_IN OMX_HANDLETYPE hComponent, eError = OMX_ErrorInsufficientResources; goto EXIT; } + } else { + if (ion_share(pCompPrv->ion_fd, handle, &(pCompPrv->tBufList[currentBuffer].mmap_fd)) < 0) { + DOMX_ERROR("ion_share failed !!! \n"); + goto EXIT; + } else { + DOMX_DEBUG("ion_share success pMemptr: 0x%x \n", pCompPrv->tBufList[currentBuffer].mmap_fd); + } } pMemptr = pCompPrv->tBufList[currentBuffer].mmap_fd; DOMX_DEBUG ("Ion handle recieved = %x",handle); @@ -756,7 +762,6 @@ OMX_ERRORTYPE PROXY_AllocateBuffer(OMX_IN OMX_HANDLETYPE hComponent, /*No need to increment Allocated buffers here. It will be done in the subsequent use buffer call below*/ - eError = PROXY_UseBuffer(hComponent, ppBufferHdr, nPortIndex, pAppPrivate, nSize, pMemptr); if(eError != OMX_ErrorNone) { @@ -779,6 +784,8 @@ OMX_ERRORTYPE PROXY_AllocateBuffer(OMX_IN OMX_HANDLETYPE hComponent, { DOMX_DEBUG("before mapping, handle = %x, nSize = %d",handle,nSize); (*ppBufferHdr)->pBuffer = pIonMappedBuffer; + } else { + (*ppBufferHdr)->pBuffer = (OMX_U8 *)handle; } #endif |