diff options
author | Changyeon Lee <cyeon.lee@samsung.com> | 2016-03-22 16:53:35 +0900 |
---|---|---|
committer | Changyeon Lee <cyeon.lee@samsung.com> | 2016-03-22 16:55:21 +0900 |
commit | 6aa7d79651b3f999f342a813092293bc45e0fd97 (patch) | |
tree | 736e003e5887fc87a41f3bb853b759446035201f | |
parent | 4fb8b5a6a74872cfd3e88eda1ca7b67849ec73e0 (diff) | |
download | libtbm-dumb-submit/tizen/20160323.081622.tar.gz libtbm-dumb-submit/tizen/20160323.081622.tar.bz2 libtbm-dumb-submit/tizen/20160323.081622.zip |
Always Set lock backend fuctionsubmit/tizen/20160323.081622accepted/tizen/wearable/20160323.135415accepted/tizen/tv/20160323.135629accepted/tizen/mobile/20160323.135417accepted/tizen/ivi/20160323.140817accepted/tizen/common/20160323.185219
Change-Id: I4cecebc3a4272e446a10acbca3d3d5587516f83e
-rwxr-xr-x | src/tbm_bufmgr_dumb.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/tbm_bufmgr_dumb.c b/src/tbm_bufmgr_dumb.c index 1ce7624..3436f52 100755 --- a/src/tbm_bufmgr_dumb.c +++ b/src/tbm_bufmgr_dumb.c @@ -947,6 +947,9 @@ tbm_dumb_bo_lock(tbm_bo bo, int device, int opt) bufmgr_dumb = (tbm_bufmgr_dumb)tbm_backend_get_bufmgr_priv(bo); DUMB_RETURN_VAL_IF_FAIL (bufmgr_dumb!=NULL, 0); + if (!bufmgr_dumb->use_dma_fence) + return 1; + memset(&fence, 0, sizeof(struct dma_buf_fence)); /* Check if the given type is valid or not. */ @@ -1048,6 +1051,12 @@ tbm_dumb_bo_unlock(tbm_bo bo) bo_dumb = (tbm_bo_dumb)tbm_backend_get_bo_priv(bo); DUMB_RETURN_VAL_IF_FAIL (bo_dumb!=NULL, 0); + bufmgr_dumb = (tbm_bufmgr_dumb)tbm_backend_get_bufmgr_priv(bo); + DUMB_RETURN_VAL_IF_FAIL (bufmgr_dumb!=NULL, 0); + + if (!bufmgr_dumb->use_dma_fence) + return 1; + if (bo_dumb->dma_fence[0].type & DMA_BUF_ACCESS_DMA) dma_type = 1; @@ -1850,19 +1859,10 @@ init_tbm_bufmgr_priv (tbm_bufmgr bufmgr, int fd) bufmgr_backend->surface_get_num_bos = tbm_dumb_surface_get_num_bos; bufmgr_backend->bo_get_flags = tbm_dumb_bo_get_flags; - if (bufmgr_dumb->use_dma_fence) - { - bufmgr_backend->flags = (TBM_LOCK_CTRL_BACKEND | TBM_CACHE_CTRL_BACKEND); - bufmgr_backend->bo_lock = NULL; - bufmgr_backend->bo_lock2 = tbm_dumb_bo_lock; - bufmgr_backend->bo_unlock = tbm_dumb_bo_unlock; - } - else - { - bufmgr_backend->flags = (TBM_LOCK_CTRL_BACKEND | TBM_CACHE_CTRL_BACKEND); - bufmgr_backend->bo_lock = NULL; - bufmgr_backend->bo_unlock = NULL; - } + bufmgr_backend->flags = (TBM_LOCK_CTRL_BACKEND | TBM_CACHE_CTRL_BACKEND); + bufmgr_backend->bo_lock = NULL; + bufmgr_backend->bo_lock2 = tbm_dumb_bo_lock; + bufmgr_backend->bo_unlock = tbm_dumb_bo_unlock; if (!tbm_backend_init (bufmgr, bufmgr_backend)) { |