From 9ab27b6505a43237751ae8c896f97f44a0897785 Mon Sep 17 00:00:00 2001 From: Changyeon Lee Date: Thu, 29 Sep 2016 14:56:35 +0900 Subject: [PATCH] Fix svace issues Change-Id: Ibf92bcd26152d79f4d34aca257a8f3f0768dc79a --- src/tbm_bufmgr_exynos.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/tbm_bufmgr_exynos.c b/src/tbm_bufmgr_exynos.c index e3d5b4d..defd7bf 100644 --- a/src/tbm_bufmgr_exynos.c +++ b/src/tbm_bufmgr_exynos.c @@ -358,8 +358,6 @@ _exynos_cache_flush(tbm_bufmgr_exynos bufmgr_exynos, tbm_bo_exynos bo_exynos, in 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; @@ -442,7 +440,7 @@ _bo_set_cache_state(tbm_bufmgr_exynos bufmgr_exynos, tbm_bo_exynos bo_exynos, in 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 */ @@ -452,7 +450,7 @@ _bo_set_cache_state(tbm_bufmgr_exynos bufmgr_exynos, tbm_bo_exynos bo_exynos, in /* 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; @@ -553,8 +551,6 @@ _bufmgr_init_cache_state(tbm_bufmgr_exynos bufmgr_exynos) TBM_EXYNOS_LOG("[libtbm-exynos:%d] " "error: Fail to open global_lock:%s\n", getpid(), tgl_devfile); - - close(bufmgr_exynos->tgl_fd); return 0; } } -- 2.7.4