1f6ffbd4fSLucas Stach /* SPDX-License-Identifier: GPL-2.0 */ 2a8c21a54SThe etnaviv authors /* 3a8c21a54SThe etnaviv authors * Copyright (C) 2015 Etnaviv Project 4a8c21a54SThe etnaviv authors */ 5f6ffbd4fSLucas Stach 6a8c21a54SThe etnaviv authors #ifndef ETNAVIV_DUMP_H 7a8c21a54SThe etnaviv authors #define ETNAVIV_DUMP_H 8a8c21a54SThe etnaviv authors 9a8c21a54SThe etnaviv authors #include <linux/types.h> 10a8c21a54SThe etnaviv authors 11a8c21a54SThe etnaviv authors enum { 12a8c21a54SThe etnaviv authors ETDUMP_MAGIC = 0x414e5445, 13a8c21a54SThe etnaviv authors ETDUMP_BUF_REG = 0, 14a8c21a54SThe etnaviv authors ETDUMP_BUF_MMU, 15a8c21a54SThe etnaviv authors ETDUMP_BUF_RING, 16a8c21a54SThe etnaviv authors ETDUMP_BUF_CMD, 17a8c21a54SThe etnaviv authors ETDUMP_BUF_BOMAP, 18a8c21a54SThe etnaviv authors ETDUMP_BUF_BO, 19a8c21a54SThe etnaviv authors ETDUMP_BUF_END, 20a8c21a54SThe etnaviv authors }; 21a8c21a54SThe etnaviv authors 22a8c21a54SThe etnaviv authors struct etnaviv_dump_object_header { 23a8c21a54SThe etnaviv authors __le32 magic; 24a8c21a54SThe etnaviv authors __le32 type; 25a8c21a54SThe etnaviv authors __le32 file_offset; 26a8c21a54SThe etnaviv authors __le32 file_size; 27a8c21a54SThe etnaviv authors __le64 iova; 28a8c21a54SThe etnaviv authors __le32 data[2]; 29a8c21a54SThe etnaviv authors }; 30a8c21a54SThe etnaviv authors 31a8c21a54SThe etnaviv authors /* Registers object, an array of these */ 32a8c21a54SThe etnaviv authors struct etnaviv_dump_registers { 33a8c21a54SThe etnaviv authors __le32 reg; 34a8c21a54SThe etnaviv authors __le32 value; 35a8c21a54SThe etnaviv authors }; 36a8c21a54SThe etnaviv authors 37a8c21a54SThe etnaviv authors #ifdef __KERNEL__ 38*3001eeb7SLucas Stach struct etnaviv_gem_submit; 39*3001eeb7SLucas Stach void etnaviv_core_dump(struct etnaviv_gem_submit *submit); 40a8c21a54SThe etnaviv authors #endif 41a8c21a54SThe etnaviv authors 42a8c21a54SThe etnaviv authors #endif 43