tbm_bufmgr: use tbm_module_bufmgr_get_capabilities
[platform/core/uifw/libtbm.git] / src / tbm_module.c
index fe90662..10e7eff 100644 (file)
@@ -91,7 +91,6 @@ static int
 _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;
@@ -138,25 +137,6 @@ _tbm_backend_load_hal_tbm(tbm_module *module)
                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;
 
@@ -318,20 +298,6 @@ _tbm_backend_load_module(tbm_module *module, const char *file)
                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;