The tbm_modlue does not have a dependency of tbm_bufmgr anymore.
Remove all tbm_bufmgr variables at tbm_module.
Change-Id: Ia8be69be53aaaac2985e820b368d265fa32f7149
}
/* 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);
// 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) {
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) */
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);
/* LCOV_EXCL_STOP */
tbm_module *
-tbm_module_load(tbm_bufmgr bufmgr, int fd)
+tbm_module_load(int fd)
{
tbm_module *module;
struct dirent **namelist;
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);
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);
break;
}
- module->bufmgr = NULL;
-
free(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;
}