NOT_SUPPORTED return ture at lock/unlock 82/253982/2
authorSooChan Lim <sc1.lim@samsung.com>
Sun, 7 Feb 2021 06:47:03 +0000 (15:47 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Mon, 22 Feb 2021 03:46:08 +0000 (03:46 +0000)
Change-Id: I64abc4f9c942d10d0830f2ca647276a02f54b0f3

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) {