From: SooChan Lim Date: Fri, 11 Jun 2021 00:45:40 +0000 (+0900) Subject: tbm_module: remove bufmgr variable at tbm_module X-Git-Tag: submit/tizen/20210611.072439~4 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Flibtbm.git;a=commitdiff_plain;h=2ca8ae589a48d5885f3fff2c075dac04e3f6cc0e tbm_module: remove bufmgr variable at tbm_module The tbm_modlue does not have a dependency of tbm_bufmgr anymore. Remove all tbm_bufmgr variables at tbm_module. Change-Id: Ia8be69be53aaaac2985e820b368d265fa32f7149 --- diff --git a/src/tbm_bufmgr.c b/src/tbm_bufmgr.c index ec13191..226ea25 100644 --- a/src/tbm_bufmgr.c +++ b/src/tbm_bufmgr.c @@ -268,7 +268,7 @@ _tbm_bufmgr_init(int fd, int server) } /* load bufmgr priv from env */ - gBufMgr->module = tbm_module_load(gBufMgr, gBufMgr->fd); + gBufMgr->module = tbm_module_load(gBufMgr->fd); if (!gBufMgr->module) { TBM_ERR("error : Fail to load bufmgr backend\n"); _tbm_set_last_result(TBM_ERROR_INVALID_OPERATION); @@ -822,7 +822,7 @@ tbm_bufmgr_bind_native_display(tbm_bufmgr bufmgr, void *native_display) // TODO: this duplication will be removed after refactoring tbm_module bufmgr->module->auth_wl_socket_created = 1; - bufmgr->module->bufmgr->auth_fd = fd; + bufmgr->module->auth_fd = fd; } } else if (bufmgr->backend_module_data) { if (!bufmgr->bufmgr_func->bufmgr_bind_native_display) { diff --git a/src/tbm_bufmgr_int.h b/src/tbm_bufmgr_int.h index fe9bc61..70957f8 100644 --- a/src/tbm_bufmgr_int.h +++ b/src/tbm_bufmgr_int.h @@ -179,7 +179,6 @@ typedef enum _tbm_module_type { typedef struct _tbm_module { tbm_module_type type; - tbm_bufmgr bufmgr; void *module_data; /* backend module */ tbm_bufmgr_backend backend; /* bufmgr backend (will be DEPRECATED) */ @@ -355,7 +354,7 @@ tbm_bo tbm_bo_alloc_with_surface(tbm_bufmgr bufmgr, int width, int height, int f tbm_bo tbm_bo_alloc_with_bo_data(tbm_bufmgr bufmgr, tbm_backend_bo_data *bo_data, int flags); /* tbm_module functions */ -tbm_module *tbm_module_load(tbm_bufmgr bufmgr, int fd); +tbm_module *tbm_module_load(int fd); void tbm_module_unload(tbm_module *module); int tbm_module_bufmgr_get_capabilities(tbm_module *module); diff --git a/src/tbm_module.c b/src/tbm_module.c index 2644f82..ae8e848 100644 --- a/src/tbm_module.c +++ b/src/tbm_module.c @@ -345,7 +345,7 @@ err: /* LCOV_EXCL_STOP */ tbm_module * -tbm_module_load(tbm_bufmgr bufmgr, int fd) +tbm_module_load(int fd) { tbm_module *module; struct dirent **namelist; @@ -356,7 +356,6 @@ tbm_module_load(tbm_bufmgr bufmgr, int fd) TBM_ERR("fail to allocate the memory"); return NULL; } - module->bufmgr = bufmgr; /* try to load the hal-tbm backend module */ ret = _tbm_backend_load_hal_tbm(module); @@ -379,7 +378,7 @@ tbm_module_load(tbm_bufmgr bufmgr, int fd) return module; } - /* load bufmgr priv from configured path */ + /* load backend_module from configured path */ n = scandir(BUFMGR_MODULE_DIR, &namelist, 0, alphasort); if (n < 0) { TBM_ERR("no files : %s\n", BUFMGR_MODULE_DIR); @@ -455,8 +454,6 @@ tbm_module_unload(tbm_module *module) break; } - module->bufmgr = NULL; - free(module); } @@ -482,7 +479,7 @@ tbm_module_bufmgr_get_capabilities(tbm_module *module) } if (error != TBM_ERROR_NONE) { - TBM_ERR("fail to get capabilities of bufmgr"); + TBM_ERR("fail to get capabilities of tbm_module_bufmgr"); return 0; }