At hal_tbm, the backend consider if this tbm_bo is the tiled memory or not with hal_tbm_bo_memory_type.
Therefore, remove the use of hal_tbm_bufmgr_alloc_bo_with_tiled_format api. This api is deprecated at hal tbm.
Change-Id: I86a7561845312a0a5fccfddf9fce9ca39593a50c
/* LCOV_EXCL_START */
tbm_bo
tbm_bo_alloc_with_format(tbm_bufmgr bufmgr, int format, int bo_idx, int width,
- int height, tbm_bo_memory_type flags, tbm_error_e *error)
+ int height, int bpp, tbm_bo_memory_type flags, tbm_error_e *error)
{
tbm_bo bo;
tbm_backend_bo_data *bo_data;
if (bufmgr->use_hal_tbm) {
hal_tbm_error ret;
bo_data = (tbm_backend_bo_data *)hal_tbm_bufmgr_alloc_bo_with_format(bufmgr->hal_bufmgr,
- format, bo_idx, width, height, (hal_tbm_bo_memory_type)flags, &ret);
+ format, bo_idx, width, height, bpp, (hal_tbm_bo_memory_type)flags, &ret);
if (error)
*error = (tbm_error_e)ret;
if (ret != HAL_TBM_ERROR_NONE) {
if (bufmgr->use_hal_tbm) {
hal_tbm_error ret;
- bo_data = (tbm_backend_bo_data *)hal_tbm_bufmgr_alloc_bo_with_tiled_format(bufmgr->hal_bufmgr,
+ bo_data = (tbm_backend_bo_data *)hal_tbm_bufmgr_alloc_bo_with_format(bufmgr->hal_bufmgr,
width, height, bpp, format, (hal_tbm_bo_memory_type)flags, bo_idx, &ret);
if (error)
*error = (tbm_error_e)ret;
void _tbm_bufmgr_mutex_lock(void);
void _tbm_bufmgr_mutex_unlock(void);
-tbm_bo tbm_bo_alloc_with_format(tbm_bufmgr bufmgr, int format, int bo_idx, int width,
+tbm_bo tbm_bo_alloc_with_format(tbm_bufmgr bufmgr, int format, int bo_idx, int width, int bpp,
int height, tbm_bo_memory_type flags, tbm_error_e *error);
tbm_bo tbm_bo_alloc_with_tiled_format(tbm_bufmgr bufmgr, int width, int height, int bpp, int format,
tbm_bo_memory_type flags, int bo_idx, tbm_error_e *error);
}
if (bufmgr->use_hal_tbm) {
- surf->bos[i] = tbm_bo_alloc_with_format(bufmgr, format, i, width, height, flags, &error);
+ 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) {
- if (flags & TBM_BO_TILED) {
- surf->bos[i] = tbm_bo_alloc_with_tiled_format(bufmgr, width, height, surf->info.bpp/8, format, flags, i, &error);
- if (error == TBM_ERROR_NOT_SUPPORTED) {
- surf->bos[i] = tbm_bo_alloc(bufmgr, bo_size, flags);
- } else if (error != TBM_ERROR_NONE) {
- TBM_ERR("fail to alloc bo idx:%d\n", i);
- goto alloc_bo_fail;
- }
- } else {
- surf->bos[i] = tbm_bo_alloc(bufmgr, bo_size, flags);
- }
-
- if (!surf->bos[i]) {
+ if (error != TBM_ERROR_NONE) {
TBM_ERR("fail to alloc bo idx:%d\n", i);
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, flags, &error);
+ 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);
goto alloc_bo_fail;