summaryrefslogtreecommitdiffstats
path: root/domx
diff options
context:
space:
mode:
authorPradeep Venkatasubbarao <pradeepv@ti.com>2012-03-22 18:47:18 +0530
committerBrijesh Nekkare <b-nekkare@ti.com>2012-04-03 12:47:17 +0530
commitc805ef6e6122350796c50bc640365bcafa79bca5 (patch)
treeeb7dbb528c770568af3e9e5079c94e5c6cd0b9db /domx
parent0ada1957ac18c41762d82a25d19c31ba3ea1e657 (diff)
downloadhardware_ti_omap4-c805ef6e6122350796c50bc640365bcafa79bca5.zip
hardware_ti_omap4-c805ef6e6122350796c50bc640365bcafa79bca5.tar.gz
hardware_ti_omap4-c805ef6e6122350796c50bc640365bcafa79bca5.tar.bz2
[DOMX] Fix Buffer Map type during free buffer
The buffer sent from RPC calls (UseBuffer, AllocateBuffer, FreeBuffer) will get mapped to approriate space depending on the map type that is set in the packet. Even though a pBuffer was sent in the packet, the map type (RPC_OMX_MAP_INFO_TYPE) was set to RPC_OMX_MAP_INFO_NONE. This resulted in conversion not being done in rpmsg. This patch sets the RPC_OMX_MAP_INFO_TYPE correctly in the packet to RPC_OMX_MAP_INFO_ONE_BUF. With this rpmsg will convert the pBuffer address to ducati side (tiler) address. Change-Id: I722b618687e178817e2e8ffdb9670e7a5f54d5e9 Signed-off-by: Pradeep Venkatasubbarao <pradeepv@ti.com>
Diffstat (limited to 'domx')
-rwxr-xr-xdomx/omx_rpc/src/omx_rpc_stub.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/domx/omx_rpc/src/omx_rpc_stub.c b/domx/omx_rpc/src/omx_rpc_stub.c
index 118f457..e650361 100755
--- a/domx/omx_rpc/src/omx_rpc_stub.c
+++ b/domx/omx_rpc/src/omx_rpc_stub.c
@@ -1186,8 +1186,11 @@ RPC_OMX_ERRORTYPE RPC_FreeBuffer(OMX_HANDLETYPE hRPCCtx,
RPC_getPacket(nPacketSize, pPacket);
RPC_initPacket(pPacket, pOmxPacket, pData, nFxnIdx, nPacketSize);
+ /*Offset is the location of the buffer pointer from the start of the data packet */
+ nOffset = sizeof(RPC_OMX_MAP_INFO_TYPE) + sizeof(OMX_U32) +
+ sizeof(OMX_HANDLETYPE) + sizeof(OMX_U32) + sizeof(OMX_U32);
/*No buffer mapping required */
- RPC_SETFIELDVALUE(pData, nPos, RPC_OMX_MAP_INFO_NONE,
+ RPC_SETFIELDVALUE(pData, nPos, RPC_OMX_MAP_INFO_ONE_BUF,
RPC_OMX_MAP_INFO_TYPE);
RPC_SETFIELDVALUE(pData, nPos, nOffset, OMX_U32);