Debian Codegraph @

src/asahi/lib/decode.h

raw
1 /*
2 * Copyright 2017-2019 Lyude Paul
3 * Copyright 2017-2019 Alyssa Rosenzweig
4 * SPDX-License-Identifier: MIT
5 *
6 */
7
8 #pragma once
9
10 #include <sys/types.h>
11 #include "agx_bo.h"
12
13 #include "drm-uapi/asahi_drm.h"
14
15 struct agxdecode_ctx;
16
17 struct agxdecode_ctx *agxdecode_new_context(uint64_t shader_base);
18
19 void agxdecode_destroy_context(struct agxdecode_ctx *ctx);
20
21 void agxdecode_next_frame(void);
22
23 void agxdecode_close(void);
24
25 void agxdecode_cmdstream(struct agxdecode_ctx *ctx, unsigned cmdbuf_index,
26 unsigned map_index, bool verbose);
27
28 struct util_dynarray;
29
30 void agxdecode_drm_cmdbuf(struct agxdecode_ctx *ctx,
31 struct drm_asahi_params_global *params,
32 struct util_dynarray *cmdbuf, bool verbose);
33
34 void agxdecode_dump_file_open(void);
35
36 void agxdecode_track_alloc(struct agxdecode_ctx *ctx, struct agx_bo *alloc);
37
38 void agxdecode_track_free(struct agxdecode_ctx *ctx, struct agx_bo *bo);
39
40 struct libagxdecode_config {
41 uint32_t chip_id;
42 size_t (*read_gpu_mem)(uint64_t addr, size_t size, void *data);
43 ssize_t (*stream_write)(const char *buffer, size_t size);
44 };
45
46 void libagxdecode_init(struct libagxdecode_config *config);
47 void libagxdecode_vdm(struct agxdecode_ctx *ctx, uint64_t addr,
48 const char *label, bool verbose);
49 void libagxdecode_cdm(struct agxdecode_ctx *ctx, uint64_t addr,
50 const char *label, bool verbose);
51 void libagxdecode_usc(struct agxdecode_ctx *ctx, uint64_t addr,
52 const char *label, bool verbose);
53 void libagxdecode_shutdown(void);