.. | .. |
---|
1 | 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ |
---|
2 | 2 | /* |
---|
3 | 3 | * |
---|
4 | | - * (C) COPYRIGHT 2014-2015, 2018-2021 ARM Limited. All rights reserved. |
---|
| 4 | + * (C) COPYRIGHT 2014-2015, 2018-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 |
---|
.. | .. |
---|
37 | 37 | /* Functions common to all HW access backends */ |
---|
38 | 38 | |
---|
39 | 39 | /** |
---|
40 | | - * Initialize the power management framework. |
---|
41 | | - * |
---|
42 | | - * Must be called before any other power management function |
---|
| 40 | + * kbase_hwaccess_pm_init - Initialize the power management framework. |
---|
43 | 41 | * |
---|
44 | 42 | * @kbdev: The kbase device structure for the device (must be a valid pointer) |
---|
| 43 | + * |
---|
| 44 | + * Must be called before any other power management function |
---|
45 | 45 | * |
---|
46 | 46 | * Return: 0 if the power management framework was successfully initialized. |
---|
47 | 47 | */ |
---|
48 | 48 | int kbase_hwaccess_pm_init(struct kbase_device *kbdev); |
---|
49 | 49 | |
---|
50 | 50 | /** |
---|
51 | | - * Terminate the power management framework. |
---|
52 | | - * |
---|
53 | | - * No power management functions may be called after this |
---|
| 51 | + * kbase_hwaccess_pm_term - Terminate the power management framework. |
---|
54 | 52 | * |
---|
55 | 53 | * @kbdev: The kbase device structure for the device (must be a valid pointer) |
---|
| 54 | + * |
---|
| 55 | + * No power management functions may be called after this |
---|
56 | 56 | */ |
---|
57 | 57 | void kbase_hwaccess_pm_term(struct kbase_device *kbdev); |
---|
58 | 58 | |
---|
.. | .. |
---|
70 | 70 | unsigned int flags); |
---|
71 | 71 | |
---|
72 | 72 | /** |
---|
73 | | - * Halt the power management framework. |
---|
| 73 | + * kbase_hwaccess_pm_halt - Halt the power management framework. |
---|
| 74 | + * |
---|
| 75 | + * @kbdev: The kbase device structure for the device (must be a valid pointer) |
---|
74 | 76 | * |
---|
75 | 77 | * Should ensure that no new interrupts are generated, but allow any currently |
---|
76 | 78 | * running interrupt handlers to complete successfully. The GPU is forced off by |
---|
77 | 79 | * the time this function returns, regardless of whether or not the active power |
---|
78 | 80 | * policy asks for the GPU to be powered off. |
---|
79 | | - * |
---|
80 | | - * @kbdev: The kbase device structure for the device (must be a valid pointer) |
---|
81 | 81 | */ |
---|
82 | 82 | void kbase_hwaccess_pm_halt(struct kbase_device *kbdev); |
---|
83 | 83 | |
---|
84 | 84 | /** |
---|
85 | | - * Perform any backend-specific actions to suspend the GPU |
---|
| 85 | + * kbase_hwaccess_pm_suspend - Perform any backend-specific actions to suspend the GPU |
---|
86 | 86 | * |
---|
87 | 87 | * @kbdev: The kbase device structure for the device (must be a valid pointer) |
---|
| 88 | + * |
---|
| 89 | + * Return: 0 if suspend was successful. |
---|
88 | 90 | */ |
---|
89 | | -void kbase_hwaccess_pm_suspend(struct kbase_device *kbdev); |
---|
| 91 | +int kbase_hwaccess_pm_suspend(struct kbase_device *kbdev); |
---|
90 | 92 | |
---|
91 | 93 | /** |
---|
92 | | - * Perform any backend-specific actions to resume the GPU from a suspend |
---|
| 94 | + * kbase_hwaccess_pm_resume - Perform any backend-specific actions to resume the GPU |
---|
| 95 | + * from a suspend |
---|
93 | 96 | * |
---|
94 | 97 | * @kbdev: The kbase device structure for the device (must be a valid pointer) |
---|
95 | 98 | */ |
---|
96 | 99 | void kbase_hwaccess_pm_resume(struct kbase_device *kbdev); |
---|
97 | 100 | |
---|
98 | 101 | /** |
---|
99 | | - * Perform any required actions for activating the GPU. Called when the first |
---|
100 | | - * context goes active. |
---|
| 102 | + * kbase_hwaccess_pm_gpu_active - Perform any required actions for activating the GPU. |
---|
| 103 | + * Called when the first context goes active. |
---|
101 | 104 | * |
---|
102 | 105 | * @kbdev: The kbase device structure for the device (must be a valid pointer) |
---|
103 | 106 | */ |
---|
104 | 107 | void kbase_hwaccess_pm_gpu_active(struct kbase_device *kbdev); |
---|
105 | 108 | |
---|
106 | 109 | /** |
---|
107 | | - * Perform any required actions for idling the GPU. Called when the last |
---|
108 | | - * context goes idle. |
---|
| 110 | + * kbase_hwaccess_pm_gpu_idle - Perform any required actions for idling the GPU. |
---|
| 111 | + * Called when the last context goes idle. |
---|
109 | 112 | * |
---|
110 | 113 | * @kbdev: The kbase device structure for the device (must be a valid pointer) |
---|
111 | 114 | */ |
---|
.. | .. |
---|
113 | 116 | |
---|
114 | 117 | #if MALI_USE_CSF |
---|
115 | 118 | /** |
---|
116 | | - * Set the debug core mask. |
---|
117 | | - * |
---|
118 | | - * This determines which cores the power manager is allowed to use. |
---|
| 119 | + * kbase_pm_set_debug_core_mask - Set the debug core mask. |
---|
119 | 120 | * |
---|
120 | 121 | * @kbdev: The kbase device structure for the device (must be a valid pointer) |
---|
121 | 122 | * @new_core_mask: The core mask to use |
---|
| 123 | + * |
---|
| 124 | + * This determines which cores the power manager is allowed to use. |
---|
122 | 125 | */ |
---|
123 | 126 | void kbase_pm_set_debug_core_mask(struct kbase_device *kbdev, |
---|
124 | 127 | u64 new_core_mask); |
---|
125 | 128 | #else |
---|
126 | 129 | /** |
---|
127 | | - * Set the debug core mask. |
---|
128 | | - * |
---|
129 | | - * This determines which cores the power manager is allowed to use. |
---|
| 130 | + * kbase_pm_set_debug_core_mask - Set the debug core mask. |
---|
130 | 131 | * |
---|
131 | 132 | * @kbdev: The kbase device structure for the device (must be a valid pointer) |
---|
132 | 133 | * @new_core_mask_js0: The core mask to use for job slot 0 |
---|
133 | 134 | * @new_core_mask_js1: The core mask to use for job slot 1 |
---|
134 | 135 | * @new_core_mask_js2: The core mask to use for job slot 2 |
---|
| 136 | + * |
---|
| 137 | + * This determines which cores the power manager is allowed to use. |
---|
135 | 138 | */ |
---|
136 | 139 | void kbase_pm_set_debug_core_mask(struct kbase_device *kbdev, |
---|
137 | 140 | u64 new_core_mask_js0, u64 new_core_mask_js1, |
---|
.. | .. |
---|
139 | 142 | #endif /* MALI_USE_CSF */ |
---|
140 | 143 | |
---|
141 | 144 | /** |
---|
142 | | - * Get the current policy. |
---|
143 | | - * |
---|
144 | | - * Returns the policy that is currently active. |
---|
| 145 | + * kbase_pm_ca_get_policy - Get the current policy. |
---|
145 | 146 | * |
---|
146 | 147 | * @kbdev: The kbase device structure for the device (must be a valid pointer) |
---|
147 | 148 | * |
---|
148 | | - * @return The current policy |
---|
| 149 | + * Returns the policy that is currently active. |
---|
| 150 | + * |
---|
| 151 | + * Return: The current policy |
---|
149 | 152 | */ |
---|
150 | 153 | const struct kbase_pm_ca_policy |
---|
151 | 154 | *kbase_pm_ca_get_policy(struct kbase_device *kbdev); |
---|
152 | 155 | |
---|
153 | 156 | /** |
---|
154 | | - * Change the policy to the one specified. |
---|
| 157 | + * kbase_pm_ca_set_policy - Change the policy to the one specified. |
---|
155 | 158 | * |
---|
156 | 159 | * @kbdev: The kbase device structure for the device (must be a valid pointer) |
---|
157 | 160 | * @policy: The policy to change to (valid pointer returned from |
---|
.. | .. |
---|
161 | 164 | const struct kbase_pm_ca_policy *policy); |
---|
162 | 165 | |
---|
163 | 166 | /** |
---|
164 | | - * Retrieve a static list of the available policies. |
---|
| 167 | + * kbase_pm_ca_list_policies - Retrieve a static list of the available policies. |
---|
165 | 168 | * |
---|
166 | 169 | * @policies: An array pointer to take the list of policies. This may be NULL. |
---|
167 | 170 | * The contents of this array must not be modified. |
---|
168 | 171 | * |
---|
169 | | - * @return The number of policies |
---|
| 172 | + * Return: The number of policies |
---|
170 | 173 | */ |
---|
171 | 174 | int |
---|
172 | 175 | kbase_pm_ca_list_policies(const struct kbase_pm_ca_policy * const **policies); |
---|
173 | 176 | |
---|
174 | 177 | /** |
---|
175 | | - * Get the current policy. |
---|
176 | | - * |
---|
177 | | - * Returns the policy that is currently active. |
---|
| 178 | + * kbase_pm_get_policy - Get the current policy. |
---|
178 | 179 | * |
---|
179 | 180 | * @kbdev: The kbase device structure for the device (must be a valid pointer) |
---|
180 | 181 | * |
---|
181 | | - * @return The current policy |
---|
| 182 | + * Returns the policy that is currently active. |
---|
| 183 | + * |
---|
| 184 | + * Return: The current policy |
---|
182 | 185 | */ |
---|
183 | 186 | const struct kbase_pm_policy *kbase_pm_get_policy(struct kbase_device *kbdev); |
---|
184 | 187 | |
---|
185 | 188 | /** |
---|
186 | | - * Change the policy to the one specified. |
---|
| 189 | + * kbase_pm_set_policy - Change the policy to the one specified. |
---|
187 | 190 | * |
---|
188 | 191 | * @kbdev: The kbase device structure for the device (must be a valid |
---|
189 | 192 | * pointer) |
---|
.. | .. |
---|
206 | 209 | const struct kbase_pm_policy * const **list); |
---|
207 | 210 | |
---|
208 | 211 | /** |
---|
209 | | - * kbase_protected_most_enable - Enable protected mode |
---|
| 212 | + * kbase_pm_protected_mode_enable() - Enable protected mode |
---|
210 | 213 | * |
---|
211 | 214 | * @kbdev: Address of the instance of a GPU platform device. |
---|
212 | 215 | * |
---|
.. | .. |
---|
215 | 218 | int kbase_pm_protected_mode_enable(struct kbase_device *kbdev); |
---|
216 | 219 | |
---|
217 | 220 | /** |
---|
218 | | - * kbase_protected_mode_disable - Disable protected mode |
---|
| 221 | + * kbase_pm_protected_mode_disable() - Disable protected mode |
---|
219 | 222 | * |
---|
220 | 223 | * @kbdev: Address of the instance of a GPU platform device. |
---|
221 | 224 | * |
---|