From c805ef6e6122350796c50bc640365bcafa79bca5 Mon Sep 17 00:00:00 2001 From: Pradeep Venkatasubbarao Date: Thu, 22 Mar 2012 18:47:18 +0530 Subject: [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 --- domx/omx_rpc/src/omx_rpc_stub.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'domx') 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); -- cgit v1.1