summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/tbm_bufmgr_dumb.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/tbm_bufmgr_dumb.c b/src/tbm_bufmgr_dumb.c
index 2a5b375..01705b1 100644
--- a/src/tbm_bufmgr_dumb.c
+++ b/src/tbm_bufmgr_dumb.c
@@ -1366,6 +1366,9 @@ init_tbm_bufmgr_priv(tbm_bufmgr bufmgr, int fd)
tbm_bufmgr_backend bufmgr_backend;
uint64_t cap = 0;
uint32_t ret;
+ int fp;
+ int length;
+ char buf[1];
if (!bufmgr)
return 0;
@@ -1411,9 +1414,7 @@ init_tbm_bufmgr_priv(tbm_bufmgr bufmgr, int fd)
bufmgr_dumb->hashBos = drmHashCreate();
//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];
+ fp = open("/sys/module/dmabuf_sync/parameters/enabled", O_RDONLY);
if (fp != -1) {
length = read(fp, buf, 1);