From bd8eda43700d4789a42881c5483544a4b403c4a6 Mon Sep 17 00:00:00 2001 From: Jack Diver Date: Thu, 30 Mar 2023 16:10:44 +0000 Subject: mali_kbase: platform: mgm: Get accurate SLC partition size Use mgm_resize_callback to update memory group size. Add entry point allowing memory group size to be queried. Bug: 264990406 Test: Boot to home Test: gfx-bench mh3.1 Change-Id: I80f595724c7418b97e07679719d2b76e4ee7b96f Signed-off-by: Jack Diver --- .../platform/pixel/pixel_memory_group_manager.h | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'common') diff --git a/common/include/uapi/gpu/arm/midgard/platform/pixel/pixel_memory_group_manager.h b/common/include/uapi/gpu/arm/midgard/platform/pixel/pixel_memory_group_manager.h index 83fa76d..8259516 100644 --- a/common/include/uapi/gpu/arm/midgard/platform/pixel/pixel_memory_group_manager.h +++ b/common/include/uapi/gpu/arm/midgard/platform/pixel/pixel_memory_group_manager.h @@ -27,17 +27,26 @@ enum pixel_mgm_group_id MGM_IMPORTED_MEMORY_GROUP_ID = (MEMORY_GROUP_MANAGER_NR_GROUPS - 1), }; +/** + * pixel_mgm_query_group_size - Query the current size of a memory group + * + * @mgm_dev: The memory group manager through which the request is being made. + * @group_id: Memory group to query. + * + * Returns the actual size of the memory group's active partition + */ +extern u64 pixel_mgm_query_group_size(struct memory_group_manager_device* mgm_dev, + enum pixel_mgm_group_id group_id); + /** * pixel_mgm_resize_group_to_fit - Resize a memory group to meet @demand, if possible * * @mgm_dev: The memory group manager through which the request is being made. * @group_id: Memory group for which we will change the backing partition. * @demand: The demanded space from the memory group. - * - * Returns the actual size of the memory group after resizing */ -extern u64 pixel_mgm_resize_group_to_fit(struct memory_group_manager_device* mgm_dev, - enum pixel_mgm_group_id group_id, - u64 demand); +extern void pixel_mgm_resize_group_to_fit(struct memory_group_manager_device* mgm_dev, + enum pixel_mgm_group_id group_id, + u64 demand); #endif /* _UAPI_PIXEL_MEMORY_GROUP_MANAGER_H_ */ -- cgit v1.2.3