hc
2024-05-16 8d2a02b24d66aa359e83eebc1ed3c0f85367a1cb
kernel/drivers/gpu/arm/bifrost/backend/gpu/mali_kbase_jm_internal.h
....@@ -1,7 +1,7 @@
11 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
22 /*
33 *
4
- * (C) COPYRIGHT 2011-2016, 2018-2021 ARM Limited. All rights reserved.
4
+ * (C) COPYRIGHT 2011-2016, 2018-2023 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
....@@ -34,21 +34,6 @@
3434 #include <device/mali_kbase_device.h>
3535
3636 /**
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
-/**
5237 * kbase_job_done_slot() - Complete the head job on a particular job-slot
5338 * @kbdev: Device pointer
5439 * @s: Job slot
....@@ -60,22 +45,12 @@
6045 u64 job_tail, ktime_t *end_timestamp);
6146
6247 #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)
6549 {
66
- snprintf(js_string, js_size, "job_slot_%i", js);
50
+ snprintf(js_string, js_size, "job_slot_%u", js);
6751 return js_string;
6852 }
6953 #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
-
7954
8055 /**
8156 * kbase_job_hw_submit() - Submit a job to the GPU
....@@ -88,10 +63,10 @@
8863 *
8964 * The following locking conditions are made on the caller:
9065 * - it must hold the hwaccess_lock
66
+ *
67
+ * Return: 0 if the job was successfully submitted to hardware, an error otherwise.
9168 */
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);
9570
9671 #if !MALI_USE_CSF
9772 /**
....@@ -107,11 +82,9 @@
10782 * The following locking conditions are made on the caller:
10883 * - it must hold the hwaccess_lock
10984 */
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);
11588 #endif /* !MALI_USE_CSF */
11689
11790 /**
....@@ -135,11 +108,8 @@
135108 *
136109 * Return: true if an atom was stopped, false otherwise
137110 */
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);
143113
144114 /**
145115 * kbase_job_slot_init - Initialise job slot framework