remove use_dma_fence relevant code 85/157785/3
authorInki Dae <inki.dae@samsung.com>
Tue, 10 Oct 2017 04:15:38 +0000 (13:15 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Mon, 30 Oct 2017 23:01:08 +0000 (23:01 +0000)
Change-Id: I392310bfc407fb033d400cc063840e1e0a8f0491
Signed-off-by: Inki Dae <inki.dae@samsung.com>
src/tbm_bufmgr_nexell.c

index a7da9f013e22bacf77a21920b763f3793f818548..c892f8e2f5de533b6bbeb6d34c6f8667fc65fe82 100644 (file)
@@ -232,8 +232,6 @@ struct _tbm_bufmgr_nexell {
        int isLocal;
        void *hashBos;
 
-       int use_dma_fence;
-
        int tgl_fd;
 
        char *device_name;
@@ -354,9 +352,6 @@ _bo_init_cache_state(tbm_bufmgr_nexell bufmgr_nexell, tbm_bo_nexell bo_nexell, i
        NEXELL_RETURN_VAL_IF_FAIL(bufmgr_nexell != NULL, 0);
        NEXELL_RETURN_VAL_IF_FAIL(bo_nexell != NULL, 0);
 
-       if (bufmgr_nexell->use_dma_fence)
-               return 1;
-
        tbm_bo_cache_state cache_state;
 
        _tgl_init(bufmgr_nexell->tgl_fd, bo_nexell->name);
@@ -380,9 +375,6 @@ _bo_set_cache_state(tbm_bufmgr_nexell bufmgr_nexell, tbm_bo_nexell bo_nexell, in
        NEXELL_RETURN_VAL_IF_FAIL(bufmgr_nexell != NULL, 0);
        NEXELL_RETURN_VAL_IF_FAIL(bo_nexell != NULL, 0);
 
-       if (bufmgr_nexell->use_dma_fence)
-               return 1;
-
        char need_flush = 0;
        unsigned short cntFlush = 0;
 
@@ -448,9 +440,6 @@ _bo_save_cache_state(tbm_bufmgr_nexell bufmgr_nexell, tbm_bo_nexell bo_nexell)
        NEXELL_RETURN_VAL_IF_FAIL(bufmgr_nexell != NULL, 0);
        NEXELL_RETURN_VAL_IF_FAIL(bo_nexell != NULL, 0);
 
-       if (bufmgr_nexell->use_dma_fence)
-               return 1;
-
        unsigned short cntFlush = 0;
 
        /* get global cache flush count */
@@ -472,9 +461,6 @@ _bo_destroy_cache_state(tbm_bufmgr_nexell bufmgr_nexell, tbm_bo_nexell bo_nexell
        NEXELL_RETURN_IF_FAIL(bufmgr_nexell != NULL);
        NEXELL_RETURN_IF_FAIL(bo_nexell != NULL);
 
-       if (bufmgr_nexell->use_dma_fence)
-               return ;
-
        _tgl_destroy(bufmgr_nexell->tgl_fd, bo_nexell->name);
 #endif
 }
@@ -485,9 +471,6 @@ _bufmgr_init_cache_state(tbm_bufmgr_nexell bufmgr_nexell)
 #ifdef ENABLE_CACHECRTL
        NEXELL_RETURN_IF_FAIL(bufmgr_nexell != NULL);
 
-       if (bufmgr_nexell->use_dma_fence)
-               return 1;
-
        /* open tgl fd for saving cache flush data */
        bufmgr_nexell->tgl_fd = open(tgl_devfile, O_RDWR);
 
@@ -522,9 +505,6 @@ _bufmgr_deinit_cache_state(tbm_bufmgr_nexell bufmgr_nexell)
 #ifdef ENABLE_CACHECRTL
        NEXELL_RETURN_IF_FAIL(bufmgr_nexell != NULL);
 
-       if (bufmgr_nexell->use_dma_fence)
-               return;
-
        if (bufmgr_nexell->tgl_fd >= 0)
                close(bufmgr_nexell->tgl_fd);
 #endif
@@ -1913,21 +1893,6 @@ init_tbm_bufmgr_priv(tbm_bufmgr bufmgr, int fd)
                }
        }
 
-#ifdef USE_DMA_FD
-       //Check if the tbm manager supports dma fence or not.
-       int fp = open("/sys/module/dmabuf_sync/parameters/enabled", O_RDONLY);
-       int length;
-       char buf[1];
-       if (fp != -1) {
-               length = read(fp, buf, 1);
-
-               if (length == 1 && buf[0] == '1')
-                       bufmgr_nexell->use_dma_fence = 1;
-
-               close(fp);
-       }
-#endif
-
        if (!_bufmgr_init_cache_state(bufmgr_nexell)) {
                TBM_NEXELL_LOG("[libtbm-nexell:%d] error: init bufmgr cache state failed!\n", getpid());