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 void agxdecode_next_frame(void); 14 15 void agxdecode_close(void); 16 17 void agxdecode_cmdstream(unsigned cmdbuf_index, unsigned map_index, 18 bool verbose); 19 20 void agxdecode_dump_file_open(void); 21 22 void agxdecode_track_alloc(struct agx_bo *alloc); 23 24 void agxdecode_dump_mappings(unsigned map_index); 25 26 void agxdecode_track_free(struct agx_bo *bo); 27 28 struct libagxdecode_config { 29 uint32_t chip_id; 30 size_t (*read_gpu_mem)(uint64_t addr, size_t size, void *data); 31 ssize_t (*stream_write)(const char *buffer, size_t size); 32 }; 33 34 void libagxdecode_init(struct libagxdecode_config *config); 35 void libagxdecode_vdm(uint64_t addr, const char *label, bool verbose); 36 void libagxdecode_cdm(uint64_t addr, const char *label, bool verbose); 37 void libagxdecode_usc(uint64_t addr, const char *label, bool verbose); 38 void libagxdecode_shutdown(void); 39