From a92208d7d6892363eceaad4840dc5e8087183b6f Mon Sep 17 00:00:00 2001 From: SooChan Lim Date: Sun, 7 Feb 2021 15:47:03 +0900 Subject: [PATCH] NOT_SUPPORTED return ture at lock/unlock Change-Id: I64abc4f9c942d10d0830f2ca647276a02f54b0f3 --- src/tbm_bo.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/src/tbm_bo.c b/src/tbm_bo.c index db05ef7..95000a5 100644 --- a/src/tbm_bo.c +++ b/src/tbm_bo.c @@ -157,10 +157,14 @@ _bo_lock(tbm_bo bo, int device, int opt) if (bo->bufmgr->use_hal_tbm) { error = (tbm_error_e)hal_tbm_bo_lock((hal_tbm_bo *)bo->bo_data, device, opt); - if (error != TBM_ERROR_NONE) { - TBM_WRN("fail to lock"); - _tbm_set_last_result(error); - ret = 0; + if (error == TBM_ERROR_NOT_SUPPORTED) { + _tbm_set_last_result(TBM_ERROR_NONE); + } else { + if (error != TBM_ERROR_NONE) { + TBM_WRN("fail to lock"); + _tbm_set_last_result(error); + ret = 0; + } } } else if (bo->bufmgr->backend_module_data) { if (bo->bufmgr->bo_func->bo_lock) { @@ -189,9 +193,13 @@ _bo_unlock(tbm_bo bo) if (bo->bufmgr->use_hal_tbm) { error = (tbm_error_e)hal_tbm_bo_unlock((hal_tbm_bo *)bo->bo_data); - if (error != TBM_ERROR_NONE) { - TBM_WRN("fail to lock"); - _tbm_set_last_result(error); + if (error == TBM_ERROR_NOT_SUPPORTED) { + _tbm_set_last_result(TBM_ERROR_NONE); + } else { + if (error != TBM_ERROR_NONE) { + TBM_WRN("fail to lock"); + _tbm_set_last_result(error); + } } } else if (bo->bufmgr->backend_module_data) { if (bo->bufmgr->bo_func->bo_unlock) { -- 2.7.4