- if (bufmgr->use_hal_tbm) {
- surf->bos[i] = tbm_bo_alloc_with_format(bufmgr, format, i, width, height, surf->info.bpp/8, flags, error);
- if (*error == TBM_ERROR_NOT_SUPPORTED) {
- surf->bos[i] = tbm_bo_alloc(bufmgr, bo_size, flags);
- if (!surf->bos[i]) {
- TBM_ERR("fail to alloc bo idx:%d\n", i);
- *error = tbm_get_last_error();
- goto alloc_bo_fail;
- }
- }
- } else if (bufmgr->backend_module_data) {
- if (bufmgr->bufmgr_func->bufmgr_alloc_bo_with_format) {
- /* LCOV_EXCL_START */
- surf->bos[i] = tbm_bo_alloc_with_format(bufmgr, format, i, width, height, surf->info.bpp/8, flags, error);
- if (!surf->bos[i]) {
- TBM_ERR("fail to tbm_bo_alloc_with_format idx:%d\n", i);
- *error = tbm_get_last_error();
- goto alloc_bo_fail;
- }
- /* LCOV_EXCL_STOP */
- } else if (bufmgr->bufmgr_func->bufmgr_alloc_bo_with_tiled_format && (flags & TBM_BO_TILED)) {
- /* LCOV_EXCL_START */
- TBM_ERR("NOT SUPPORTED. idx:%d", i);
- *error = TBM_ERROR_NOT_SUPPORTED;
+ surf->bos[i] = tbm_bo_alloc_with_format(bufmgr, format, i, width, height, surf->info.bpp/8, flags, error);
+ if (!surf->bos[i]) {
+ surf->bos[i] = tbm_bo_alloc(bufmgr, bo_size, flags);
+ if (!surf->bos[i]) {
+ TBM_ERR("fail to alloc bo idx:%d\n", i);
+ *error = tbm_get_last_error();