| .. | .. |
|---|
| 1 | 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ |
|---|
| 2 | 2 | /* |
|---|
| 3 | 3 | * |
|---|
| 4 | | - * (C) COPYRIGHT 2017-2018, 2020-2021 ARM Limited. All rights reserved. |
|---|
| 4 | + * (C) COPYRIGHT 2017-2018, 2020-2022 ARM Limited. All rights reserved. |
|---|
| 5 | 5 | * |
|---|
| 6 | 6 | * This program is free software and is provided to you under the terms of the |
|---|
| 7 | 7 | * GNU General Public License version 2 as published by the Free Software |
|---|
| .. | .. |
|---|
| 23 | 23 | #define _KBASE_IPA_COUNTER_COMMON_JM_H_ |
|---|
| 24 | 24 | |
|---|
| 25 | 25 | #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" |
|---|
| 28 | 28 | |
|---|
| 29 | 29 | /* Maximum number of IPA groups for an IPA model. */ |
|---|
| 30 | 30 | #define KBASE_IPA_MAX_GROUP_DEF_NUM 16 |
|---|
| 31 | 31 | |
|---|
| 32 | 32 | /* 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)) |
|---|
| 34 | 34 | |
|---|
| 35 | 35 | /* Number of hardware counters per block in a vinstr_buffer. */ |
|---|
| 36 | 36 | #define KBASE_IPA_NR_CNT_PER_BLOCK 64 |
|---|
| .. | .. |
|---|
| 83 | 83 | }; |
|---|
| 84 | 84 | |
|---|
| 85 | 85 | /** |
|---|
| 86 | | - * struct ipa_group - represents a single IPA group |
|---|
| 86 | + * struct kbase_ipa_group - represents a single IPA group |
|---|
| 87 | 87 | * @name: name of the IPA group |
|---|
| 88 | 88 | * @default_value: default value of coefficient for IPA group. |
|---|
| 89 | 89 | * Coefficients are interpreted as fractions where the |
|---|
| .. | .. |
|---|
| 94 | 94 | struct kbase_ipa_group { |
|---|
| 95 | 95 | const char *name; |
|---|
| 96 | 96 | 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); |
|---|
| 98 | 101 | u32 counter_block_offset; |
|---|
| 99 | 102 | }; |
|---|
| 100 | 103 | |
|---|
| .. | .. |
|---|
| 149 | 152 | s32 coeff, u32 counter); |
|---|
| 150 | 153 | |
|---|
| 151 | 154 | /** |
|---|
| 152 | | - * attach_vinstr() - attach a vinstr_buffer to an IPA model. |
|---|
| 155 | + * kbase_ipa_attach_vinstr() - attach a vinstr_buffer to an IPA model. |
|---|
| 153 | 156 | * @model_data: pointer to model data |
|---|
| 154 | 157 | * |
|---|
| 155 | 158 | * Attach a vinstr_buffer to an IPA model. The vinstr_buffer |
|---|
| .. | .. |
|---|
| 161 | 164 | int kbase_ipa_attach_vinstr(struct kbase_ipa_model_vinstr_data *model_data); |
|---|
| 162 | 165 | |
|---|
| 163 | 166 | /** |
|---|
| 164 | | - * detach_vinstr() - detach a vinstr_buffer from an IPA model. |
|---|
| 167 | + * kbase_ipa_detach_vinstr() - detach a vinstr_buffer from an IPA model. |
|---|
| 165 | 168 | * @model_data: pointer to model data |
|---|
| 166 | 169 | * |
|---|
| 167 | 170 | * Detach a vinstr_buffer from an IPA model. |
|---|