if (bufmgr_exynos->use_dma_fence)
return 1;
- EXYNOS_RETURN_VAL_IF_FAIL(bo_exynos != NULL, 0);
-
struct drm_exynos_gem_cache_op cache_op = {0, };
int ret;
char need_flush = 0;
unsigned short cntFlush = 0;
- if (bo_exynos->flags_exynos & EXYNOS_BO_NONCACHABLE)
+ if (!(bo_exynos->flags_exynos & EXYNOS_BO_CACHABLE))
return 1;
/* get cache state of a bo */
/* get global cache flush count */
cntFlush = (unsigned short)_tgl_get_data(bufmgr_exynos->tgl_fd, GLOBAL_KEY);
- if (opt == TBM_DEVICE_CPU) {
+ if (device == TBM_DEVICE_CPU) {
if (bo_exynos->cache_state.data.isDirtied == DEVICE_CO &&
bo_exynos->cache_state.data.isCached)
need_flush = TBM_EXYNOS_CACHE_INV;
TBM_EXYNOS_LOG("[libtbm-exynos:%d] "
"error: Fail to open global_lock:%s\n",
getpid(), tgl_devfile);
-
- close(bufmgr_exynos->tgl_fd);
return 0;
}
}