summaryrefslogtreecommitdiff
path: root/mali_kbase/mali_kbase_kinstr_prfcnt.h
diff options
context:
space:
mode:
Diffstat (limited to 'mali_kbase/mali_kbase_kinstr_prfcnt.h')
-rw-r--r--mali_kbase/mali_kbase_kinstr_prfcnt.h27
1 files changed, 20 insertions, 7 deletions
diff --git a/mali_kbase/mali_kbase_kinstr_prfcnt.h b/mali_kbase/mali_kbase_kinstr_prfcnt.h
index 53e9674..78ff74b 100644
--- a/mali_kbase/mali_kbase_kinstr_prfcnt.h
+++ b/mali_kbase/mali_kbase_kinstr_prfcnt.h
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
/*
*
- * (C) COPYRIGHT 2021-2022 ARM Limited. All rights reserved.
+ * (C) COPYRIGHT 2021-2023 ARM Limited. All rights reserved.
*
* This program is free software and is provided to you under the terms of the
* GNU General Public License version 2 as published by the Free Software
@@ -46,9 +46,8 @@ union kbase_ioctl_kinstr_prfcnt_setup;
*
* Return: 0 on success, else error code.
*/
-int kbase_kinstr_prfcnt_init(
- struct kbase_hwcnt_virtualizer *hvirt,
- struct kbase_kinstr_prfcnt_context **out_kinstr_ctx);
+int kbase_kinstr_prfcnt_init(struct kbase_hwcnt_virtualizer *hvirt,
+ struct kbase_kinstr_prfcnt_context **out_kinstr_ctx);
/**
* kbase_kinstr_prfcnt_term() - Terminate a kinstr_prfcnt context.
@@ -168,9 +167,8 @@ void kbasep_kinstr_prfcnt_client_destroy(struct kbase_kinstr_prfcnt_client *cli)
*
* Return: 0 on success, else error code.
*/
-int kbase_kinstr_prfcnt_enum_info(
- struct kbase_kinstr_prfcnt_context *kinstr_ctx,
- struct kbase_ioctl_kinstr_prfcnt_enum_info *enum_info);
+int kbase_kinstr_prfcnt_enum_info(struct kbase_kinstr_prfcnt_context *kinstr_ctx,
+ struct kbase_ioctl_kinstr_prfcnt_enum_info *enum_info);
/**
* kbase_kinstr_prfcnt_setup() - Set up a new hardware counter reader client.
@@ -186,4 +184,19 @@ int kbase_kinstr_prfcnt_enum_info(
int kbase_kinstr_prfcnt_setup(struct kbase_kinstr_prfcnt_context *kinstr_ctx,
union kbase_ioctl_kinstr_prfcnt_setup *setup);
+/**
+ * kbasep_kinstr_populate_prfcnt_enum_list() - Populate the enumeration output list.
+ * @metadata: Hardware counter metadata
+ * @item_array: Pointer to a pre-allocated array for populating the enumeration items
+ * @array_size: The array size of the item_array. Must match the corresponding metadata
+ * enumeration number of items.
+ *
+ * The function converts the configured hardware counter metadata into perfcnt enumeration
+ * items and populate them into the supplied recipient array.
+ *
+ * Return: 0 on success, else -EINVAL on misconfigured input fields or mismatched array length.
+ */
+int kbasep_kinstr_populate_prfcnt_enum_list(const struct kbase_hwcnt_metadata *metadata,
+ struct prfcnt_enum_item *item_array, size_t array_size);
+
#endif /* _KBASE_KINSTR_PRFCNT_H_ */