aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSunita Nadampalli2014-11-14 11:50:08 -0600
committerSunita Nadampalli2014-11-14 11:50:08 -0600
commit5693201c37da9070928a751d79cbfed6bb8dd051 (patch)
treef604218e7f0c87438bcc0bab44455b2b3f8d4507 /libdce.c
parent830a4d36e8c6e9eb2ac97f9a1472e04b71832987 (diff)
downloadrepo-libdce-5693201c37da9070928a751d79cbfed6bb8dd051.tar.gz
repo-libdce-5693201c37da9070928a751d79cbfed6bb8dd051.tar.xz
repo-libdce-5693201c37da9070928a751d79cbfed6bb8dd051.zip
libdce: Changes to make dce_ipc_init/deinit external
dce_ipc_init and dce_ipc_deinit are required by android memplugin even before DCE engine open happens. This is required to use MmRpc interface for DRM/GEM buffer locking. Change-Id: Ia11af04658c367242c33ab8acffaa4b522aa0716 Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
Diffstat (limited to 'libdce.c')
-rw-r--r--libdce.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/libdce.c b/libdce.c
index 2d12c20..a51e5b3 100644
--- a/libdce.c
+++ b/libdce.c
@@ -166,7 +166,7 @@ void dce_free(void *ptr)
166 * 166 *
167 * @ return : Error Status. 167 * @ return : Error Status.
168 */ 168 */
169static int dce_ipc_init(int core) 169int dce_ipc_init(int core)
170{ 170{
171 MmRpc_Params args; 171 MmRpc_Params args;
172 dce_error_status eError = DCE_EOK; 172 dce_error_status eError = DCE_EOK;
@@ -200,18 +200,17 @@ EXIT:
200/** dce_ipc_deinit : DeInitialize MmRpc. This function is called within 200/** dce_ipc_deinit : DeInitialize MmRpc. This function is called within
201 * Engine_close(). 201 * Engine_close().
202 */ 202 */
203static void dce_ipc_deinit(int core, int tableIdx) 203void dce_ipc_deinit(int core, int tableIdx)
204{ 204{
205 /*
206 There is no need to validate tableIdx as tableIdx is guaranteed to have
207 valid value when core is valid. core is already validated before coming here.
208 */
209 if(__ClientCount[core] == 0) { 205 if(__ClientCount[core] == 0) {
210 DEBUG("Nothing to be done: a spurious call\n"); 206 DEBUG("Nothing to be done: a spurious call\n");
211 return; 207 return;
212 } 208 }
213 __ClientCount[core]--; 209 __ClientCount[core]--;
214 gEngineHandle[tableIdx][core] = 0; 210
211 if (tableIdx >= 0)
212 gEngineHandle[tableIdx][core] = 0;
213
215 if( __ClientCount[core] > 0 ) { 214 if( __ClientCount[core] > 0 ) {
216 goto EXIT; 215 goto EXIT;
217 } 216 }