hc
2023-12-06 08f87f769b595151be1afeff53e144f543faa614
kernel/drivers/gpu/arm/bifrost/tl/mali_kbase_tracepoints.h
....@@ -1,7 +1,7 @@
11 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
22 /*
33 *
4
- * (C) COPYRIGHT 2010-2021 ARM Limited. All rights reserved.
4
+ * (C) COPYRIGHT 2010-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
....@@ -20,7 +20,7 @@
2020 */
2121
2222 /*
23
- * THIS FILE IS AUTOGENERATED BY mali_trace_generator.py.
23
+ * THIS FILE IS AUTOGENERATED BY generate_tracepoints.py.
2424 * DO NOT EDIT.
2525 */
2626
....@@ -77,118 +77,138 @@
7777 #define TL_JS_EVENT_STOP GATOR_JOB_SLOT_STOP
7878 #define TL_JS_EVENT_SOFT_STOP GATOR_JOB_SLOT_SOFT_STOPPED
7979
80
-#define TLSTREAM_ENABLED (1 << 31)
80
+#define TLSTREAM_ENABLED (1u << 31)
8181
8282 void __kbase_tlstream_tl_new_ctx(
8383 struct kbase_tlstream *stream,
8484 const void *ctx,
8585 u32 ctx_nr,
86
- u32 tgid);
86
+ u32 tgid
87
+);
88
+
8789 void __kbase_tlstream_tl_new_gpu(
8890 struct kbase_tlstream *stream,
8991 const void *gpu,
9092 u32 gpu_id,
91
- u32 core_count);
93
+ u32 core_count
94
+);
95
+
9296 void __kbase_tlstream_tl_new_lpu(
9397 struct kbase_tlstream *stream,
9498 const void *lpu,
9599 u32 lpu_nr,
96
- u32 lpu_fn);
100
+ u32 lpu_fn
101
+);
102
+
97103 void __kbase_tlstream_tl_new_atom(
98104 struct kbase_tlstream *stream,
99105 const void *atom,
100
- u32 atom_nr);
106
+ u32 atom_nr
107
+);
108
+
101109 void __kbase_tlstream_tl_new_as(
102110 struct kbase_tlstream *stream,
103111 const void *address_space,
104
- u32 as_nr);
112
+ u32 as_nr
113
+);
114
+
105115 void __kbase_tlstream_tl_del_ctx(
106116 struct kbase_tlstream *stream,
107
- const void *ctx);
117
+ const void *ctx
118
+);
119
+
108120 void __kbase_tlstream_tl_del_atom(
109121 struct kbase_tlstream *stream,
110
- const void *atom);
122
+ const void *atom
123
+);
124
+
111125 void __kbase_tlstream_tl_lifelink_lpu_gpu(
112126 struct kbase_tlstream *stream,
113127 const void *lpu,
114
- const void *gpu);
128
+ const void *gpu
129
+);
130
+
115131 void __kbase_tlstream_tl_lifelink_as_gpu(
116132 struct kbase_tlstream *stream,
117133 const void *address_space,
118
- const void *gpu);
134
+ const void *gpu
135
+);
136
+
119137 void __kbase_tlstream_tl_ret_ctx_lpu(
120138 struct kbase_tlstream *stream,
121139 const void *ctx,
122
- const void *lpu);
140
+ const void *lpu
141
+);
142
+
123143 void __kbase_tlstream_tl_ret_atom_ctx(
124144 struct kbase_tlstream *stream,
125145 const void *atom,
126
- const void *ctx);
146
+ const void *ctx
147
+);
148
+
127149 void __kbase_tlstream_tl_ret_atom_lpu(
128150 struct kbase_tlstream *stream,
129151 const void *atom,
130152 const void *lpu,
131
- const char *attrib_match_list);
153
+ const char *attrib_match_list
154
+);
155
+
132156 void __kbase_tlstream_tl_nret_ctx_lpu(
133157 struct kbase_tlstream *stream,
134158 const void *ctx,
135
- const void *lpu);
159
+ const void *lpu
160
+);
161
+
136162 void __kbase_tlstream_tl_nret_atom_ctx(
137163 struct kbase_tlstream *stream,
138164 const void *atom,
139
- const void *ctx);
165
+ const void *ctx
166
+);
167
+
140168 void __kbase_tlstream_tl_nret_atom_lpu(
141169 struct kbase_tlstream *stream,
142170 const void *atom,
143
- const void *lpu);
171
+ const void *lpu
172
+);
173
+
144174 void __kbase_tlstream_tl_ret_as_ctx(
145175 struct kbase_tlstream *stream,
146176 const void *address_space,
147
- const void *ctx);
177
+ const void *ctx
178
+);
179
+
148180 void __kbase_tlstream_tl_nret_as_ctx(
149181 struct kbase_tlstream *stream,
150182 const void *address_space,
151
- const void *ctx);
183
+ const void *ctx
184
+);
185
+
152186 void __kbase_tlstream_tl_ret_atom_as(
153187 struct kbase_tlstream *stream,
154188 const void *atom,
155
- const void *address_space);
189
+ const void *address_space
190
+);
191
+
156192 void __kbase_tlstream_tl_nret_atom_as(
157193 struct kbase_tlstream *stream,
158194 const void *atom,
159
- const void *address_space);
195
+ const void *address_space
196
+);
197
+
160198 void __kbase_tlstream_tl_attrib_atom_config(
161199 struct kbase_tlstream *stream,
162200 const void *atom,
163201 u64 descriptor,
164202 u64 affinity,
165
- u32 config);
166
-void __kbase_tlstream_tl_attrib_atom_priority(
167
- struct kbase_tlstream *stream,
168
- const void *atom,
169
- u32 prio);
170
-void __kbase_tlstream_tl_attrib_atom_state(
171
- struct kbase_tlstream *stream,
172
- const void *atom,
173
- u32 state);
174
-void __kbase_tlstream_tl_attrib_atom_prioritized(
175
- struct kbase_tlstream *stream,
176
- const void *atom);
177
-void __kbase_tlstream_tl_attrib_atom_jit(
178
- struct kbase_tlstream *stream,
179
- const void *atom,
180
- u64 edit_addr,
181
- u64 new_addr,
182
- u32 jit_flags,
183
- u64 mem_flags,
184
- u32 j_id,
185
- u64 com_pgs,
186
- u64 extent,
187
- u64 va_pgs);
203
+ u32 config
204
+);
205
+
188206 void __kbase_tlstream_tl_jit_usedpages(
189207 struct kbase_tlstream *stream,
190208 u64 used_pages,
191
- u32 j_id);
209
+ u32 j_id
210
+);
211
+
192212 void __kbase_tlstream_tl_attrib_atom_jitallocinfo(
193213 struct kbase_tlstream *stream,
194214 const void *atom,
....@@ -199,181 +219,326 @@
199219 u32 bin_id,
200220 u32 max_allocs,
201221 u32 jit_flags,
202
- u32 usg_id);
222
+ u32 usg_id
223
+);
224
+
203225 void __kbase_tlstream_tl_attrib_atom_jitfreeinfo(
204226 struct kbase_tlstream *stream,
205227 const void *atom,
206
- u32 j_id);
228
+ u32 j_id
229
+);
230
+
207231 void __kbase_tlstream_tl_attrib_as_config(
208232 struct kbase_tlstream *stream,
209233 const void *address_space,
210234 u64 transtab,
211235 u64 memattr,
212
- u64 transcfg);
236
+ u64 transcfg
237
+);
238
+
213239 void __kbase_tlstream_tl_event_lpu_softstop(
214240 struct kbase_tlstream *stream,
215
- const void *lpu);
241
+ const void *lpu
242
+);
243
+
216244 void __kbase_tlstream_tl_event_atom_softstop_ex(
217245 struct kbase_tlstream *stream,
218
- const void *atom);
246
+ const void *atom
247
+);
248
+
219249 void __kbase_tlstream_tl_event_atom_softstop_issue(
220250 struct kbase_tlstream *stream,
221
- const void *atom);
251
+ const void *atom
252
+);
253
+
222254 void __kbase_tlstream_tl_event_atom_softjob_start(
223255 struct kbase_tlstream *stream,
224
- const void *atom);
256
+ const void *atom
257
+);
258
+
225259 void __kbase_tlstream_tl_event_atom_softjob_end(
226260 struct kbase_tlstream *stream,
227
- const void *atom);
261
+ const void *atom
262
+);
263
+
228264 void __kbase_tlstream_tl_arbiter_granted(
229265 struct kbase_tlstream *stream,
230
- const void *gpu);
266
+ const void *gpu
267
+);
268
+
231269 void __kbase_tlstream_tl_arbiter_started(
232270 struct kbase_tlstream *stream,
233
- const void *gpu);
271
+ const void *gpu
272
+);
273
+
234274 void __kbase_tlstream_tl_arbiter_stop_requested(
235275 struct kbase_tlstream *stream,
236
- const void *gpu);
276
+ const void *gpu
277
+);
278
+
237279 void __kbase_tlstream_tl_arbiter_stopped(
238280 struct kbase_tlstream *stream,
239
- const void *gpu);
281
+ const void *gpu
282
+);
283
+
240284 void __kbase_tlstream_tl_arbiter_requested(
241285 struct kbase_tlstream *stream,
242
- const void *gpu);
286
+ const void *gpu
287
+);
288
+
243289 void __kbase_tlstream_jd_gpu_soft_reset(
244290 struct kbase_tlstream *stream,
245
- const void *gpu);
246
-void __kbase_tlstream_aux_pm_state(
247
- struct kbase_tlstream *stream,
248
- u32 core_type,
249
- u64 core_state_bitset);
250
-void __kbase_tlstream_aux_pagefault(
251
- struct kbase_tlstream *stream,
252
- u32 ctx_nr,
253
- u32 as_nr,
254
- u64 page_cnt_change);
255
-void __kbase_tlstream_aux_pagesalloc(
256
- struct kbase_tlstream *stream,
257
- u32 ctx_nr,
258
- u64 page_cnt);
259
-void __kbase_tlstream_aux_devfreq_target(
260
- struct kbase_tlstream *stream,
261
- u64 target_freq);
262
-void __kbase_tlstream_aux_protected_enter_start(
263
- struct kbase_tlstream *stream,
264
- const void *gpu);
265
-void __kbase_tlstream_aux_protected_enter_end(
266
- struct kbase_tlstream *stream,
267
- const void *gpu);
268
-void __kbase_tlstream_aux_protected_leave_start(
269
- struct kbase_tlstream *stream,
270
- const void *gpu);
271
-void __kbase_tlstream_aux_protected_leave_end(
272
- struct kbase_tlstream *stream,
273
- const void *gpu);
274
-void __kbase_tlstream_aux_jit_stats(
275
- struct kbase_tlstream *stream,
276
- u32 ctx_nr,
277
- u32 bid,
278
- u32 max_allocs,
279
- u32 allocs,
280
- u32 va_pages,
281
- u32 ph_pages);
282
-void __kbase_tlstream_aux_tiler_heap_stats(
291
+ const void *gpu
292
+);
293
+
294
+void __kbase_tlstream_jd_tiler_heap_chunk_alloc(
283295 struct kbase_tlstream *stream,
284296 u32 ctx_nr,
285297 u64 heap_id,
286
- u32 va_pages,
287
- u32 ph_pages,
288
- u32 max_chunks,
289
- u32 chunk_size,
290
- u32 chunk_count,
291
- u32 target_in_flight,
292
- u32 nr_in_flight);
293
-void __kbase_tlstream_aux_event_job_slot(
298
+ u64 chunk_va
299
+);
300
+
301
+void __kbase_tlstream_tl_js_sched_start(
294302 struct kbase_tlstream *stream,
295
- const void *ctx,
296
- u32 slot_nr,
297
- u32 atom_nr,
298
- u32 event);
303
+ u32 dummy
304
+);
305
+
306
+void __kbase_tlstream_tl_js_sched_end(
307
+ struct kbase_tlstream *stream,
308
+ u32 dummy
309
+);
310
+
311
+void __kbase_tlstream_tl_jd_submit_atom_start(
312
+ struct kbase_tlstream *stream,
313
+ const void *atom
314
+);
315
+
316
+void __kbase_tlstream_tl_jd_submit_atom_end(
317
+ struct kbase_tlstream *stream,
318
+ const void *atom
319
+);
320
+
321
+void __kbase_tlstream_tl_jd_done_no_lock_start(
322
+ struct kbase_tlstream *stream,
323
+ const void *atom
324
+);
325
+
326
+void __kbase_tlstream_tl_jd_done_no_lock_end(
327
+ struct kbase_tlstream *stream,
328
+ const void *atom
329
+);
330
+
331
+void __kbase_tlstream_tl_jd_done_start(
332
+ struct kbase_tlstream *stream,
333
+ const void *atom
334
+);
335
+
336
+void __kbase_tlstream_tl_jd_done_end(
337
+ struct kbase_tlstream *stream,
338
+ const void *atom
339
+);
340
+
341
+void __kbase_tlstream_tl_jd_atom_complete(
342
+ struct kbase_tlstream *stream,
343
+ const void *atom
344
+);
345
+
346
+void __kbase_tlstream_tl_run_atom_start(
347
+ struct kbase_tlstream *stream,
348
+ const void *atom,
349
+ u32 atom_nr
350
+);
351
+
352
+void __kbase_tlstream_tl_run_atom_end(
353
+ struct kbase_tlstream *stream,
354
+ const void *atom,
355
+ u32 atom_nr
356
+);
357
+
358
+void __kbase_tlstream_tl_attrib_atom_priority(
359
+ struct kbase_tlstream *stream,
360
+ const void *atom,
361
+ u32 prio
362
+);
363
+
364
+void __kbase_tlstream_tl_attrib_atom_state(
365
+ struct kbase_tlstream *stream,
366
+ const void *atom,
367
+ u32 state
368
+);
369
+
370
+void __kbase_tlstream_tl_attrib_atom_prioritized(
371
+ struct kbase_tlstream *stream,
372
+ const void *atom
373
+);
374
+
375
+void __kbase_tlstream_tl_attrib_atom_jit(
376
+ struct kbase_tlstream *stream,
377
+ const void *atom,
378
+ u64 edit_addr,
379
+ u64 new_addr,
380
+ u32 jit_flags,
381
+ u64 mem_flags,
382
+ u32 j_id,
383
+ u64 com_pgs,
384
+ u64 extent,
385
+ u64 va_pgs
386
+);
387
+
299388 void __kbase_tlstream_tl_kbase_new_device(
300389 struct kbase_tlstream *stream,
301390 u32 kbase_device_id,
302391 u32 kbase_device_gpu_core_count,
303392 u32 kbase_device_max_num_csgs,
304
- u32 kbase_device_as_count);
393
+ u32 kbase_device_as_count,
394
+ u32 kbase_device_sb_entry_count,
395
+ u32 kbase_device_has_cross_stream_sync,
396
+ u32 kbase_device_supports_gpu_sleep
397
+);
398
+
399
+void __kbase_tlstream_tl_kbase_gpucmdqueue_kick(
400
+ struct kbase_tlstream *stream,
401
+ u32 kernel_ctx_id,
402
+ u64 buffer_gpu_addr
403
+);
404
+
305405 void __kbase_tlstream_tl_kbase_device_program_csg(
306406 struct kbase_tlstream *stream,
307407 u32 kbase_device_id,
408
+ u32 kernel_ctx_id,
308409 u32 gpu_cmdq_grp_handle,
309
- u32 kbase_device_csg_slot_index);
410
+ u32 kbase_device_csg_slot_index,
411
+ u32 kbase_device_csg_slot_resuming
412
+);
413
+
310414 void __kbase_tlstream_tl_kbase_device_deprogram_csg(
311415 struct kbase_tlstream *stream,
312416 u32 kbase_device_id,
313
- u32 kbase_device_csg_slot_index);
417
+ u32 kbase_device_csg_slot_index
418
+);
419
+
420
+void __kbase_tlstream_tl_kbase_device_halting_csg(
421
+ struct kbase_tlstream *stream,
422
+ u32 kbase_device_id,
423
+ u32 kbase_device_csg_slot_index,
424
+ u32 kbase_device_csg_slot_suspending
425
+);
426
+
427
+void __kbase_tlstream_tl_kbase_device_suspend_csg(
428
+ struct kbase_tlstream *stream,
429
+ u32 kbase_device_id,
430
+ u32 kbase_device_csg_slot_index
431
+);
432
+
433
+void __kbase_tlstream_tl_kbase_device_csg_idle(
434
+ struct kbase_tlstream *stream,
435
+ u32 kbase_device_id,
436
+ u32 kbase_device_csg_slot_index
437
+);
438
+
314439 void __kbase_tlstream_tl_kbase_new_ctx(
315440 struct kbase_tlstream *stream,
316441 u32 kernel_ctx_id,
317
- u32 kbase_device_id);
442
+ u32 kbase_device_id
443
+);
444
+
318445 void __kbase_tlstream_tl_kbase_del_ctx(
319446 struct kbase_tlstream *stream,
320
- u32 kernel_ctx_id);
447
+ u32 kernel_ctx_id
448
+);
449
+
321450 void __kbase_tlstream_tl_kbase_ctx_assign_as(
322451 struct kbase_tlstream *stream,
323452 u32 kernel_ctx_id,
324
- u32 kbase_device_as_index);
453
+ u32 kbase_device_as_index
454
+);
455
+
325456 void __kbase_tlstream_tl_kbase_ctx_unassign_as(
326457 struct kbase_tlstream *stream,
327
- u32 kernel_ctx_id);
458
+ u32 kernel_ctx_id
459
+);
460
+
328461 void __kbase_tlstream_tl_kbase_new_kcpuqueue(
329462 struct kbase_tlstream *stream,
330463 const void *kcpu_queue,
464
+ u32 kcpu_queue_id,
331465 u32 kernel_ctx_id,
332
- u32 kcpuq_num_pending_cmds);
466
+ u32 kcpuq_num_pending_cmds
467
+);
468
+
333469 void __kbase_tlstream_tl_kbase_del_kcpuqueue(
334470 struct kbase_tlstream *stream,
335
- const void *kcpu_queue);
471
+ const void *kcpu_queue
472
+);
473
+
336474 void __kbase_tlstream_tl_kbase_kcpuqueue_enqueue_fence_signal(
337475 struct kbase_tlstream *stream,
338476 const void *kcpu_queue,
339
- const void *fence);
477
+ const void *fence
478
+);
479
+
340480 void __kbase_tlstream_tl_kbase_kcpuqueue_enqueue_fence_wait(
341481 struct kbase_tlstream *stream,
342482 const void *kcpu_queue,
343
- const void *fence);
483
+ const void *fence
484
+);
485
+
344486 void __kbase_tlstream_tl_kbase_kcpuqueue_enqueue_cqs_wait(
345487 struct kbase_tlstream *stream,
346488 const void *kcpu_queue,
347489 u64 cqs_obj_gpu_addr,
348
- u32 cqs_obj_compare_value,
349
- u32 cqs_obj_inherit_error);
490
+ u32 compare_value,
491
+ u32 inherit_error
492
+);
493
+
350494 void __kbase_tlstream_tl_kbase_kcpuqueue_enqueue_cqs_set(
351495 struct kbase_tlstream *stream,
352496 const void *kcpu_queue,
353
- u64 cqs_obj_gpu_addr);
497
+ u64 cqs_obj_gpu_addr
498
+);
499
+
500
+void __kbase_tlstream_tl_kbase_kcpuqueue_enqueue_cqs_wait_operation(
501
+ struct kbase_tlstream *stream,
502
+ const void *kcpu_queue,
503
+ u64 cqs_obj_gpu_addr,
504
+ u64 compare_value,
505
+ u32 condition,
506
+ u32 data_type,
507
+ u32 inherit_error
508
+);
509
+
510
+void __kbase_tlstream_tl_kbase_kcpuqueue_enqueue_cqs_set_operation(
511
+ struct kbase_tlstream *stream,
512
+ const void *kcpu_queue,
513
+ u64 cqs_obj_gpu_addr,
514
+ u64 value,
515
+ u32 operation,
516
+ u32 data_type
517
+);
518
+
354519 void __kbase_tlstream_tl_kbase_kcpuqueue_enqueue_map_import(
355520 struct kbase_tlstream *stream,
356521 const void *kcpu_queue,
357
- u64 map_import_buf_gpu_addr);
522
+ u64 map_import_buf_gpu_addr
523
+);
524
+
358525 void __kbase_tlstream_tl_kbase_kcpuqueue_enqueue_unmap_import(
359526 struct kbase_tlstream *stream,
360527 const void *kcpu_queue,
361
- u64 map_import_buf_gpu_addr);
528
+ u64 map_import_buf_gpu_addr
529
+);
530
+
362531 void __kbase_tlstream_tl_kbase_kcpuqueue_enqueue_unmap_import_force(
363532 struct kbase_tlstream *stream,
364533 const void *kcpu_queue,
365
- u64 map_import_buf_gpu_addr);
366
-void __kbase_tlstream_tl_kbase_kcpuqueue_enqueue_error_barrier(
367
- struct kbase_tlstream *stream,
368
- const void *kcpu_queue);
369
-void __kbase_tlstream_tl_kbase_kcpuqueue_enqueue_group_suspend(
370
- struct kbase_tlstream *stream,
371
- const void *kcpu_queue,
372
- const void *group_suspend_buf,
373
- u32 gpu_cmdq_grp_handle);
534
+ u64 map_import_buf_gpu_addr
535
+);
536
+
374537 void __kbase_tlstream_tl_kbase_array_begin_kcpuqueue_enqueue_jit_alloc(
375538 struct kbase_tlstream *stream,
376
- const void *kcpu_queue);
539
+ const void *kcpu_queue
540
+);
541
+
377542 void __kbase_tlstream_tl_kbase_array_item_kcpuqueue_enqueue_jit_alloc(
378543 struct kbase_tlstream *stream,
379544 const void *kcpu_queue,
....@@ -385,118 +550,321 @@
385550 u32 jit_alloc_bin_id,
386551 u32 jit_alloc_max_allocations,
387552 u32 jit_alloc_flags,
388
- u32 jit_alloc_usage_id);
553
+ u32 jit_alloc_usage_id
554
+);
555
+
389556 void __kbase_tlstream_tl_kbase_array_end_kcpuqueue_enqueue_jit_alloc(
390557 struct kbase_tlstream *stream,
391
- const void *kcpu_queue);
558
+ const void *kcpu_queue
559
+);
560
+
392561 void __kbase_tlstream_tl_kbase_array_begin_kcpuqueue_enqueue_jit_free(
393562 struct kbase_tlstream *stream,
394
- const void *kcpu_queue);
563
+ const void *kcpu_queue
564
+);
565
+
395566 void __kbase_tlstream_tl_kbase_array_item_kcpuqueue_enqueue_jit_free(
396567 struct kbase_tlstream *stream,
397568 const void *kcpu_queue,
398
- u32 jit_alloc_jit_id);
569
+ u32 jit_alloc_jit_id
570
+);
571
+
399572 void __kbase_tlstream_tl_kbase_array_end_kcpuqueue_enqueue_jit_free(
400573 struct kbase_tlstream *stream,
401
- const void *kcpu_queue);
574
+ const void *kcpu_queue
575
+);
576
+
577
+void __kbase_tlstream_tl_kbase_kcpuqueue_enqueue_error_barrier(
578
+ struct kbase_tlstream *stream,
579
+ const void *kcpu_queue
580
+);
581
+
582
+void __kbase_tlstream_tl_kbase_kcpuqueue_enqueue_group_suspend(
583
+ struct kbase_tlstream *stream,
584
+ const void *kcpu_queue,
585
+ const void *group_suspend_buf,
586
+ u32 gpu_cmdq_grp_handle
587
+);
588
+
402589 void __kbase_tlstream_tl_kbase_kcpuqueue_execute_fence_signal_start(
403590 struct kbase_tlstream *stream,
404
- const void *kcpu_queue);
591
+ const void *kcpu_queue
592
+);
593
+
405594 void __kbase_tlstream_tl_kbase_kcpuqueue_execute_fence_signal_end(
406595 struct kbase_tlstream *stream,
407596 const void *kcpu_queue,
408
- u32 execute_error);
597
+ u32 execute_error
598
+);
599
+
409600 void __kbase_tlstream_tl_kbase_kcpuqueue_execute_fence_wait_start(
410601 struct kbase_tlstream *stream,
411
- const void *kcpu_queue);
602
+ const void *kcpu_queue
603
+);
604
+
412605 void __kbase_tlstream_tl_kbase_kcpuqueue_execute_fence_wait_end(
413606 struct kbase_tlstream *stream,
414607 const void *kcpu_queue,
415
- u32 execute_error);
608
+ u32 execute_error
609
+);
610
+
416611 void __kbase_tlstream_tl_kbase_kcpuqueue_execute_cqs_wait_start(
417612 struct kbase_tlstream *stream,
418
- const void *kcpu_queue);
613
+ const void *kcpu_queue
614
+);
615
+
419616 void __kbase_tlstream_tl_kbase_kcpuqueue_execute_cqs_wait_end(
420617 struct kbase_tlstream *stream,
421618 const void *kcpu_queue,
422
- u32 execute_error);
619
+ u32 execute_error
620
+);
621
+
423622 void __kbase_tlstream_tl_kbase_kcpuqueue_execute_cqs_set(
424623 struct kbase_tlstream *stream,
425624 const void *kcpu_queue,
426
- u32 execute_error);
625
+ u32 execute_error
626
+);
627
+
628
+void __kbase_tlstream_tl_kbase_kcpuqueue_execute_cqs_wait_operation_start(
629
+ struct kbase_tlstream *stream,
630
+ const void *kcpu_queue
631
+);
632
+
633
+void __kbase_tlstream_tl_kbase_kcpuqueue_execute_cqs_wait_operation_end(
634
+ struct kbase_tlstream *stream,
635
+ const void *kcpu_queue,
636
+ u32 execute_error
637
+);
638
+
639
+void __kbase_tlstream_tl_kbase_kcpuqueue_execute_cqs_set_operation(
640
+ struct kbase_tlstream *stream,
641
+ const void *kcpu_queue,
642
+ u32 execute_error
643
+);
644
+
427645 void __kbase_tlstream_tl_kbase_kcpuqueue_execute_map_import_start(
428646 struct kbase_tlstream *stream,
429
- const void *kcpu_queue);
647
+ const void *kcpu_queue
648
+);
649
+
430650 void __kbase_tlstream_tl_kbase_kcpuqueue_execute_map_import_end(
431651 struct kbase_tlstream *stream,
432652 const void *kcpu_queue,
433
- u32 execute_error);
653
+ u32 execute_error
654
+);
655
+
434656 void __kbase_tlstream_tl_kbase_kcpuqueue_execute_unmap_import_start(
435657 struct kbase_tlstream *stream,
436
- const void *kcpu_queue);
658
+ const void *kcpu_queue
659
+);
660
+
437661 void __kbase_tlstream_tl_kbase_kcpuqueue_execute_unmap_import_end(
438662 struct kbase_tlstream *stream,
439663 const void *kcpu_queue,
440
- u32 execute_error);
664
+ u32 execute_error
665
+);
666
+
441667 void __kbase_tlstream_tl_kbase_kcpuqueue_execute_unmap_import_force_start(
442668 struct kbase_tlstream *stream,
443
- const void *kcpu_queue);
669
+ const void *kcpu_queue
670
+);
671
+
444672 void __kbase_tlstream_tl_kbase_kcpuqueue_execute_unmap_import_force_end(
445673 struct kbase_tlstream *stream,
446674 const void *kcpu_queue,
447
- u32 execute_error);
675
+ u32 execute_error
676
+);
677
+
448678 void __kbase_tlstream_tl_kbase_kcpuqueue_execute_jit_alloc_start(
449679 struct kbase_tlstream *stream,
450
- const void *kcpu_queue);
680
+ const void *kcpu_queue
681
+);
682
+
451683 void __kbase_tlstream_tl_kbase_array_begin_kcpuqueue_execute_jit_alloc_end(
452684 struct kbase_tlstream *stream,
453
- const void *kcpu_queue);
685
+ const void *kcpu_queue
686
+);
687
+
454688 void __kbase_tlstream_tl_kbase_array_item_kcpuqueue_execute_jit_alloc_end(
455689 struct kbase_tlstream *stream,
456690 const void *kcpu_queue,
457691 u32 execute_error,
458692 u64 jit_alloc_gpu_alloc_addr,
459
- u64 jit_alloc_mmu_flags);
693
+ u64 jit_alloc_mmu_flags
694
+);
695
+
460696 void __kbase_tlstream_tl_kbase_array_end_kcpuqueue_execute_jit_alloc_end(
461697 struct kbase_tlstream *stream,
462
- const void *kcpu_queue);
698
+ const void *kcpu_queue
699
+);
700
+
463701 void __kbase_tlstream_tl_kbase_kcpuqueue_execute_jit_free_start(
464702 struct kbase_tlstream *stream,
465
- const void *kcpu_queue);
703
+ const void *kcpu_queue
704
+);
705
+
466706 void __kbase_tlstream_tl_kbase_array_begin_kcpuqueue_execute_jit_free_end(
467707 struct kbase_tlstream *stream,
468
- const void *kcpu_queue);
708
+ const void *kcpu_queue
709
+);
710
+
469711 void __kbase_tlstream_tl_kbase_array_item_kcpuqueue_execute_jit_free_end(
470712 struct kbase_tlstream *stream,
471713 const void *kcpu_queue,
472714 u32 execute_error,
473
- u64 jit_free_pages_used);
715
+ u64 jit_free_pages_used
716
+);
717
+
474718 void __kbase_tlstream_tl_kbase_array_end_kcpuqueue_execute_jit_free_end(
475719 struct kbase_tlstream *stream,
476
- const void *kcpu_queue);
720
+ const void *kcpu_queue
721
+);
722
+
477723 void __kbase_tlstream_tl_kbase_kcpuqueue_execute_error_barrier(
478724 struct kbase_tlstream *stream,
479
- const void *kcpu_queue);
725
+ const void *kcpu_queue
726
+);
727
+
480728 void __kbase_tlstream_tl_kbase_kcpuqueue_execute_group_suspend_start(
481729 struct kbase_tlstream *stream,
482
- const void *kcpu_queue);
730
+ const void *kcpu_queue
731
+);
732
+
483733 void __kbase_tlstream_tl_kbase_kcpuqueue_execute_group_suspend_end(
484734 struct kbase_tlstream *stream,
485735 const void *kcpu_queue,
486
- u32 execute_error);
736
+ u32 execute_error
737
+);
738
+
739
+void __kbase_tlstream_tl_kbase_csffw_fw_reloading(
740
+ struct kbase_tlstream *stream,
741
+ u64 csffw_cycle
742
+);
743
+
744
+void __kbase_tlstream_tl_kbase_csffw_fw_enabling(
745
+ struct kbase_tlstream *stream,
746
+ u64 csffw_cycle
747
+);
748
+
749
+void __kbase_tlstream_tl_kbase_csffw_fw_request_sleep(
750
+ struct kbase_tlstream *stream,
751
+ u64 csffw_cycle
752
+);
753
+
754
+void __kbase_tlstream_tl_kbase_csffw_fw_request_wakeup(
755
+ struct kbase_tlstream *stream,
756
+ u64 csffw_cycle
757
+);
758
+
759
+void __kbase_tlstream_tl_kbase_csffw_fw_request_halt(
760
+ struct kbase_tlstream *stream,
761
+ u64 csffw_cycle
762
+);
763
+
764
+void __kbase_tlstream_tl_kbase_csffw_fw_disabling(
765
+ struct kbase_tlstream *stream,
766
+ u64 csffw_cycle
767
+);
768
+
769
+void __kbase_tlstream_tl_kbase_csffw_fw_off(
770
+ struct kbase_tlstream *stream,
771
+ u64 csffw_cycle
772
+);
773
+
487774 void __kbase_tlstream_tl_kbase_csffw_tlstream_overflow(
488775 struct kbase_tlstream *stream,
489776 u64 csffw_timestamp,
490
- u64 csffw_cycle);
491
-void __kbase_tlstream_tl_kbase_csffw_reset(
777
+ u64 csffw_cycle
778
+);
779
+
780
+void __kbase_tlstream_aux_pm_state(
492781 struct kbase_tlstream *stream,
493
- u64 csffw_cycle);
782
+ u32 core_type,
783
+ u64 core_state_bitset
784
+);
785
+
786
+void __kbase_tlstream_aux_pagefault(
787
+ struct kbase_tlstream *stream,
788
+ u32 ctx_nr,
789
+ u32 as_nr,
790
+ u64 page_cnt_change
791
+);
792
+
793
+void __kbase_tlstream_aux_pagesalloc(
794
+ struct kbase_tlstream *stream,
795
+ u32 ctx_nr,
796
+ u64 page_cnt
797
+);
798
+
799
+void __kbase_tlstream_aux_devfreq_target(
800
+ struct kbase_tlstream *stream,
801
+ u64 target_freq
802
+);
803
+
804
+void __kbase_tlstream_aux_jit_stats(
805
+ struct kbase_tlstream *stream,
806
+ u32 ctx_nr,
807
+ u32 bid,
808
+ u32 max_allocs,
809
+ u32 allocs,
810
+ u32 va_pages,
811
+ u32 ph_pages
812
+);
813
+
814
+void __kbase_tlstream_aux_tiler_heap_stats(
815
+ struct kbase_tlstream *stream,
816
+ u32 ctx_nr,
817
+ u64 heap_id,
818
+ u32 va_pages,
819
+ u32 ph_pages,
820
+ u32 max_chunks,
821
+ u32 chunk_size,
822
+ u32 chunk_count,
823
+ u32 target_in_flight,
824
+ u32 nr_in_flight
825
+);
826
+
827
+void __kbase_tlstream_aux_event_job_slot(
828
+ struct kbase_tlstream *stream,
829
+ const void *ctx,
830
+ u32 slot_nr,
831
+ u32 atom_nr,
832
+ u32 event
833
+);
834
+
835
+void __kbase_tlstream_aux_protected_enter_start(
836
+ struct kbase_tlstream *stream,
837
+ const void *gpu
838
+);
839
+
840
+void __kbase_tlstream_aux_protected_enter_end(
841
+ struct kbase_tlstream *stream,
842
+ const void *gpu
843
+);
844
+
845
+void __kbase_tlstream_aux_mmu_command(
846
+ struct kbase_tlstream *stream,
847
+ u32 kernel_ctx_id,
848
+ u32 mmu_cmd_id,
849
+ u32 mmu_synchronicity,
850
+ u64 mmu_lock_addr,
851
+ u32 mmu_lock_page_num
852
+);
853
+
854
+void __kbase_tlstream_aux_protected_leave_start(
855
+ struct kbase_tlstream *stream,
856
+ const void *gpu
857
+);
858
+
859
+void __kbase_tlstream_aux_protected_leave_end(
860
+ struct kbase_tlstream *stream,
861
+ const void *gpu
862
+);
494863
495864 struct kbase_tlstream;
496865
497866 /**
498
- * KBASE_TLSTREAM_TL_NEW_CTX -
499
- * object ctx is created
867
+ * KBASE_TLSTREAM_TL_NEW_CTX - object ctx is created
500868 *
501869 * @kbdev: Kbase device
502870 * @ctx: Name of the context object
....@@ -514,12 +882,14 @@
514882 if (enabled & TLSTREAM_ENABLED) \
515883 __kbase_tlstream_tl_new_ctx( \
516884 __TL_DISPATCH_STREAM(kbdev, obj), \
517
- ctx, ctx_nr, tgid); \
885
+ ctx, \
886
+ ctx_nr, \
887
+ tgid \
888
+ ); \
518889 } while (0)
519890
520891 /**
521
- * KBASE_TLSTREAM_TL_NEW_GPU -
522
- * object gpu is created
892
+ * KBASE_TLSTREAM_TL_NEW_GPU - object gpu is created
523893 *
524894 * @kbdev: Kbase device
525895 * @gpu: Name of the GPU object
....@@ -537,12 +907,14 @@
537907 if (enabled & TLSTREAM_ENABLED) \
538908 __kbase_tlstream_tl_new_gpu( \
539909 __TL_DISPATCH_STREAM(kbdev, obj), \
540
- gpu, gpu_id, core_count); \
910
+ gpu, \
911
+ gpu_id, \
912
+ core_count \
913
+ ); \
541914 } while (0)
542915
543916 /**
544
- * KBASE_TLSTREAM_TL_NEW_LPU -
545
- * object lpu is created
917
+ * KBASE_TLSTREAM_TL_NEW_LPU - object lpu is created
546918 *
547919 * @kbdev: Kbase device
548920 * @lpu: Name of the Logical Processing Unit object
....@@ -560,12 +932,14 @@
560932 if (enabled & TLSTREAM_ENABLED) \
561933 __kbase_tlstream_tl_new_lpu( \
562934 __TL_DISPATCH_STREAM(kbdev, obj), \
563
- lpu, lpu_nr, lpu_fn); \
935
+ lpu, \
936
+ lpu_nr, \
937
+ lpu_fn \
938
+ ); \
564939 } while (0)
565940
566941 /**
567
- * KBASE_TLSTREAM_TL_NEW_ATOM -
568
- * object atom is created
942
+ * KBASE_TLSTREAM_TL_NEW_ATOM - object atom is created
569943 *
570944 * @kbdev: Kbase device
571945 * @atom: Atom identifier
....@@ -581,12 +955,13 @@
581955 if (enabled & TLSTREAM_ENABLED) \
582956 __kbase_tlstream_tl_new_atom( \
583957 __TL_DISPATCH_STREAM(kbdev, obj), \
584
- atom, atom_nr); \
958
+ atom, \
959
+ atom_nr \
960
+ ); \
585961 } while (0)
586962
587963 /**
588
- * KBASE_TLSTREAM_TL_NEW_AS -
589
- * address space object is created
964
+ * KBASE_TLSTREAM_TL_NEW_AS - address space object is created
590965 *
591966 * @kbdev: Kbase device
592967 * @address_space: Name of the address space object
....@@ -602,12 +977,13 @@
602977 if (enabled & TLSTREAM_ENABLED) \
603978 __kbase_tlstream_tl_new_as( \
604979 __TL_DISPATCH_STREAM(kbdev, obj), \
605
- address_space, as_nr); \
980
+ address_space, \
981
+ as_nr \
982
+ ); \
606983 } while (0)
607984
608985 /**
609
- * KBASE_TLSTREAM_TL_DEL_CTX -
610
- * context is destroyed
986
+ * KBASE_TLSTREAM_TL_DEL_CTX - context is destroyed
611987 *
612988 * @kbdev: Kbase device
613989 * @ctx: Name of the context object
....@@ -621,12 +997,12 @@
621997 if (enabled & TLSTREAM_ENABLED) \
622998 __kbase_tlstream_tl_del_ctx( \
623999 __TL_DISPATCH_STREAM(kbdev, obj), \
624
- ctx); \
1000
+ ctx \
1001
+ ); \
6251002 } while (0)
6261003
6271004 /**
628
- * KBASE_TLSTREAM_TL_DEL_ATOM -
629
- * atom is destroyed
1005
+ * KBASE_TLSTREAM_TL_DEL_ATOM - atom is destroyed
6301006 *
6311007 * @kbdev: Kbase device
6321008 * @atom: Atom identifier
....@@ -640,12 +1016,12 @@
6401016 if (enabled & TLSTREAM_ENABLED) \
6411017 __kbase_tlstream_tl_del_atom( \
6421018 __TL_DISPATCH_STREAM(kbdev, obj), \
643
- atom); \
1019
+ atom \
1020
+ ); \
6441021 } while (0)
6451022
6461023 /**
647
- * KBASE_TLSTREAM_TL_LIFELINK_LPU_GPU -
648
- * lpu is deleted with gpu
1024
+ * KBASE_TLSTREAM_TL_LIFELINK_LPU_GPU - lpu is deleted with gpu
6491025 *
6501026 * @kbdev: Kbase device
6511027 * @lpu: Name of the Logical Processing Unit object
....@@ -661,12 +1037,13 @@
6611037 if (enabled & TLSTREAM_ENABLED) \
6621038 __kbase_tlstream_tl_lifelink_lpu_gpu( \
6631039 __TL_DISPATCH_STREAM(kbdev, obj), \
664
- lpu, gpu); \
1040
+ lpu, \
1041
+ gpu \
1042
+ ); \
6651043 } while (0)
6661044
6671045 /**
668
- * KBASE_TLSTREAM_TL_LIFELINK_AS_GPU -
669
- * address space is deleted with gpu
1046
+ * KBASE_TLSTREAM_TL_LIFELINK_AS_GPU - address space is deleted with gpu
6701047 *
6711048 * @kbdev: Kbase device
6721049 * @address_space: Name of the address space object
....@@ -682,12 +1059,13 @@
6821059 if (enabled & TLSTREAM_ENABLED) \
6831060 __kbase_tlstream_tl_lifelink_as_gpu( \
6841061 __TL_DISPATCH_STREAM(kbdev, obj), \
685
- address_space, gpu); \
1062
+ address_space, \
1063
+ gpu \
1064
+ ); \
6861065 } while (0)
6871066
6881067 /**
689
- * KBASE_TLSTREAM_TL_RET_CTX_LPU -
690
- * context is retained by lpu
1068
+ * KBASE_TLSTREAM_TL_RET_CTX_LPU - context is retained by lpu
6911069 *
6921070 * @kbdev: Kbase device
6931071 * @ctx: Name of the context object
....@@ -703,12 +1081,13 @@
7031081 if (enabled & TLSTREAM_ENABLED) \
7041082 __kbase_tlstream_tl_ret_ctx_lpu( \
7051083 __TL_DISPATCH_STREAM(kbdev, obj), \
706
- ctx, lpu); \
1084
+ ctx, \
1085
+ lpu \
1086
+ ); \
7071087 } while (0)
7081088
7091089 /**
710
- * KBASE_TLSTREAM_TL_RET_ATOM_CTX -
711
- * atom is retained by context
1090
+ * KBASE_TLSTREAM_TL_RET_ATOM_CTX - atom is retained by context
7121091 *
7131092 * @kbdev: Kbase device
7141093 * @atom: Atom identifier
....@@ -724,12 +1103,13 @@
7241103 if (enabled & TLSTREAM_ENABLED) \
7251104 __kbase_tlstream_tl_ret_atom_ctx( \
7261105 __TL_DISPATCH_STREAM(kbdev, obj), \
727
- atom, ctx); \
1106
+ atom, \
1107
+ ctx \
1108
+ ); \
7281109 } while (0)
7291110
7301111 /**
731
- * KBASE_TLSTREAM_TL_RET_ATOM_LPU -
732
- * atom is retained by lpu
1112
+ * KBASE_TLSTREAM_TL_RET_ATOM_LPU - atom is retained by lpu
7331113 *
7341114 * @kbdev: Kbase device
7351115 * @atom: Atom identifier
....@@ -747,12 +1127,14 @@
7471127 if (enabled & TLSTREAM_ENABLED) \
7481128 __kbase_tlstream_tl_ret_atom_lpu( \
7491129 __TL_DISPATCH_STREAM(kbdev, obj), \
750
- atom, lpu, attrib_match_list); \
1130
+ atom, \
1131
+ lpu, \
1132
+ attrib_match_list \
1133
+ ); \
7511134 } while (0)
7521135
7531136 /**
754
- * KBASE_TLSTREAM_TL_NRET_CTX_LPU -
755
- * context is released by lpu
1137
+ * KBASE_TLSTREAM_TL_NRET_CTX_LPU - context is released by lpu
7561138 *
7571139 * @kbdev: Kbase device
7581140 * @ctx: Name of the context object
....@@ -768,12 +1150,13 @@
7681150 if (enabled & TLSTREAM_ENABLED) \
7691151 __kbase_tlstream_tl_nret_ctx_lpu( \
7701152 __TL_DISPATCH_STREAM(kbdev, obj), \
771
- ctx, lpu); \
1153
+ ctx, \
1154
+ lpu \
1155
+ ); \
7721156 } while (0)
7731157
7741158 /**
775
- * KBASE_TLSTREAM_TL_NRET_ATOM_CTX -
776
- * atom is released by context
1159
+ * KBASE_TLSTREAM_TL_NRET_ATOM_CTX - atom is released by context
7771160 *
7781161 * @kbdev: Kbase device
7791162 * @atom: Atom identifier
....@@ -789,12 +1172,13 @@
7891172 if (enabled & TLSTREAM_ENABLED) \
7901173 __kbase_tlstream_tl_nret_atom_ctx( \
7911174 __TL_DISPATCH_STREAM(kbdev, obj), \
792
- atom, ctx); \
1175
+ atom, \
1176
+ ctx \
1177
+ ); \
7931178 } while (0)
7941179
7951180 /**
796
- * KBASE_TLSTREAM_TL_NRET_ATOM_LPU -
797
- * atom is released by lpu
1181
+ * KBASE_TLSTREAM_TL_NRET_ATOM_LPU - atom is released by lpu
7981182 *
7991183 * @kbdev: Kbase device
8001184 * @atom: Atom identifier
....@@ -810,12 +1194,13 @@
8101194 if (enabled & TLSTREAM_ENABLED) \
8111195 __kbase_tlstream_tl_nret_atom_lpu( \
8121196 __TL_DISPATCH_STREAM(kbdev, obj), \
813
- atom, lpu); \
1197
+ atom, \
1198
+ lpu \
1199
+ ); \
8141200 } while (0)
8151201
8161202 /**
817
- * KBASE_TLSTREAM_TL_RET_AS_CTX -
818
- * address space is retained by context
1203
+ * KBASE_TLSTREAM_TL_RET_AS_CTX - address space is retained by context
8191204 *
8201205 * @kbdev: Kbase device
8211206 * @address_space: Name of the address space object
....@@ -831,12 +1216,13 @@
8311216 if (enabled & TLSTREAM_ENABLED) \
8321217 __kbase_tlstream_tl_ret_as_ctx( \
8331218 __TL_DISPATCH_STREAM(kbdev, obj), \
834
- address_space, ctx); \
1219
+ address_space, \
1220
+ ctx \
1221
+ ); \
8351222 } while (0)
8361223
8371224 /**
838
- * KBASE_TLSTREAM_TL_NRET_AS_CTX -
839
- * address space is released by context
1225
+ * KBASE_TLSTREAM_TL_NRET_AS_CTX - address space is released by context
8401226 *
8411227 * @kbdev: Kbase device
8421228 * @address_space: Name of the address space object
....@@ -852,12 +1238,13 @@
8521238 if (enabled & TLSTREAM_ENABLED) \
8531239 __kbase_tlstream_tl_nret_as_ctx( \
8541240 __TL_DISPATCH_STREAM(kbdev, obj), \
855
- address_space, ctx); \
1241
+ address_space, \
1242
+ ctx \
1243
+ ); \
8561244 } while (0)
8571245
8581246 /**
859
- * KBASE_TLSTREAM_TL_RET_ATOM_AS -
860
- * atom is retained by address space
1247
+ * KBASE_TLSTREAM_TL_RET_ATOM_AS - atom is retained by address space
8611248 *
8621249 * @kbdev: Kbase device
8631250 * @atom: Atom identifier
....@@ -873,12 +1260,13 @@
8731260 if (enabled & TLSTREAM_ENABLED) \
8741261 __kbase_tlstream_tl_ret_atom_as( \
8751262 __TL_DISPATCH_STREAM(kbdev, obj), \
876
- atom, address_space); \
1263
+ atom, \
1264
+ address_space \
1265
+ ); \
8771266 } while (0)
8781267
8791268 /**
880
- * KBASE_TLSTREAM_TL_NRET_ATOM_AS -
881
- * atom is released by address space
1269
+ * KBASE_TLSTREAM_TL_NRET_ATOM_AS - atom is released by address space
8821270 *
8831271 * @kbdev: Kbase device
8841272 * @atom: Atom identifier
....@@ -894,12 +1282,13 @@
8941282 if (enabled & TLSTREAM_ENABLED) \
8951283 __kbase_tlstream_tl_nret_atom_as( \
8961284 __TL_DISPATCH_STREAM(kbdev, obj), \
897
- atom, address_space); \
1285
+ atom, \
1286
+ address_space \
1287
+ ); \
8981288 } while (0)
8991289
9001290 /**
901
- * KBASE_TLSTREAM_TL_ATTRIB_ATOM_CONFIG -
902
- * atom job slot attributes
1291
+ * KBASE_TLSTREAM_TL_ATTRIB_ATOM_CONFIG - atom job slot attributes
9031292 *
9041293 * @kbdev: Kbase device
9051294 * @atom: Atom identifier
....@@ -919,117 +1308,19 @@
9191308 if (enabled & TLSTREAM_ENABLED) \
9201309 __kbase_tlstream_tl_attrib_atom_config( \
9211310 __TL_DISPATCH_STREAM(kbdev, obj), \
922
- atom, descriptor, affinity, config); \
1311
+ atom, \
1312
+ descriptor, \
1313
+ affinity, \
1314
+ config \
1315
+ ); \
9231316 } while (0)
9241317
9251318 /**
926
- * KBASE_TLSTREAM_TL_ATTRIB_ATOM_PRIORITY -
927
- * atom priority
928
- *
929
- * @kbdev: Kbase device
930
- * @atom: Atom identifier
931
- * @prio: Atom priority
932
- */
933
-#define KBASE_TLSTREAM_TL_ATTRIB_ATOM_PRIORITY( \
934
- kbdev, \
935
- atom, \
936
- prio \
937
- ) \
938
- do { \
939
- int enabled = atomic_read(&kbdev->timeline_flags); \
940
- if (enabled & BASE_TLSTREAM_ENABLE_LATENCY_TRACEPOINTS) \
941
- __kbase_tlstream_tl_attrib_atom_priority( \
942
- __TL_DISPATCH_STREAM(kbdev, obj), \
943
- atom, prio); \
944
- } while (0)
945
-
946
-/**
947
- * KBASE_TLSTREAM_TL_ATTRIB_ATOM_STATE -
948
- * atom state
949
- *
950
- * @kbdev: Kbase device
951
- * @atom: Atom identifier
952
- * @state: Atom state
953
- */
954
-#define KBASE_TLSTREAM_TL_ATTRIB_ATOM_STATE( \
955
- kbdev, \
956
- atom, \
957
- state \
958
- ) \
959
- do { \
960
- int enabled = atomic_read(&kbdev->timeline_flags); \
961
- if (enabled & BASE_TLSTREAM_ENABLE_LATENCY_TRACEPOINTS) \
962
- __kbase_tlstream_tl_attrib_atom_state( \
963
- __TL_DISPATCH_STREAM(kbdev, obj), \
964
- atom, state); \
965
- } while (0)
966
-
967
-/**
968
- * KBASE_TLSTREAM_TL_ATTRIB_ATOM_PRIORITIZED -
969
- * atom caused priority change
970
- *
971
- * @kbdev: Kbase device
972
- * @atom: Atom identifier
973
- */
974
-#define KBASE_TLSTREAM_TL_ATTRIB_ATOM_PRIORITIZED( \
975
- kbdev, \
976
- atom \
977
- ) \
978
- do { \
979
- int enabled = atomic_read(&kbdev->timeline_flags); \
980
- if (enabled & BASE_TLSTREAM_ENABLE_LATENCY_TRACEPOINTS) \
981
- __kbase_tlstream_tl_attrib_atom_prioritized( \
982
- __TL_DISPATCH_STREAM(kbdev, obj), \
983
- atom); \
984
- } while (0)
985
-
986
-/**
987
- * KBASE_TLSTREAM_TL_ATTRIB_ATOM_JIT -
988
- * jit done for atom
989
- *
990
- * @kbdev: Kbase device
991
- * @atom: Atom identifier
992
- * @edit_addr: Address edited by jit
993
- * @new_addr: Address placed into the edited location
994
- * @jit_flags: Flags specifying the special requirements for
995
- * the JIT allocation.
996
- * @mem_flags: Flags defining the properties of a memory region
997
- * @j_id: Unique ID provided by the caller, this is used
998
- * to pair allocation and free requests.
999
- * @com_pgs: The minimum number of physical pages which
1000
- * should back the allocation.
1001
- * @extent: Granularity of physical pages to grow the
1002
- * allocation by during a fault.
1003
- * @va_pgs: The minimum number of virtual pages required
1004
- */
1005
-#define KBASE_TLSTREAM_TL_ATTRIB_ATOM_JIT( \
1006
- kbdev, \
1007
- atom, \
1008
- edit_addr, \
1009
- new_addr, \
1010
- jit_flags, \
1011
- mem_flags, \
1012
- j_id, \
1013
- com_pgs, \
1014
- extent, \
1015
- va_pgs \
1016
- ) \
1017
- do { \
1018
- int enabled = atomic_read(&kbdev->timeline_flags); \
1019
- if (enabled & BASE_TLSTREAM_JOB_DUMPING_ENABLED) \
1020
- __kbase_tlstream_tl_attrib_atom_jit( \
1021
- __TL_DISPATCH_STREAM(kbdev, obj), \
1022
- atom, edit_addr, new_addr, jit_flags, mem_flags, j_id, com_pgs, extent, va_pgs); \
1023
- } while (0)
1024
-
1025
-/**
1026
- * KBASE_TLSTREAM_TL_JIT_USEDPAGES -
1027
- * used pages for jit
1319
+ * KBASE_TLSTREAM_TL_JIT_USEDPAGES - used pages for jit
10281320 *
10291321 * @kbdev: Kbase device
10301322 * @used_pages: Number of pages used for jit
1031
- * @j_id: Unique ID provided by the caller, this is used
1032
- * to pair allocation and free requests.
1323
+ * @j_id: Unique ID provided by the caller, this is used to pair allocation and free requests.
10331324 */
10341325 #define KBASE_TLSTREAM_TL_JIT_USEDPAGES( \
10351326 kbdev, \
....@@ -1041,28 +1332,23 @@
10411332 if (enabled & TLSTREAM_ENABLED) \
10421333 __kbase_tlstream_tl_jit_usedpages( \
10431334 __TL_DISPATCH_STREAM(kbdev, obj), \
1044
- used_pages, j_id); \
1335
+ used_pages, \
1336
+ j_id \
1337
+ ); \
10451338 } while (0)
10461339
10471340 /**
1048
- * KBASE_TLSTREAM_TL_ATTRIB_ATOM_JITALLOCINFO -
1049
- * Information about JIT allocations
1341
+ * KBASE_TLSTREAM_TL_ATTRIB_ATOM_JITALLOCINFO - Information about JIT allocations
10501342 *
10511343 * @kbdev: Kbase device
10521344 * @atom: Atom identifier
10531345 * @va_pgs: The minimum number of virtual pages required
1054
- * @com_pgs: The minimum number of physical pages which
1055
- * should back the allocation.
1056
- * @extent: Granularity of physical pages to grow the
1057
- * allocation by during a fault.
1058
- * @j_id: Unique ID provided by the caller, this is used
1059
- * to pair allocation and free requests.
1060
- * @bin_id: The JIT allocation bin, used in conjunction with
1061
- * max_allocations to limit the number of each
1062
- * type of JIT allocation.
1346
+ * @com_pgs: The minimum number of physical pages which should back the allocation.
1347
+ * @extent: Granularity of physical pages to grow the allocation by during a fault.
1348
+ * @j_id: Unique ID provided by the caller, this is used to pair allocation and free requests.
1349
+ * @bin_id: The JIT allocation bin, used in conjunction with max_allocations to limit the number of each type of JIT allocation.
10631350 * @max_allocs: Maximum allocations allowed in this bin.
1064
- * @jit_flags: Flags specifying the special requirements for
1065
- * the JIT allocation.
1351
+ * @jit_flags: Flags specifying the special requirements for the JIT allocation.
10661352 * @usg_id: A hint about which allocation should be reused.
10671353 */
10681354 #define KBASE_TLSTREAM_TL_ATTRIB_ATOM_JITALLOCINFO( \
....@@ -1082,17 +1368,24 @@
10821368 if (enabled & TLSTREAM_ENABLED) \
10831369 __kbase_tlstream_tl_attrib_atom_jitallocinfo( \
10841370 __TL_DISPATCH_STREAM(kbdev, obj), \
1085
- atom, va_pgs, com_pgs, extent, j_id, bin_id, max_allocs, jit_flags, usg_id); \
1371
+ atom, \
1372
+ va_pgs, \
1373
+ com_pgs, \
1374
+ extent, \
1375
+ j_id, \
1376
+ bin_id, \
1377
+ max_allocs, \
1378
+ jit_flags, \
1379
+ usg_id \
1380
+ ); \
10861381 } while (0)
10871382
10881383 /**
1089
- * KBASE_TLSTREAM_TL_ATTRIB_ATOM_JITFREEINFO -
1090
- * Information about JIT frees
1384
+ * KBASE_TLSTREAM_TL_ATTRIB_ATOM_JITFREEINFO - Information about JIT frees
10911385 *
10921386 * @kbdev: Kbase device
10931387 * @atom: Atom identifier
1094
- * @j_id: Unique ID provided by the caller, this is used
1095
- * to pair allocation and free requests.
1388
+ * @j_id: Unique ID provided by the caller, this is used to pair allocation and free requests.
10961389 */
10971390 #define KBASE_TLSTREAM_TL_ATTRIB_ATOM_JITFREEINFO( \
10981391 kbdev, \
....@@ -1104,12 +1397,13 @@
11041397 if (enabled & TLSTREAM_ENABLED) \
11051398 __kbase_tlstream_tl_attrib_atom_jitfreeinfo( \
11061399 __TL_DISPATCH_STREAM(kbdev, obj), \
1107
- atom, j_id); \
1400
+ atom, \
1401
+ j_id \
1402
+ ); \
11081403 } while (0)
11091404
11101405 /**
1111
- * KBASE_TLSTREAM_TL_ATTRIB_AS_CONFIG -
1112
- * address space attributes
1406
+ * KBASE_TLSTREAM_TL_ATTRIB_AS_CONFIG - address space attributes
11131407 *
11141408 * @kbdev: Kbase device
11151409 * @address_space: Name of the address space object
....@@ -1129,12 +1423,15 @@
11291423 if (enabled & TLSTREAM_ENABLED) \
11301424 __kbase_tlstream_tl_attrib_as_config( \
11311425 __TL_DISPATCH_STREAM(kbdev, obj), \
1132
- address_space, transtab, memattr, transcfg); \
1426
+ address_space, \
1427
+ transtab, \
1428
+ memattr, \
1429
+ transcfg \
1430
+ ); \
11331431 } while (0)
11341432
11351433 /**
1136
- * KBASE_TLSTREAM_TL_EVENT_LPU_SOFTSTOP -
1137
- * softstop event on given lpu
1434
+ * KBASE_TLSTREAM_TL_EVENT_LPU_SOFTSTOP - softstop event on given lpu
11381435 *
11391436 * @kbdev: Kbase device
11401437 * @lpu: Name of the Logical Processing Unit object
....@@ -1148,12 +1445,12 @@
11481445 if (enabled & TLSTREAM_ENABLED) \
11491446 __kbase_tlstream_tl_event_lpu_softstop( \
11501447 __TL_DISPATCH_STREAM(kbdev, obj), \
1151
- lpu); \
1448
+ lpu \
1449
+ ); \
11521450 } while (0)
11531451
11541452 /**
1155
- * KBASE_TLSTREAM_TL_EVENT_ATOM_SOFTSTOP_EX -
1156
- * atom softstopped
1453
+ * KBASE_TLSTREAM_TL_EVENT_ATOM_SOFTSTOP_EX - atom softstopped
11571454 *
11581455 * @kbdev: Kbase device
11591456 * @atom: Atom identifier
....@@ -1167,12 +1464,12 @@
11671464 if (enabled & TLSTREAM_ENABLED) \
11681465 __kbase_tlstream_tl_event_atom_softstop_ex( \
11691466 __TL_DISPATCH_STREAM(kbdev, obj), \
1170
- atom); \
1467
+ atom \
1468
+ ); \
11711469 } while (0)
11721470
11731471 /**
1174
- * KBASE_TLSTREAM_TL_EVENT_ATOM_SOFTSTOP_ISSUE -
1175
- * atom softstop issued
1472
+ * KBASE_TLSTREAM_TL_EVENT_ATOM_SOFTSTOP_ISSUE - atom softstop issued
11761473 *
11771474 * @kbdev: Kbase device
11781475 * @atom: Atom identifier
....@@ -1186,12 +1483,12 @@
11861483 if (enabled & TLSTREAM_ENABLED) \
11871484 __kbase_tlstream_tl_event_atom_softstop_issue( \
11881485 __TL_DISPATCH_STREAM(kbdev, obj), \
1189
- atom); \
1486
+ atom \
1487
+ ); \
11901488 } while (0)
11911489
11921490 /**
1193
- * KBASE_TLSTREAM_TL_EVENT_ATOM_SOFTJOB_START -
1194
- * atom soft job has started
1491
+ * KBASE_TLSTREAM_TL_EVENT_ATOM_SOFTJOB_START - atom soft job has started
11951492 *
11961493 * @kbdev: Kbase device
11971494 * @atom: Atom identifier
....@@ -1205,12 +1502,12 @@
12051502 if (enabled & TLSTREAM_ENABLED) \
12061503 __kbase_tlstream_tl_event_atom_softjob_start( \
12071504 __TL_DISPATCH_STREAM(kbdev, obj), \
1208
- atom); \
1505
+ atom \
1506
+ ); \
12091507 } while (0)
12101508
12111509 /**
1212
- * KBASE_TLSTREAM_TL_EVENT_ATOM_SOFTJOB_END -
1213
- * atom soft job has completed
1510
+ * KBASE_TLSTREAM_TL_EVENT_ATOM_SOFTJOB_END - atom soft job has completed
12141511 *
12151512 * @kbdev: Kbase device
12161513 * @atom: Atom identifier
....@@ -1224,12 +1521,12 @@
12241521 if (enabled & TLSTREAM_ENABLED) \
12251522 __kbase_tlstream_tl_event_atom_softjob_end( \
12261523 __TL_DISPATCH_STREAM(kbdev, obj), \
1227
- atom); \
1524
+ atom \
1525
+ ); \
12281526 } while (0)
12291527
12301528 /**
1231
- * KBASE_TLSTREAM_TL_ARBITER_GRANTED -
1232
- * Arbiter has granted gpu access
1529
+ * KBASE_TLSTREAM_TL_ARBITER_GRANTED - Arbiter has granted gpu access
12331530 *
12341531 * @kbdev: Kbase device
12351532 * @gpu: Name of the GPU object
....@@ -1243,12 +1540,12 @@
12431540 if (enabled & TLSTREAM_ENABLED) \
12441541 __kbase_tlstream_tl_arbiter_granted( \
12451542 __TL_DISPATCH_STREAM(kbdev, obj), \
1246
- gpu); \
1543
+ gpu \
1544
+ ); \
12471545 } while (0)
12481546
12491547 /**
1250
- * KBASE_TLSTREAM_TL_ARBITER_STARTED -
1251
- * Driver is running again and able to process jobs
1548
+ * KBASE_TLSTREAM_TL_ARBITER_STARTED - Driver is running again and able to process jobs
12521549 *
12531550 * @kbdev: Kbase device
12541551 * @gpu: Name of the GPU object
....@@ -1262,12 +1559,12 @@
12621559 if (enabled & TLSTREAM_ENABLED) \
12631560 __kbase_tlstream_tl_arbiter_started( \
12641561 __TL_DISPATCH_STREAM(kbdev, obj), \
1265
- gpu); \
1562
+ gpu \
1563
+ ); \
12661564 } while (0)
12671565
12681566 /**
1269
- * KBASE_TLSTREAM_TL_ARBITER_STOP_REQUESTED -
1270
- * Arbiter has requested driver to stop using gpu
1567
+ * KBASE_TLSTREAM_TL_ARBITER_STOP_REQUESTED - Arbiter has requested driver to stop using gpu
12711568 *
12721569 * @kbdev: Kbase device
12731570 * @gpu: Name of the GPU object
....@@ -1281,12 +1578,12 @@
12811578 if (enabled & TLSTREAM_ENABLED) \
12821579 __kbase_tlstream_tl_arbiter_stop_requested( \
12831580 __TL_DISPATCH_STREAM(kbdev, obj), \
1284
- gpu); \
1581
+ gpu \
1582
+ ); \
12851583 } while (0)
12861584
12871585 /**
1288
- * KBASE_TLSTREAM_TL_ARBITER_STOPPED -
1289
- * Driver has stopped using gpu
1586
+ * KBASE_TLSTREAM_TL_ARBITER_STOPPED - Driver has stopped using gpu
12901587 *
12911588 * @kbdev: Kbase device
12921589 * @gpu: Name of the GPU object
....@@ -1300,12 +1597,12 @@
13001597 if (enabled & TLSTREAM_ENABLED) \
13011598 __kbase_tlstream_tl_arbiter_stopped( \
13021599 __TL_DISPATCH_STREAM(kbdev, obj), \
1303
- gpu); \
1600
+ gpu \
1601
+ ); \
13041602 } while (0)
13051603
13061604 /**
1307
- * KBASE_TLSTREAM_TL_ARBITER_REQUESTED -
1308
- * Driver has requested the arbiter for gpu access
1605
+ * KBASE_TLSTREAM_TL_ARBITER_REQUESTED - Driver has requested the arbiter for gpu access
13091606 *
13101607 * @kbdev: Kbase device
13111608 * @gpu: Name of the GPU object
....@@ -1319,12 +1616,12 @@
13191616 if (enabled & TLSTREAM_ENABLED) \
13201617 __kbase_tlstream_tl_arbiter_requested( \
13211618 __TL_DISPATCH_STREAM(kbdev, obj), \
1322
- gpu); \
1619
+ gpu \
1620
+ ); \
13231621 } while (0)
13241622
13251623 /**
1326
- * KBASE_TLSTREAM_JD_GPU_SOFT_RESET -
1327
- * gpu soft reset
1624
+ * KBASE_TLSTREAM_JD_GPU_SOFT_RESET - gpu soft reset
13281625 *
13291626 * @kbdev: Kbase device
13301627 * @gpu: Name of the GPU object
....@@ -1338,17 +1635,2385 @@
13381635 if (enabled & TLSTREAM_ENABLED) \
13391636 __kbase_tlstream_jd_gpu_soft_reset( \
13401637 __TL_DISPATCH_STREAM(kbdev, obj), \
1341
- gpu); \
1638
+ gpu \
1639
+ ); \
13421640 } while (0)
13431641
13441642 /**
1345
- * KBASE_TLSTREAM_AUX_PM_STATE -
1346
- * PM state
1643
+ * KBASE_TLSTREAM_JD_TILER_HEAP_CHUNK_ALLOC - Tiler Heap Chunk Allocation
1644
+ *
1645
+ * @kbdev: Kbase device
1646
+ * @ctx_nr: Kernel context number
1647
+ * @heap_id: Unique id used to represent a heap under a context
1648
+ * @chunk_va: Virtual start address of tiler heap chunk
1649
+ */
1650
+#define KBASE_TLSTREAM_JD_TILER_HEAP_CHUNK_ALLOC( \
1651
+ kbdev, \
1652
+ ctx_nr, \
1653
+ heap_id, \
1654
+ chunk_va \
1655
+ ) \
1656
+ do { \
1657
+ int enabled = atomic_read(&kbdev->timeline_flags); \
1658
+ if (enabled & TLSTREAM_ENABLED) \
1659
+ __kbase_tlstream_jd_tiler_heap_chunk_alloc( \
1660
+ __TL_DISPATCH_STREAM(kbdev, obj), \
1661
+ ctx_nr, \
1662
+ heap_id, \
1663
+ chunk_va \
1664
+ ); \
1665
+ } while (0)
1666
+
1667
+/**
1668
+ * KBASE_TLSTREAM_TL_JS_SCHED_START - Scheduling starts
1669
+ *
1670
+ * @kbdev: Kbase device
1671
+ * @dummy: dummy argument
1672
+ */
1673
+#define KBASE_TLSTREAM_TL_JS_SCHED_START( \
1674
+ kbdev, \
1675
+ dummy \
1676
+ ) \
1677
+ do { \
1678
+ int enabled = atomic_read(&kbdev->timeline_flags); \
1679
+ if (enabled & TLSTREAM_ENABLED) \
1680
+ __kbase_tlstream_tl_js_sched_start( \
1681
+ __TL_DISPATCH_STREAM(kbdev, obj), \
1682
+ dummy \
1683
+ ); \
1684
+ } while (0)
1685
+
1686
+/**
1687
+ * KBASE_TLSTREAM_TL_JS_SCHED_END - Scheduling ends
1688
+ *
1689
+ * @kbdev: Kbase device
1690
+ * @dummy: dummy argument
1691
+ */
1692
+#define KBASE_TLSTREAM_TL_JS_SCHED_END( \
1693
+ kbdev, \
1694
+ dummy \
1695
+ ) \
1696
+ do { \
1697
+ int enabled = atomic_read(&kbdev->timeline_flags); \
1698
+ if (enabled & TLSTREAM_ENABLED) \
1699
+ __kbase_tlstream_tl_js_sched_end( \
1700
+ __TL_DISPATCH_STREAM(kbdev, obj), \
1701
+ dummy \
1702
+ ); \
1703
+ } while (0)
1704
+
1705
+/**
1706
+ * KBASE_TLSTREAM_TL_JD_SUBMIT_ATOM_START - Submitting an atom starts
1707
+ *
1708
+ * @kbdev: Kbase device
1709
+ * @atom: Atom identifier
1710
+ */
1711
+#define KBASE_TLSTREAM_TL_JD_SUBMIT_ATOM_START( \
1712
+ kbdev, \
1713
+ atom \
1714
+ ) \
1715
+ do { \
1716
+ int enabled = atomic_read(&kbdev->timeline_flags); \
1717
+ if (enabled & TLSTREAM_ENABLED) \
1718
+ __kbase_tlstream_tl_jd_submit_atom_start( \
1719
+ __TL_DISPATCH_STREAM(kbdev, obj), \
1720
+ atom \
1721
+ ); \
1722
+ } while (0)
1723
+
1724
+/**
1725
+ * KBASE_TLSTREAM_TL_JD_SUBMIT_ATOM_END - Submitting an atom ends
1726
+ *
1727
+ * @kbdev: Kbase device
1728
+ * @atom: Atom identifier
1729
+ */
1730
+#define KBASE_TLSTREAM_TL_JD_SUBMIT_ATOM_END( \
1731
+ kbdev, \
1732
+ atom \
1733
+ ) \
1734
+ do { \
1735
+ int enabled = atomic_read(&kbdev->timeline_flags); \
1736
+ if (enabled & TLSTREAM_ENABLED) \
1737
+ __kbase_tlstream_tl_jd_submit_atom_end( \
1738
+ __TL_DISPATCH_STREAM(kbdev, obj), \
1739
+ atom \
1740
+ ); \
1741
+ } while (0)
1742
+
1743
+/**
1744
+ * KBASE_TLSTREAM_TL_JD_DONE_NO_LOCK_START - Within function kbase_jd_done_nolock
1745
+ *
1746
+ * @kbdev: Kbase device
1747
+ * @atom: Atom identifier
1748
+ */
1749
+#define KBASE_TLSTREAM_TL_JD_DONE_NO_LOCK_START( \
1750
+ kbdev, \
1751
+ atom \
1752
+ ) \
1753
+ do { \
1754
+ int enabled = atomic_read(&kbdev->timeline_flags); \
1755
+ if (enabled & TLSTREAM_ENABLED) \
1756
+ __kbase_tlstream_tl_jd_done_no_lock_start( \
1757
+ __TL_DISPATCH_STREAM(kbdev, obj), \
1758
+ atom \
1759
+ ); \
1760
+ } while (0)
1761
+
1762
+/**
1763
+ * KBASE_TLSTREAM_TL_JD_DONE_NO_LOCK_END - Within function kbase_jd_done_nolock - end
1764
+ *
1765
+ * @kbdev: Kbase device
1766
+ * @atom: Atom identifier
1767
+ */
1768
+#define KBASE_TLSTREAM_TL_JD_DONE_NO_LOCK_END( \
1769
+ kbdev, \
1770
+ atom \
1771
+ ) \
1772
+ do { \
1773
+ int enabled = atomic_read(&kbdev->timeline_flags); \
1774
+ if (enabled & TLSTREAM_ENABLED) \
1775
+ __kbase_tlstream_tl_jd_done_no_lock_end( \
1776
+ __TL_DISPATCH_STREAM(kbdev, obj), \
1777
+ atom \
1778
+ ); \
1779
+ } while (0)
1780
+
1781
+/**
1782
+ * KBASE_TLSTREAM_TL_JD_DONE_START - Start of kbase_jd_done
1783
+ *
1784
+ * @kbdev: Kbase device
1785
+ * @atom: Atom identifier
1786
+ */
1787
+#define KBASE_TLSTREAM_TL_JD_DONE_START( \
1788
+ kbdev, \
1789
+ atom \
1790
+ ) \
1791
+ do { \
1792
+ int enabled = atomic_read(&kbdev->timeline_flags); \
1793
+ if (enabled & TLSTREAM_ENABLED) \
1794
+ __kbase_tlstream_tl_jd_done_start( \
1795
+ __TL_DISPATCH_STREAM(kbdev, obj), \
1796
+ atom \
1797
+ ); \
1798
+ } while (0)
1799
+
1800
+/**
1801
+ * KBASE_TLSTREAM_TL_JD_DONE_END - End of kbase_jd_done
1802
+ *
1803
+ * @kbdev: Kbase device
1804
+ * @atom: Atom identifier
1805
+ */
1806
+#define KBASE_TLSTREAM_TL_JD_DONE_END( \
1807
+ kbdev, \
1808
+ atom \
1809
+ ) \
1810
+ do { \
1811
+ int enabled = atomic_read(&kbdev->timeline_flags); \
1812
+ if (enabled & TLSTREAM_ENABLED) \
1813
+ __kbase_tlstream_tl_jd_done_end( \
1814
+ __TL_DISPATCH_STREAM(kbdev, obj), \
1815
+ atom \
1816
+ ); \
1817
+ } while (0)
1818
+
1819
+/**
1820
+ * KBASE_TLSTREAM_TL_JD_ATOM_COMPLETE - Atom marked complete
1821
+ *
1822
+ * @kbdev: Kbase device
1823
+ * @atom: Atom identifier
1824
+ */
1825
+#define KBASE_TLSTREAM_TL_JD_ATOM_COMPLETE( \
1826
+ kbdev, \
1827
+ atom \
1828
+ ) \
1829
+ do { \
1830
+ int enabled = atomic_read(&kbdev->timeline_flags); \
1831
+ if (enabled & TLSTREAM_ENABLED) \
1832
+ __kbase_tlstream_tl_jd_atom_complete( \
1833
+ __TL_DISPATCH_STREAM(kbdev, obj), \
1834
+ atom \
1835
+ ); \
1836
+ } while (0)
1837
+
1838
+/**
1839
+ * KBASE_TLSTREAM_TL_RUN_ATOM_START - Running of atom starts
1840
+ *
1841
+ * @kbdev: Kbase device
1842
+ * @atom: Atom identifier
1843
+ * @atom_nr: Sequential number of an atom
1844
+ */
1845
+#define KBASE_TLSTREAM_TL_RUN_ATOM_START( \
1846
+ kbdev, \
1847
+ atom, \
1848
+ atom_nr \
1849
+ ) \
1850
+ do { \
1851
+ int enabled = atomic_read(&kbdev->timeline_flags); \
1852
+ if (enabled & TLSTREAM_ENABLED) \
1853
+ __kbase_tlstream_tl_run_atom_start( \
1854
+ __TL_DISPATCH_STREAM(kbdev, obj), \
1855
+ atom, \
1856
+ atom_nr \
1857
+ ); \
1858
+ } while (0)
1859
+
1860
+/**
1861
+ * KBASE_TLSTREAM_TL_RUN_ATOM_END - Running of atom ends
1862
+ *
1863
+ * @kbdev: Kbase device
1864
+ * @atom: Atom identifier
1865
+ * @atom_nr: Sequential number of an atom
1866
+ */
1867
+#define KBASE_TLSTREAM_TL_RUN_ATOM_END( \
1868
+ kbdev, \
1869
+ atom, \
1870
+ atom_nr \
1871
+ ) \
1872
+ do { \
1873
+ int enabled = atomic_read(&kbdev->timeline_flags); \
1874
+ if (enabled & TLSTREAM_ENABLED) \
1875
+ __kbase_tlstream_tl_run_atom_end( \
1876
+ __TL_DISPATCH_STREAM(kbdev, obj), \
1877
+ atom, \
1878
+ atom_nr \
1879
+ ); \
1880
+ } while (0)
1881
+
1882
+/**
1883
+ * KBASE_TLSTREAM_TL_ATTRIB_ATOM_PRIORITY - atom priority
1884
+ *
1885
+ * @kbdev: Kbase device
1886
+ * @atom: Atom identifier
1887
+ * @prio: Atom priority
1888
+ */
1889
+#define KBASE_TLSTREAM_TL_ATTRIB_ATOM_PRIORITY( \
1890
+ kbdev, \
1891
+ atom, \
1892
+ prio \
1893
+ ) \
1894
+ do { \
1895
+ int enabled = atomic_read(&kbdev->timeline_flags); \
1896
+ if (enabled & BASE_TLSTREAM_ENABLE_LATENCY_TRACEPOINTS) \
1897
+ __kbase_tlstream_tl_attrib_atom_priority( \
1898
+ __TL_DISPATCH_STREAM(kbdev, obj), \
1899
+ atom, \
1900
+ prio \
1901
+ ); \
1902
+ } while (0)
1903
+
1904
+/**
1905
+ * KBASE_TLSTREAM_TL_ATTRIB_ATOM_STATE - atom state
1906
+ *
1907
+ * @kbdev: Kbase device
1908
+ * @atom: Atom identifier
1909
+ * @state: Atom state
1910
+ */
1911
+#define KBASE_TLSTREAM_TL_ATTRIB_ATOM_STATE( \
1912
+ kbdev, \
1913
+ atom, \
1914
+ state \
1915
+ ) \
1916
+ do { \
1917
+ int enabled = atomic_read(&kbdev->timeline_flags); \
1918
+ if (enabled & BASE_TLSTREAM_ENABLE_LATENCY_TRACEPOINTS) \
1919
+ __kbase_tlstream_tl_attrib_atom_state( \
1920
+ __TL_DISPATCH_STREAM(kbdev, obj), \
1921
+ atom, \
1922
+ state \
1923
+ ); \
1924
+ } while (0)
1925
+
1926
+/**
1927
+ * KBASE_TLSTREAM_TL_ATTRIB_ATOM_PRIORITIZED - atom caused priority change
1928
+ *
1929
+ * @kbdev: Kbase device
1930
+ * @atom: Atom identifier
1931
+ */
1932
+#define KBASE_TLSTREAM_TL_ATTRIB_ATOM_PRIORITIZED( \
1933
+ kbdev, \
1934
+ atom \
1935
+ ) \
1936
+ do { \
1937
+ int enabled = atomic_read(&kbdev->timeline_flags); \
1938
+ if (enabled & BASE_TLSTREAM_ENABLE_LATENCY_TRACEPOINTS) \
1939
+ __kbase_tlstream_tl_attrib_atom_prioritized( \
1940
+ __TL_DISPATCH_STREAM(kbdev, obj), \
1941
+ atom \
1942
+ ); \
1943
+ } while (0)
1944
+
1945
+/**
1946
+ * KBASE_TLSTREAM_TL_ATTRIB_ATOM_JIT - jit done for atom
1947
+ *
1948
+ * @kbdev: Kbase device
1949
+ * @atom: Atom identifier
1950
+ * @edit_addr: Address edited by jit
1951
+ * @new_addr: Address placed into the edited location
1952
+ * @jit_flags: Flags specifying the special requirements for the JIT allocation.
1953
+ * @mem_flags: Flags defining the properties of a memory region
1954
+ * @j_id: Unique ID provided by the caller, this is used to pair allocation and free requests.
1955
+ * @com_pgs: The minimum number of physical pages which should back the allocation.
1956
+ * @extent: Granularity of physical pages to grow the allocation by during a fault.
1957
+ * @va_pgs: The minimum number of virtual pages required
1958
+ */
1959
+#define KBASE_TLSTREAM_TL_ATTRIB_ATOM_JIT( \
1960
+ kbdev, \
1961
+ atom, \
1962
+ edit_addr, \
1963
+ new_addr, \
1964
+ jit_flags, \
1965
+ mem_flags, \
1966
+ j_id, \
1967
+ com_pgs, \
1968
+ extent, \
1969
+ va_pgs \
1970
+ ) \
1971
+ do { \
1972
+ int enabled = atomic_read(&kbdev->timeline_flags); \
1973
+ if (enabled & BASE_TLSTREAM_JOB_DUMPING_ENABLED) \
1974
+ __kbase_tlstream_tl_attrib_atom_jit( \
1975
+ __TL_DISPATCH_STREAM(kbdev, obj), \
1976
+ atom, \
1977
+ edit_addr, \
1978
+ new_addr, \
1979
+ jit_flags, \
1980
+ mem_flags, \
1981
+ j_id, \
1982
+ com_pgs, \
1983
+ extent, \
1984
+ va_pgs \
1985
+ ); \
1986
+ } while (0)
1987
+
1988
+/**
1989
+ * KBASE_TLSTREAM_TL_KBASE_NEW_DEVICE - New KBase Device
1990
+ *
1991
+ * @kbdev: Kbase device
1992
+ * @kbase_device_id: The ID of the physical hardware
1993
+ * @kbase_device_gpu_core_count: The number of gpu cores in the physical hardware
1994
+ * @kbase_device_max_num_csgs: The max number of CSGs the physical hardware supports
1995
+ * @kbase_device_as_count: The number of address spaces the physical hardware has available
1996
+ * @kbase_device_sb_entry_count: The number of entries each scoreboard set in the physical hardware has available
1997
+ * @kbase_device_has_cross_stream_sync: Whether cross-stream synchronization is supported
1998
+ * @kbase_device_supports_gpu_sleep: Whether GPU sleep is supported
1999
+ */
2000
+#if MALI_USE_CSF
2001
+#define KBASE_TLSTREAM_TL_KBASE_NEW_DEVICE( \
2002
+ kbdev, \
2003
+ kbase_device_id, \
2004
+ kbase_device_gpu_core_count, \
2005
+ kbase_device_max_num_csgs, \
2006
+ kbase_device_as_count, \
2007
+ kbase_device_sb_entry_count, \
2008
+ kbase_device_has_cross_stream_sync, \
2009
+ kbase_device_supports_gpu_sleep \
2010
+ ) \
2011
+ do { \
2012
+ int enabled = atomic_read(&kbdev->timeline_flags); \
2013
+ if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
2014
+ __kbase_tlstream_tl_kbase_new_device( \
2015
+ __TL_DISPATCH_STREAM(kbdev, obj), \
2016
+ kbase_device_id, \
2017
+ kbase_device_gpu_core_count, \
2018
+ kbase_device_max_num_csgs, \
2019
+ kbase_device_as_count, \
2020
+ kbase_device_sb_entry_count, \
2021
+ kbase_device_has_cross_stream_sync, \
2022
+ kbase_device_supports_gpu_sleep \
2023
+ ); \
2024
+ } while (0)
2025
+#else
2026
+#define KBASE_TLSTREAM_TL_KBASE_NEW_DEVICE( \
2027
+ kbdev, \
2028
+ kbase_device_id, \
2029
+ kbase_device_gpu_core_count, \
2030
+ kbase_device_max_num_csgs, \
2031
+ kbase_device_as_count, \
2032
+ kbase_device_sb_entry_count, \
2033
+ kbase_device_has_cross_stream_sync, \
2034
+ kbase_device_supports_gpu_sleep \
2035
+ ) \
2036
+ do { } while (0)
2037
+#endif /* MALI_USE_CSF */
2038
+
2039
+/**
2040
+ * KBASE_TLSTREAM_TL_KBASE_GPUCMDQUEUE_KICK - Kernel receives a request to process new GPU queue instructions
2041
+ *
2042
+ * @kbdev: Kbase device
2043
+ * @kernel_ctx_id: Unique ID for the KBase Context
2044
+ * @buffer_gpu_addr: Address of the GPU queue's command buffer
2045
+ */
2046
+#if MALI_USE_CSF
2047
+#define KBASE_TLSTREAM_TL_KBASE_GPUCMDQUEUE_KICK( \
2048
+ kbdev, \
2049
+ kernel_ctx_id, \
2050
+ buffer_gpu_addr \
2051
+ ) \
2052
+ do { \
2053
+ int enabled = atomic_read(&kbdev->timeline_flags); \
2054
+ if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
2055
+ __kbase_tlstream_tl_kbase_gpucmdqueue_kick( \
2056
+ __TL_DISPATCH_STREAM(kbdev, obj), \
2057
+ kernel_ctx_id, \
2058
+ buffer_gpu_addr \
2059
+ ); \
2060
+ } while (0)
2061
+#else
2062
+#define KBASE_TLSTREAM_TL_KBASE_GPUCMDQUEUE_KICK( \
2063
+ kbdev, \
2064
+ kernel_ctx_id, \
2065
+ buffer_gpu_addr \
2066
+ ) \
2067
+ do { } while (0)
2068
+#endif /* MALI_USE_CSF */
2069
+
2070
+/**
2071
+ * KBASE_TLSTREAM_TL_KBASE_DEVICE_PROGRAM_CSG - CSG is programmed to a slot
2072
+ *
2073
+ * @kbdev: Kbase device
2074
+ * @kbase_device_id: The ID of the physical hardware
2075
+ * @kernel_ctx_id: Unique ID for the KBase Context
2076
+ * @gpu_cmdq_grp_handle: GPU Command Queue Group handle which will match userspace
2077
+ * @kbase_device_csg_slot_index: The index of the slot in the scheduler being programmed
2078
+ * @kbase_device_csg_slot_resuming: Whether the csg is being resumed
2079
+ */
2080
+#if MALI_USE_CSF
2081
+#define KBASE_TLSTREAM_TL_KBASE_DEVICE_PROGRAM_CSG( \
2082
+ kbdev, \
2083
+ kbase_device_id, \
2084
+ kernel_ctx_id, \
2085
+ gpu_cmdq_grp_handle, \
2086
+ kbase_device_csg_slot_index, \
2087
+ kbase_device_csg_slot_resuming \
2088
+ ) \
2089
+ do { \
2090
+ int enabled = atomic_read(&kbdev->timeline_flags); \
2091
+ if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
2092
+ __kbase_tlstream_tl_kbase_device_program_csg( \
2093
+ __TL_DISPATCH_STREAM(kbdev, obj), \
2094
+ kbase_device_id, \
2095
+ kernel_ctx_id, \
2096
+ gpu_cmdq_grp_handle, \
2097
+ kbase_device_csg_slot_index, \
2098
+ kbase_device_csg_slot_resuming \
2099
+ ); \
2100
+ } while (0)
2101
+#else
2102
+#define KBASE_TLSTREAM_TL_KBASE_DEVICE_PROGRAM_CSG( \
2103
+ kbdev, \
2104
+ kbase_device_id, \
2105
+ kernel_ctx_id, \
2106
+ gpu_cmdq_grp_handle, \
2107
+ kbase_device_csg_slot_index, \
2108
+ kbase_device_csg_slot_resuming \
2109
+ ) \
2110
+ do { } while (0)
2111
+#endif /* MALI_USE_CSF */
2112
+
2113
+/**
2114
+ * KBASE_TLSTREAM_TL_KBASE_DEVICE_DEPROGRAM_CSG - CSG is deprogrammed from a slot
2115
+ *
2116
+ * @kbdev: Kbase device
2117
+ * @kbase_device_id: The ID of the physical hardware
2118
+ * @kbase_device_csg_slot_index: The index of the slot in the scheduler whose CSG is being deprogrammed
2119
+ */
2120
+#if MALI_USE_CSF
2121
+#define KBASE_TLSTREAM_TL_KBASE_DEVICE_DEPROGRAM_CSG( \
2122
+ kbdev, \
2123
+ kbase_device_id, \
2124
+ kbase_device_csg_slot_index \
2125
+ ) \
2126
+ do { \
2127
+ int enabled = atomic_read(&kbdev->timeline_flags); \
2128
+ if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
2129
+ __kbase_tlstream_tl_kbase_device_deprogram_csg( \
2130
+ __TL_DISPATCH_STREAM(kbdev, obj), \
2131
+ kbase_device_id, \
2132
+ kbase_device_csg_slot_index \
2133
+ ); \
2134
+ } while (0)
2135
+#else
2136
+#define KBASE_TLSTREAM_TL_KBASE_DEVICE_DEPROGRAM_CSG( \
2137
+ kbdev, \
2138
+ kbase_device_id, \
2139
+ kbase_device_csg_slot_index \
2140
+ ) \
2141
+ do { } while (0)
2142
+#endif /* MALI_USE_CSF */
2143
+
2144
+/**
2145
+ * KBASE_TLSTREAM_TL_KBASE_DEVICE_HALTING_CSG - CSG is halting
2146
+ *
2147
+ * @kbdev: Kbase device
2148
+ * @kbase_device_id: The ID of the physical hardware
2149
+ * @kbase_device_csg_slot_index: The index of the slot in the scheduler whose CSG is being halted
2150
+ * @kbase_device_csg_slot_suspending: Whether the csg is being suspended
2151
+ */
2152
+#if MALI_USE_CSF
2153
+#define KBASE_TLSTREAM_TL_KBASE_DEVICE_HALTING_CSG( \
2154
+ kbdev, \
2155
+ kbase_device_id, \
2156
+ kbase_device_csg_slot_index, \
2157
+ kbase_device_csg_slot_suspending \
2158
+ ) \
2159
+ do { \
2160
+ int enabled = atomic_read(&kbdev->timeline_flags); \
2161
+ if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
2162
+ __kbase_tlstream_tl_kbase_device_halting_csg( \
2163
+ __TL_DISPATCH_STREAM(kbdev, obj), \
2164
+ kbase_device_id, \
2165
+ kbase_device_csg_slot_index, \
2166
+ kbase_device_csg_slot_suspending \
2167
+ ); \
2168
+ } while (0)
2169
+#else
2170
+#define KBASE_TLSTREAM_TL_KBASE_DEVICE_HALTING_CSG( \
2171
+ kbdev, \
2172
+ kbase_device_id, \
2173
+ kbase_device_csg_slot_index, \
2174
+ kbase_device_csg_slot_suspending \
2175
+ ) \
2176
+ do { } while (0)
2177
+#endif /* MALI_USE_CSF */
2178
+
2179
+/**
2180
+ * KBASE_TLSTREAM_TL_KBASE_DEVICE_SUSPEND_CSG - CSG is suspended
2181
+ *
2182
+ * @kbdev: Kbase device
2183
+ * @kbase_device_id: The ID of the physical hardware
2184
+ * @kbase_device_csg_slot_index: The index of the slot in the scheduler whose CSG is being suspended
2185
+ */
2186
+#if MALI_USE_CSF
2187
+#define KBASE_TLSTREAM_TL_KBASE_DEVICE_SUSPEND_CSG( \
2188
+ kbdev, \
2189
+ kbase_device_id, \
2190
+ kbase_device_csg_slot_index \
2191
+ ) \
2192
+ do { \
2193
+ int enabled = atomic_read(&kbdev->timeline_flags); \
2194
+ if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
2195
+ __kbase_tlstream_tl_kbase_device_suspend_csg( \
2196
+ __TL_DISPATCH_STREAM(kbdev, obj), \
2197
+ kbase_device_id, \
2198
+ kbase_device_csg_slot_index \
2199
+ ); \
2200
+ } while (0)
2201
+#else
2202
+#define KBASE_TLSTREAM_TL_KBASE_DEVICE_SUSPEND_CSG( \
2203
+ kbdev, \
2204
+ kbase_device_id, \
2205
+ kbase_device_csg_slot_index \
2206
+ ) \
2207
+ do { } while (0)
2208
+#endif /* MALI_USE_CSF */
2209
+
2210
+/**
2211
+ * KBASE_TLSTREAM_TL_KBASE_DEVICE_CSG_IDLE - KBase device is notified that CSG is idle.
2212
+ *
2213
+ * @kbdev: Kbase device
2214
+ * @kbase_device_id: The ID of the physical hardware
2215
+ * @kbase_device_csg_slot_index: The index of the slot in the scheduler whose CSG for which we are receiving an idle notification
2216
+ */
2217
+#if MALI_USE_CSF
2218
+#define KBASE_TLSTREAM_TL_KBASE_DEVICE_CSG_IDLE( \
2219
+ kbdev, \
2220
+ kbase_device_id, \
2221
+ kbase_device_csg_slot_index \
2222
+ ) \
2223
+ do { \
2224
+ int enabled = atomic_read(&kbdev->timeline_flags); \
2225
+ if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
2226
+ __kbase_tlstream_tl_kbase_device_csg_idle( \
2227
+ __TL_DISPATCH_STREAM(kbdev, obj), \
2228
+ kbase_device_id, \
2229
+ kbase_device_csg_slot_index \
2230
+ ); \
2231
+ } while (0)
2232
+#else
2233
+#define KBASE_TLSTREAM_TL_KBASE_DEVICE_CSG_IDLE( \
2234
+ kbdev, \
2235
+ kbase_device_id, \
2236
+ kbase_device_csg_slot_index \
2237
+ ) \
2238
+ do { } while (0)
2239
+#endif /* MALI_USE_CSF */
2240
+
2241
+/**
2242
+ * KBASE_TLSTREAM_TL_KBASE_NEW_CTX - New KBase Context
2243
+ *
2244
+ * @kbdev: Kbase device
2245
+ * @kernel_ctx_id: Unique ID for the KBase Context
2246
+ * @kbase_device_id: The ID of the physical hardware
2247
+ */
2248
+#if MALI_USE_CSF
2249
+#define KBASE_TLSTREAM_TL_KBASE_NEW_CTX( \
2250
+ kbdev, \
2251
+ kernel_ctx_id, \
2252
+ kbase_device_id \
2253
+ ) \
2254
+ do { \
2255
+ int enabled = atomic_read(&kbdev->timeline_flags); \
2256
+ if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
2257
+ __kbase_tlstream_tl_kbase_new_ctx( \
2258
+ __TL_DISPATCH_STREAM(kbdev, obj), \
2259
+ kernel_ctx_id, \
2260
+ kbase_device_id \
2261
+ ); \
2262
+ } while (0)
2263
+#else
2264
+#define KBASE_TLSTREAM_TL_KBASE_NEW_CTX( \
2265
+ kbdev, \
2266
+ kernel_ctx_id, \
2267
+ kbase_device_id \
2268
+ ) \
2269
+ do { } while (0)
2270
+#endif /* MALI_USE_CSF */
2271
+
2272
+/**
2273
+ * KBASE_TLSTREAM_TL_KBASE_DEL_CTX - Delete KBase Context
2274
+ *
2275
+ * @kbdev: Kbase device
2276
+ * @kernel_ctx_id: Unique ID for the KBase Context
2277
+ */
2278
+#if MALI_USE_CSF
2279
+#define KBASE_TLSTREAM_TL_KBASE_DEL_CTX( \
2280
+ kbdev, \
2281
+ kernel_ctx_id \
2282
+ ) \
2283
+ do { \
2284
+ int enabled = atomic_read(&kbdev->timeline_flags); \
2285
+ if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
2286
+ __kbase_tlstream_tl_kbase_del_ctx( \
2287
+ __TL_DISPATCH_STREAM(kbdev, obj), \
2288
+ kernel_ctx_id \
2289
+ ); \
2290
+ } while (0)
2291
+#else
2292
+#define KBASE_TLSTREAM_TL_KBASE_DEL_CTX( \
2293
+ kbdev, \
2294
+ kernel_ctx_id \
2295
+ ) \
2296
+ do { } while (0)
2297
+#endif /* MALI_USE_CSF */
2298
+
2299
+/**
2300
+ * KBASE_TLSTREAM_TL_KBASE_CTX_ASSIGN_AS - Address Space is assigned to a KBase context
2301
+ *
2302
+ * @kbdev: Kbase device
2303
+ * @kernel_ctx_id: Unique ID for the KBase Context
2304
+ * @kbase_device_as_index: The index of the device address space being assigned
2305
+ */
2306
+#if MALI_USE_CSF
2307
+#define KBASE_TLSTREAM_TL_KBASE_CTX_ASSIGN_AS( \
2308
+ kbdev, \
2309
+ kernel_ctx_id, \
2310
+ kbase_device_as_index \
2311
+ ) \
2312
+ do { \
2313
+ int enabled = atomic_read(&kbdev->timeline_flags); \
2314
+ if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
2315
+ __kbase_tlstream_tl_kbase_ctx_assign_as( \
2316
+ __TL_DISPATCH_STREAM(kbdev, obj), \
2317
+ kernel_ctx_id, \
2318
+ kbase_device_as_index \
2319
+ ); \
2320
+ } while (0)
2321
+#else
2322
+#define KBASE_TLSTREAM_TL_KBASE_CTX_ASSIGN_AS( \
2323
+ kbdev, \
2324
+ kernel_ctx_id, \
2325
+ kbase_device_as_index \
2326
+ ) \
2327
+ do { } while (0)
2328
+#endif /* MALI_USE_CSF */
2329
+
2330
+/**
2331
+ * KBASE_TLSTREAM_TL_KBASE_CTX_UNASSIGN_AS - Address Space is unassigned from a KBase context
2332
+ *
2333
+ * @kbdev: Kbase device
2334
+ * @kernel_ctx_id: Unique ID for the KBase Context
2335
+ */
2336
+#if MALI_USE_CSF
2337
+#define KBASE_TLSTREAM_TL_KBASE_CTX_UNASSIGN_AS( \
2338
+ kbdev, \
2339
+ kernel_ctx_id \
2340
+ ) \
2341
+ do { \
2342
+ int enabled = atomic_read(&kbdev->timeline_flags); \
2343
+ if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
2344
+ __kbase_tlstream_tl_kbase_ctx_unassign_as( \
2345
+ __TL_DISPATCH_STREAM(kbdev, obj), \
2346
+ kernel_ctx_id \
2347
+ ); \
2348
+ } while (0)
2349
+#else
2350
+#define KBASE_TLSTREAM_TL_KBASE_CTX_UNASSIGN_AS( \
2351
+ kbdev, \
2352
+ kernel_ctx_id \
2353
+ ) \
2354
+ do { } while (0)
2355
+#endif /* MALI_USE_CSF */
2356
+
2357
+/**
2358
+ * KBASE_TLSTREAM_TL_KBASE_NEW_KCPUQUEUE - New KCPU Queue
2359
+ *
2360
+ * @kbdev: Kbase device
2361
+ * @kcpu_queue: KCPU queue
2362
+ * @kcpu_queue_id: KCPU queue ID
2363
+ * @kernel_ctx_id: Unique ID for the KBase Context
2364
+ * @kcpuq_num_pending_cmds: Number of commands already enqueued in the KCPU queue
2365
+ */
2366
+#if MALI_USE_CSF
2367
+#define KBASE_TLSTREAM_TL_KBASE_NEW_KCPUQUEUE( \
2368
+ kbdev, \
2369
+ kcpu_queue, \
2370
+ kcpu_queue_id, \
2371
+ kernel_ctx_id, \
2372
+ kcpuq_num_pending_cmds \
2373
+ ) \
2374
+ do { \
2375
+ int enabled = atomic_read(&kbdev->timeline_flags); \
2376
+ if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
2377
+ __kbase_tlstream_tl_kbase_new_kcpuqueue( \
2378
+ __TL_DISPATCH_STREAM(kbdev, obj), \
2379
+ kcpu_queue, \
2380
+ kcpu_queue_id, \
2381
+ kernel_ctx_id, \
2382
+ kcpuq_num_pending_cmds \
2383
+ ); \
2384
+ } while (0)
2385
+#else
2386
+#define KBASE_TLSTREAM_TL_KBASE_NEW_KCPUQUEUE( \
2387
+ kbdev, \
2388
+ kcpu_queue, \
2389
+ kcpu_queue_id, \
2390
+ kernel_ctx_id, \
2391
+ kcpuq_num_pending_cmds \
2392
+ ) \
2393
+ do { } while (0)
2394
+#endif /* MALI_USE_CSF */
2395
+
2396
+/**
2397
+ * KBASE_TLSTREAM_TL_KBASE_DEL_KCPUQUEUE - Delete KCPU Queue
2398
+ *
2399
+ * @kbdev: Kbase device
2400
+ * @kcpu_queue: KCPU queue
2401
+ */
2402
+#if MALI_USE_CSF
2403
+#define KBASE_TLSTREAM_TL_KBASE_DEL_KCPUQUEUE( \
2404
+ kbdev, \
2405
+ kcpu_queue \
2406
+ ) \
2407
+ do { \
2408
+ int enabled = atomic_read(&kbdev->timeline_flags); \
2409
+ if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
2410
+ __kbase_tlstream_tl_kbase_del_kcpuqueue( \
2411
+ __TL_DISPATCH_STREAM(kbdev, obj), \
2412
+ kcpu_queue \
2413
+ ); \
2414
+ } while (0)
2415
+#else
2416
+#define KBASE_TLSTREAM_TL_KBASE_DEL_KCPUQUEUE( \
2417
+ kbdev, \
2418
+ kcpu_queue \
2419
+ ) \
2420
+ do { } while (0)
2421
+#endif /* MALI_USE_CSF */
2422
+
2423
+/**
2424
+ * KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_ENQUEUE_FENCE_SIGNAL - KCPU Queue enqueues Signal on Fence
2425
+ *
2426
+ * @kbdev: Kbase device
2427
+ * @kcpu_queue: KCPU queue
2428
+ * @fence: Fence object handle
2429
+ */
2430
+#if MALI_USE_CSF
2431
+#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_ENQUEUE_FENCE_SIGNAL( \
2432
+ kbdev, \
2433
+ kcpu_queue, \
2434
+ fence \
2435
+ ) \
2436
+ do { \
2437
+ int enabled = atomic_read(&kbdev->timeline_flags); \
2438
+ if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
2439
+ __kbase_tlstream_tl_kbase_kcpuqueue_enqueue_fence_signal( \
2440
+ __TL_DISPATCH_STREAM(kbdev, obj), \
2441
+ kcpu_queue, \
2442
+ fence \
2443
+ ); \
2444
+ } while (0)
2445
+#else
2446
+#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_ENQUEUE_FENCE_SIGNAL( \
2447
+ kbdev, \
2448
+ kcpu_queue, \
2449
+ fence \
2450
+ ) \
2451
+ do { } while (0)
2452
+#endif /* MALI_USE_CSF */
2453
+
2454
+/**
2455
+ * KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_ENQUEUE_FENCE_WAIT - KCPU Queue enqueues Wait on Fence
2456
+ *
2457
+ * @kbdev: Kbase device
2458
+ * @kcpu_queue: KCPU queue
2459
+ * @fence: Fence object handle
2460
+ */
2461
+#if MALI_USE_CSF
2462
+#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_ENQUEUE_FENCE_WAIT( \
2463
+ kbdev, \
2464
+ kcpu_queue, \
2465
+ fence \
2466
+ ) \
2467
+ do { \
2468
+ int enabled = atomic_read(&kbdev->timeline_flags); \
2469
+ if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
2470
+ __kbase_tlstream_tl_kbase_kcpuqueue_enqueue_fence_wait( \
2471
+ __TL_DISPATCH_STREAM(kbdev, obj), \
2472
+ kcpu_queue, \
2473
+ fence \
2474
+ ); \
2475
+ } while (0)
2476
+#else
2477
+#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_ENQUEUE_FENCE_WAIT( \
2478
+ kbdev, \
2479
+ kcpu_queue, \
2480
+ fence \
2481
+ ) \
2482
+ do { } while (0)
2483
+#endif /* MALI_USE_CSF */
2484
+
2485
+/**
2486
+ * KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_ENQUEUE_CQS_WAIT - KCPU Queue enqueues Wait on Cross Queue Sync Object
2487
+ *
2488
+ * @kbdev: Kbase device
2489
+ * @kcpu_queue: KCPU queue
2490
+ * @cqs_obj_gpu_addr: CQS Object GPU pointer
2491
+ * @compare_value: Semaphore value that should be exceeded for the WAIT to pass
2492
+ * @inherit_error: Flag which indicates if the CQS object error state should be inherited by the queue
2493
+ */
2494
+#if MALI_USE_CSF
2495
+#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_ENQUEUE_CQS_WAIT( \
2496
+ kbdev, \
2497
+ kcpu_queue, \
2498
+ cqs_obj_gpu_addr, \
2499
+ compare_value, \
2500
+ inherit_error \
2501
+ ) \
2502
+ do { \
2503
+ int enabled = atomic_read(&kbdev->timeline_flags); \
2504
+ if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
2505
+ __kbase_tlstream_tl_kbase_kcpuqueue_enqueue_cqs_wait( \
2506
+ __TL_DISPATCH_STREAM(kbdev, obj), \
2507
+ kcpu_queue, \
2508
+ cqs_obj_gpu_addr, \
2509
+ compare_value, \
2510
+ inherit_error \
2511
+ ); \
2512
+ } while (0)
2513
+#else
2514
+#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_ENQUEUE_CQS_WAIT( \
2515
+ kbdev, \
2516
+ kcpu_queue, \
2517
+ cqs_obj_gpu_addr, \
2518
+ compare_value, \
2519
+ inherit_error \
2520
+ ) \
2521
+ do { } while (0)
2522
+#endif /* MALI_USE_CSF */
2523
+
2524
+/**
2525
+ * KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_ENQUEUE_CQS_SET - KCPU Queue enqueues Set on Cross Queue Sync Object
2526
+ *
2527
+ * @kbdev: Kbase device
2528
+ * @kcpu_queue: KCPU queue
2529
+ * @cqs_obj_gpu_addr: CQS Object GPU pointer
2530
+ */
2531
+#if MALI_USE_CSF
2532
+#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_ENQUEUE_CQS_SET( \
2533
+ kbdev, \
2534
+ kcpu_queue, \
2535
+ cqs_obj_gpu_addr \
2536
+ ) \
2537
+ do { \
2538
+ int enabled = atomic_read(&kbdev->timeline_flags); \
2539
+ if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
2540
+ __kbase_tlstream_tl_kbase_kcpuqueue_enqueue_cqs_set( \
2541
+ __TL_DISPATCH_STREAM(kbdev, obj), \
2542
+ kcpu_queue, \
2543
+ cqs_obj_gpu_addr \
2544
+ ); \
2545
+ } while (0)
2546
+#else
2547
+#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_ENQUEUE_CQS_SET( \
2548
+ kbdev, \
2549
+ kcpu_queue, \
2550
+ cqs_obj_gpu_addr \
2551
+ ) \
2552
+ do { } while (0)
2553
+#endif /* MALI_USE_CSF */
2554
+
2555
+/**
2556
+ * KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_ENQUEUE_CQS_WAIT_OPERATION - KCPU Queue enqueues Wait Operation on Cross Queue Sync Object
2557
+ *
2558
+ * @kbdev: Kbase device
2559
+ * @kcpu_queue: KCPU queue
2560
+ * @cqs_obj_gpu_addr: CQS Object GPU pointer
2561
+ * @compare_value: Value that should be compared to semaphore value for the WAIT to pass
2562
+ * @condition: Condition for unblocking WAITs on Timeline Cross Queue Sync Object (e.g. greater than, less or equal)
2563
+ * @data_type: Data type of a CQS Object's value
2564
+ * @inherit_error: Flag which indicates if the CQS object error state should be inherited by the queue
2565
+ */
2566
+#if MALI_USE_CSF
2567
+#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_ENQUEUE_CQS_WAIT_OPERATION( \
2568
+ kbdev, \
2569
+ kcpu_queue, \
2570
+ cqs_obj_gpu_addr, \
2571
+ compare_value, \
2572
+ condition, \
2573
+ data_type, \
2574
+ inherit_error \
2575
+ ) \
2576
+ do { \
2577
+ int enabled = atomic_read(&kbdev->timeline_flags); \
2578
+ if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
2579
+ __kbase_tlstream_tl_kbase_kcpuqueue_enqueue_cqs_wait_operation( \
2580
+ __TL_DISPATCH_STREAM(kbdev, obj), \
2581
+ kcpu_queue, \
2582
+ cqs_obj_gpu_addr, \
2583
+ compare_value, \
2584
+ condition, \
2585
+ data_type, \
2586
+ inherit_error \
2587
+ ); \
2588
+ } while (0)
2589
+#else
2590
+#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_ENQUEUE_CQS_WAIT_OPERATION( \
2591
+ kbdev, \
2592
+ kcpu_queue, \
2593
+ cqs_obj_gpu_addr, \
2594
+ compare_value, \
2595
+ condition, \
2596
+ data_type, \
2597
+ inherit_error \
2598
+ ) \
2599
+ do { } while (0)
2600
+#endif /* MALI_USE_CSF */
2601
+
2602
+/**
2603
+ * KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_ENQUEUE_CQS_SET_OPERATION - KCPU Queue enqueues Set Operation on Cross Queue Sync Object
2604
+ *
2605
+ * @kbdev: Kbase device
2606
+ * @kcpu_queue: KCPU queue
2607
+ * @cqs_obj_gpu_addr: CQS Object GPU pointer
2608
+ * @value: Value that will be set or added to semaphore
2609
+ * @operation: Operation type performed on semaphore value (SET or ADD)
2610
+ * @data_type: Data type of a CQS Object's value
2611
+ */
2612
+#if MALI_USE_CSF
2613
+#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_ENQUEUE_CQS_SET_OPERATION( \
2614
+ kbdev, \
2615
+ kcpu_queue, \
2616
+ cqs_obj_gpu_addr, \
2617
+ value, \
2618
+ operation, \
2619
+ data_type \
2620
+ ) \
2621
+ do { \
2622
+ int enabled = atomic_read(&kbdev->timeline_flags); \
2623
+ if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
2624
+ __kbase_tlstream_tl_kbase_kcpuqueue_enqueue_cqs_set_operation( \
2625
+ __TL_DISPATCH_STREAM(kbdev, obj), \
2626
+ kcpu_queue, \
2627
+ cqs_obj_gpu_addr, \
2628
+ value, \
2629
+ operation, \
2630
+ data_type \
2631
+ ); \
2632
+ } while (0)
2633
+#else
2634
+#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_ENQUEUE_CQS_SET_OPERATION( \
2635
+ kbdev, \
2636
+ kcpu_queue, \
2637
+ cqs_obj_gpu_addr, \
2638
+ value, \
2639
+ operation, \
2640
+ data_type \
2641
+ ) \
2642
+ do { } while (0)
2643
+#endif /* MALI_USE_CSF */
2644
+
2645
+/**
2646
+ * KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_ENQUEUE_MAP_IMPORT - KCPU Queue enqueues Map Import
2647
+ *
2648
+ * @kbdev: Kbase device
2649
+ * @kcpu_queue: KCPU queue
2650
+ * @map_import_buf_gpu_addr: Map import buffer GPU pointer
2651
+ */
2652
+#if MALI_USE_CSF
2653
+#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_ENQUEUE_MAP_IMPORT( \
2654
+ kbdev, \
2655
+ kcpu_queue, \
2656
+ map_import_buf_gpu_addr \
2657
+ ) \
2658
+ do { \
2659
+ int enabled = atomic_read(&kbdev->timeline_flags); \
2660
+ if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
2661
+ __kbase_tlstream_tl_kbase_kcpuqueue_enqueue_map_import( \
2662
+ __TL_DISPATCH_STREAM(kbdev, obj), \
2663
+ kcpu_queue, \
2664
+ map_import_buf_gpu_addr \
2665
+ ); \
2666
+ } while (0)
2667
+#else
2668
+#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_ENQUEUE_MAP_IMPORT( \
2669
+ kbdev, \
2670
+ kcpu_queue, \
2671
+ map_import_buf_gpu_addr \
2672
+ ) \
2673
+ do { } while (0)
2674
+#endif /* MALI_USE_CSF */
2675
+
2676
+/**
2677
+ * KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_ENQUEUE_UNMAP_IMPORT - KCPU Queue enqueues Unmap Import
2678
+ *
2679
+ * @kbdev: Kbase device
2680
+ * @kcpu_queue: KCPU queue
2681
+ * @map_import_buf_gpu_addr: Map import buffer GPU pointer
2682
+ */
2683
+#if MALI_USE_CSF
2684
+#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_ENQUEUE_UNMAP_IMPORT( \
2685
+ kbdev, \
2686
+ kcpu_queue, \
2687
+ map_import_buf_gpu_addr \
2688
+ ) \
2689
+ do { \
2690
+ int enabled = atomic_read(&kbdev->timeline_flags); \
2691
+ if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
2692
+ __kbase_tlstream_tl_kbase_kcpuqueue_enqueue_unmap_import( \
2693
+ __TL_DISPATCH_STREAM(kbdev, obj), \
2694
+ kcpu_queue, \
2695
+ map_import_buf_gpu_addr \
2696
+ ); \
2697
+ } while (0)
2698
+#else
2699
+#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_ENQUEUE_UNMAP_IMPORT( \
2700
+ kbdev, \
2701
+ kcpu_queue, \
2702
+ map_import_buf_gpu_addr \
2703
+ ) \
2704
+ do { } while (0)
2705
+#endif /* MALI_USE_CSF */
2706
+
2707
+/**
2708
+ * KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_ENQUEUE_UNMAP_IMPORT_FORCE - KCPU Queue enqueues Unmap Import ignoring reference count
2709
+ *
2710
+ * @kbdev: Kbase device
2711
+ * @kcpu_queue: KCPU queue
2712
+ * @map_import_buf_gpu_addr: Map import buffer GPU pointer
2713
+ */
2714
+#if MALI_USE_CSF
2715
+#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_ENQUEUE_UNMAP_IMPORT_FORCE( \
2716
+ kbdev, \
2717
+ kcpu_queue, \
2718
+ map_import_buf_gpu_addr \
2719
+ ) \
2720
+ do { \
2721
+ int enabled = atomic_read(&kbdev->timeline_flags); \
2722
+ if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
2723
+ __kbase_tlstream_tl_kbase_kcpuqueue_enqueue_unmap_import_force( \
2724
+ __TL_DISPATCH_STREAM(kbdev, obj), \
2725
+ kcpu_queue, \
2726
+ map_import_buf_gpu_addr \
2727
+ ); \
2728
+ } while (0)
2729
+#else
2730
+#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_ENQUEUE_UNMAP_IMPORT_FORCE( \
2731
+ kbdev, \
2732
+ kcpu_queue, \
2733
+ map_import_buf_gpu_addr \
2734
+ ) \
2735
+ do { } while (0)
2736
+#endif /* MALI_USE_CSF */
2737
+
2738
+/**
2739
+ * KBASE_TLSTREAM_TL_KBASE_ARRAY_BEGIN_KCPUQUEUE_ENQUEUE_JIT_ALLOC - Begin array of KCPU Queue enqueues JIT Alloc
2740
+ *
2741
+ * @kbdev: Kbase device
2742
+ * @kcpu_queue: KCPU queue
2743
+ */
2744
+#if MALI_USE_CSF
2745
+#define KBASE_TLSTREAM_TL_KBASE_ARRAY_BEGIN_KCPUQUEUE_ENQUEUE_JIT_ALLOC( \
2746
+ kbdev, \
2747
+ kcpu_queue \
2748
+ ) \
2749
+ do { \
2750
+ int enabled = atomic_read(&kbdev->timeline_flags); \
2751
+ if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
2752
+ __kbase_tlstream_tl_kbase_array_begin_kcpuqueue_enqueue_jit_alloc( \
2753
+ __TL_DISPATCH_STREAM(kbdev, obj), \
2754
+ kcpu_queue \
2755
+ ); \
2756
+ } while (0)
2757
+#else
2758
+#define KBASE_TLSTREAM_TL_KBASE_ARRAY_BEGIN_KCPUQUEUE_ENQUEUE_JIT_ALLOC( \
2759
+ kbdev, \
2760
+ kcpu_queue \
2761
+ ) \
2762
+ do { } while (0)
2763
+#endif /* MALI_USE_CSF */
2764
+
2765
+/**
2766
+ * KBASE_TLSTREAM_TL_KBASE_ARRAY_ITEM_KCPUQUEUE_ENQUEUE_JIT_ALLOC - Array item of KCPU Queue enqueues JIT Alloc
2767
+ *
2768
+ * @kbdev: Kbase device
2769
+ * @kcpu_queue: KCPU queue
2770
+ * @jit_alloc_gpu_alloc_addr_dest: The GPU virtual address to write the JIT allocated GPU virtual address to
2771
+ * @jit_alloc_va_pages: The minimum number of virtual pages required
2772
+ * @jit_alloc_commit_pages: The minimum number of physical pages which should back the allocation
2773
+ * @jit_alloc_extent: Granularity of physical pages to grow the allocation by during a fault
2774
+ * @jit_alloc_jit_id: Unique ID provided by the caller, this is used to pair allocation and free requests. Zero is not a valid value
2775
+ * @jit_alloc_bin_id: The JIT allocation bin, used in conjunction with max_allocations to limit the number of each type of JIT allocation
2776
+ * @jit_alloc_max_allocations: The maximum number of allocations allowed within the bin specified by bin_id. Should be the same for all JIT allocations within the same bin.
2777
+ * @jit_alloc_flags: Flags specifying the special requirements for the JIT allocation
2778
+ * @jit_alloc_usage_id: A hint about which allocation should be reused. The kernel should attempt to use a previous allocation with the same usage_id
2779
+ */
2780
+#if MALI_USE_CSF
2781
+#define KBASE_TLSTREAM_TL_KBASE_ARRAY_ITEM_KCPUQUEUE_ENQUEUE_JIT_ALLOC( \
2782
+ kbdev, \
2783
+ kcpu_queue, \
2784
+ jit_alloc_gpu_alloc_addr_dest, \
2785
+ jit_alloc_va_pages, \
2786
+ jit_alloc_commit_pages, \
2787
+ jit_alloc_extent, \
2788
+ jit_alloc_jit_id, \
2789
+ jit_alloc_bin_id, \
2790
+ jit_alloc_max_allocations, \
2791
+ jit_alloc_flags, \
2792
+ jit_alloc_usage_id \
2793
+ ) \
2794
+ do { \
2795
+ int enabled = atomic_read(&kbdev->timeline_flags); \
2796
+ if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
2797
+ __kbase_tlstream_tl_kbase_array_item_kcpuqueue_enqueue_jit_alloc( \
2798
+ __TL_DISPATCH_STREAM(kbdev, obj), \
2799
+ kcpu_queue, \
2800
+ jit_alloc_gpu_alloc_addr_dest, \
2801
+ jit_alloc_va_pages, \
2802
+ jit_alloc_commit_pages, \
2803
+ jit_alloc_extent, \
2804
+ jit_alloc_jit_id, \
2805
+ jit_alloc_bin_id, \
2806
+ jit_alloc_max_allocations, \
2807
+ jit_alloc_flags, \
2808
+ jit_alloc_usage_id \
2809
+ ); \
2810
+ } while (0)
2811
+#else
2812
+#define KBASE_TLSTREAM_TL_KBASE_ARRAY_ITEM_KCPUQUEUE_ENQUEUE_JIT_ALLOC( \
2813
+ kbdev, \
2814
+ kcpu_queue, \
2815
+ jit_alloc_gpu_alloc_addr_dest, \
2816
+ jit_alloc_va_pages, \
2817
+ jit_alloc_commit_pages, \
2818
+ jit_alloc_extent, \
2819
+ jit_alloc_jit_id, \
2820
+ jit_alloc_bin_id, \
2821
+ jit_alloc_max_allocations, \
2822
+ jit_alloc_flags, \
2823
+ jit_alloc_usage_id \
2824
+ ) \
2825
+ do { } while (0)
2826
+#endif /* MALI_USE_CSF */
2827
+
2828
+/**
2829
+ * KBASE_TLSTREAM_TL_KBASE_ARRAY_END_KCPUQUEUE_ENQUEUE_JIT_ALLOC - End array of KCPU Queue enqueues JIT Alloc
2830
+ *
2831
+ * @kbdev: Kbase device
2832
+ * @kcpu_queue: KCPU queue
2833
+ */
2834
+#if MALI_USE_CSF
2835
+#define KBASE_TLSTREAM_TL_KBASE_ARRAY_END_KCPUQUEUE_ENQUEUE_JIT_ALLOC( \
2836
+ kbdev, \
2837
+ kcpu_queue \
2838
+ ) \
2839
+ do { \
2840
+ int enabled = atomic_read(&kbdev->timeline_flags); \
2841
+ if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
2842
+ __kbase_tlstream_tl_kbase_array_end_kcpuqueue_enqueue_jit_alloc( \
2843
+ __TL_DISPATCH_STREAM(kbdev, obj), \
2844
+ kcpu_queue \
2845
+ ); \
2846
+ } while (0)
2847
+#else
2848
+#define KBASE_TLSTREAM_TL_KBASE_ARRAY_END_KCPUQUEUE_ENQUEUE_JIT_ALLOC( \
2849
+ kbdev, \
2850
+ kcpu_queue \
2851
+ ) \
2852
+ do { } while (0)
2853
+#endif /* MALI_USE_CSF */
2854
+
2855
+/**
2856
+ * KBASE_TLSTREAM_TL_KBASE_ARRAY_BEGIN_KCPUQUEUE_ENQUEUE_JIT_FREE - Begin array of KCPU Queue enqueues JIT Free
2857
+ *
2858
+ * @kbdev: Kbase device
2859
+ * @kcpu_queue: KCPU queue
2860
+ */
2861
+#if MALI_USE_CSF
2862
+#define KBASE_TLSTREAM_TL_KBASE_ARRAY_BEGIN_KCPUQUEUE_ENQUEUE_JIT_FREE( \
2863
+ kbdev, \
2864
+ kcpu_queue \
2865
+ ) \
2866
+ do { \
2867
+ int enabled = atomic_read(&kbdev->timeline_flags); \
2868
+ if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
2869
+ __kbase_tlstream_tl_kbase_array_begin_kcpuqueue_enqueue_jit_free( \
2870
+ __TL_DISPATCH_STREAM(kbdev, obj), \
2871
+ kcpu_queue \
2872
+ ); \
2873
+ } while (0)
2874
+#else
2875
+#define KBASE_TLSTREAM_TL_KBASE_ARRAY_BEGIN_KCPUQUEUE_ENQUEUE_JIT_FREE( \
2876
+ kbdev, \
2877
+ kcpu_queue \
2878
+ ) \
2879
+ do { } while (0)
2880
+#endif /* MALI_USE_CSF */
2881
+
2882
+/**
2883
+ * KBASE_TLSTREAM_TL_KBASE_ARRAY_ITEM_KCPUQUEUE_ENQUEUE_JIT_FREE - Array item of KCPU Queue enqueues JIT Free
2884
+ *
2885
+ * @kbdev: Kbase device
2886
+ * @kcpu_queue: KCPU queue
2887
+ * @jit_alloc_jit_id: Unique ID provided by the caller, this is used to pair allocation and free requests. Zero is not a valid value
2888
+ */
2889
+#if MALI_USE_CSF
2890
+#define KBASE_TLSTREAM_TL_KBASE_ARRAY_ITEM_KCPUQUEUE_ENQUEUE_JIT_FREE( \
2891
+ kbdev, \
2892
+ kcpu_queue, \
2893
+ jit_alloc_jit_id \
2894
+ ) \
2895
+ do { \
2896
+ int enabled = atomic_read(&kbdev->timeline_flags); \
2897
+ if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
2898
+ __kbase_tlstream_tl_kbase_array_item_kcpuqueue_enqueue_jit_free( \
2899
+ __TL_DISPATCH_STREAM(kbdev, obj), \
2900
+ kcpu_queue, \
2901
+ jit_alloc_jit_id \
2902
+ ); \
2903
+ } while (0)
2904
+#else
2905
+#define KBASE_TLSTREAM_TL_KBASE_ARRAY_ITEM_KCPUQUEUE_ENQUEUE_JIT_FREE( \
2906
+ kbdev, \
2907
+ kcpu_queue, \
2908
+ jit_alloc_jit_id \
2909
+ ) \
2910
+ do { } while (0)
2911
+#endif /* MALI_USE_CSF */
2912
+
2913
+/**
2914
+ * KBASE_TLSTREAM_TL_KBASE_ARRAY_END_KCPUQUEUE_ENQUEUE_JIT_FREE - End array of KCPU Queue enqueues JIT Free
2915
+ *
2916
+ * @kbdev: Kbase device
2917
+ * @kcpu_queue: KCPU queue
2918
+ */
2919
+#if MALI_USE_CSF
2920
+#define KBASE_TLSTREAM_TL_KBASE_ARRAY_END_KCPUQUEUE_ENQUEUE_JIT_FREE( \
2921
+ kbdev, \
2922
+ kcpu_queue \
2923
+ ) \
2924
+ do { \
2925
+ int enabled = atomic_read(&kbdev->timeline_flags); \
2926
+ if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
2927
+ __kbase_tlstream_tl_kbase_array_end_kcpuqueue_enqueue_jit_free( \
2928
+ __TL_DISPATCH_STREAM(kbdev, obj), \
2929
+ kcpu_queue \
2930
+ ); \
2931
+ } while (0)
2932
+#else
2933
+#define KBASE_TLSTREAM_TL_KBASE_ARRAY_END_KCPUQUEUE_ENQUEUE_JIT_FREE( \
2934
+ kbdev, \
2935
+ kcpu_queue \
2936
+ ) \
2937
+ do { } while (0)
2938
+#endif /* MALI_USE_CSF */
2939
+
2940
+/**
2941
+ * KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_ENQUEUE_ERROR_BARRIER - KCPU Queue enqueues Error Barrier
2942
+ *
2943
+ * @kbdev: Kbase device
2944
+ * @kcpu_queue: KCPU queue
2945
+ */
2946
+#if MALI_USE_CSF
2947
+#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_ENQUEUE_ERROR_BARRIER( \
2948
+ kbdev, \
2949
+ kcpu_queue \
2950
+ ) \
2951
+ do { \
2952
+ int enabled = atomic_read(&kbdev->timeline_flags); \
2953
+ if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
2954
+ __kbase_tlstream_tl_kbase_kcpuqueue_enqueue_error_barrier( \
2955
+ __TL_DISPATCH_STREAM(kbdev, obj), \
2956
+ kcpu_queue \
2957
+ ); \
2958
+ } while (0)
2959
+#else
2960
+#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_ENQUEUE_ERROR_BARRIER( \
2961
+ kbdev, \
2962
+ kcpu_queue \
2963
+ ) \
2964
+ do { } while (0)
2965
+#endif /* MALI_USE_CSF */
2966
+
2967
+/**
2968
+ * KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_ENQUEUE_GROUP_SUSPEND - KCPU Queue enqueues Group Suspend
2969
+ *
2970
+ * @kbdev: Kbase device
2971
+ * @kcpu_queue: KCPU queue
2972
+ * @group_suspend_buf: Pointer to the suspend buffer structure
2973
+ * @gpu_cmdq_grp_handle: GPU Command Queue Group handle which will match userspace
2974
+ */
2975
+#if MALI_USE_CSF
2976
+#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_ENQUEUE_GROUP_SUSPEND( \
2977
+ kbdev, \
2978
+ kcpu_queue, \
2979
+ group_suspend_buf, \
2980
+ gpu_cmdq_grp_handle \
2981
+ ) \
2982
+ do { \
2983
+ int enabled = atomic_read(&kbdev->timeline_flags); \
2984
+ if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
2985
+ __kbase_tlstream_tl_kbase_kcpuqueue_enqueue_group_suspend( \
2986
+ __TL_DISPATCH_STREAM(kbdev, obj), \
2987
+ kcpu_queue, \
2988
+ group_suspend_buf, \
2989
+ gpu_cmdq_grp_handle \
2990
+ ); \
2991
+ } while (0)
2992
+#else
2993
+#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_ENQUEUE_GROUP_SUSPEND( \
2994
+ kbdev, \
2995
+ kcpu_queue, \
2996
+ group_suspend_buf, \
2997
+ gpu_cmdq_grp_handle \
2998
+ ) \
2999
+ do { } while (0)
3000
+#endif /* MALI_USE_CSF */
3001
+
3002
+/**
3003
+ * KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_FENCE_SIGNAL_START - KCPU Queue starts a Signal on Fence
3004
+ *
3005
+ * @kbdev: Kbase device
3006
+ * @kcpu_queue: KCPU queue
3007
+ */
3008
+#if MALI_USE_CSF
3009
+#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_FENCE_SIGNAL_START( \
3010
+ kbdev, \
3011
+ kcpu_queue \
3012
+ ) \
3013
+ do { \
3014
+ int enabled = atomic_read(&kbdev->timeline_flags); \
3015
+ if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
3016
+ __kbase_tlstream_tl_kbase_kcpuqueue_execute_fence_signal_start( \
3017
+ __TL_DISPATCH_STREAM(kbdev, obj), \
3018
+ kcpu_queue \
3019
+ ); \
3020
+ } while (0)
3021
+#else
3022
+#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_FENCE_SIGNAL_START( \
3023
+ kbdev, \
3024
+ kcpu_queue \
3025
+ ) \
3026
+ do { } while (0)
3027
+#endif /* MALI_USE_CSF */
3028
+
3029
+/**
3030
+ * KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_FENCE_SIGNAL_END - KCPU Queue ends a Signal on Fence
3031
+ *
3032
+ * @kbdev: Kbase device
3033
+ * @kcpu_queue: KCPU queue
3034
+ * @execute_error: Non-zero error code if KCPU Queue item completed with error, else zero
3035
+ */
3036
+#if MALI_USE_CSF
3037
+#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_FENCE_SIGNAL_END( \
3038
+ kbdev, \
3039
+ kcpu_queue, \
3040
+ execute_error \
3041
+ ) \
3042
+ do { \
3043
+ int enabled = atomic_read(&kbdev->timeline_flags); \
3044
+ if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
3045
+ __kbase_tlstream_tl_kbase_kcpuqueue_execute_fence_signal_end( \
3046
+ __TL_DISPATCH_STREAM(kbdev, obj), \
3047
+ kcpu_queue, \
3048
+ execute_error \
3049
+ ); \
3050
+ } while (0)
3051
+#else
3052
+#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_FENCE_SIGNAL_END( \
3053
+ kbdev, \
3054
+ kcpu_queue, \
3055
+ execute_error \
3056
+ ) \
3057
+ do { } while (0)
3058
+#endif /* MALI_USE_CSF */
3059
+
3060
+/**
3061
+ * KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_FENCE_WAIT_START - KCPU Queue starts a Wait on Fence
3062
+ *
3063
+ * @kbdev: Kbase device
3064
+ * @kcpu_queue: KCPU queue
3065
+ */
3066
+#if MALI_USE_CSF
3067
+#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_FENCE_WAIT_START( \
3068
+ kbdev, \
3069
+ kcpu_queue \
3070
+ ) \
3071
+ do { \
3072
+ int enabled = atomic_read(&kbdev->timeline_flags); \
3073
+ if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
3074
+ __kbase_tlstream_tl_kbase_kcpuqueue_execute_fence_wait_start( \
3075
+ __TL_DISPATCH_STREAM(kbdev, obj), \
3076
+ kcpu_queue \
3077
+ ); \
3078
+ } while (0)
3079
+#else
3080
+#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_FENCE_WAIT_START( \
3081
+ kbdev, \
3082
+ kcpu_queue \
3083
+ ) \
3084
+ do { } while (0)
3085
+#endif /* MALI_USE_CSF */
3086
+
3087
+/**
3088
+ * KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_FENCE_WAIT_END - KCPU Queue ends a Wait on Fence
3089
+ *
3090
+ * @kbdev: Kbase device
3091
+ * @kcpu_queue: KCPU queue
3092
+ * @execute_error: Non-zero error code if KCPU Queue item completed with error, else zero
3093
+ */
3094
+#if MALI_USE_CSF
3095
+#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_FENCE_WAIT_END( \
3096
+ kbdev, \
3097
+ kcpu_queue, \
3098
+ execute_error \
3099
+ ) \
3100
+ do { \
3101
+ int enabled = atomic_read(&kbdev->timeline_flags); \
3102
+ if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
3103
+ __kbase_tlstream_tl_kbase_kcpuqueue_execute_fence_wait_end( \
3104
+ __TL_DISPATCH_STREAM(kbdev, obj), \
3105
+ kcpu_queue, \
3106
+ execute_error \
3107
+ ); \
3108
+ } while (0)
3109
+#else
3110
+#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_FENCE_WAIT_END( \
3111
+ kbdev, \
3112
+ kcpu_queue, \
3113
+ execute_error \
3114
+ ) \
3115
+ do { } while (0)
3116
+#endif /* MALI_USE_CSF */
3117
+
3118
+/**
3119
+ * KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_CQS_WAIT_START - KCPU Queue starts a Wait on Cross Queue Sync Object
3120
+ *
3121
+ * @kbdev: Kbase device
3122
+ * @kcpu_queue: KCPU queue
3123
+ */
3124
+#if MALI_USE_CSF
3125
+#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_CQS_WAIT_START( \
3126
+ kbdev, \
3127
+ kcpu_queue \
3128
+ ) \
3129
+ do { \
3130
+ int enabled = atomic_read(&kbdev->timeline_flags); \
3131
+ if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
3132
+ __kbase_tlstream_tl_kbase_kcpuqueue_execute_cqs_wait_start( \
3133
+ __TL_DISPATCH_STREAM(kbdev, obj), \
3134
+ kcpu_queue \
3135
+ ); \
3136
+ } while (0)
3137
+#else
3138
+#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_CQS_WAIT_START( \
3139
+ kbdev, \
3140
+ kcpu_queue \
3141
+ ) \
3142
+ do { } while (0)
3143
+#endif /* MALI_USE_CSF */
3144
+
3145
+/**
3146
+ * KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_CQS_WAIT_END - KCPU Queue ends a Wait on Cross Queue Sync Object
3147
+ *
3148
+ * @kbdev: Kbase device
3149
+ * @kcpu_queue: KCPU queue
3150
+ * @execute_error: Non-zero error code if KCPU Queue item completed with error, else zero
3151
+ */
3152
+#if MALI_USE_CSF
3153
+#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_CQS_WAIT_END( \
3154
+ kbdev, \
3155
+ kcpu_queue, \
3156
+ execute_error \
3157
+ ) \
3158
+ do { \
3159
+ int enabled = atomic_read(&kbdev->timeline_flags); \
3160
+ if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
3161
+ __kbase_tlstream_tl_kbase_kcpuqueue_execute_cqs_wait_end( \
3162
+ __TL_DISPATCH_STREAM(kbdev, obj), \
3163
+ kcpu_queue, \
3164
+ execute_error \
3165
+ ); \
3166
+ } while (0)
3167
+#else
3168
+#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_CQS_WAIT_END( \
3169
+ kbdev, \
3170
+ kcpu_queue, \
3171
+ execute_error \
3172
+ ) \
3173
+ do { } while (0)
3174
+#endif /* MALI_USE_CSF */
3175
+
3176
+/**
3177
+ * KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_CQS_SET - KCPU Queue executes a Set on Cross Queue Sync Object
3178
+ *
3179
+ * @kbdev: Kbase device
3180
+ * @kcpu_queue: KCPU queue
3181
+ * @execute_error: Non-zero error code if KCPU Queue item completed with error, else zero
3182
+ */
3183
+#if MALI_USE_CSF
3184
+#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_CQS_SET( \
3185
+ kbdev, \
3186
+ kcpu_queue, \
3187
+ execute_error \
3188
+ ) \
3189
+ do { \
3190
+ int enabled = atomic_read(&kbdev->timeline_flags); \
3191
+ if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
3192
+ __kbase_tlstream_tl_kbase_kcpuqueue_execute_cqs_set( \
3193
+ __TL_DISPATCH_STREAM(kbdev, obj), \
3194
+ kcpu_queue, \
3195
+ execute_error \
3196
+ ); \
3197
+ } while (0)
3198
+#else
3199
+#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_CQS_SET( \
3200
+ kbdev, \
3201
+ kcpu_queue, \
3202
+ execute_error \
3203
+ ) \
3204
+ do { } while (0)
3205
+#endif /* MALI_USE_CSF */
3206
+
3207
+/**
3208
+ * KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_CQS_WAIT_OPERATION_START - KCPU Queue starts a Wait Operation on Cross Queue Sync Object
3209
+ *
3210
+ * @kbdev: Kbase device
3211
+ * @kcpu_queue: KCPU queue
3212
+ */
3213
+#if MALI_USE_CSF
3214
+#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_CQS_WAIT_OPERATION_START( \
3215
+ kbdev, \
3216
+ kcpu_queue \
3217
+ ) \
3218
+ do { \
3219
+ int enabled = atomic_read(&kbdev->timeline_flags); \
3220
+ if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
3221
+ __kbase_tlstream_tl_kbase_kcpuqueue_execute_cqs_wait_operation_start( \
3222
+ __TL_DISPATCH_STREAM(kbdev, obj), \
3223
+ kcpu_queue \
3224
+ ); \
3225
+ } while (0)
3226
+#else
3227
+#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_CQS_WAIT_OPERATION_START( \
3228
+ kbdev, \
3229
+ kcpu_queue \
3230
+ ) \
3231
+ do { } while (0)
3232
+#endif /* MALI_USE_CSF */
3233
+
3234
+/**
3235
+ * KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_CQS_WAIT_OPERATION_END - KCPU Queue ends a Wait Operation on Cross Queue Sync Object
3236
+ *
3237
+ * @kbdev: Kbase device
3238
+ * @kcpu_queue: KCPU queue
3239
+ * @execute_error: Non-zero error code if KCPU Queue item completed with error, else zero
3240
+ */
3241
+#if MALI_USE_CSF
3242
+#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_CQS_WAIT_OPERATION_END( \
3243
+ kbdev, \
3244
+ kcpu_queue, \
3245
+ execute_error \
3246
+ ) \
3247
+ do { \
3248
+ int enabled = atomic_read(&kbdev->timeline_flags); \
3249
+ if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
3250
+ __kbase_tlstream_tl_kbase_kcpuqueue_execute_cqs_wait_operation_end( \
3251
+ __TL_DISPATCH_STREAM(kbdev, obj), \
3252
+ kcpu_queue, \
3253
+ execute_error \
3254
+ ); \
3255
+ } while (0)
3256
+#else
3257
+#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_CQS_WAIT_OPERATION_END( \
3258
+ kbdev, \
3259
+ kcpu_queue, \
3260
+ execute_error \
3261
+ ) \
3262
+ do { } while (0)
3263
+#endif /* MALI_USE_CSF */
3264
+
3265
+/**
3266
+ * KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_CQS_SET_OPERATION - KCPU Queue executes a Set Operation on Cross Queue Sync Object
3267
+ *
3268
+ * @kbdev: Kbase device
3269
+ * @kcpu_queue: KCPU queue
3270
+ * @execute_error: Non-zero error code if KCPU Queue item completed with error, else zero
3271
+ */
3272
+#if MALI_USE_CSF
3273
+#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_CQS_SET_OPERATION( \
3274
+ kbdev, \
3275
+ kcpu_queue, \
3276
+ execute_error \
3277
+ ) \
3278
+ do { \
3279
+ int enabled = atomic_read(&kbdev->timeline_flags); \
3280
+ if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
3281
+ __kbase_tlstream_tl_kbase_kcpuqueue_execute_cqs_set_operation( \
3282
+ __TL_DISPATCH_STREAM(kbdev, obj), \
3283
+ kcpu_queue, \
3284
+ execute_error \
3285
+ ); \
3286
+ } while (0)
3287
+#else
3288
+#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_CQS_SET_OPERATION( \
3289
+ kbdev, \
3290
+ kcpu_queue, \
3291
+ execute_error \
3292
+ ) \
3293
+ do { } while (0)
3294
+#endif /* MALI_USE_CSF */
3295
+
3296
+/**
3297
+ * KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_MAP_IMPORT_START - KCPU Queue starts a Map Import
3298
+ *
3299
+ * @kbdev: Kbase device
3300
+ * @kcpu_queue: KCPU queue
3301
+ */
3302
+#if MALI_USE_CSF
3303
+#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_MAP_IMPORT_START( \
3304
+ kbdev, \
3305
+ kcpu_queue \
3306
+ ) \
3307
+ do { \
3308
+ int enabled = atomic_read(&kbdev->timeline_flags); \
3309
+ if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
3310
+ __kbase_tlstream_tl_kbase_kcpuqueue_execute_map_import_start( \
3311
+ __TL_DISPATCH_STREAM(kbdev, obj), \
3312
+ kcpu_queue \
3313
+ ); \
3314
+ } while (0)
3315
+#else
3316
+#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_MAP_IMPORT_START( \
3317
+ kbdev, \
3318
+ kcpu_queue \
3319
+ ) \
3320
+ do { } while (0)
3321
+#endif /* MALI_USE_CSF */
3322
+
3323
+/**
3324
+ * KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_MAP_IMPORT_END - KCPU Queue ends a Map Import
3325
+ *
3326
+ * @kbdev: Kbase device
3327
+ * @kcpu_queue: KCPU queue
3328
+ * @execute_error: Non-zero error code if KCPU Queue item completed with error, else zero
3329
+ */
3330
+#if MALI_USE_CSF
3331
+#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_MAP_IMPORT_END( \
3332
+ kbdev, \
3333
+ kcpu_queue, \
3334
+ execute_error \
3335
+ ) \
3336
+ do { \
3337
+ int enabled = atomic_read(&kbdev->timeline_flags); \
3338
+ if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
3339
+ __kbase_tlstream_tl_kbase_kcpuqueue_execute_map_import_end( \
3340
+ __TL_DISPATCH_STREAM(kbdev, obj), \
3341
+ kcpu_queue, \
3342
+ execute_error \
3343
+ ); \
3344
+ } while (0)
3345
+#else
3346
+#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_MAP_IMPORT_END( \
3347
+ kbdev, \
3348
+ kcpu_queue, \
3349
+ execute_error \
3350
+ ) \
3351
+ do { } while (0)
3352
+#endif /* MALI_USE_CSF */
3353
+
3354
+/**
3355
+ * KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_UNMAP_IMPORT_START - KCPU Queue starts an Unmap Import
3356
+ *
3357
+ * @kbdev: Kbase device
3358
+ * @kcpu_queue: KCPU queue
3359
+ */
3360
+#if MALI_USE_CSF
3361
+#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_UNMAP_IMPORT_START( \
3362
+ kbdev, \
3363
+ kcpu_queue \
3364
+ ) \
3365
+ do { \
3366
+ int enabled = atomic_read(&kbdev->timeline_flags); \
3367
+ if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
3368
+ __kbase_tlstream_tl_kbase_kcpuqueue_execute_unmap_import_start( \
3369
+ __TL_DISPATCH_STREAM(kbdev, obj), \
3370
+ kcpu_queue \
3371
+ ); \
3372
+ } while (0)
3373
+#else
3374
+#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_UNMAP_IMPORT_START( \
3375
+ kbdev, \
3376
+ kcpu_queue \
3377
+ ) \
3378
+ do { } while (0)
3379
+#endif /* MALI_USE_CSF */
3380
+
3381
+/**
3382
+ * KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_UNMAP_IMPORT_END - KCPU Queue ends an Unmap Import
3383
+ *
3384
+ * @kbdev: Kbase device
3385
+ * @kcpu_queue: KCPU queue
3386
+ * @execute_error: Non-zero error code if KCPU Queue item completed with error, else zero
3387
+ */
3388
+#if MALI_USE_CSF
3389
+#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_UNMAP_IMPORT_END( \
3390
+ kbdev, \
3391
+ kcpu_queue, \
3392
+ execute_error \
3393
+ ) \
3394
+ do { \
3395
+ int enabled = atomic_read(&kbdev->timeline_flags); \
3396
+ if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
3397
+ __kbase_tlstream_tl_kbase_kcpuqueue_execute_unmap_import_end( \
3398
+ __TL_DISPATCH_STREAM(kbdev, obj), \
3399
+ kcpu_queue, \
3400
+ execute_error \
3401
+ ); \
3402
+ } while (0)
3403
+#else
3404
+#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_UNMAP_IMPORT_END( \
3405
+ kbdev, \
3406
+ kcpu_queue, \
3407
+ execute_error \
3408
+ ) \
3409
+ do { } while (0)
3410
+#endif /* MALI_USE_CSF */
3411
+
3412
+/**
3413
+ * KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_UNMAP_IMPORT_FORCE_START - KCPU Queue starts an Unmap Import ignoring reference count
3414
+ *
3415
+ * @kbdev: Kbase device
3416
+ * @kcpu_queue: KCPU queue
3417
+ */
3418
+#if MALI_USE_CSF
3419
+#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_UNMAP_IMPORT_FORCE_START( \
3420
+ kbdev, \
3421
+ kcpu_queue \
3422
+ ) \
3423
+ do { \
3424
+ int enabled = atomic_read(&kbdev->timeline_flags); \
3425
+ if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
3426
+ __kbase_tlstream_tl_kbase_kcpuqueue_execute_unmap_import_force_start( \
3427
+ __TL_DISPATCH_STREAM(kbdev, obj), \
3428
+ kcpu_queue \
3429
+ ); \
3430
+ } while (0)
3431
+#else
3432
+#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_UNMAP_IMPORT_FORCE_START( \
3433
+ kbdev, \
3434
+ kcpu_queue \
3435
+ ) \
3436
+ do { } while (0)
3437
+#endif /* MALI_USE_CSF */
3438
+
3439
+/**
3440
+ * KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_UNMAP_IMPORT_FORCE_END - KCPU Queue ends an Unmap Import ignoring reference count
3441
+ *
3442
+ * @kbdev: Kbase device
3443
+ * @kcpu_queue: KCPU queue
3444
+ * @execute_error: Non-zero error code if KCPU Queue item completed with error, else zero
3445
+ */
3446
+#if MALI_USE_CSF
3447
+#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_UNMAP_IMPORT_FORCE_END( \
3448
+ kbdev, \
3449
+ kcpu_queue, \
3450
+ execute_error \
3451
+ ) \
3452
+ do { \
3453
+ int enabled = atomic_read(&kbdev->timeline_flags); \
3454
+ if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
3455
+ __kbase_tlstream_tl_kbase_kcpuqueue_execute_unmap_import_force_end( \
3456
+ __TL_DISPATCH_STREAM(kbdev, obj), \
3457
+ kcpu_queue, \
3458
+ execute_error \
3459
+ ); \
3460
+ } while (0)
3461
+#else
3462
+#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_UNMAP_IMPORT_FORCE_END( \
3463
+ kbdev, \
3464
+ kcpu_queue, \
3465
+ execute_error \
3466
+ ) \
3467
+ do { } while (0)
3468
+#endif /* MALI_USE_CSF */
3469
+
3470
+/**
3471
+ * KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_JIT_ALLOC_START - KCPU Queue starts an array of JIT Allocs
3472
+ *
3473
+ * @kbdev: Kbase device
3474
+ * @kcpu_queue: KCPU queue
3475
+ */
3476
+#if MALI_USE_CSF
3477
+#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_JIT_ALLOC_START( \
3478
+ kbdev, \
3479
+ kcpu_queue \
3480
+ ) \
3481
+ do { \
3482
+ int enabled = atomic_read(&kbdev->timeline_flags); \
3483
+ if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
3484
+ __kbase_tlstream_tl_kbase_kcpuqueue_execute_jit_alloc_start( \
3485
+ __TL_DISPATCH_STREAM(kbdev, obj), \
3486
+ kcpu_queue \
3487
+ ); \
3488
+ } while (0)
3489
+#else
3490
+#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_JIT_ALLOC_START( \
3491
+ kbdev, \
3492
+ kcpu_queue \
3493
+ ) \
3494
+ do { } while (0)
3495
+#endif /* MALI_USE_CSF */
3496
+
3497
+/**
3498
+ * KBASE_TLSTREAM_TL_KBASE_ARRAY_BEGIN_KCPUQUEUE_EXECUTE_JIT_ALLOC_END - Begin array of KCPU Queue ends an array of JIT Allocs
3499
+ *
3500
+ * @kbdev: Kbase device
3501
+ * @kcpu_queue: KCPU queue
3502
+ */
3503
+#if MALI_USE_CSF
3504
+#define KBASE_TLSTREAM_TL_KBASE_ARRAY_BEGIN_KCPUQUEUE_EXECUTE_JIT_ALLOC_END( \
3505
+ kbdev, \
3506
+ kcpu_queue \
3507
+ ) \
3508
+ do { \
3509
+ int enabled = atomic_read(&kbdev->timeline_flags); \
3510
+ if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
3511
+ __kbase_tlstream_tl_kbase_array_begin_kcpuqueue_execute_jit_alloc_end( \
3512
+ __TL_DISPATCH_STREAM(kbdev, obj), \
3513
+ kcpu_queue \
3514
+ ); \
3515
+ } while (0)
3516
+#else
3517
+#define KBASE_TLSTREAM_TL_KBASE_ARRAY_BEGIN_KCPUQUEUE_EXECUTE_JIT_ALLOC_END( \
3518
+ kbdev, \
3519
+ kcpu_queue \
3520
+ ) \
3521
+ do { } while (0)
3522
+#endif /* MALI_USE_CSF */
3523
+
3524
+/**
3525
+ * KBASE_TLSTREAM_TL_KBASE_ARRAY_ITEM_KCPUQUEUE_EXECUTE_JIT_ALLOC_END - Array item of KCPU Queue ends an array of JIT Allocs
3526
+ *
3527
+ * @kbdev: Kbase device
3528
+ * @kcpu_queue: KCPU queue
3529
+ * @execute_error: Non-zero error code if KCPU Queue item completed with error, else zero
3530
+ * @jit_alloc_gpu_alloc_addr: The JIT allocated GPU virtual address
3531
+ * @jit_alloc_mmu_flags: The MMU flags for the JIT allocation
3532
+ */
3533
+#if MALI_USE_CSF
3534
+#define KBASE_TLSTREAM_TL_KBASE_ARRAY_ITEM_KCPUQUEUE_EXECUTE_JIT_ALLOC_END( \
3535
+ kbdev, \
3536
+ kcpu_queue, \
3537
+ execute_error, \
3538
+ jit_alloc_gpu_alloc_addr, \
3539
+ jit_alloc_mmu_flags \
3540
+ ) \
3541
+ do { \
3542
+ int enabled = atomic_read(&kbdev->timeline_flags); \
3543
+ if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
3544
+ __kbase_tlstream_tl_kbase_array_item_kcpuqueue_execute_jit_alloc_end( \
3545
+ __TL_DISPATCH_STREAM(kbdev, obj), \
3546
+ kcpu_queue, \
3547
+ execute_error, \
3548
+ jit_alloc_gpu_alloc_addr, \
3549
+ jit_alloc_mmu_flags \
3550
+ ); \
3551
+ } while (0)
3552
+#else
3553
+#define KBASE_TLSTREAM_TL_KBASE_ARRAY_ITEM_KCPUQUEUE_EXECUTE_JIT_ALLOC_END( \
3554
+ kbdev, \
3555
+ kcpu_queue, \
3556
+ execute_error, \
3557
+ jit_alloc_gpu_alloc_addr, \
3558
+ jit_alloc_mmu_flags \
3559
+ ) \
3560
+ do { } while (0)
3561
+#endif /* MALI_USE_CSF */
3562
+
3563
+/**
3564
+ * KBASE_TLSTREAM_TL_KBASE_ARRAY_END_KCPUQUEUE_EXECUTE_JIT_ALLOC_END - End array of KCPU Queue ends an array of JIT Allocs
3565
+ *
3566
+ * @kbdev: Kbase device
3567
+ * @kcpu_queue: KCPU queue
3568
+ */
3569
+#if MALI_USE_CSF
3570
+#define KBASE_TLSTREAM_TL_KBASE_ARRAY_END_KCPUQUEUE_EXECUTE_JIT_ALLOC_END( \
3571
+ kbdev, \
3572
+ kcpu_queue \
3573
+ ) \
3574
+ do { \
3575
+ int enabled = atomic_read(&kbdev->timeline_flags); \
3576
+ if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
3577
+ __kbase_tlstream_tl_kbase_array_end_kcpuqueue_execute_jit_alloc_end( \
3578
+ __TL_DISPATCH_STREAM(kbdev, obj), \
3579
+ kcpu_queue \
3580
+ ); \
3581
+ } while (0)
3582
+#else
3583
+#define KBASE_TLSTREAM_TL_KBASE_ARRAY_END_KCPUQUEUE_EXECUTE_JIT_ALLOC_END( \
3584
+ kbdev, \
3585
+ kcpu_queue \
3586
+ ) \
3587
+ do { } while (0)
3588
+#endif /* MALI_USE_CSF */
3589
+
3590
+/**
3591
+ * KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_JIT_FREE_START - KCPU Queue starts an array of JIT Frees
3592
+ *
3593
+ * @kbdev: Kbase device
3594
+ * @kcpu_queue: KCPU queue
3595
+ */
3596
+#if MALI_USE_CSF
3597
+#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_JIT_FREE_START( \
3598
+ kbdev, \
3599
+ kcpu_queue \
3600
+ ) \
3601
+ do { \
3602
+ int enabled = atomic_read(&kbdev->timeline_flags); \
3603
+ if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
3604
+ __kbase_tlstream_tl_kbase_kcpuqueue_execute_jit_free_start( \
3605
+ __TL_DISPATCH_STREAM(kbdev, obj), \
3606
+ kcpu_queue \
3607
+ ); \
3608
+ } while (0)
3609
+#else
3610
+#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_JIT_FREE_START( \
3611
+ kbdev, \
3612
+ kcpu_queue \
3613
+ ) \
3614
+ do { } while (0)
3615
+#endif /* MALI_USE_CSF */
3616
+
3617
+/**
3618
+ * KBASE_TLSTREAM_TL_KBASE_ARRAY_BEGIN_KCPUQUEUE_EXECUTE_JIT_FREE_END - Begin array of KCPU Queue ends an array of JIT Frees
3619
+ *
3620
+ * @kbdev: Kbase device
3621
+ * @kcpu_queue: KCPU queue
3622
+ */
3623
+#if MALI_USE_CSF
3624
+#define KBASE_TLSTREAM_TL_KBASE_ARRAY_BEGIN_KCPUQUEUE_EXECUTE_JIT_FREE_END( \
3625
+ kbdev, \
3626
+ kcpu_queue \
3627
+ ) \
3628
+ do { \
3629
+ int enabled = atomic_read(&kbdev->timeline_flags); \
3630
+ if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
3631
+ __kbase_tlstream_tl_kbase_array_begin_kcpuqueue_execute_jit_free_end( \
3632
+ __TL_DISPATCH_STREAM(kbdev, obj), \
3633
+ kcpu_queue \
3634
+ ); \
3635
+ } while (0)
3636
+#else
3637
+#define KBASE_TLSTREAM_TL_KBASE_ARRAY_BEGIN_KCPUQUEUE_EXECUTE_JIT_FREE_END( \
3638
+ kbdev, \
3639
+ kcpu_queue \
3640
+ ) \
3641
+ do { } while (0)
3642
+#endif /* MALI_USE_CSF */
3643
+
3644
+/**
3645
+ * KBASE_TLSTREAM_TL_KBASE_ARRAY_ITEM_KCPUQUEUE_EXECUTE_JIT_FREE_END - Array item of KCPU Queue ends an array of JIT Frees
3646
+ *
3647
+ * @kbdev: Kbase device
3648
+ * @kcpu_queue: KCPU queue
3649
+ * @execute_error: Non-zero error code if KCPU Queue item completed with error, else zero
3650
+ * @jit_free_pages_used: The actual number of pages used by the JIT allocation
3651
+ */
3652
+#if MALI_USE_CSF
3653
+#define KBASE_TLSTREAM_TL_KBASE_ARRAY_ITEM_KCPUQUEUE_EXECUTE_JIT_FREE_END( \
3654
+ kbdev, \
3655
+ kcpu_queue, \
3656
+ execute_error, \
3657
+ jit_free_pages_used \
3658
+ ) \
3659
+ do { \
3660
+ int enabled = atomic_read(&kbdev->timeline_flags); \
3661
+ if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
3662
+ __kbase_tlstream_tl_kbase_array_item_kcpuqueue_execute_jit_free_end( \
3663
+ __TL_DISPATCH_STREAM(kbdev, obj), \
3664
+ kcpu_queue, \
3665
+ execute_error, \
3666
+ jit_free_pages_used \
3667
+ ); \
3668
+ } while (0)
3669
+#else
3670
+#define KBASE_TLSTREAM_TL_KBASE_ARRAY_ITEM_KCPUQUEUE_EXECUTE_JIT_FREE_END( \
3671
+ kbdev, \
3672
+ kcpu_queue, \
3673
+ execute_error, \
3674
+ jit_free_pages_used \
3675
+ ) \
3676
+ do { } while (0)
3677
+#endif /* MALI_USE_CSF */
3678
+
3679
+/**
3680
+ * KBASE_TLSTREAM_TL_KBASE_ARRAY_END_KCPUQUEUE_EXECUTE_JIT_FREE_END - End array of KCPU Queue ends an array of JIT Frees
3681
+ *
3682
+ * @kbdev: Kbase device
3683
+ * @kcpu_queue: KCPU queue
3684
+ */
3685
+#if MALI_USE_CSF
3686
+#define KBASE_TLSTREAM_TL_KBASE_ARRAY_END_KCPUQUEUE_EXECUTE_JIT_FREE_END( \
3687
+ kbdev, \
3688
+ kcpu_queue \
3689
+ ) \
3690
+ do { \
3691
+ int enabled = atomic_read(&kbdev->timeline_flags); \
3692
+ if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
3693
+ __kbase_tlstream_tl_kbase_array_end_kcpuqueue_execute_jit_free_end( \
3694
+ __TL_DISPATCH_STREAM(kbdev, obj), \
3695
+ kcpu_queue \
3696
+ ); \
3697
+ } while (0)
3698
+#else
3699
+#define KBASE_TLSTREAM_TL_KBASE_ARRAY_END_KCPUQUEUE_EXECUTE_JIT_FREE_END( \
3700
+ kbdev, \
3701
+ kcpu_queue \
3702
+ ) \
3703
+ do { } while (0)
3704
+#endif /* MALI_USE_CSF */
3705
+
3706
+/**
3707
+ * KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_ERROR_BARRIER - KCPU Queue executes an Error Barrier
3708
+ *
3709
+ * @kbdev: Kbase device
3710
+ * @kcpu_queue: KCPU queue
3711
+ */
3712
+#if MALI_USE_CSF
3713
+#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_ERROR_BARRIER( \
3714
+ kbdev, \
3715
+ kcpu_queue \
3716
+ ) \
3717
+ do { \
3718
+ int enabled = atomic_read(&kbdev->timeline_flags); \
3719
+ if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
3720
+ __kbase_tlstream_tl_kbase_kcpuqueue_execute_error_barrier( \
3721
+ __TL_DISPATCH_STREAM(kbdev, obj), \
3722
+ kcpu_queue \
3723
+ ); \
3724
+ } while (0)
3725
+#else
3726
+#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_ERROR_BARRIER( \
3727
+ kbdev, \
3728
+ kcpu_queue \
3729
+ ) \
3730
+ do { } while (0)
3731
+#endif /* MALI_USE_CSF */
3732
+
3733
+/**
3734
+ * KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_GROUP_SUSPEND_START - KCPU Queue starts a group suspend
3735
+ *
3736
+ * @kbdev: Kbase device
3737
+ * @kcpu_queue: KCPU queue
3738
+ */
3739
+#if MALI_USE_CSF
3740
+#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_GROUP_SUSPEND_START( \
3741
+ kbdev, \
3742
+ kcpu_queue \
3743
+ ) \
3744
+ do { \
3745
+ int enabled = atomic_read(&kbdev->timeline_flags); \
3746
+ if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
3747
+ __kbase_tlstream_tl_kbase_kcpuqueue_execute_group_suspend_start( \
3748
+ __TL_DISPATCH_STREAM(kbdev, obj), \
3749
+ kcpu_queue \
3750
+ ); \
3751
+ } while (0)
3752
+#else
3753
+#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_GROUP_SUSPEND_START( \
3754
+ kbdev, \
3755
+ kcpu_queue \
3756
+ ) \
3757
+ do { } while (0)
3758
+#endif /* MALI_USE_CSF */
3759
+
3760
+/**
3761
+ * KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_GROUP_SUSPEND_END - KCPU Queue ends a group suspend
3762
+ *
3763
+ * @kbdev: Kbase device
3764
+ * @kcpu_queue: KCPU queue
3765
+ * @execute_error: Non-zero error code if KCPU Queue item completed with error, else zero
3766
+ */
3767
+#if MALI_USE_CSF
3768
+#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_GROUP_SUSPEND_END( \
3769
+ kbdev, \
3770
+ kcpu_queue, \
3771
+ execute_error \
3772
+ ) \
3773
+ do { \
3774
+ int enabled = atomic_read(&kbdev->timeline_flags); \
3775
+ if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
3776
+ __kbase_tlstream_tl_kbase_kcpuqueue_execute_group_suspend_end( \
3777
+ __TL_DISPATCH_STREAM(kbdev, obj), \
3778
+ kcpu_queue, \
3779
+ execute_error \
3780
+ ); \
3781
+ } while (0)
3782
+#else
3783
+#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_GROUP_SUSPEND_END( \
3784
+ kbdev, \
3785
+ kcpu_queue, \
3786
+ execute_error \
3787
+ ) \
3788
+ do { } while (0)
3789
+#endif /* MALI_USE_CSF */
3790
+
3791
+/**
3792
+ * KBASE_TLSTREAM_TL_KBASE_CSFFW_FW_RELOADING - CSF FW is being reloaded
3793
+ *
3794
+ * @kbdev: Kbase device
3795
+ * @csffw_cycle: Cycle number of a CSFFW event
3796
+ */
3797
+#if MALI_USE_CSF
3798
+#define KBASE_TLSTREAM_TL_KBASE_CSFFW_FW_RELOADING( \
3799
+ kbdev, \
3800
+ csffw_cycle \
3801
+ ) \
3802
+ do { \
3803
+ int enabled = atomic_read(&kbdev->timeline_flags); \
3804
+ if (enabled & BASE_TLSTREAM_ENABLE_CSFFW_TRACEPOINTS) \
3805
+ __kbase_tlstream_tl_kbase_csffw_fw_reloading( \
3806
+ __TL_DISPATCH_STREAM(kbdev, obj), \
3807
+ csffw_cycle \
3808
+ ); \
3809
+ } while (0)
3810
+#else
3811
+#define KBASE_TLSTREAM_TL_KBASE_CSFFW_FW_RELOADING( \
3812
+ kbdev, \
3813
+ csffw_cycle \
3814
+ ) \
3815
+ do { } while (0)
3816
+#endif /* MALI_USE_CSF */
3817
+
3818
+/**
3819
+ * KBASE_TLSTREAM_TL_KBASE_CSFFW_FW_ENABLING - CSF FW is being enabled
3820
+ *
3821
+ * @kbdev: Kbase device
3822
+ * @csffw_cycle: Cycle number of a CSFFW event
3823
+ */
3824
+#if MALI_USE_CSF
3825
+#define KBASE_TLSTREAM_TL_KBASE_CSFFW_FW_ENABLING( \
3826
+ kbdev, \
3827
+ csffw_cycle \
3828
+ ) \
3829
+ do { \
3830
+ int enabled = atomic_read(&kbdev->timeline_flags); \
3831
+ if (enabled & BASE_TLSTREAM_ENABLE_CSFFW_TRACEPOINTS) \
3832
+ __kbase_tlstream_tl_kbase_csffw_fw_enabling( \
3833
+ __TL_DISPATCH_STREAM(kbdev, obj), \
3834
+ csffw_cycle \
3835
+ ); \
3836
+ } while (0)
3837
+#else
3838
+#define KBASE_TLSTREAM_TL_KBASE_CSFFW_FW_ENABLING( \
3839
+ kbdev, \
3840
+ csffw_cycle \
3841
+ ) \
3842
+ do { } while (0)
3843
+#endif /* MALI_USE_CSF */
3844
+
3845
+/**
3846
+ * KBASE_TLSTREAM_TL_KBASE_CSFFW_FW_REQUEST_SLEEP - CSF FW sleep is requested
3847
+ *
3848
+ * @kbdev: Kbase device
3849
+ * @csffw_cycle: Cycle number of a CSFFW event
3850
+ */
3851
+#if MALI_USE_CSF
3852
+#define KBASE_TLSTREAM_TL_KBASE_CSFFW_FW_REQUEST_SLEEP( \
3853
+ kbdev, \
3854
+ csffw_cycle \
3855
+ ) \
3856
+ do { \
3857
+ int enabled = atomic_read(&kbdev->timeline_flags); \
3858
+ if (enabled & BASE_TLSTREAM_ENABLE_CSFFW_TRACEPOINTS) \
3859
+ __kbase_tlstream_tl_kbase_csffw_fw_request_sleep( \
3860
+ __TL_DISPATCH_STREAM(kbdev, obj), \
3861
+ csffw_cycle \
3862
+ ); \
3863
+ } while (0)
3864
+#else
3865
+#define KBASE_TLSTREAM_TL_KBASE_CSFFW_FW_REQUEST_SLEEP( \
3866
+ kbdev, \
3867
+ csffw_cycle \
3868
+ ) \
3869
+ do { } while (0)
3870
+#endif /* MALI_USE_CSF */
3871
+
3872
+/**
3873
+ * KBASE_TLSTREAM_TL_KBASE_CSFFW_FW_REQUEST_WAKEUP - CSF FW wake up is requested
3874
+ *
3875
+ * @kbdev: Kbase device
3876
+ * @csffw_cycle: Cycle number of a CSFFW event
3877
+ */
3878
+#if MALI_USE_CSF
3879
+#define KBASE_TLSTREAM_TL_KBASE_CSFFW_FW_REQUEST_WAKEUP( \
3880
+ kbdev, \
3881
+ csffw_cycle \
3882
+ ) \
3883
+ do { \
3884
+ int enabled = atomic_read(&kbdev->timeline_flags); \
3885
+ if (enabled & BASE_TLSTREAM_ENABLE_CSFFW_TRACEPOINTS) \
3886
+ __kbase_tlstream_tl_kbase_csffw_fw_request_wakeup( \
3887
+ __TL_DISPATCH_STREAM(kbdev, obj), \
3888
+ csffw_cycle \
3889
+ ); \
3890
+ } while (0)
3891
+#else
3892
+#define KBASE_TLSTREAM_TL_KBASE_CSFFW_FW_REQUEST_WAKEUP( \
3893
+ kbdev, \
3894
+ csffw_cycle \
3895
+ ) \
3896
+ do { } while (0)
3897
+#endif /* MALI_USE_CSF */
3898
+
3899
+/**
3900
+ * KBASE_TLSTREAM_TL_KBASE_CSFFW_FW_REQUEST_HALT - CSF FW halt is requested
3901
+ *
3902
+ * @kbdev: Kbase device
3903
+ * @csffw_cycle: Cycle number of a CSFFW event
3904
+ */
3905
+#if MALI_USE_CSF
3906
+#define KBASE_TLSTREAM_TL_KBASE_CSFFW_FW_REQUEST_HALT( \
3907
+ kbdev, \
3908
+ csffw_cycle \
3909
+ ) \
3910
+ do { \
3911
+ int enabled = atomic_read(&kbdev->timeline_flags); \
3912
+ if (enabled & BASE_TLSTREAM_ENABLE_CSFFW_TRACEPOINTS) \
3913
+ __kbase_tlstream_tl_kbase_csffw_fw_request_halt( \
3914
+ __TL_DISPATCH_STREAM(kbdev, obj), \
3915
+ csffw_cycle \
3916
+ ); \
3917
+ } while (0)
3918
+#else
3919
+#define KBASE_TLSTREAM_TL_KBASE_CSFFW_FW_REQUEST_HALT( \
3920
+ kbdev, \
3921
+ csffw_cycle \
3922
+ ) \
3923
+ do { } while (0)
3924
+#endif /* MALI_USE_CSF */
3925
+
3926
+/**
3927
+ * KBASE_TLSTREAM_TL_KBASE_CSFFW_FW_DISABLING - CSF FW is being disabled
3928
+ *
3929
+ * @kbdev: Kbase device
3930
+ * @csffw_cycle: Cycle number of a CSFFW event
3931
+ */
3932
+#if MALI_USE_CSF
3933
+#define KBASE_TLSTREAM_TL_KBASE_CSFFW_FW_DISABLING( \
3934
+ kbdev, \
3935
+ csffw_cycle \
3936
+ ) \
3937
+ do { \
3938
+ int enabled = atomic_read(&kbdev->timeline_flags); \
3939
+ if (enabled & BASE_TLSTREAM_ENABLE_CSFFW_TRACEPOINTS) \
3940
+ __kbase_tlstream_tl_kbase_csffw_fw_disabling( \
3941
+ __TL_DISPATCH_STREAM(kbdev, obj), \
3942
+ csffw_cycle \
3943
+ ); \
3944
+ } while (0)
3945
+#else
3946
+#define KBASE_TLSTREAM_TL_KBASE_CSFFW_FW_DISABLING( \
3947
+ kbdev, \
3948
+ csffw_cycle \
3949
+ ) \
3950
+ do { } while (0)
3951
+#endif /* MALI_USE_CSF */
3952
+
3953
+/**
3954
+ * KBASE_TLSTREAM_TL_KBASE_CSFFW_FW_OFF - CSF FW is off
3955
+ *
3956
+ * @kbdev: Kbase device
3957
+ * @csffw_cycle: Cycle number of a CSFFW event
3958
+ */
3959
+#if MALI_USE_CSF
3960
+#define KBASE_TLSTREAM_TL_KBASE_CSFFW_FW_OFF( \
3961
+ kbdev, \
3962
+ csffw_cycle \
3963
+ ) \
3964
+ do { \
3965
+ int enabled = atomic_read(&kbdev->timeline_flags); \
3966
+ if (enabled & BASE_TLSTREAM_ENABLE_CSFFW_TRACEPOINTS) \
3967
+ __kbase_tlstream_tl_kbase_csffw_fw_off( \
3968
+ __TL_DISPATCH_STREAM(kbdev, obj), \
3969
+ csffw_cycle \
3970
+ ); \
3971
+ } while (0)
3972
+#else
3973
+#define KBASE_TLSTREAM_TL_KBASE_CSFFW_FW_OFF( \
3974
+ kbdev, \
3975
+ csffw_cycle \
3976
+ ) \
3977
+ do { } while (0)
3978
+#endif /* MALI_USE_CSF */
3979
+
3980
+/**
3981
+ * KBASE_TLSTREAM_TL_KBASE_CSFFW_TLSTREAM_OVERFLOW - An overflow has happened with the CSFFW Timeline stream
3982
+ *
3983
+ * @kbdev: Kbase device
3984
+ * @csffw_timestamp: Timestamp of a CSFFW event
3985
+ * @csffw_cycle: Cycle number of a CSFFW event
3986
+ */
3987
+#if MALI_USE_CSF
3988
+#define KBASE_TLSTREAM_TL_KBASE_CSFFW_TLSTREAM_OVERFLOW( \
3989
+ kbdev, \
3990
+ csffw_timestamp, \
3991
+ csffw_cycle \
3992
+ ) \
3993
+ do { \
3994
+ int enabled = atomic_read(&kbdev->timeline_flags); \
3995
+ if (enabled & BASE_TLSTREAM_ENABLE_CSFFW_TRACEPOINTS) \
3996
+ __kbase_tlstream_tl_kbase_csffw_tlstream_overflow( \
3997
+ __TL_DISPATCH_STREAM(kbdev, obj), \
3998
+ csffw_timestamp, \
3999
+ csffw_cycle \
4000
+ ); \
4001
+ } while (0)
4002
+#else
4003
+#define KBASE_TLSTREAM_TL_KBASE_CSFFW_TLSTREAM_OVERFLOW( \
4004
+ kbdev, \
4005
+ csffw_timestamp, \
4006
+ csffw_cycle \
4007
+ ) \
4008
+ do { } while (0)
4009
+#endif /* MALI_USE_CSF */
4010
+
4011
+/**
4012
+ * KBASE_TLSTREAM_AUX_PM_STATE - PM state
13474013 *
13484014 * @kbdev: Kbase device
13494015 * @core_type: Core type (shader, tiler, l2 cache, l3 cache)
1350
- * @core_state_bitset: 64bits bitmask reporting power state of the cores
1351
- * (1-ON, 0-OFF)
4016
+ * @core_state_bitset: 64bits bitmask reporting power state of the cores (1-ON, 0-OFF)
13524017 */
13534018 #define KBASE_TLSTREAM_AUX_PM_STATE( \
13544019 kbdev, \
....@@ -1360,12 +4025,13 @@
13604025 if (enabled & TLSTREAM_ENABLED) \
13614026 __kbase_tlstream_aux_pm_state( \
13624027 __TL_DISPATCH_STREAM(kbdev, aux), \
1363
- core_type, core_state_bitset); \
4028
+ core_type, \
4029
+ core_state_bitset \
4030
+ ); \
13644031 } while (0)
13654032
13664033 /**
1367
- * KBASE_TLSTREAM_AUX_PAGEFAULT -
1368
- * Page fault
4034
+ * KBASE_TLSTREAM_AUX_PAGEFAULT - Page fault
13694035 *
13704036 * @kbdev: Kbase device
13714037 * @ctx_nr: Kernel context number
....@@ -1383,12 +4049,14 @@
13834049 if (enabled & TLSTREAM_ENABLED) \
13844050 __kbase_tlstream_aux_pagefault( \
13854051 __TL_DISPATCH_STREAM(kbdev, aux), \
1386
- ctx_nr, as_nr, page_cnt_change); \
4052
+ ctx_nr, \
4053
+ as_nr, \
4054
+ page_cnt_change \
4055
+ ); \
13874056 } while (0)
13884057
13894058 /**
1390
- * KBASE_TLSTREAM_AUX_PAGESALLOC -
1391
- * Total alloc pages change
4059
+ * KBASE_TLSTREAM_AUX_PAGESALLOC - Total alloc pages change
13924060 *
13934061 * @kbdev: Kbase device
13944062 * @ctx_nr: Kernel context number
....@@ -1404,12 +4072,13 @@
14044072 if (enabled & TLSTREAM_ENABLED) \
14054073 __kbase_tlstream_aux_pagesalloc( \
14064074 __TL_DISPATCH_STREAM(kbdev, aux), \
1407
- ctx_nr, page_cnt); \
4075
+ ctx_nr, \
4076
+ page_cnt \
4077
+ ); \
14084078 } while (0)
14094079
14104080 /**
1411
- * KBASE_TLSTREAM_AUX_DEVFREQ_TARGET -
1412
- * New device frequency target
4081
+ * KBASE_TLSTREAM_AUX_DEVFREQ_TARGET - New device frequency target
14134082 *
14144083 * @kbdev: Kbase device
14154084 * @target_freq: New target frequency
....@@ -1423,88 +4092,12 @@
14234092 if (enabled & TLSTREAM_ENABLED) \
14244093 __kbase_tlstream_aux_devfreq_target( \
14254094 __TL_DISPATCH_STREAM(kbdev, aux), \
1426
- target_freq); \
4095
+ target_freq \
4096
+ ); \
14274097 } while (0)
14284098
14294099 /**
1430
- * KBASE_TLSTREAM_AUX_PROTECTED_ENTER_START -
1431
- * enter protected mode start
1432
- *
1433
- * @kbdev: Kbase device
1434
- * @gpu: Name of the GPU object
1435
- */
1436
-#define KBASE_TLSTREAM_AUX_PROTECTED_ENTER_START( \
1437
- kbdev, \
1438
- gpu \
1439
- ) \
1440
- do { \
1441
- int enabled = atomic_read(&kbdev->timeline_flags); \
1442
- if (enabled & BASE_TLSTREAM_ENABLE_LATENCY_TRACEPOINTS) \
1443
- __kbase_tlstream_aux_protected_enter_start( \
1444
- __TL_DISPATCH_STREAM(kbdev, aux), \
1445
- gpu); \
1446
- } while (0)
1447
-
1448
-/**
1449
- * KBASE_TLSTREAM_AUX_PROTECTED_ENTER_END -
1450
- * enter protected mode end
1451
- *
1452
- * @kbdev: Kbase device
1453
- * @gpu: Name of the GPU object
1454
- */
1455
-#define KBASE_TLSTREAM_AUX_PROTECTED_ENTER_END( \
1456
- kbdev, \
1457
- gpu \
1458
- ) \
1459
- do { \
1460
- int enabled = atomic_read(&kbdev->timeline_flags); \
1461
- if (enabled & BASE_TLSTREAM_ENABLE_LATENCY_TRACEPOINTS) \
1462
- __kbase_tlstream_aux_protected_enter_end( \
1463
- __TL_DISPATCH_STREAM(kbdev, aux), \
1464
- gpu); \
1465
- } while (0)
1466
-
1467
-/**
1468
- * KBASE_TLSTREAM_AUX_PROTECTED_LEAVE_START -
1469
- * leave protected mode start
1470
- *
1471
- * @kbdev: Kbase device
1472
- * @gpu: Name of the GPU object
1473
- */
1474
-#define KBASE_TLSTREAM_AUX_PROTECTED_LEAVE_START( \
1475
- kbdev, \
1476
- gpu \
1477
- ) \
1478
- do { \
1479
- int enabled = atomic_read(&kbdev->timeline_flags); \
1480
- if (enabled & BASE_TLSTREAM_ENABLE_LATENCY_TRACEPOINTS) \
1481
- __kbase_tlstream_aux_protected_leave_start( \
1482
- __TL_DISPATCH_STREAM(kbdev, aux), \
1483
- gpu); \
1484
- } while (0)
1485
-
1486
-/**
1487
- * KBASE_TLSTREAM_AUX_PROTECTED_LEAVE_END -
1488
- * leave protected mode end
1489
- *
1490
- * @kbdev: Kbase device
1491
- * @gpu: Name of the GPU object
1492
- */
1493
-#define KBASE_TLSTREAM_AUX_PROTECTED_LEAVE_END( \
1494
- kbdev, \
1495
- gpu \
1496
- ) \
1497
- do { \
1498
- int enabled = atomic_read(&kbdev->timeline_flags); \
1499
- if (enabled & BASE_TLSTREAM_ENABLE_LATENCY_TRACEPOINTS) \
1500
- __kbase_tlstream_aux_protected_leave_end( \
1501
- __TL_DISPATCH_STREAM(kbdev, aux), \
1502
- gpu); \
1503
- } while (0)
1504
-
1505
-/**
1506
- * KBASE_TLSTREAM_AUX_JIT_STATS -
1507
- * per-bin JIT statistics
4100
+ * KBASE_TLSTREAM_AUX_JIT_STATS - per-bin JIT statistics
15084101 *
15094102 * @kbdev: Kbase device
15104103 * @ctx_nr: Kernel context number
....@@ -1528,12 +4121,17 @@
15284121 if (enabled & TLSTREAM_ENABLED) \
15294122 __kbase_tlstream_aux_jit_stats( \
15304123 __TL_DISPATCH_STREAM(kbdev, aux), \
1531
- ctx_nr, bid, max_allocs, allocs, va_pages, ph_pages); \
4124
+ ctx_nr, \
4125
+ bid, \
4126
+ max_allocs, \
4127
+ allocs, \
4128
+ va_pages, \
4129
+ ph_pages \
4130
+ ); \
15324131 } while (0)
15334132
15344133 /**
1535
- * KBASE_TLSTREAM_AUX_TILER_HEAP_STATS -
1536
- * Tiler Heap statistics
4134
+ * KBASE_TLSTREAM_AUX_TILER_HEAP_STATS - Tiler Heap statistics
15374135 *
15384136 * @kbdev: Kbase device
15394137 * @ctx_nr: Kernel context number
....@@ -1543,8 +4141,7 @@
15434141 * @max_chunks: The maximum number of chunks that the heap should be allowed to use
15444142 * @chunk_size: Size of each chunk in tiler heap, in bytes
15454143 * @chunk_count: The number of chunks currently allocated in the tiler heap
1546
- * @target_in_flight: Number of render-passes that the driver should attempt
1547
- * to keep in flight for which allocation of new chunks is allowed
4144
+ * @target_in_flight: Number of render-passes that the driver should attempt to keep in flight for which allocation of new chunks is allowed
15484145 * @nr_in_flight: Number of render-passes that are in flight
15494146 */
15504147 #define KBASE_TLSTREAM_AUX_TILER_HEAP_STATS( \
....@@ -1564,12 +4161,20 @@
15644161 if (enabled & TLSTREAM_ENABLED) \
15654162 __kbase_tlstream_aux_tiler_heap_stats( \
15664163 __TL_DISPATCH_STREAM(kbdev, aux), \
1567
- ctx_nr, heap_id, va_pages, ph_pages, max_chunks, chunk_size, chunk_count, target_in_flight, nr_in_flight); \
4164
+ ctx_nr, \
4165
+ heap_id, \
4166
+ va_pages, \
4167
+ ph_pages, \
4168
+ max_chunks, \
4169
+ chunk_size, \
4170
+ chunk_count, \
4171
+ target_in_flight, \
4172
+ nr_in_flight \
4173
+ ); \
15684174 } while (0)
15694175
15704176 /**
1571
- * KBASE_TLSTREAM_AUX_EVENT_JOB_SLOT -
1572
- * event on a given job slot
4177
+ * KBASE_TLSTREAM_AUX_EVENT_JOB_SLOT - event on a given job slot
15734178 *
15744179 * @kbdev: Kbase device
15754180 * @ctx: Name of the context object
....@@ -1589,1508 +4194,119 @@
15894194 if (enabled & TLSTREAM_ENABLED) \
15904195 __kbase_tlstream_aux_event_job_slot( \
15914196 __TL_DISPATCH_STREAM(kbdev, aux), \
1592
- ctx, slot_nr, atom_nr, event); \
4197
+ ctx, \
4198
+ slot_nr, \
4199
+ atom_nr, \
4200
+ event \
4201
+ ); \
15934202 } while (0)
15944203
15954204 /**
1596
- * KBASE_TLSTREAM_TL_KBASE_NEW_DEVICE -
1597
- * New KBase Device
4205
+ * KBASE_TLSTREAM_AUX_PROTECTED_ENTER_START - enter protected mode start
15984206 *
15994207 * @kbdev: Kbase device
1600
- * @kbase_device_id: The id of the physical hardware
1601
- * @kbase_device_gpu_core_count: The number of gpu cores in the physical hardware
1602
- * @kbase_device_max_num_csgs: The max number of CSGs the physical hardware supports
1603
- * @kbase_device_as_count: The number of address spaces the physical hardware has available
4208
+ * @gpu: Name of the GPU object
16044209 */
1605
-#if MALI_USE_CSF
1606
-#define KBASE_TLSTREAM_TL_KBASE_NEW_DEVICE( \
4210
+#define KBASE_TLSTREAM_AUX_PROTECTED_ENTER_START( \
16074211 kbdev, \
1608
- kbase_device_id, \
1609
- kbase_device_gpu_core_count, \
1610
- kbase_device_max_num_csgs, \
1611
- kbase_device_as_count \
4212
+ gpu \
16124213 ) \
16134214 do { \
16144215 int enabled = atomic_read(&kbdev->timeline_flags); \
1615
- if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
1616
- __kbase_tlstream_tl_kbase_new_device( \
1617
- __TL_DISPATCH_STREAM(kbdev, obj), \
1618
- kbase_device_id, kbase_device_gpu_core_count, kbase_device_max_num_csgs, kbase_device_as_count); \
4216
+ if (enabled & TLSTREAM_ENABLED) \
4217
+ __kbase_tlstream_aux_protected_enter_start( \
4218
+ __TL_DISPATCH_STREAM(kbdev, aux), \
4219
+ gpu \
4220
+ ); \
16194221 } while (0)
1620
-#else
1621
-#define KBASE_TLSTREAM_TL_KBASE_NEW_DEVICE( \
1622
- kbdev, \
1623
- kbase_device_id, \
1624
- kbase_device_gpu_core_count, \
1625
- kbase_device_max_num_csgs, \
1626
- kbase_device_as_count \
1627
- ) \
1628
- do { } while (0)
1629
-#endif /* MALI_USE_CSF */
16304222
16314223 /**
1632
- * KBASE_TLSTREAM_TL_KBASE_DEVICE_PROGRAM_CSG -
1633
- * CSG is programmed to a slot
4224
+ * KBASE_TLSTREAM_AUX_PROTECTED_ENTER_END - enter protected mode end
16344225 *
16354226 * @kbdev: Kbase device
1636
- * @kbase_device_id: The id of the physical hardware
1637
- * @gpu_cmdq_grp_handle: GPU Command Queue Group handle which will match userspace
1638
- * @kbase_device_csg_slot_index: The index of the slot in the scheduler being programmed
4227
+ * @gpu: Name of the GPU object
16394228 */
1640
-#if MALI_USE_CSF
1641
-#define KBASE_TLSTREAM_TL_KBASE_DEVICE_PROGRAM_CSG( \
4229
+#define KBASE_TLSTREAM_AUX_PROTECTED_ENTER_END( \
16424230 kbdev, \
1643
- kbase_device_id, \
1644
- gpu_cmdq_grp_handle, \
1645
- kbase_device_csg_slot_index \
4231
+ gpu \
16464232 ) \
16474233 do { \
16484234 int enabled = atomic_read(&kbdev->timeline_flags); \
1649
- if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
1650
- __kbase_tlstream_tl_kbase_device_program_csg( \
1651
- __TL_DISPATCH_STREAM(kbdev, obj), \
1652
- kbase_device_id, gpu_cmdq_grp_handle, kbase_device_csg_slot_index); \
4235
+ if (enabled & TLSTREAM_ENABLED) \
4236
+ __kbase_tlstream_aux_protected_enter_end( \
4237
+ __TL_DISPATCH_STREAM(kbdev, aux), \
4238
+ gpu \
4239
+ ); \
16534240 } while (0)
1654
-#else
1655
-#define KBASE_TLSTREAM_TL_KBASE_DEVICE_PROGRAM_CSG( \
1656
- kbdev, \
1657
- kbase_device_id, \
1658
- gpu_cmdq_grp_handle, \
1659
- kbase_device_csg_slot_index \
1660
- ) \
1661
- do { } while (0)
1662
-#endif /* MALI_USE_CSF */
16634241
16644242 /**
1665
- * KBASE_TLSTREAM_TL_KBASE_DEVICE_DEPROGRAM_CSG -
1666
- * CSG is deprogrammed from a slot
1667
- *
1668
- * @kbdev: Kbase device
1669
- * @kbase_device_id: The id of the physical hardware
1670
- * @kbase_device_csg_slot_index: The index of the slot in the scheduler being programmed
1671
- */
1672
-#if MALI_USE_CSF
1673
-#define KBASE_TLSTREAM_TL_KBASE_DEVICE_DEPROGRAM_CSG( \
1674
- kbdev, \
1675
- kbase_device_id, \
1676
- kbase_device_csg_slot_index \
1677
- ) \
1678
- do { \
1679
- int enabled = atomic_read(&kbdev->timeline_flags); \
1680
- if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
1681
- __kbase_tlstream_tl_kbase_device_deprogram_csg( \
1682
- __TL_DISPATCH_STREAM(kbdev, obj), \
1683
- kbase_device_id, kbase_device_csg_slot_index); \
1684
- } while (0)
1685
-#else
1686
-#define KBASE_TLSTREAM_TL_KBASE_DEVICE_DEPROGRAM_CSG( \
1687
- kbdev, \
1688
- kbase_device_id, \
1689
- kbase_device_csg_slot_index \
1690
- ) \
1691
- do { } while (0)
1692
-#endif /* MALI_USE_CSF */
1693
-
1694
-/**
1695
- * KBASE_TLSTREAM_TL_KBASE_NEW_CTX -
1696
- * New KBase Context
4243
+ * KBASE_TLSTREAM_AUX_MMU_COMMAND - mmu commands with synchronicity info
16974244 *
16984245 * @kbdev: Kbase device
16994246 * @kernel_ctx_id: Unique ID for the KBase Context
1700
- * @kbase_device_id: The id of the physical hardware
4247
+ * @mmu_cmd_id: MMU Command ID (e.g AS_COMMAND_UPDATE)
4248
+ * @mmu_synchronicity: Indicates whether the command is related to current running job that needs to be resolved to make it progress (synchronous, e.g. grow on page fault, JIT) or not (asynchronous, e.g. IOCTL calls from user-space). This param will be 0 if it is an asynchronous operation.
4249
+ * @mmu_lock_addr: start address of regions to be locked/unlocked/invalidated
4250
+ * @mmu_lock_page_num: number of pages to be locked/unlocked/invalidated
17014251 */
1702
-#if MALI_USE_CSF
1703
-#define KBASE_TLSTREAM_TL_KBASE_NEW_CTX( \
4252
+#define KBASE_TLSTREAM_AUX_MMU_COMMAND( \
17044253 kbdev, \
17054254 kernel_ctx_id, \
1706
- kbase_device_id \
4255
+ mmu_cmd_id, \
4256
+ mmu_synchronicity, \
4257
+ mmu_lock_addr, \
4258
+ mmu_lock_page_num \
17074259 ) \
17084260 do { \
17094261 int enabled = atomic_read(&kbdev->timeline_flags); \
1710
- if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
1711
- __kbase_tlstream_tl_kbase_new_ctx( \
1712
- __TL_DISPATCH_STREAM(kbdev, obj), \
1713
- kernel_ctx_id, kbase_device_id); \
4262
+ if (enabled & TLSTREAM_ENABLED) \
4263
+ __kbase_tlstream_aux_mmu_command( \
4264
+ __TL_DISPATCH_STREAM(kbdev, aux), \
4265
+ kernel_ctx_id, \
4266
+ mmu_cmd_id, \
4267
+ mmu_synchronicity, \
4268
+ mmu_lock_addr, \
4269
+ mmu_lock_page_num \
4270
+ ); \
17144271 } while (0)
1715
-#else
1716
-#define KBASE_TLSTREAM_TL_KBASE_NEW_CTX( \
1717
- kbdev, \
1718
- kernel_ctx_id, \
1719
- kbase_device_id \
1720
- ) \
1721
- do { } while (0)
1722
-#endif /* MALI_USE_CSF */
17234272
17244273 /**
1725
- * KBASE_TLSTREAM_TL_KBASE_DEL_CTX -
1726
- * Delete KBase Context
4274
+ * KBASE_TLSTREAM_AUX_PROTECTED_LEAVE_START - leave protected mode start
17274275 *
17284276 * @kbdev: Kbase device
1729
- * @kernel_ctx_id: Unique ID for the KBase Context
4277
+ * @gpu: Name of the GPU object
17304278 */
1731
-#if MALI_USE_CSF
1732
-#define KBASE_TLSTREAM_TL_KBASE_DEL_CTX( \
4279
+#define KBASE_TLSTREAM_AUX_PROTECTED_LEAVE_START( \
17334280 kbdev, \
1734
- kernel_ctx_id \
4281
+ gpu \
17354282 ) \
17364283 do { \
17374284 int enabled = atomic_read(&kbdev->timeline_flags); \
1738
- if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
1739
- __kbase_tlstream_tl_kbase_del_ctx( \
1740
- __TL_DISPATCH_STREAM(kbdev, obj), \
1741
- kernel_ctx_id); \
4285
+ if (enabled & BASE_TLSTREAM_ENABLE_LATENCY_TRACEPOINTS) \
4286
+ __kbase_tlstream_aux_protected_leave_start( \
4287
+ __TL_DISPATCH_STREAM(kbdev, aux), \
4288
+ gpu \
4289
+ ); \
17424290 } while (0)
1743
-#else
1744
-#define KBASE_TLSTREAM_TL_KBASE_DEL_CTX( \
1745
- kbdev, \
1746
- kernel_ctx_id \
1747
- ) \
1748
- do { } while (0)
1749
-#endif /* MALI_USE_CSF */
17504291
17514292 /**
1752
- * KBASE_TLSTREAM_TL_KBASE_CTX_ASSIGN_AS -
1753
- * Address Space is assigned to a KBase context
4293
+ * KBASE_TLSTREAM_AUX_PROTECTED_LEAVE_END - leave protected mode end
17544294 *
17554295 * @kbdev: Kbase device
1756
- * @kernel_ctx_id: Unique ID for the KBase Context
1757
- * @kbase_device_as_index: The index of the device address space being assigned
4296
+ * @gpu: Name of the GPU object
17584297 */
1759
-#if MALI_USE_CSF
1760
-#define KBASE_TLSTREAM_TL_KBASE_CTX_ASSIGN_AS( \
4298
+#define KBASE_TLSTREAM_AUX_PROTECTED_LEAVE_END( \
17614299 kbdev, \
1762
- kernel_ctx_id, \
1763
- kbase_device_as_index \
4300
+ gpu \
17644301 ) \
17654302 do { \
17664303 int enabled = atomic_read(&kbdev->timeline_flags); \
1767
- if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
1768
- __kbase_tlstream_tl_kbase_ctx_assign_as( \
1769
- __TL_DISPATCH_STREAM(kbdev, obj), \
1770
- kernel_ctx_id, kbase_device_as_index); \
4304
+ if (enabled & BASE_TLSTREAM_ENABLE_LATENCY_TRACEPOINTS) \
4305
+ __kbase_tlstream_aux_protected_leave_end( \
4306
+ __TL_DISPATCH_STREAM(kbdev, aux), \
4307
+ gpu \
4308
+ ); \
17714309 } while (0)
1772
-#else
1773
-#define KBASE_TLSTREAM_TL_KBASE_CTX_ASSIGN_AS( \
1774
- kbdev, \
1775
- kernel_ctx_id, \
1776
- kbase_device_as_index \
1777
- ) \
1778
- do { } while (0)
1779
-#endif /* MALI_USE_CSF */
1780
-
1781
-/**
1782
- * KBASE_TLSTREAM_TL_KBASE_CTX_UNASSIGN_AS -
1783
- * Address Space is unassigned from a KBase context
1784
- *
1785
- * @kbdev: Kbase device
1786
- * @kernel_ctx_id: Unique ID for the KBase Context
1787
- */
1788
-#if MALI_USE_CSF
1789
-#define KBASE_TLSTREAM_TL_KBASE_CTX_UNASSIGN_AS( \
1790
- kbdev, \
1791
- kernel_ctx_id \
1792
- ) \
1793
- do { \
1794
- int enabled = atomic_read(&kbdev->timeline_flags); \
1795
- if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
1796
- __kbase_tlstream_tl_kbase_ctx_unassign_as( \
1797
- __TL_DISPATCH_STREAM(kbdev, obj), \
1798
- kernel_ctx_id); \
1799
- } while (0)
1800
-#else
1801
-#define KBASE_TLSTREAM_TL_KBASE_CTX_UNASSIGN_AS( \
1802
- kbdev, \
1803
- kernel_ctx_id \
1804
- ) \
1805
- do { } while (0)
1806
-#endif /* MALI_USE_CSF */
1807
-
1808
-/**
1809
- * KBASE_TLSTREAM_TL_KBASE_NEW_KCPUQUEUE -
1810
- * New KCPU Queue
1811
- *
1812
- * @kbdev: Kbase device
1813
- * @kcpu_queue: KCPU queue
1814
- * @kernel_ctx_id: Unique ID for the KBase Context
1815
- * @kcpuq_num_pending_cmds: Number of commands already enqueued
1816
- * in the KCPU queue
1817
- */
1818
-#if MALI_USE_CSF
1819
-#define KBASE_TLSTREAM_TL_KBASE_NEW_KCPUQUEUE( \
1820
- kbdev, \
1821
- kcpu_queue, \
1822
- kernel_ctx_id, \
1823
- kcpuq_num_pending_cmds \
1824
- ) \
1825
- do { \
1826
- int enabled = atomic_read(&kbdev->timeline_flags); \
1827
- if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
1828
- __kbase_tlstream_tl_kbase_new_kcpuqueue( \
1829
- __TL_DISPATCH_STREAM(kbdev, obj), \
1830
- kcpu_queue, kernel_ctx_id, kcpuq_num_pending_cmds); \
1831
- } while (0)
1832
-#else
1833
-#define KBASE_TLSTREAM_TL_KBASE_NEW_KCPUQUEUE( \
1834
- kbdev, \
1835
- kcpu_queue, \
1836
- kernel_ctx_id, \
1837
- kcpuq_num_pending_cmds \
1838
- ) \
1839
- do { } while (0)
1840
-#endif /* MALI_USE_CSF */
1841
-
1842
-/**
1843
- * KBASE_TLSTREAM_TL_KBASE_DEL_KCPUQUEUE -
1844
- * Delete KCPU Queue
1845
- *
1846
- * @kbdev: Kbase device
1847
- * @kcpu_queue: KCPU queue
1848
- */
1849
-#if MALI_USE_CSF
1850
-#define KBASE_TLSTREAM_TL_KBASE_DEL_KCPUQUEUE( \
1851
- kbdev, \
1852
- kcpu_queue \
1853
- ) \
1854
- do { \
1855
- int enabled = atomic_read(&kbdev->timeline_flags); \
1856
- if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
1857
- __kbase_tlstream_tl_kbase_del_kcpuqueue( \
1858
- __TL_DISPATCH_STREAM(kbdev, obj), \
1859
- kcpu_queue); \
1860
- } while (0)
1861
-#else
1862
-#define KBASE_TLSTREAM_TL_KBASE_DEL_KCPUQUEUE( \
1863
- kbdev, \
1864
- kcpu_queue \
1865
- ) \
1866
- do { } while (0)
1867
-#endif /* MALI_USE_CSF */
1868
-
1869
-/**
1870
- * KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_ENQUEUE_FENCE_SIGNAL -
1871
- * KCPU Queue enqueues Signal on Fence
1872
- *
1873
- * @kbdev: Kbase device
1874
- * @kcpu_queue: KCPU queue
1875
- * @fence: Fence object handle
1876
- */
1877
-#if MALI_USE_CSF
1878
-#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_ENQUEUE_FENCE_SIGNAL( \
1879
- kbdev, \
1880
- kcpu_queue, \
1881
- fence \
1882
- ) \
1883
- do { \
1884
- int enabled = atomic_read(&kbdev->timeline_flags); \
1885
- if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
1886
- __kbase_tlstream_tl_kbase_kcpuqueue_enqueue_fence_signal( \
1887
- __TL_DISPATCH_STREAM(kbdev, obj), \
1888
- kcpu_queue, fence); \
1889
- } while (0)
1890
-#else
1891
-#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_ENQUEUE_FENCE_SIGNAL( \
1892
- kbdev, \
1893
- kcpu_queue, \
1894
- fence \
1895
- ) \
1896
- do { } while (0)
1897
-#endif /* MALI_USE_CSF */
1898
-
1899
-/**
1900
- * KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_ENQUEUE_FENCE_WAIT -
1901
- * KCPU Queue enqueues Wait on Fence
1902
- *
1903
- * @kbdev: Kbase device
1904
- * @kcpu_queue: KCPU queue
1905
- * @fence: Fence object handle
1906
- */
1907
-#if MALI_USE_CSF
1908
-#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_ENQUEUE_FENCE_WAIT( \
1909
- kbdev, \
1910
- kcpu_queue, \
1911
- fence \
1912
- ) \
1913
- do { \
1914
- int enabled = atomic_read(&kbdev->timeline_flags); \
1915
- if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
1916
- __kbase_tlstream_tl_kbase_kcpuqueue_enqueue_fence_wait( \
1917
- __TL_DISPATCH_STREAM(kbdev, obj), \
1918
- kcpu_queue, fence); \
1919
- } while (0)
1920
-#else
1921
-#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_ENQUEUE_FENCE_WAIT( \
1922
- kbdev, \
1923
- kcpu_queue, \
1924
- fence \
1925
- ) \
1926
- do { } while (0)
1927
-#endif /* MALI_USE_CSF */
1928
-
1929
-/**
1930
- * KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_ENQUEUE_CQS_WAIT -
1931
- * KCPU Queue enqueues Wait on Cross Queue Sync Object
1932
- *
1933
- * @kbdev: Kbase device
1934
- * @kcpu_queue: KCPU queue
1935
- * @cqs_obj_gpu_addr: CQS Object GPU pointer
1936
- * @cqs_obj_compare_value: Semaphore value that should be exceeded
1937
- * for the WAIT to pass
1938
- * @cqs_obj_inherit_error: Indicates the error state should be inherited into the queue or not
1939
- */
1940
-#if MALI_USE_CSF
1941
-#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_ENQUEUE_CQS_WAIT( \
1942
- kbdev, \
1943
- kcpu_queue, \
1944
- cqs_obj_gpu_addr, \
1945
- cqs_obj_compare_value, \
1946
- cqs_obj_inherit_error \
1947
- ) \
1948
- do { \
1949
- int enabled = atomic_read(&kbdev->timeline_flags); \
1950
- if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
1951
- __kbase_tlstream_tl_kbase_kcpuqueue_enqueue_cqs_wait( \
1952
- __TL_DISPATCH_STREAM(kbdev, obj), \
1953
- kcpu_queue, cqs_obj_gpu_addr, cqs_obj_compare_value, cqs_obj_inherit_error); \
1954
- } while (0)
1955
-#else
1956
-#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_ENQUEUE_CQS_WAIT( \
1957
- kbdev, \
1958
- kcpu_queue, \
1959
- cqs_obj_gpu_addr, \
1960
- cqs_obj_compare_value, \
1961
- cqs_obj_inherit_error \
1962
- ) \
1963
- do { } while (0)
1964
-#endif /* MALI_USE_CSF */
1965
-
1966
-/**
1967
- * KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_ENQUEUE_CQS_SET -
1968
- * KCPU Queue enqueues Set on Cross Queue Sync Object
1969
- *
1970
- * @kbdev: Kbase device
1971
- * @kcpu_queue: KCPU queue
1972
- * @cqs_obj_gpu_addr: CQS Object GPU pointer
1973
- */
1974
-#if MALI_USE_CSF
1975
-#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_ENQUEUE_CQS_SET( \
1976
- kbdev, \
1977
- kcpu_queue, \
1978
- cqs_obj_gpu_addr \
1979
- ) \
1980
- do { \
1981
- int enabled = atomic_read(&kbdev->timeline_flags); \
1982
- if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
1983
- __kbase_tlstream_tl_kbase_kcpuqueue_enqueue_cqs_set( \
1984
- __TL_DISPATCH_STREAM(kbdev, obj), \
1985
- kcpu_queue, cqs_obj_gpu_addr); \
1986
- } while (0)
1987
-#else
1988
-#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_ENQUEUE_CQS_SET( \
1989
- kbdev, \
1990
- kcpu_queue, \
1991
- cqs_obj_gpu_addr \
1992
- ) \
1993
- do { } while (0)
1994
-#endif /* MALI_USE_CSF */
1995
-
1996
-/**
1997
- * KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_ENQUEUE_MAP_IMPORT -
1998
- * KCPU Queue enqueues Map Import
1999
- *
2000
- * @kbdev: Kbase device
2001
- * @kcpu_queue: KCPU queue
2002
- * @map_import_buf_gpu_addr: Map import buffer GPU pointer
2003
- */
2004
-#if MALI_USE_CSF
2005
-#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_ENQUEUE_MAP_IMPORT( \
2006
- kbdev, \
2007
- kcpu_queue, \
2008
- map_import_buf_gpu_addr \
2009
- ) \
2010
- do { \
2011
- int enabled = atomic_read(&kbdev->timeline_flags); \
2012
- if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
2013
- __kbase_tlstream_tl_kbase_kcpuqueue_enqueue_map_import( \
2014
- __TL_DISPATCH_STREAM(kbdev, obj), \
2015
- kcpu_queue, map_import_buf_gpu_addr); \
2016
- } while (0)
2017
-#else
2018
-#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_ENQUEUE_MAP_IMPORT( \
2019
- kbdev, \
2020
- kcpu_queue, \
2021
- map_import_buf_gpu_addr \
2022
- ) \
2023
- do { } while (0)
2024
-#endif /* MALI_USE_CSF */
2025
-
2026
-/**
2027
- * KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_ENQUEUE_UNMAP_IMPORT -
2028
- * KCPU Queue enqueues Unmap Import
2029
- *
2030
- * @kbdev: Kbase device
2031
- * @kcpu_queue: KCPU queue
2032
- * @map_import_buf_gpu_addr: Map import buffer GPU pointer
2033
- */
2034
-#if MALI_USE_CSF
2035
-#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_ENQUEUE_UNMAP_IMPORT( \
2036
- kbdev, \
2037
- kcpu_queue, \
2038
- map_import_buf_gpu_addr \
2039
- ) \
2040
- do { \
2041
- int enabled = atomic_read(&kbdev->timeline_flags); \
2042
- if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
2043
- __kbase_tlstream_tl_kbase_kcpuqueue_enqueue_unmap_import( \
2044
- __TL_DISPATCH_STREAM(kbdev, obj), \
2045
- kcpu_queue, map_import_buf_gpu_addr); \
2046
- } while (0)
2047
-#else
2048
-#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_ENQUEUE_UNMAP_IMPORT( \
2049
- kbdev, \
2050
- kcpu_queue, \
2051
- map_import_buf_gpu_addr \
2052
- ) \
2053
- do { } while (0)
2054
-#endif /* MALI_USE_CSF */
2055
-
2056
-/**
2057
- * KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_ENQUEUE_UNMAP_IMPORT_FORCE -
2058
- * KCPU Queue enqueues Unmap Import ignoring reference count
2059
- *
2060
- * @kbdev: Kbase device
2061
- * @kcpu_queue: KCPU queue
2062
- * @map_import_buf_gpu_addr: Map import buffer GPU pointer
2063
- */
2064
-#if MALI_USE_CSF
2065
-#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_ENQUEUE_UNMAP_IMPORT_FORCE( \
2066
- kbdev, \
2067
- kcpu_queue, \
2068
- map_import_buf_gpu_addr \
2069
- ) \
2070
- do { \
2071
- int enabled = atomic_read(&kbdev->timeline_flags); \
2072
- if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
2073
- __kbase_tlstream_tl_kbase_kcpuqueue_enqueue_unmap_import_force( \
2074
- __TL_DISPATCH_STREAM(kbdev, obj), \
2075
- kcpu_queue, map_import_buf_gpu_addr); \
2076
- } while (0)
2077
-#else
2078
-#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_ENQUEUE_UNMAP_IMPORT_FORCE( \
2079
- kbdev, \
2080
- kcpu_queue, \
2081
- map_import_buf_gpu_addr \
2082
- ) \
2083
- do { } while (0)
2084
-#endif /* MALI_USE_CSF */
2085
-
2086
-/**
2087
- * KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_ENQUEUE_ERROR_BARRIER -
2088
- * KCPU Queue enqueues Error Barrier
2089
- *
2090
- * @kbdev: Kbase device
2091
- * @kcpu_queue: KCPU queue
2092
- */
2093
-#if MALI_USE_CSF
2094
-#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_ENQUEUE_ERROR_BARRIER( \
2095
- kbdev, \
2096
- kcpu_queue \
2097
- ) \
2098
- do { \
2099
- int enabled = atomic_read(&kbdev->timeline_flags); \
2100
- if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
2101
- __kbase_tlstream_tl_kbase_kcpuqueue_enqueue_error_barrier( \
2102
- __TL_DISPATCH_STREAM(kbdev, obj), \
2103
- kcpu_queue); \
2104
- } while (0)
2105
-#else
2106
-#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_ENQUEUE_ERROR_BARRIER( \
2107
- kbdev, \
2108
- kcpu_queue \
2109
- ) \
2110
- do { } while (0)
2111
-#endif /* MALI_USE_CSF */
2112
-
2113
-/**
2114
- * KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_ENQUEUE_GROUP_SUSPEND -
2115
- * KCPU Queue enqueues Group Suspend
2116
- *
2117
- * @kbdev: Kbase device
2118
- * @kcpu_queue: KCPU queue
2119
- * @group_suspend_buf: Pointer to the suspend buffer structure
2120
- * @gpu_cmdq_grp_handle: GPU Command Queue Group handle which will match userspace
2121
- */
2122
-#if MALI_USE_CSF
2123
-#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_ENQUEUE_GROUP_SUSPEND( \
2124
- kbdev, \
2125
- kcpu_queue, \
2126
- group_suspend_buf, \
2127
- gpu_cmdq_grp_handle \
2128
- ) \
2129
- do { \
2130
- int enabled = atomic_read(&kbdev->timeline_flags); \
2131
- if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
2132
- __kbase_tlstream_tl_kbase_kcpuqueue_enqueue_group_suspend( \
2133
- __TL_DISPATCH_STREAM(kbdev, obj), \
2134
- kcpu_queue, group_suspend_buf, gpu_cmdq_grp_handle); \
2135
- } while (0)
2136
-#else
2137
-#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_ENQUEUE_GROUP_SUSPEND( \
2138
- kbdev, \
2139
- kcpu_queue, \
2140
- group_suspend_buf, \
2141
- gpu_cmdq_grp_handle \
2142
- ) \
2143
- do { } while (0)
2144
-#endif /* MALI_USE_CSF */
2145
-
2146
-/**
2147
- * KBASE_TLSTREAM_TL_KBASE_ARRAY_BEGIN_KCPUQUEUE_ENQUEUE_JIT_ALLOC -
2148
- * Begin array of KCPU Queue enqueues JIT Alloc
2149
- *
2150
- * @kbdev: Kbase device
2151
- * @kcpu_queue: KCPU queue
2152
- */
2153
-#if MALI_USE_CSF
2154
-#define KBASE_TLSTREAM_TL_KBASE_ARRAY_BEGIN_KCPUQUEUE_ENQUEUE_JIT_ALLOC( \
2155
- kbdev, \
2156
- kcpu_queue \
2157
- ) \
2158
- do { \
2159
- int enabled = atomic_read(&kbdev->timeline_flags); \
2160
- if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
2161
- __kbase_tlstream_tl_kbase_array_begin_kcpuqueue_enqueue_jit_alloc( \
2162
- __TL_DISPATCH_STREAM(kbdev, obj), \
2163
- kcpu_queue); \
2164
- } while (0)
2165
-#else
2166
-#define KBASE_TLSTREAM_TL_KBASE_ARRAY_BEGIN_KCPUQUEUE_ENQUEUE_JIT_ALLOC( \
2167
- kbdev, \
2168
- kcpu_queue \
2169
- ) \
2170
- do { } while (0)
2171
-#endif /* MALI_USE_CSF */
2172
-
2173
-/**
2174
- * KBASE_TLSTREAM_TL_KBASE_ARRAY_ITEM_KCPUQUEUE_ENQUEUE_JIT_ALLOC -
2175
- * Array item of KCPU Queue enqueues JIT Alloc
2176
- *
2177
- * @kbdev: Kbase device
2178
- * @kcpu_queue: KCPU queue
2179
- * @jit_alloc_gpu_alloc_addr_dest: The GPU virtual address to write
2180
- * the JIT allocated GPU virtual address to
2181
- * @jit_alloc_va_pages: The minimum number of virtual pages required
2182
- * @jit_alloc_commit_pages: The minimum number of physical pages which
2183
- * should back the allocation
2184
- * @jit_alloc_extent: Granularity of physical pages to grow the allocation
2185
- * by during a fault
2186
- * @jit_alloc_jit_id: Unique ID provided by the caller, this is used
2187
- * to pair allocation and free requests. Zero is not a valid value
2188
- * @jit_alloc_bin_id: The JIT allocation bin, used in conjunction with
2189
- * max_allocations to limit the number of each type of JIT allocation
2190
- * @jit_alloc_max_allocations: The maximum number of allocations
2191
- * allowed within the bin specified by bin_id. Should be the same for all
2192
- * JIT allocations within the same bin.
2193
- * @jit_alloc_flags: Flags specifying the special requirements for the
2194
- * JIT allocation
2195
- * @jit_alloc_usage_id: A hint about which allocation should be
2196
- * reused. The kernel should attempt to use a previous allocation with the same
2197
- * usage_id
2198
- */
2199
-#if MALI_USE_CSF
2200
-#define KBASE_TLSTREAM_TL_KBASE_ARRAY_ITEM_KCPUQUEUE_ENQUEUE_JIT_ALLOC( \
2201
- kbdev, \
2202
- kcpu_queue, \
2203
- jit_alloc_gpu_alloc_addr_dest, \
2204
- jit_alloc_va_pages, \
2205
- jit_alloc_commit_pages, \
2206
- jit_alloc_extent, \
2207
- jit_alloc_jit_id, \
2208
- jit_alloc_bin_id, \
2209
- jit_alloc_max_allocations, \
2210
- jit_alloc_flags, \
2211
- jit_alloc_usage_id \
2212
- ) \
2213
- do { \
2214
- int enabled = atomic_read(&kbdev->timeline_flags); \
2215
- if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
2216
- __kbase_tlstream_tl_kbase_array_item_kcpuqueue_enqueue_jit_alloc( \
2217
- __TL_DISPATCH_STREAM(kbdev, obj), \
2218
- kcpu_queue, jit_alloc_gpu_alloc_addr_dest, jit_alloc_va_pages, jit_alloc_commit_pages, jit_alloc_extent, jit_alloc_jit_id, jit_alloc_bin_id, jit_alloc_max_allocations, jit_alloc_flags, jit_alloc_usage_id); \
2219
- } while (0)
2220
-#else
2221
-#define KBASE_TLSTREAM_TL_KBASE_ARRAY_ITEM_KCPUQUEUE_ENQUEUE_JIT_ALLOC( \
2222
- kbdev, \
2223
- kcpu_queue, \
2224
- jit_alloc_gpu_alloc_addr_dest, \
2225
- jit_alloc_va_pages, \
2226
- jit_alloc_commit_pages, \
2227
- jit_alloc_extent, \
2228
- jit_alloc_jit_id, \
2229
- jit_alloc_bin_id, \
2230
- jit_alloc_max_allocations, \
2231
- jit_alloc_flags, \
2232
- jit_alloc_usage_id \
2233
- ) \
2234
- do { } while (0)
2235
-#endif /* MALI_USE_CSF */
2236
-
2237
-/**
2238
- * KBASE_TLSTREAM_TL_KBASE_ARRAY_END_KCPUQUEUE_ENQUEUE_JIT_ALLOC -
2239
- * End array of KCPU Queue enqueues JIT Alloc
2240
- *
2241
- * @kbdev: Kbase device
2242
- * @kcpu_queue: KCPU queue
2243
- */
2244
-#if MALI_USE_CSF
2245
-#define KBASE_TLSTREAM_TL_KBASE_ARRAY_END_KCPUQUEUE_ENQUEUE_JIT_ALLOC( \
2246
- kbdev, \
2247
- kcpu_queue \
2248
- ) \
2249
- do { \
2250
- int enabled = atomic_read(&kbdev->timeline_flags); \
2251
- if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
2252
- __kbase_tlstream_tl_kbase_array_end_kcpuqueue_enqueue_jit_alloc( \
2253
- __TL_DISPATCH_STREAM(kbdev, obj), \
2254
- kcpu_queue); \
2255
- } while (0)
2256
-#else
2257
-#define KBASE_TLSTREAM_TL_KBASE_ARRAY_END_KCPUQUEUE_ENQUEUE_JIT_ALLOC( \
2258
- kbdev, \
2259
- kcpu_queue \
2260
- ) \
2261
- do { } while (0)
2262
-#endif /* MALI_USE_CSF */
2263
-
2264
-/**
2265
- * KBASE_TLSTREAM_TL_KBASE_ARRAY_BEGIN_KCPUQUEUE_ENQUEUE_JIT_FREE -
2266
- * Begin array of KCPU Queue enqueues JIT Free
2267
- *
2268
- * @kbdev: Kbase device
2269
- * @kcpu_queue: KCPU queue
2270
- */
2271
-#if MALI_USE_CSF
2272
-#define KBASE_TLSTREAM_TL_KBASE_ARRAY_BEGIN_KCPUQUEUE_ENQUEUE_JIT_FREE( \
2273
- kbdev, \
2274
- kcpu_queue \
2275
- ) \
2276
- do { \
2277
- int enabled = atomic_read(&kbdev->timeline_flags); \
2278
- if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
2279
- __kbase_tlstream_tl_kbase_array_begin_kcpuqueue_enqueue_jit_free( \
2280
- __TL_DISPATCH_STREAM(kbdev, obj), \
2281
- kcpu_queue); \
2282
- } while (0)
2283
-#else
2284
-#define KBASE_TLSTREAM_TL_KBASE_ARRAY_BEGIN_KCPUQUEUE_ENQUEUE_JIT_FREE( \
2285
- kbdev, \
2286
- kcpu_queue \
2287
- ) \
2288
- do { } while (0)
2289
-#endif /* MALI_USE_CSF */
2290
-
2291
-/**
2292
- * KBASE_TLSTREAM_TL_KBASE_ARRAY_ITEM_KCPUQUEUE_ENQUEUE_JIT_FREE -
2293
- * Array item of KCPU Queue enqueues JIT Free
2294
- *
2295
- * @kbdev: Kbase device
2296
- * @kcpu_queue: KCPU queue
2297
- * @jit_alloc_jit_id: Unique ID provided by the caller, this is used
2298
- * to pair allocation and free requests. Zero is not a valid value
2299
- */
2300
-#if MALI_USE_CSF
2301
-#define KBASE_TLSTREAM_TL_KBASE_ARRAY_ITEM_KCPUQUEUE_ENQUEUE_JIT_FREE( \
2302
- kbdev, \
2303
- kcpu_queue, \
2304
- jit_alloc_jit_id \
2305
- ) \
2306
- do { \
2307
- int enabled = atomic_read(&kbdev->timeline_flags); \
2308
- if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
2309
- __kbase_tlstream_tl_kbase_array_item_kcpuqueue_enqueue_jit_free( \
2310
- __TL_DISPATCH_STREAM(kbdev, obj), \
2311
- kcpu_queue, jit_alloc_jit_id); \
2312
- } while (0)
2313
-#else
2314
-#define KBASE_TLSTREAM_TL_KBASE_ARRAY_ITEM_KCPUQUEUE_ENQUEUE_JIT_FREE( \
2315
- kbdev, \
2316
- kcpu_queue, \
2317
- jit_alloc_jit_id \
2318
- ) \
2319
- do { } while (0)
2320
-#endif /* MALI_USE_CSF */
2321
-
2322
-/**
2323
- * KBASE_TLSTREAM_TL_KBASE_ARRAY_END_KCPUQUEUE_ENQUEUE_JIT_FREE -
2324
- * End array of KCPU Queue enqueues JIT Free
2325
- *
2326
- * @kbdev: Kbase device
2327
- * @kcpu_queue: KCPU queue
2328
- */
2329
-#if MALI_USE_CSF
2330
-#define KBASE_TLSTREAM_TL_KBASE_ARRAY_END_KCPUQUEUE_ENQUEUE_JIT_FREE( \
2331
- kbdev, \
2332
- kcpu_queue \
2333
- ) \
2334
- do { \
2335
- int enabled = atomic_read(&kbdev->timeline_flags); \
2336
- if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
2337
- __kbase_tlstream_tl_kbase_array_end_kcpuqueue_enqueue_jit_free( \
2338
- __TL_DISPATCH_STREAM(kbdev, obj), \
2339
- kcpu_queue); \
2340
- } while (0)
2341
-#else
2342
-#define KBASE_TLSTREAM_TL_KBASE_ARRAY_END_KCPUQUEUE_ENQUEUE_JIT_FREE( \
2343
- kbdev, \
2344
- kcpu_queue \
2345
- ) \
2346
- do { } while (0)
2347
-#endif /* MALI_USE_CSF */
2348
-
2349
-/**
2350
- * KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_FENCE_SIGNAL_START -
2351
- * KCPU Queue starts a Signal on Fence
2352
- *
2353
- * @kbdev: Kbase device
2354
- * @kcpu_queue: KCPU queue
2355
- */
2356
-#if MALI_USE_CSF
2357
-#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_FENCE_SIGNAL_START( \
2358
- kbdev, \
2359
- kcpu_queue \
2360
- ) \
2361
- do { \
2362
- int enabled = atomic_read(&kbdev->timeline_flags); \
2363
- if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
2364
- __kbase_tlstream_tl_kbase_kcpuqueue_execute_fence_signal_start( \
2365
- __TL_DISPATCH_STREAM(kbdev, obj), \
2366
- kcpu_queue); \
2367
- } while (0)
2368
-#else
2369
-#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_FENCE_SIGNAL_START( \
2370
- kbdev, \
2371
- kcpu_queue \
2372
- ) \
2373
- do { } while (0)
2374
-#endif /* MALI_USE_CSF */
2375
-
2376
-/**
2377
- * KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_FENCE_SIGNAL_END -
2378
- * KCPU Queue ends a Signal on Fence
2379
- *
2380
- * @kbdev: Kbase device
2381
- * @kcpu_queue: KCPU queue
2382
- * @execute_error: Non-zero error code if KCPU Queue item completed with error, else zero
2383
- */
2384
-#if MALI_USE_CSF
2385
-#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_FENCE_SIGNAL_END( \
2386
- kbdev, \
2387
- kcpu_queue, \
2388
- execute_error \
2389
- ) \
2390
- do { \
2391
- int enabled = atomic_read(&kbdev->timeline_flags); \
2392
- if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
2393
- __kbase_tlstream_tl_kbase_kcpuqueue_execute_fence_signal_end( \
2394
- __TL_DISPATCH_STREAM(kbdev, obj), \
2395
- kcpu_queue, execute_error); \
2396
- } while (0)
2397
-#else
2398
-#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_FENCE_SIGNAL_END( \
2399
- kbdev, \
2400
- kcpu_queue, \
2401
- execute_error \
2402
- ) \
2403
- do { } while (0)
2404
-#endif /* MALI_USE_CSF */
2405
-
2406
-/**
2407
- * KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_FENCE_WAIT_START -
2408
- * KCPU Queue starts a Wait on Fence
2409
- *
2410
- * @kbdev: Kbase device
2411
- * @kcpu_queue: KCPU queue
2412
- */
2413
-#if MALI_USE_CSF
2414
-#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_FENCE_WAIT_START( \
2415
- kbdev, \
2416
- kcpu_queue \
2417
- ) \
2418
- do { \
2419
- int enabled = atomic_read(&kbdev->timeline_flags); \
2420
- if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
2421
- __kbase_tlstream_tl_kbase_kcpuqueue_execute_fence_wait_start( \
2422
- __TL_DISPATCH_STREAM(kbdev, obj), \
2423
- kcpu_queue); \
2424
- } while (0)
2425
-#else
2426
-#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_FENCE_WAIT_START( \
2427
- kbdev, \
2428
- kcpu_queue \
2429
- ) \
2430
- do { } while (0)
2431
-#endif /* MALI_USE_CSF */
2432
-
2433
-/**
2434
- * KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_FENCE_WAIT_END -
2435
- * KCPU Queue ends a Wait on Fence
2436
- *
2437
- * @kbdev: Kbase device
2438
- * @kcpu_queue: KCPU queue
2439
- * @execute_error: Non-zero error code if KCPU Queue item completed with error, else zero
2440
- */
2441
-#if MALI_USE_CSF
2442
-#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_FENCE_WAIT_END( \
2443
- kbdev, \
2444
- kcpu_queue, \
2445
- execute_error \
2446
- ) \
2447
- do { \
2448
- int enabled = atomic_read(&kbdev->timeline_flags); \
2449
- if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
2450
- __kbase_tlstream_tl_kbase_kcpuqueue_execute_fence_wait_end( \
2451
- __TL_DISPATCH_STREAM(kbdev, obj), \
2452
- kcpu_queue, execute_error); \
2453
- } while (0)
2454
-#else
2455
-#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_FENCE_WAIT_END( \
2456
- kbdev, \
2457
- kcpu_queue, \
2458
- execute_error \
2459
- ) \
2460
- do { } while (0)
2461
-#endif /* MALI_USE_CSF */
2462
-
2463
-/**
2464
- * KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_CQS_WAIT_START -
2465
- * KCPU Queue starts a Wait on an array of Cross Queue Sync Objects
2466
- *
2467
- * @kbdev: Kbase device
2468
- * @kcpu_queue: KCPU queue
2469
- */
2470
-#if MALI_USE_CSF
2471
-#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_CQS_WAIT_START( \
2472
- kbdev, \
2473
- kcpu_queue \
2474
- ) \
2475
- do { \
2476
- int enabled = atomic_read(&kbdev->timeline_flags); \
2477
- if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
2478
- __kbase_tlstream_tl_kbase_kcpuqueue_execute_cqs_wait_start( \
2479
- __TL_DISPATCH_STREAM(kbdev, obj), \
2480
- kcpu_queue); \
2481
- } while (0)
2482
-#else
2483
-#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_CQS_WAIT_START( \
2484
- kbdev, \
2485
- kcpu_queue \
2486
- ) \
2487
- do { } while (0)
2488
-#endif /* MALI_USE_CSF */
2489
-
2490
-/**
2491
- * KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_CQS_WAIT_END -
2492
- * KCPU Queue ends a Wait on an array of Cross Queue Sync Objects
2493
- *
2494
- * @kbdev: Kbase device
2495
- * @kcpu_queue: KCPU queue
2496
- * @execute_error: Non-zero error code if KCPU Queue item completed with error, else zero
2497
- */
2498
-#if MALI_USE_CSF
2499
-#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_CQS_WAIT_END( \
2500
- kbdev, \
2501
- kcpu_queue, \
2502
- execute_error \
2503
- ) \
2504
- do { \
2505
- int enabled = atomic_read(&kbdev->timeline_flags); \
2506
- if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
2507
- __kbase_tlstream_tl_kbase_kcpuqueue_execute_cqs_wait_end( \
2508
- __TL_DISPATCH_STREAM(kbdev, obj), \
2509
- kcpu_queue, execute_error); \
2510
- } while (0)
2511
-#else
2512
-#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_CQS_WAIT_END( \
2513
- kbdev, \
2514
- kcpu_queue, \
2515
- execute_error \
2516
- ) \
2517
- do { } while (0)
2518
-#endif /* MALI_USE_CSF */
2519
-
2520
-/**
2521
- * KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_CQS_SET -
2522
- * KCPU Queue executes a Set on an array of Cross Queue Sync Objects
2523
- *
2524
- * @kbdev: Kbase device
2525
- * @kcpu_queue: KCPU queue
2526
- * @execute_error: Non-zero error code if KCPU Queue item completed with error, else zero
2527
- */
2528
-#if MALI_USE_CSF
2529
-#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_CQS_SET( \
2530
- kbdev, \
2531
- kcpu_queue, \
2532
- execute_error \
2533
- ) \
2534
- do { \
2535
- int enabled = atomic_read(&kbdev->timeline_flags); \
2536
- if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
2537
- __kbase_tlstream_tl_kbase_kcpuqueue_execute_cqs_set( \
2538
- __TL_DISPATCH_STREAM(kbdev, obj), \
2539
- kcpu_queue, execute_error); \
2540
- } while (0)
2541
-#else
2542
-#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_CQS_SET( \
2543
- kbdev, \
2544
- kcpu_queue, \
2545
- execute_error \
2546
- ) \
2547
- do { } while (0)
2548
-#endif /* MALI_USE_CSF */
2549
-
2550
-/**
2551
- * KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_MAP_IMPORT_START -
2552
- * KCPU Queue starts a Map Import
2553
- *
2554
- * @kbdev: Kbase device
2555
- * @kcpu_queue: KCPU queue
2556
- */
2557
-#if MALI_USE_CSF
2558
-#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_MAP_IMPORT_START( \
2559
- kbdev, \
2560
- kcpu_queue \
2561
- ) \
2562
- do { \
2563
- int enabled = atomic_read(&kbdev->timeline_flags); \
2564
- if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
2565
- __kbase_tlstream_tl_kbase_kcpuqueue_execute_map_import_start( \
2566
- __TL_DISPATCH_STREAM(kbdev, obj), \
2567
- kcpu_queue); \
2568
- } while (0)
2569
-#else
2570
-#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_MAP_IMPORT_START( \
2571
- kbdev, \
2572
- kcpu_queue \
2573
- ) \
2574
- do { } while (0)
2575
-#endif /* MALI_USE_CSF */
2576
-
2577
-/**
2578
- * KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_MAP_IMPORT_END -
2579
- * KCPU Queue ends a Map Import
2580
- *
2581
- * @kbdev: Kbase device
2582
- * @kcpu_queue: KCPU queue
2583
- * @execute_error: Non-zero error code if KCPU Queue item completed with error, else zero
2584
- */
2585
-#if MALI_USE_CSF
2586
-#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_MAP_IMPORT_END( \
2587
- kbdev, \
2588
- kcpu_queue, \
2589
- execute_error \
2590
- ) \
2591
- do { \
2592
- int enabled = atomic_read(&kbdev->timeline_flags); \
2593
- if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
2594
- __kbase_tlstream_tl_kbase_kcpuqueue_execute_map_import_end( \
2595
- __TL_DISPATCH_STREAM(kbdev, obj), \
2596
- kcpu_queue, execute_error); \
2597
- } while (0)
2598
-#else
2599
-#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_MAP_IMPORT_END( \
2600
- kbdev, \
2601
- kcpu_queue, \
2602
- execute_error \
2603
- ) \
2604
- do { } while (0)
2605
-#endif /* MALI_USE_CSF */
2606
-
2607
-/**
2608
- * KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_UNMAP_IMPORT_START -
2609
- * KCPU Queue starts an Unmap Import
2610
- *
2611
- * @kbdev: Kbase device
2612
- * @kcpu_queue: KCPU queue
2613
- */
2614
-#if MALI_USE_CSF
2615
-#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_UNMAP_IMPORT_START( \
2616
- kbdev, \
2617
- kcpu_queue \
2618
- ) \
2619
- do { \
2620
- int enabled = atomic_read(&kbdev->timeline_flags); \
2621
- if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
2622
- __kbase_tlstream_tl_kbase_kcpuqueue_execute_unmap_import_start( \
2623
- __TL_DISPATCH_STREAM(kbdev, obj), \
2624
- kcpu_queue); \
2625
- } while (0)
2626
-#else
2627
-#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_UNMAP_IMPORT_START( \
2628
- kbdev, \
2629
- kcpu_queue \
2630
- ) \
2631
- do { } while (0)
2632
-#endif /* MALI_USE_CSF */
2633
-
2634
-/**
2635
- * KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_UNMAP_IMPORT_END -
2636
- * KCPU Queue ends an Unmap Import
2637
- *
2638
- * @kbdev: Kbase device
2639
- * @kcpu_queue: KCPU queue
2640
- * @execute_error: Non-zero error code if KCPU Queue item completed with error, else zero
2641
- */
2642
-#if MALI_USE_CSF
2643
-#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_UNMAP_IMPORT_END( \
2644
- kbdev, \
2645
- kcpu_queue, \
2646
- execute_error \
2647
- ) \
2648
- do { \
2649
- int enabled = atomic_read(&kbdev->timeline_flags); \
2650
- if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
2651
- __kbase_tlstream_tl_kbase_kcpuqueue_execute_unmap_import_end( \
2652
- __TL_DISPATCH_STREAM(kbdev, obj), \
2653
- kcpu_queue, execute_error); \
2654
- } while (0)
2655
-#else
2656
-#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_UNMAP_IMPORT_END( \
2657
- kbdev, \
2658
- kcpu_queue, \
2659
- execute_error \
2660
- ) \
2661
- do { } while (0)
2662
-#endif /* MALI_USE_CSF */
2663
-
2664
-/**
2665
- * KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_UNMAP_IMPORT_FORCE_START -
2666
- * KCPU Queue starts an Unmap Import ignoring reference count
2667
- *
2668
- * @kbdev: Kbase device
2669
- * @kcpu_queue: KCPU queue
2670
- */
2671
-#if MALI_USE_CSF
2672
-#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_UNMAP_IMPORT_FORCE_START( \
2673
- kbdev, \
2674
- kcpu_queue \
2675
- ) \
2676
- do { \
2677
- int enabled = atomic_read(&kbdev->timeline_flags); \
2678
- if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
2679
- __kbase_tlstream_tl_kbase_kcpuqueue_execute_unmap_import_force_start( \
2680
- __TL_DISPATCH_STREAM(kbdev, obj), \
2681
- kcpu_queue); \
2682
- } while (0)
2683
-#else
2684
-#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_UNMAP_IMPORT_FORCE_START( \
2685
- kbdev, \
2686
- kcpu_queue \
2687
- ) \
2688
- do { } while (0)
2689
-#endif /* MALI_USE_CSF */
2690
-
2691
-/**
2692
- * KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_UNMAP_IMPORT_FORCE_END -
2693
- * KCPU Queue ends an Unmap Import ignoring reference count
2694
- *
2695
- * @kbdev: Kbase device
2696
- * @kcpu_queue: KCPU queue
2697
- * @execute_error: Non-zero error code if KCPU Queue item completed with error, else zero
2698
- */
2699
-#if MALI_USE_CSF
2700
-#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_UNMAP_IMPORT_FORCE_END( \
2701
- kbdev, \
2702
- kcpu_queue, \
2703
- execute_error \
2704
- ) \
2705
- do { \
2706
- int enabled = atomic_read(&kbdev->timeline_flags); \
2707
- if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
2708
- __kbase_tlstream_tl_kbase_kcpuqueue_execute_unmap_import_force_end( \
2709
- __TL_DISPATCH_STREAM(kbdev, obj), \
2710
- kcpu_queue, execute_error); \
2711
- } while (0)
2712
-#else
2713
-#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_UNMAP_IMPORT_FORCE_END( \
2714
- kbdev, \
2715
- kcpu_queue, \
2716
- execute_error \
2717
- ) \
2718
- do { } while (0)
2719
-#endif /* MALI_USE_CSF */
2720
-
2721
-/**
2722
- * KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_JIT_ALLOC_START -
2723
- * KCPU Queue starts an array of JIT Allocs
2724
- *
2725
- * @kbdev: Kbase device
2726
- * @kcpu_queue: KCPU queue
2727
- */
2728
-#if MALI_USE_CSF
2729
-#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_JIT_ALLOC_START( \
2730
- kbdev, \
2731
- kcpu_queue \
2732
- ) \
2733
- do { \
2734
- int enabled = atomic_read(&kbdev->timeline_flags); \
2735
- if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
2736
- __kbase_tlstream_tl_kbase_kcpuqueue_execute_jit_alloc_start( \
2737
- __TL_DISPATCH_STREAM(kbdev, obj), \
2738
- kcpu_queue); \
2739
- } while (0)
2740
-#else
2741
-#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_JIT_ALLOC_START( \
2742
- kbdev, \
2743
- kcpu_queue \
2744
- ) \
2745
- do { } while (0)
2746
-#endif /* MALI_USE_CSF */
2747
-
2748
-/**
2749
- * KBASE_TLSTREAM_TL_KBASE_ARRAY_BEGIN_KCPUQUEUE_EXECUTE_JIT_ALLOC_END -
2750
- * Begin array of KCPU Queue ends an array of JIT Allocs
2751
- *
2752
- * @kbdev: Kbase device
2753
- * @kcpu_queue: KCPU queue
2754
- */
2755
-#if MALI_USE_CSF
2756
-#define KBASE_TLSTREAM_TL_KBASE_ARRAY_BEGIN_KCPUQUEUE_EXECUTE_JIT_ALLOC_END( \
2757
- kbdev, \
2758
- kcpu_queue \
2759
- ) \
2760
- do { \
2761
- int enabled = atomic_read(&kbdev->timeline_flags); \
2762
- if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
2763
- __kbase_tlstream_tl_kbase_array_begin_kcpuqueue_execute_jit_alloc_end( \
2764
- __TL_DISPATCH_STREAM(kbdev, obj), \
2765
- kcpu_queue); \
2766
- } while (0)
2767
-#else
2768
-#define KBASE_TLSTREAM_TL_KBASE_ARRAY_BEGIN_KCPUQUEUE_EXECUTE_JIT_ALLOC_END( \
2769
- kbdev, \
2770
- kcpu_queue \
2771
- ) \
2772
- do { } while (0)
2773
-#endif /* MALI_USE_CSF */
2774
-
2775
-/**
2776
- * KBASE_TLSTREAM_TL_KBASE_ARRAY_ITEM_KCPUQUEUE_EXECUTE_JIT_ALLOC_END -
2777
- * Array item of KCPU Queue ends an array of JIT Allocs
2778
- *
2779
- * @kbdev: Kbase device
2780
- * @kcpu_queue: KCPU queue
2781
- * @execute_error: Non-zero error code if KCPU Queue item completed with error, else zero
2782
- * @jit_alloc_gpu_alloc_addr: The JIT allocated GPU virtual address
2783
- * @jit_alloc_mmu_flags: The MMU flags for the JIT allocation
2784
- */
2785
-#if MALI_USE_CSF
2786
-#define KBASE_TLSTREAM_TL_KBASE_ARRAY_ITEM_KCPUQUEUE_EXECUTE_JIT_ALLOC_END( \
2787
- kbdev, \
2788
- kcpu_queue, \
2789
- execute_error, \
2790
- jit_alloc_gpu_alloc_addr, \
2791
- jit_alloc_mmu_flags \
2792
- ) \
2793
- do { \
2794
- int enabled = atomic_read(&kbdev->timeline_flags); \
2795
- if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
2796
- __kbase_tlstream_tl_kbase_array_item_kcpuqueue_execute_jit_alloc_end( \
2797
- __TL_DISPATCH_STREAM(kbdev, obj), \
2798
- kcpu_queue, execute_error, jit_alloc_gpu_alloc_addr, jit_alloc_mmu_flags); \
2799
- } while (0)
2800
-#else
2801
-#define KBASE_TLSTREAM_TL_KBASE_ARRAY_ITEM_KCPUQUEUE_EXECUTE_JIT_ALLOC_END( \
2802
- kbdev, \
2803
- kcpu_queue, \
2804
- execute_error, \
2805
- jit_alloc_gpu_alloc_addr, \
2806
- jit_alloc_mmu_flags \
2807
- ) \
2808
- do { } while (0)
2809
-#endif /* MALI_USE_CSF */
2810
-
2811
-/**
2812
- * KBASE_TLSTREAM_TL_KBASE_ARRAY_END_KCPUQUEUE_EXECUTE_JIT_ALLOC_END -
2813
- * End array of KCPU Queue ends an array of JIT Allocs
2814
- *
2815
- * @kbdev: Kbase device
2816
- * @kcpu_queue: KCPU queue
2817
- */
2818
-#if MALI_USE_CSF
2819
-#define KBASE_TLSTREAM_TL_KBASE_ARRAY_END_KCPUQUEUE_EXECUTE_JIT_ALLOC_END( \
2820
- kbdev, \
2821
- kcpu_queue \
2822
- ) \
2823
- do { \
2824
- int enabled = atomic_read(&kbdev->timeline_flags); \
2825
- if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
2826
- __kbase_tlstream_tl_kbase_array_end_kcpuqueue_execute_jit_alloc_end( \
2827
- __TL_DISPATCH_STREAM(kbdev, obj), \
2828
- kcpu_queue); \
2829
- } while (0)
2830
-#else
2831
-#define KBASE_TLSTREAM_TL_KBASE_ARRAY_END_KCPUQUEUE_EXECUTE_JIT_ALLOC_END( \
2832
- kbdev, \
2833
- kcpu_queue \
2834
- ) \
2835
- do { } while (0)
2836
-#endif /* MALI_USE_CSF */
2837
-
2838
-/**
2839
- * KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_JIT_FREE_START -
2840
- * KCPU Queue starts an array of JIT Frees
2841
- *
2842
- * @kbdev: Kbase device
2843
- * @kcpu_queue: KCPU queue
2844
- */
2845
-#if MALI_USE_CSF
2846
-#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_JIT_FREE_START( \
2847
- kbdev, \
2848
- kcpu_queue \
2849
- ) \
2850
- do { \
2851
- int enabled = atomic_read(&kbdev->timeline_flags); \
2852
- if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
2853
- __kbase_tlstream_tl_kbase_kcpuqueue_execute_jit_free_start( \
2854
- __TL_DISPATCH_STREAM(kbdev, obj), \
2855
- kcpu_queue); \
2856
- } while (0)
2857
-#else
2858
-#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_JIT_FREE_START( \
2859
- kbdev, \
2860
- kcpu_queue \
2861
- ) \
2862
- do { } while (0)
2863
-#endif /* MALI_USE_CSF */
2864
-
2865
-/**
2866
- * KBASE_TLSTREAM_TL_KBASE_ARRAY_BEGIN_KCPUQUEUE_EXECUTE_JIT_FREE_END -
2867
- * Begin array of KCPU Queue ends an array of JIT Frees
2868
- *
2869
- * @kbdev: Kbase device
2870
- * @kcpu_queue: KCPU queue
2871
- */
2872
-#if MALI_USE_CSF
2873
-#define KBASE_TLSTREAM_TL_KBASE_ARRAY_BEGIN_KCPUQUEUE_EXECUTE_JIT_FREE_END( \
2874
- kbdev, \
2875
- kcpu_queue \
2876
- ) \
2877
- do { \
2878
- int enabled = atomic_read(&kbdev->timeline_flags); \
2879
- if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
2880
- __kbase_tlstream_tl_kbase_array_begin_kcpuqueue_execute_jit_free_end( \
2881
- __TL_DISPATCH_STREAM(kbdev, obj), \
2882
- kcpu_queue); \
2883
- } while (0)
2884
-#else
2885
-#define KBASE_TLSTREAM_TL_KBASE_ARRAY_BEGIN_KCPUQUEUE_EXECUTE_JIT_FREE_END( \
2886
- kbdev, \
2887
- kcpu_queue \
2888
- ) \
2889
- do { } while (0)
2890
-#endif /* MALI_USE_CSF */
2891
-
2892
-/**
2893
- * KBASE_TLSTREAM_TL_KBASE_ARRAY_ITEM_KCPUQUEUE_EXECUTE_JIT_FREE_END -
2894
- * Array item of KCPU Queue ends an array of JIT Frees
2895
- *
2896
- * @kbdev: Kbase device
2897
- * @kcpu_queue: KCPU queue
2898
- * @execute_error: Non-zero error code if KCPU Queue item completed with error, else zero
2899
- * @jit_free_pages_used: The actual number of pages used by the JIT
2900
- * allocation
2901
- */
2902
-#if MALI_USE_CSF
2903
-#define KBASE_TLSTREAM_TL_KBASE_ARRAY_ITEM_KCPUQUEUE_EXECUTE_JIT_FREE_END( \
2904
- kbdev, \
2905
- kcpu_queue, \
2906
- execute_error, \
2907
- jit_free_pages_used \
2908
- ) \
2909
- do { \
2910
- int enabled = atomic_read(&kbdev->timeline_flags); \
2911
- if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
2912
- __kbase_tlstream_tl_kbase_array_item_kcpuqueue_execute_jit_free_end( \
2913
- __TL_DISPATCH_STREAM(kbdev, obj), \
2914
- kcpu_queue, execute_error, jit_free_pages_used); \
2915
- } while (0)
2916
-#else
2917
-#define KBASE_TLSTREAM_TL_KBASE_ARRAY_ITEM_KCPUQUEUE_EXECUTE_JIT_FREE_END( \
2918
- kbdev, \
2919
- kcpu_queue, \
2920
- execute_error, \
2921
- jit_free_pages_used \
2922
- ) \
2923
- do { } while (0)
2924
-#endif /* MALI_USE_CSF */
2925
-
2926
-/**
2927
- * KBASE_TLSTREAM_TL_KBASE_ARRAY_END_KCPUQUEUE_EXECUTE_JIT_FREE_END -
2928
- * End array of KCPU Queue ends an array of JIT Frees
2929
- *
2930
- * @kbdev: Kbase device
2931
- * @kcpu_queue: KCPU queue
2932
- */
2933
-#if MALI_USE_CSF
2934
-#define KBASE_TLSTREAM_TL_KBASE_ARRAY_END_KCPUQUEUE_EXECUTE_JIT_FREE_END( \
2935
- kbdev, \
2936
- kcpu_queue \
2937
- ) \
2938
- do { \
2939
- int enabled = atomic_read(&kbdev->timeline_flags); \
2940
- if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
2941
- __kbase_tlstream_tl_kbase_array_end_kcpuqueue_execute_jit_free_end( \
2942
- __TL_DISPATCH_STREAM(kbdev, obj), \
2943
- kcpu_queue); \
2944
- } while (0)
2945
-#else
2946
-#define KBASE_TLSTREAM_TL_KBASE_ARRAY_END_KCPUQUEUE_EXECUTE_JIT_FREE_END( \
2947
- kbdev, \
2948
- kcpu_queue \
2949
- ) \
2950
- do { } while (0)
2951
-#endif /* MALI_USE_CSF */
2952
-
2953
-/**
2954
- * KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_ERROR_BARRIER -
2955
- * KCPU Queue executes an Error Barrier
2956
- *
2957
- * @kbdev: Kbase device
2958
- * @kcpu_queue: KCPU queue
2959
- */
2960
-#if MALI_USE_CSF
2961
-#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_ERROR_BARRIER( \
2962
- kbdev, \
2963
- kcpu_queue \
2964
- ) \
2965
- do { \
2966
- int enabled = atomic_read(&kbdev->timeline_flags); \
2967
- if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
2968
- __kbase_tlstream_tl_kbase_kcpuqueue_execute_error_barrier( \
2969
- __TL_DISPATCH_STREAM(kbdev, obj), \
2970
- kcpu_queue); \
2971
- } while (0)
2972
-#else
2973
-#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_ERROR_BARRIER( \
2974
- kbdev, \
2975
- kcpu_queue \
2976
- ) \
2977
- do { } while (0)
2978
-#endif /* MALI_USE_CSF */
2979
-
2980
-/**
2981
- * KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_GROUP_SUSPEND_START -
2982
- * KCPU Queue starts a group suspend
2983
- *
2984
- * @kbdev: Kbase device
2985
- * @kcpu_queue: KCPU queue
2986
- */
2987
-#if MALI_USE_CSF
2988
-#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_GROUP_SUSPEND_START( \
2989
- kbdev, \
2990
- kcpu_queue \
2991
- ) \
2992
- do { \
2993
- int enabled = atomic_read(&kbdev->timeline_flags); \
2994
- if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
2995
- __kbase_tlstream_tl_kbase_kcpuqueue_execute_group_suspend_start( \
2996
- __TL_DISPATCH_STREAM(kbdev, obj), \
2997
- kcpu_queue); \
2998
- } while (0)
2999
-#else
3000
-#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_GROUP_SUSPEND_START( \
3001
- kbdev, \
3002
- kcpu_queue \
3003
- ) \
3004
- do { } while (0)
3005
-#endif /* MALI_USE_CSF */
3006
-
3007
-/**
3008
- * KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_GROUP_SUSPEND_END -
3009
- * KCPU Queue ends a group suspend
3010
- *
3011
- * @kbdev: Kbase device
3012
- * @kcpu_queue: KCPU queue
3013
- * @execute_error: Non-zero error code if KCPU Queue item completed with error, else zero
3014
- */
3015
-#if MALI_USE_CSF
3016
-#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_GROUP_SUSPEND_END( \
3017
- kbdev, \
3018
- kcpu_queue, \
3019
- execute_error \
3020
- ) \
3021
- do { \
3022
- int enabled = atomic_read(&kbdev->timeline_flags); \
3023
- if (enabled & BASE_TLSTREAM_ENABLE_CSF_TRACEPOINTS) \
3024
- __kbase_tlstream_tl_kbase_kcpuqueue_execute_group_suspend_end( \
3025
- __TL_DISPATCH_STREAM(kbdev, obj), \
3026
- kcpu_queue, execute_error); \
3027
- } while (0)
3028
-#else
3029
-#define KBASE_TLSTREAM_TL_KBASE_KCPUQUEUE_EXECUTE_GROUP_SUSPEND_END( \
3030
- kbdev, \
3031
- kcpu_queue, \
3032
- execute_error \
3033
- ) \
3034
- do { } while (0)
3035
-#endif /* MALI_USE_CSF */
3036
-
3037
-/**
3038
- * KBASE_TLSTREAM_TL_KBASE_CSFFW_TLSTREAM_OVERFLOW -
3039
- * An overflow has happened with the CSFFW Timeline stream
3040
- *
3041
- * @kbdev: Kbase device
3042
- * @csffw_timestamp: Timestamp of a CSFFW event
3043
- * @csffw_cycle: Cycle number of a CSFFW event
3044
- */
3045
-#if MALI_USE_CSF
3046
-#define KBASE_TLSTREAM_TL_KBASE_CSFFW_TLSTREAM_OVERFLOW( \
3047
- kbdev, \
3048
- csffw_timestamp, \
3049
- csffw_cycle \
3050
- ) \
3051
- do { \
3052
- int enabled = atomic_read(&kbdev->timeline_flags); \
3053
- if (enabled & BASE_TLSTREAM_ENABLE_CSFFW_TRACEPOINTS) \
3054
- __kbase_tlstream_tl_kbase_csffw_tlstream_overflow( \
3055
- __TL_DISPATCH_STREAM(kbdev, obj), \
3056
- csffw_timestamp, csffw_cycle); \
3057
- } while (0)
3058
-#else
3059
-#define KBASE_TLSTREAM_TL_KBASE_CSFFW_TLSTREAM_OVERFLOW( \
3060
- kbdev, \
3061
- csffw_timestamp, \
3062
- csffw_cycle \
3063
- ) \
3064
- do { } while (0)
3065
-#endif /* MALI_USE_CSF */
3066
-
3067
-/**
3068
- * KBASE_TLSTREAM_TL_KBASE_CSFFW_RESET -
3069
- * A reset has happened with the CSFFW
3070
- *
3071
- * @kbdev: Kbase device
3072
- * @csffw_cycle: Cycle number of a CSFFW event
3073
- */
3074
-#if MALI_USE_CSF
3075
-#define KBASE_TLSTREAM_TL_KBASE_CSFFW_RESET( \
3076
- kbdev, \
3077
- csffw_cycle \
3078
- ) \
3079
- do { \
3080
- int enabled = atomic_read(&kbdev->timeline_flags); \
3081
- if (enabled & BASE_TLSTREAM_ENABLE_CSFFW_TRACEPOINTS) \
3082
- __kbase_tlstream_tl_kbase_csffw_reset( \
3083
- __TL_DISPATCH_STREAM(kbdev, obj), \
3084
- csffw_cycle); \
3085
- } while (0)
3086
-#else
3087
-#define KBASE_TLSTREAM_TL_KBASE_CSFFW_RESET( \
3088
- kbdev, \
3089
- csffw_cycle \
3090
- ) \
3091
- do { } while (0)
3092
-#endif /* MALI_USE_CSF */
3093
-
30944310
30954311 /* Gator tracepoints are hooked into TLSTREAM interface.
30964312 * When the following tracepoints are called, corresponding