forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-04 1543e317f1da31b75942316931e8f491a8920811
kernel/drivers/gpu/arm/bifrost/ipa/backend/mali_kbase_ipa_counter_common_jm.h
....@@ -1,7 +1,7 @@
11 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
22 /*
33 *
4
- * (C) COPYRIGHT 2017-2018, 2020-2021 ARM Limited. All rights reserved.
4
+ * (C) COPYRIGHT 2017-2018, 2020-2022 ARM Limited. All rights reserved.
55 *
66 * This program is free software and is provided to you under the terms of the
77 * GNU General Public License version 2 as published by the Free Software
....@@ -23,14 +23,14 @@
2323 #define _KBASE_IPA_COUNTER_COMMON_JM_H_
2424
2525 #include "mali_kbase.h"
26
-#include "mali_kbase_hwcnt_virtualizer.h"
27
-#include "mali_kbase_hwcnt_types.h"
26
+#include "hwcnt/mali_kbase_hwcnt_virtualizer.h"
27
+#include "hwcnt/mali_kbase_hwcnt_types.h"
2828
2929 /* Maximum number of IPA groups for an IPA model. */
3030 #define KBASE_IPA_MAX_GROUP_DEF_NUM 16
3131
3232 /* Number of bytes per hardware counter in a vinstr_buffer. */
33
-#define KBASE_IPA_NR_BYTES_PER_CNT 4
33
+#define KBASE_IPA_NR_BYTES_PER_CNT (sizeof(u64))
3434
3535 /* Number of hardware counters per block in a vinstr_buffer. */
3636 #define KBASE_IPA_NR_CNT_PER_BLOCK 64
....@@ -83,7 +83,7 @@
8383 };
8484
8585 /**
86
- * struct ipa_group - represents a single IPA group
86
+ * struct kbase_ipa_group - represents a single IPA group
8787 * @name: name of the IPA group
8888 * @default_value: default value of coefficient for IPA group.
8989 * Coefficients are interpreted as fractions where the
....@@ -94,7 +94,10 @@
9494 struct kbase_ipa_group {
9595 const char *name;
9696 s32 default_value;
97
- s64 (*op)(struct kbase_ipa_model_vinstr_data *, s32, u32);
97
+ s64 (*op)(
98
+ struct kbase_ipa_model_vinstr_data *model_data,
99
+ s32 coeff,
100
+ u32 counter_block_offset);
98101 u32 counter_block_offset;
99102 };
100103
....@@ -149,7 +152,7 @@
149152 s32 coeff, u32 counter);
150153
151154 /**
152
- * attach_vinstr() - attach a vinstr_buffer to an IPA model.
155
+ * kbase_ipa_attach_vinstr() - attach a vinstr_buffer to an IPA model.
153156 * @model_data: pointer to model data
154157 *
155158 * Attach a vinstr_buffer to an IPA model. The vinstr_buffer
....@@ -161,7 +164,7 @@
161164 int kbase_ipa_attach_vinstr(struct kbase_ipa_model_vinstr_data *model_data);
162165
163166 /**
164
- * detach_vinstr() - detach a vinstr_buffer from an IPA model.
167
+ * kbase_ipa_detach_vinstr() - detach a vinstr_buffer from an IPA model.
165168 * @model_data: pointer to model data
166169 *
167170 * Detach a vinstr_buffer from an IPA model.