Merge tag 'block-5.11-2021-01-10' of git://git.kernel.dk/linux-block
[linux/fpc-iii.git] / drivers / gpu / drm / lima / lima_dump.h
blobca243d99c51ba9120b6da8a2033959d45b8eb688
1 /* SPDX-License-Identifier: GPL-2.0 OR MIT */
2 /* Copyright 2020 Qiang Yu <yuq825@gmail.com> */
4 #ifndef __LIMA_DUMP_H__
5 #define __LIMA_DUMP_H__
7 #include <linux/types.h>
9 /**
10 * dump file format for all the information to start a lima task
12 * top level format
13 * | magic code "LIMA" | format version | num tasks | data size |
14 * | reserved | reserved | reserved | reserved |
15 * | task 1 ID | task 1 size | num chunks | reserved | task 1 data |
16 * | task 2 ID | task 2 size | num chunks | reserved | task 2 data |
17 * ...
19 * task data format
20 * | chunk 1 ID | chunk 1 size | reserved | reserved | chunk 1 data |
21 * | chunk 2 ID | chunk 2 size | reserved | reserved | chunk 2 data |
22 * ...
26 #define LIMA_DUMP_MAJOR 1
27 #define LIMA_DUMP_MINOR 0
29 #define LIMA_DUMP_MAGIC 0x414d494c
31 struct lima_dump_head {
32 __u32 magic;
33 __u16 version_major;
34 __u16 version_minor;
35 __u32 num_tasks;
36 __u32 size;
37 __u32 reserved[4];
40 #define LIMA_DUMP_TASK_GP 0
41 #define LIMA_DUMP_TASK_PP 1
42 #define LIMA_DUMP_TASK_NUM 2
44 struct lima_dump_task {
45 __u32 id;
46 __u32 size;
47 __u32 num_chunks;
48 __u32 reserved;
51 #define LIMA_DUMP_CHUNK_FRAME 0
52 #define LIMA_DUMP_CHUNK_BUFFER 1
53 #define LIMA_DUMP_CHUNK_PROCESS_NAME 2
54 #define LIMA_DUMP_CHUNK_PROCESS_ID 3
55 #define LIMA_DUMP_CHUNK_NUM 4
57 struct lima_dump_chunk {
58 __u32 id;
59 __u32 size;
60 __u32 reserved[2];
63 struct lima_dump_chunk_buffer {
64 __u32 id;
65 __u32 size;
66 __u32 va;
67 __u32 reserved;
70 struct lima_dump_chunk_pid {
71 __u32 id;
72 __u32 size;
73 __u32 pid;
74 __u32 reserved;
77 #endif