From c0f75abcae034245d46530cf4d685e10de6051e2 Mon Sep 17 00:00:00 2001 From: Michael Gernoth Date: Tue, 13 May 2014 21:00:14 -0700 Subject: domx: add board config for LOW_SECURE_HEAP Change-Id: I1a888975945ec88d011e3bfc4e8af7d8ac36fc59 Conflicts: domx/domx/plugins/memplugin_ion.c --- domx/domx/Android.mk | 4 +++- domx/domx/plugins/memplugin_ion.c | 8 ++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) (limited to 'domx') diff --git a/domx/domx/Android.mk b/domx/domx/Android.mk index 66c90b9..a785ef9 100644 --- a/domx/domx/Android.mk +++ b/domx/domx/Android.mk @@ -26,7 +26,9 @@ LOCAL_C_INCLUDES += \ $(LOCAL_PATH)/plugins/inc/ LOCAL_CFLAGS += -D_Android -DENABLE_GRALLOC_BUFFERS -DUSE_ENHANCED_PORTRECONFIG -DANDROID_QUIRK_LOCK_BUFFER -DUSE_ION - +ifdef BOARD_USE_TI_DOMX_LOW_SECURE_HEAP +LOCAL_CFLAGS += -DDOMX_LOW_SECURE_HEAP +endif LOCAL_SHARED_LIBRARIES := \ libmm_osal \ diff --git a/domx/domx/plugins/memplugin_ion.c b/domx/domx/plugins/memplugin_ion.c index 07b81cc..6199ea2 100755 --- a/domx/domx/plugins/memplugin_ion.c +++ b/domx/domx/plugins/memplugin_ion.c @@ -169,9 +169,17 @@ MEMPLUGIN_ERRORTYPE MemPlugin_ION_Alloc(void *pMemPluginHandle, OMX_U32 nClient, if(sIonParams.alloc_flags != OMAP_ION_HEAP_SECURE_INPUT) { //for non default types of allocation - no retry with tiler 1d - throw error +//STARGO: ducati secure heap is too small, need to allocate from heap +#ifdef DOMX_LOW_SECURE_HEAP + pIonBufferParams->eBuffer_type = TILER1D; + pIonBufferParams->eTiler_format = MEMPLUGIN_TILER_FORMAT_PAGE; + sIonParams.alloc_flags = OMAP_ION_HEAP_TILER_MASK; + sIonParams.nAlign = -1; +#else DOMX_ERROR("FAILED to allocate secure buffer of size=%d. ret=0x%x",pIonBufferParams->nWidth, ret); eError = MEMPLUGIN_ERROR_NORESOURCES; goto EXIT; +#endif } else { -- cgit v1.1