.. | .. |
---|
1 | 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ |
---|
2 | 2 | /* |
---|
3 | 3 | * |
---|
4 | | - * (C) COPYRIGHT 2014-2021 ARM Limited. All rights reserved. |
---|
| 4 | + * (C) COPYRIGHT 2014-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 |
---|
.. | .. |
---|
97 | 97 | * Return: true if context is now active, false otherwise (ie if context does |
---|
98 | 98 | * not have an address space assigned) |
---|
99 | 99 | */ |
---|
100 | | -bool kbase_backend_use_ctx_sched(struct kbase_device *kbdev, |
---|
101 | | - struct kbase_context *kctx, int js); |
---|
| 100 | +bool kbase_backend_use_ctx_sched(struct kbase_device *kbdev, struct kbase_context *kctx, |
---|
| 101 | + unsigned int js); |
---|
102 | 102 | |
---|
103 | 103 | /** |
---|
104 | 104 | * kbase_backend_release_ctx_irq - Release a context from the GPU. This will |
---|
.. | .. |
---|
181 | 181 | * @kbdev: Device pointer |
---|
182 | 182 | * @js: Job slot to inspect |
---|
183 | 183 | * |
---|
184 | | - * Return : Atom currently at the head of slot @js, or NULL |
---|
| 184 | + * Return: Atom currently at the head of slot @js, or NULL |
---|
185 | 185 | */ |
---|
186 | | -struct kbase_jd_atom *kbase_backend_inspect_tail(struct kbase_device *kbdev, |
---|
187 | | - int js); |
---|
| 186 | +struct kbase_jd_atom *kbase_backend_inspect_tail(struct kbase_device *kbdev, unsigned int js); |
---|
188 | 187 | |
---|
189 | 188 | /** |
---|
190 | 189 | * kbase_backend_nr_atoms_on_slot() - Return the number of atoms currently on a |
---|
.. | .. |
---|
192 | 191 | * @kbdev: Device pointer |
---|
193 | 192 | * @js: Job slot to inspect |
---|
194 | 193 | * |
---|
195 | | - * Return : Number of atoms currently on slot |
---|
| 194 | + * Return: Number of atoms currently on slot |
---|
196 | 195 | */ |
---|
197 | | -int kbase_backend_nr_atoms_on_slot(struct kbase_device *kbdev, int js); |
---|
| 196 | +int kbase_backend_nr_atoms_on_slot(struct kbase_device *kbdev, unsigned int js); |
---|
198 | 197 | |
---|
199 | 198 | /** |
---|
200 | 199 | * kbase_backend_nr_atoms_submitted() - Return the number of atoms on a slot |
---|
.. | .. |
---|
202 | 201 | * @kbdev: Device pointer |
---|
203 | 202 | * @js: Job slot to inspect |
---|
204 | 203 | * |
---|
205 | | - * Return : Number of atoms currently on slot @js that are currently on the GPU. |
---|
| 204 | + * Return: Number of atoms currently on slot @js that are currently on the GPU. |
---|
206 | 205 | */ |
---|
207 | | -int kbase_backend_nr_atoms_submitted(struct kbase_device *kbdev, int js); |
---|
| 206 | +int kbase_backend_nr_atoms_submitted(struct kbase_device *kbdev, unsigned int js); |
---|
208 | 207 | |
---|
209 | 208 | /** |
---|
210 | 209 | * kbase_backend_ctx_count_changed() - Number of contexts ready to submit jobs |
---|
.. | .. |
---|
231 | 230 | * @kbdev: Device pointer |
---|
232 | 231 | * @js: Job slot to inspect |
---|
233 | 232 | * |
---|
234 | | - * Return : Number of jobs that can be submitted. |
---|
| 233 | + * Return: Number of jobs that can be submitted. |
---|
235 | 234 | */ |
---|
236 | | -int kbase_backend_slot_free(struct kbase_device *kbdev, int js); |
---|
| 235 | +int kbase_backend_slot_free(struct kbase_device *kbdev, unsigned int js); |
---|
237 | 236 | |
---|
238 | 237 | /** |
---|
239 | | - * kbase_job_check_enter_disjoint - potentially leave disjoint state |
---|
| 238 | + * kbase_job_check_leave_disjoint - potentially leave disjoint state |
---|
240 | 239 | * @kbdev: kbase device |
---|
241 | 240 | * @target_katom: atom which is finishing |
---|
242 | 241 | * |
---|
.. | .. |
---|
287 | 286 | * Context: |
---|
288 | 287 | * The job slot lock must be held when calling this function. |
---|
289 | 288 | */ |
---|
290 | | -void kbase_job_slot_hardstop(struct kbase_context *kctx, int js, |
---|
291 | | - struct kbase_jd_atom *target_katom); |
---|
| 289 | +void kbase_job_slot_hardstop(struct kbase_context *kctx, unsigned int js, |
---|
| 290 | + struct kbase_jd_atom *target_katom); |
---|
292 | 291 | |
---|
293 | 292 | /** |
---|
294 | 293 | * kbase_gpu_atoms_submitted_any() - Inspect whether there are any atoms |
---|
.. | .. |
---|
299 | 298 | */ |
---|
300 | 299 | bool kbase_gpu_atoms_submitted_any(struct kbase_device *kbdev); |
---|
301 | 300 | |
---|
| 301 | +/** |
---|
| 302 | + * kbase_backend_slot_kctx_purge_locked - Perform a purge on the slot_rb tracked |
---|
| 303 | + * kctx |
---|
| 304 | + * |
---|
| 305 | + * @kbdev: Device pointer |
---|
| 306 | + * @kctx: The kbase context that needs to be purged from slot_rb[] |
---|
| 307 | + * |
---|
| 308 | + * For JM GPUs, the L1 read only caches may need a start_flush invalidation, |
---|
| 309 | + * potentially on all slots (even if the kctx was only using a single slot), |
---|
| 310 | + * following a context termination or address-space ID recycle. This function |
---|
| 311 | + * performs a clean-up purge on the given kctx which if it has been tracked by |
---|
| 312 | + * slot_rb[] objects. |
---|
| 313 | + * |
---|
| 314 | + * Caller must hold kbase_device->hwaccess_lock. |
---|
| 315 | + */ |
---|
| 316 | +void kbase_backend_slot_kctx_purge_locked(struct kbase_device *kbdev, struct kbase_context *kctx); |
---|
| 317 | + |
---|
302 | 318 | #endif /* _KBASE_HWACCESS_JM_H_ */ |
---|