From e32ee950de5bf6be9337623dd6d1a7eb2b8f55a6 Mon Sep 17 00:00:00 2001 From: SooChan Lim Date: Fri, 19 Mar 2021 10:37:51 +0900 Subject: [PATCH] add a bpp argument at hal_bufmgr_alloc_bo_with_format. The backend get to know a bpp at bufmgr_alloc_bo_with_format. Change-Id: Idce4875a62a78e6cc703a8f24dab79376e84bc8f --- include/hal-tbm-interface.h | 2 +- include/hal-tbm.h | 2 +- src/hal-api-tbm.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/hal-tbm-interface.h b/include/hal-tbm-interface.h index 883ee03..edd5e23 100644 --- a/include/hal-tbm-interface.h +++ b/include/hal-tbm-interface.h @@ -68,7 +68,7 @@ struct _hal_tbm_bufmgr_funcs { hal_tbm_error (*bufmgr_get_plane_data)(hal_tbm_bufmgr *bufmgr, hal_tbm_format format, int plane_idx, int width, int height, uint32_t *size, uint32_t *offset, uint32_t *pitch, int *bo_idx); hal_tbm_bo *(*bufmgr_alloc_bo)(hal_tbm_bufmgr *bufmgr, unsigned int size, hal_tbm_bo_memory_type mem_types, hal_tbm_error *error); - hal_tbm_bo *(*bufmgr_alloc_bo_with_format)(hal_tbm_bufmgr *bufmgr, int format, int bo_idx, int width, int height, + hal_tbm_bo *(*bufmgr_alloc_bo_with_format)(hal_tbm_bufmgr *bufmgr, int format, int bo_idx, int width, int height, int bpp, hal_tbm_bo_memory_type mem_types, hal_tbm_error *error); hal_tbm_bo *(*bufmgr_import_fd)(hal_tbm_bufmgr *bufmgr, hal_tbm_fd fd, hal_tbm_error *error); hal_tbm_bo *(*bufmgr_import_key)(hal_tbm_bufmgr *bufmgr, hal_tbm_key key, hal_tbm_error *error); diff --git a/include/hal-tbm.h b/include/hal-tbm.h index 07fe359..80e5cfc 100644 --- a/include/hal-tbm.h +++ b/include/hal-tbm.h @@ -56,7 +56,7 @@ hal_tbm_error hal_tbm_bufmgr_get_supported_formats(hal_tbm_bufmgr * hal_tbm_error hal_tbm_bufmgr_get_plane_data(hal_tbm_bufmgr *bufmgr, hal_tbm_format format, int plane_idx, int width, int height, uint32_t *size, uint32_t *offset, uint32_t *pitch, int *bo_idx); hal_tbm_bo *hal_tbm_bufmgr_alloc_bo(hal_tbm_bufmgr *bufmgr, unsigned int size, hal_tbm_bo_memory_type mem_types, hal_tbm_error *error); -hal_tbm_bo *hal_tbm_bufmgr_alloc_bo_with_format(hal_tbm_bufmgr *bufmgr, int format, int bo_idx, int width, int height, +hal_tbm_bo *hal_tbm_bufmgr_alloc_bo_with_format(hal_tbm_bufmgr *bufmgr, int format, int bo_idx, int width, int height, int bpp, hal_tbm_bo_memory_type mem_types, hal_tbm_error *error); hal_tbm_bo *hal_tbm_bufmgr_import_fd(hal_tbm_bufmgr *bufmgr, hal_tbm_fd fd, hal_tbm_error *error); hal_tbm_bo *hal_tbm_bufmgr_import_key(hal_tbm_bufmgr *bufmgr, hal_tbm_key key, hal_tbm_error *error); diff --git a/src/hal-api-tbm.c b/src/hal-api-tbm.c index 30c2681..b2cc49c 100644 --- a/src/hal-api-tbm.c +++ b/src/hal-api-tbm.c @@ -294,12 +294,12 @@ hal_tbm_bufmgr_alloc_bo(hal_tbm_bufmgr *bufmgr, unsigned int size, hal_tbm_bo_me } EXTERN hal_tbm_bo * -hal_tbm_bufmgr_alloc_bo_with_format(hal_tbm_bufmgr *bufmgr, int format, int bo_idx, int width, int height, +hal_tbm_bufmgr_alloc_bo_with_format(hal_tbm_bufmgr *bufmgr, int format, int bo_idx, int width, int height, int bpp, hal_tbm_bo_memory_type mem_types, hal_tbm_error *error) { BUFMGR_FUNC_ENTRY_NULL(bufmgr_alloc_bo_with_format); - return bufmgr_funcs->bufmgr_alloc_bo_with_format((hal_tbm_bufmgr *)bufmgr, format, bo_idx, width, height, mem_types, error); + return bufmgr_funcs->bufmgr_alloc_bo_with_format((hal_tbm_bufmgr *)bufmgr, format, bo_idx, width, height, bpp, mem_types, error); } EXTERN hal_tbm_bo * -- 2.7.4