_tbm_backend_load_hal_tbm(tbm_module *module)
{
hal_tbm_backend *hal_backend = NULL;
- hal_tbm_bufmgr_capability capability;
hal_tbm_bufmgr *hal_bufmgr;
hal_tbm_error ret = HAL_TBM_ERROR_NONE;
hal_tbm_fd auth_drm_fd = -1;
tbm_drm_helper_set_fd(auth_drm_fd);
}
- capability = hal_tbm_bufmgr_get_capabilities(hal_bufmgr, &ret);
- if (ret != HAL_TBM_ERROR_NONE) {
- TBM_ERR("hal_tbm_bufmgr_get_capabilities fail.");
- goto get_backend_fail;
- }
-
- if (capability == HAL_TBM_BUFMGR_CAPABILITY_NONE) {
- TBM_ERR("The capabilities of the backend module is TBM_BUFMGR_CAPABILITY_NONE.");
- TBM_ERR("TBM_BUFMGR_CAPABILITY_SHARE_FD is the essential capability.");
- goto get_backend_fail;
- }
- if (!(capability & HAL_TBM_BUFMGR_CAPABILITY_SHARE_FD)) {
- TBM_ERR("The capabilities of the backend module had no TBM_BUFMGR_CAPABILITY_SHARE_FD.");
- TBM_ERR("The tbm backend has to get TBM_BUFMGR_CAPABILITY_SHARE_FD. ");
- goto get_backend_fail;
- }
-
- module->bufmgr->capabilities = capability;
-
module->hal_backend = hal_backend;
module->hal_bufmgr = hal_bufmgr;
goto err;
}
- /* get the capability */
- module->bufmgr->capabilities = module->bufmgr->bufmgr_func->bufmgr_get_capabilities(bufmgr_data, &error);
- if (module->bufmgr->capabilities == TBM_BUFMGR_CAPABILITY_NONE) {
- TBM_ERR("The capabilities of the backend module is TBM_BUFMGR_CAPABILITY_NONE.");
- TBM_ERR("TBM_BUFMGR_CAPABILITY_SHARE_FD is the essential capability.");
- goto err;
- }
-
- if (!(module->bufmgr->capabilities & TBM_BUFMGR_CAPABILITY_SHARE_FD)) {
- TBM_ERR("The capabilities of the backend module had no TBM_BUFMGR_CAPABILITY_SHARE_FD.");
- TBM_ERR("The tbm backend has to get TBM_BUFMGR_CAPABILITY_SHARE_FD. ");
- goto err;
- }
-
module->module_data = module_data;
module->backend_module_data = backend_module_data;
module->bufmgr_data = bufmgr_data;