.. | .. |
---|
1 | 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ |
---|
2 | 2 | /* |
---|
3 | 3 | * |
---|
4 | | - * (C) COPYRIGHT 2011-2016, 2018-2021 ARM Limited. All rights reserved. |
---|
| 4 | + * (C) COPYRIGHT 2011-2016, 2018-2023 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 |
---|
.. | .. |
---|
34 | 34 | #include <device/mali_kbase_device.h> |
---|
35 | 35 | |
---|
36 | 36 | /** |
---|
37 | | - * kbase_job_submit_nolock() - Submit a job to a certain job-slot |
---|
38 | | - * @kbdev: Device pointer |
---|
39 | | - * @katom: Atom to submit |
---|
40 | | - * @js: Job slot to submit on |
---|
41 | | - * |
---|
42 | | - * The caller must check kbasep_jm_is_submit_slots_free() != false before |
---|
43 | | - * calling this. |
---|
44 | | - * |
---|
45 | | - * The following locking conditions are made on the caller: |
---|
46 | | - * - it must hold the hwaccess_lock |
---|
47 | | - */ |
---|
48 | | -void kbase_job_submit_nolock(struct kbase_device *kbdev, |
---|
49 | | - struct kbase_jd_atom *katom, int js); |
---|
50 | | - |
---|
51 | | -/** |
---|
52 | 37 | * kbase_job_done_slot() - Complete the head job on a particular job-slot |
---|
53 | 38 | * @kbdev: Device pointer |
---|
54 | 39 | * @s: Job slot |
---|
.. | .. |
---|
60 | 45 | u64 job_tail, ktime_t *end_timestamp); |
---|
61 | 46 | |
---|
62 | 47 | #if IS_ENABLED(CONFIG_GPU_TRACEPOINTS) |
---|
63 | | -static inline char *kbasep_make_job_slot_string(int js, char *js_string, |
---|
64 | | - size_t js_size) |
---|
| 48 | +static inline char *kbasep_make_job_slot_string(unsigned int js, char *js_string, size_t js_size) |
---|
65 | 49 | { |
---|
66 | | - snprintf(js_string, js_size, "job_slot_%i", js); |
---|
| 50 | + snprintf(js_string, js_size, "job_slot_%u", js); |
---|
67 | 51 | return js_string; |
---|
68 | 52 | } |
---|
69 | 53 | #endif |
---|
70 | | - |
---|
71 | | -#if !MALI_USE_CSF |
---|
72 | | -static inline int kbasep_jm_is_js_free(struct kbase_device *kbdev, int js, |
---|
73 | | - struct kbase_context *kctx) |
---|
74 | | -{ |
---|
75 | | - return !kbase_reg_read(kbdev, JOB_SLOT_REG(js, JS_COMMAND_NEXT)); |
---|
76 | | -} |
---|
77 | | -#endif |
---|
78 | | - |
---|
79 | 54 | |
---|
80 | 55 | /** |
---|
81 | 56 | * kbase_job_hw_submit() - Submit a job to the GPU |
---|
.. | .. |
---|
88 | 63 | * |
---|
89 | 64 | * The following locking conditions are made on the caller: |
---|
90 | 65 | * - it must hold the hwaccess_lock |
---|
| 66 | + * |
---|
| 67 | + * Return: 0 if the job was successfully submitted to hardware, an error otherwise. |
---|
91 | 68 | */ |
---|
92 | | -void kbase_job_hw_submit(struct kbase_device *kbdev, |
---|
93 | | - struct kbase_jd_atom *katom, |
---|
94 | | - int js); |
---|
| 69 | +int kbase_job_hw_submit(struct kbase_device *kbdev, struct kbase_jd_atom *katom, unsigned int js); |
---|
95 | 70 | |
---|
96 | 71 | #if !MALI_USE_CSF |
---|
97 | 72 | /** |
---|
.. | .. |
---|
107 | 82 | * The following locking conditions are made on the caller: |
---|
108 | 83 | * - it must hold the hwaccess_lock |
---|
109 | 84 | */ |
---|
110 | | -void kbasep_job_slot_soft_or_hard_stop_do_action(struct kbase_device *kbdev, |
---|
111 | | - int js, |
---|
112 | | - u32 action, |
---|
113 | | - base_jd_core_req core_reqs, |
---|
114 | | - struct kbase_jd_atom *target_katom); |
---|
| 85 | +void kbasep_job_slot_soft_or_hard_stop_do_action(struct kbase_device *kbdev, unsigned int js, |
---|
| 86 | + u32 action, base_jd_core_req core_reqs, |
---|
| 87 | + struct kbase_jd_atom *target_katom); |
---|
115 | 88 | #endif /* !MALI_USE_CSF */ |
---|
116 | 89 | |
---|
117 | 90 | /** |
---|
.. | .. |
---|
135 | 108 | * |
---|
136 | 109 | * Return: true if an atom was stopped, false otherwise |
---|
137 | 110 | */ |
---|
138 | | -bool kbase_backend_soft_hard_stop_slot(struct kbase_device *kbdev, |
---|
139 | | - struct kbase_context *kctx, |
---|
140 | | - int js, |
---|
141 | | - struct kbase_jd_atom *katom, |
---|
142 | | - u32 action); |
---|
| 111 | +bool kbase_backend_soft_hard_stop_slot(struct kbase_device *kbdev, struct kbase_context *kctx, |
---|
| 112 | + unsigned int js, struct kbase_jd_atom *katom, u32 action); |
---|
143 | 113 | |
---|
144 | 114 | /** |
---|
145 | 115 | * kbase_job_slot_init - Initialise job slot framework |
---|