Debian Codegraph @

src/panfrost/lib/wrap.h

raw
1 /*
2 * Copyright (C) 2017-2019 Lyude Paul
3 * Copyright (C) 2017-2019 Alyssa Rosenzweig
4 * SPDX-License-Identifier: MIT
5 */
6
7 #ifndef __PAN_DECODE_PUBLIC_H__
8 #define __PAN_DECODE_PUBLIC_H__
9
10 #include <inttypes.h>
11 #include <stdbool.h>
12 #include <stddef.h>
13 #include <stdio.h>
14 #include <stdlib.h>
15
16 /* Public entrypoints for the tracing infrastructure. This API should be kept
17 * more or less stable. Don't feel bad if you have to change it; just feel
18 * slightly guilty about creating more work for me later. -Alyssa <3
19 *
20 * I'm joking. Mostly. panwrap (out-of-tree) includes this, so update that if
21 * you need to change something here. panwrap is open-source but cannot be
22 * included in-tree.
23 */
24
25 // TODO: update panwrap
26
27 struct pandecode_context;
28
29 struct pandecode_context *pandecode_create_context(bool to_stderr);
30
31 void pandecode_next_frame(struct pandecode_context *ctx);
32
33 void pandecode_destroy_context(struct pandecode_context *ctx);
34
35 void pandecode_inject_mmap(struct pandecode_context *ctx, uint64_t gpu_va,
36 void *cpu, unsigned sz, const char *name);
37
38 void pandecode_inject_free(struct pandecode_context *ctx, uint64_t gpu_va,
39 unsigned sz);
40
41 void pandecode_jc(struct pandecode_context *ctx, uint64_t jc_gpu_va,
42 uint64_t gpu_id);
43
44 void pandecode_interpret_cs(struct pandecode_context *ctx,
45 uint64_t queue_gpu_va, uint32_t size,
46 uint64_t gpu_id, uint32_t *regs);
47
48 void pandecode_cs_binary(struct pandecode_context *ctx, uint64_t binary_gpu_va,
49 uint32_t size, uint64_t gpu_id);
50
51 void pandecode_cs_trace(struct pandecode_context *ctx, uint64_t trace_gpu_va,
52 uint32_t size, uint64_t gpu_id);
53
54 void pandecode_abort_on_fault(struct pandecode_context *ctx, uint64_t jc_gpu_va,
55 uint64_t gpu_id);
56
57 #endif /* __MMAP_TRACE_H__ */