NOT_SUPPORTED return ture at lock/unlock
[platform/core/uifw/libtbm.git] / src / tbm_bo.c
index db05ef7..95000a5 100644 (file)
@@ -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) {