add a bpp argument at hal_bufmgr_alloc_bo_with_format. 75/255475/1
authorSooChan Lim <sc1.lim@samsung.com>
Fri, 19 Mar 2021 01:37:51 +0000 (10:37 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Fri, 19 Mar 2021 01:37:51 +0000 (10:37 +0900)
The backend get to know a bpp at bufmgr_alloc_bo_with_format.

Change-Id: Idce4875a62a78e6cc703a8f24dab79376e84bc8f

include/hal-tbm-interface.h
include/hal-tbm.h
src/hal-api-tbm.c

index 883ee03..edd5e23 100644 (file)
@@ -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);
index 07fe359..80e5cfc 100644 (file)
@@ -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);
index 30c2681..b2cc49c 100644 (file)
@@ -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 *