Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 1 | /**************************************************************************** |
| 2 | **************************************************************************** |
| 3 | *** |
| 4 | *** This header was automatically generated from a Linux kernel header |
| 5 | *** of the same name, to make information necessary for userspace to |
| 6 | *** call into the kernel available to libc. It contains only constants, |
| 7 | *** structures, and macros generated from the original header, and thus, |
| 8 | *** contains no copyrightable information. |
| 9 | *** |
| 10 | *** To edit the content of this header, modify the corresponding |
| 11 | *** source file (e.g. under external/kernel-headers/original/) then |
| 12 | *** run bionic/libc/kernel/tools/update_all.py |
| 13 | *** |
| 14 | *** Any manual change here will be lost the next time this script will |
| 15 | *** be run. You've been warned! |
| 16 | *** |
| 17 | **************************************************************************** |
| 18 | ****************************************************************************/ |
| 19 | #ifndef __AMDGPU_DRM_H__ |
| 20 | #define __AMDGPU_DRM_H__ |
| 21 | #include "drm.h" |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 22 | #ifdef __cplusplus |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 23 | #endif |
| 24 | #define DRM_AMDGPU_GEM_CREATE 0x00 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 25 | #define DRM_AMDGPU_GEM_MMAP 0x01 |
| 26 | #define DRM_AMDGPU_CTX 0x02 |
| 27 | #define DRM_AMDGPU_BO_LIST 0x03 |
| 28 | #define DRM_AMDGPU_CS 0x04 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 29 | #define DRM_AMDGPU_INFO 0x05 |
| 30 | #define DRM_AMDGPU_GEM_METADATA 0x06 |
| 31 | #define DRM_AMDGPU_GEM_WAIT_IDLE 0x07 |
| 32 | #define DRM_AMDGPU_GEM_VA 0x08 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 33 | #define DRM_AMDGPU_WAIT_CS 0x09 |
| 34 | #define DRM_AMDGPU_GEM_OP 0x10 |
| 35 | #define DRM_AMDGPU_GEM_USERPTR 0x11 |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 36 | #define DRM_AMDGPU_WAIT_FENCES 0x12 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 37 | #define DRM_IOCTL_AMDGPU_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_CREATE, union drm_amdgpu_gem_create) |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 38 | #define DRM_IOCTL_AMDGPU_GEM_MMAP DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_MMAP, union drm_amdgpu_gem_mmap) |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 39 | #define DRM_IOCTL_AMDGPU_CTX DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_CTX, union drm_amdgpu_ctx) |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 40 | #define DRM_IOCTL_AMDGPU_BO_LIST DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_BO_LIST, union drm_amdgpu_bo_list) |
| 41 | #define DRM_IOCTL_AMDGPU_CS DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_CS, union drm_amdgpu_cs) |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 42 | #define DRM_IOCTL_AMDGPU_INFO DRM_IOW(DRM_COMMAND_BASE + DRM_AMDGPU_INFO, struct drm_amdgpu_info) |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 43 | #define DRM_IOCTL_AMDGPU_GEM_METADATA DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_METADATA, struct drm_amdgpu_gem_metadata) |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 44 | #define DRM_IOCTL_AMDGPU_GEM_WAIT_IDLE DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_WAIT_IDLE, union drm_amdgpu_gem_wait_idle) |
| 45 | #define DRM_IOCTL_AMDGPU_GEM_VA DRM_IOW(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_VA, struct drm_amdgpu_gem_va) |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 46 | #define DRM_IOCTL_AMDGPU_WAIT_CS DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_WAIT_CS, union drm_amdgpu_wait_cs) |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 47 | #define DRM_IOCTL_AMDGPU_GEM_OP DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_OP, struct drm_amdgpu_gem_op) |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 48 | #define DRM_IOCTL_AMDGPU_GEM_USERPTR DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_USERPTR, struct drm_amdgpu_gem_userptr) |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 49 | #define DRM_IOCTL_AMDGPU_WAIT_FENCES DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_WAIT_FENCES, union drm_amdgpu_wait_fences) |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 50 | #define AMDGPU_GEM_DOMAIN_CPU 0x1 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 51 | #define AMDGPU_GEM_DOMAIN_GTT 0x2 |
| 52 | #define AMDGPU_GEM_DOMAIN_VRAM 0x4 |
| 53 | #define AMDGPU_GEM_DOMAIN_GDS 0x8 |
| 54 | #define AMDGPU_GEM_DOMAIN_GWS 0x10 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 55 | #define AMDGPU_GEM_DOMAIN_OA 0x20 |
| 56 | #define AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED (1 << 0) |
| 57 | #define AMDGPU_GEM_CREATE_NO_CPU_ACCESS (1 << 1) |
| 58 | #define AMDGPU_GEM_CREATE_CPU_GTT_USWC (1 << 2) |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 59 | #define AMDGPU_GEM_CREATE_VRAM_CLEARED (1 << 3) |
| 60 | #define AMDGPU_GEM_CREATE_SHADOW (1 << 4) |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 61 | #define AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS (1 << 5) |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 62 | struct drm_amdgpu_gem_create_in { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 63 | __u64 bo_size; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 64 | __u64 alignment; |
| 65 | __u64 domains; |
| 66 | __u64 domain_flags; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 67 | }; |
| 68 | struct drm_amdgpu_gem_create_out { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 69 | __u32 handle; |
| 70 | __u32 _pad; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 71 | }; |
| 72 | union drm_amdgpu_gem_create { |
| 73 | struct drm_amdgpu_gem_create_in in; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 74 | struct drm_amdgpu_gem_create_out out; |
| 75 | }; |
| 76 | #define AMDGPU_BO_LIST_OP_CREATE 0 |
| 77 | #define AMDGPU_BO_LIST_OP_DESTROY 1 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 78 | #define AMDGPU_BO_LIST_OP_UPDATE 2 |
| 79 | struct drm_amdgpu_bo_list_in { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 80 | __u32 operation; |
| 81 | __u32 list_handle; |
| 82 | __u32 bo_number; |
| 83 | __u32 bo_info_size; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 84 | __u64 bo_info_ptr; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 85 | }; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 86 | struct drm_amdgpu_bo_list_entry { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 87 | __u32 bo_handle; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 88 | __u32 bo_priority; |
| 89 | }; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 90 | struct drm_amdgpu_bo_list_out { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 91 | __u32 list_handle; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 92 | __u32 _pad; |
| 93 | }; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 94 | union drm_amdgpu_bo_list { |
| 95 | struct drm_amdgpu_bo_list_in in; |
| 96 | struct drm_amdgpu_bo_list_out out; |
| 97 | }; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 98 | #define AMDGPU_CTX_OP_ALLOC_CTX 1 |
| 99 | #define AMDGPU_CTX_OP_FREE_CTX 2 |
| 100 | #define AMDGPU_CTX_OP_QUERY_STATE 3 |
| 101 | #define AMDGPU_CTX_NO_RESET 0 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 102 | #define AMDGPU_CTX_GUILTY_RESET 1 |
| 103 | #define AMDGPU_CTX_INNOCENT_RESET 2 |
| 104 | #define AMDGPU_CTX_UNKNOWN_RESET 3 |
| 105 | struct drm_amdgpu_ctx_in { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 106 | __u32 op; |
| 107 | __u32 flags; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 108 | __u32 ctx_id; |
| 109 | __u32 _pad; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 110 | }; |
| 111 | union drm_amdgpu_ctx_out { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 112 | struct { |
| 113 | __u32 ctx_id; |
| 114 | __u32 _pad; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 115 | } alloc; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 116 | struct { |
| 117 | __u64 flags; |
| 118 | __u32 hangs; |
| 119 | __u32 reset_status; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 120 | } state; |
| 121 | }; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 122 | union drm_amdgpu_ctx { |
| 123 | struct drm_amdgpu_ctx_in in; |
| 124 | union drm_amdgpu_ctx_out out; |
| 125 | }; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 126 | #define AMDGPU_GEM_USERPTR_READONLY (1 << 0) |
| 127 | #define AMDGPU_GEM_USERPTR_ANONONLY (1 << 1) |
| 128 | #define AMDGPU_GEM_USERPTR_VALIDATE (1 << 2) |
| 129 | #define AMDGPU_GEM_USERPTR_REGISTER (1 << 3) |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 130 | struct drm_amdgpu_gem_userptr { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 131 | __u64 addr; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 132 | __u64 size; |
| 133 | __u32 flags; |
| 134 | __u32 handle; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 135 | }; |
| 136 | #define AMDGPU_TILING_ARRAY_MODE_SHIFT 0 |
| 137 | #define AMDGPU_TILING_ARRAY_MODE_MASK 0xf |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 138 | #define AMDGPU_TILING_PIPE_CONFIG_SHIFT 4 |
| 139 | #define AMDGPU_TILING_PIPE_CONFIG_MASK 0x1f |
| 140 | #define AMDGPU_TILING_TILE_SPLIT_SHIFT 9 |
| 141 | #define AMDGPU_TILING_TILE_SPLIT_MASK 0x7 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 142 | #define AMDGPU_TILING_MICRO_TILE_MODE_SHIFT 12 |
| 143 | #define AMDGPU_TILING_MICRO_TILE_MODE_MASK 0x7 |
| 144 | #define AMDGPU_TILING_BANK_WIDTH_SHIFT 15 |
| 145 | #define AMDGPU_TILING_BANK_WIDTH_MASK 0x3 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 146 | #define AMDGPU_TILING_BANK_HEIGHT_SHIFT 17 |
| 147 | #define AMDGPU_TILING_BANK_HEIGHT_MASK 0x3 |
| 148 | #define AMDGPU_TILING_MACRO_TILE_ASPECT_SHIFT 19 |
| 149 | #define AMDGPU_TILING_MACRO_TILE_ASPECT_MASK 0x3 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 150 | #define AMDGPU_TILING_NUM_BANKS_SHIFT 21 |
| 151 | #define AMDGPU_TILING_NUM_BANKS_MASK 0x3 |
Christopher Ferris | 525ce91 | 2017-07-26 13:12:53 -0700 | [diff] [blame^] | 152 | #define AMDGPU_TILING_SWIZZLE_MODE_SHIFT 0 |
| 153 | #define AMDGPU_TILING_SWIZZLE_MODE_MASK 0x1f |
| 154 | #define AMDGPU_TILING_SET(field,value) (((__u64) (value) & AMDGPU_TILING_ ##field ##_MASK) << AMDGPU_TILING_ ##field ##_SHIFT) |
| 155 | #define AMDGPU_TILING_GET(value,field) (((__u64) (value) >> AMDGPU_TILING_ ##field ##_SHIFT) & AMDGPU_TILING_ ##field ##_MASK) |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 156 | #define AMDGPU_GEM_METADATA_OP_SET_METADATA 1 |
| 157 | #define AMDGPU_GEM_METADATA_OP_GET_METADATA 2 |
| 158 | struct drm_amdgpu_gem_metadata { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 159 | __u32 handle; |
| 160 | __u32 op; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 161 | struct { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 162 | __u64 flags; |
| 163 | __u64 tiling_info; |
| 164 | __u32 data_size_bytes; |
| 165 | __u32 data[64]; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 166 | } data; |
| 167 | }; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 168 | struct drm_amdgpu_gem_mmap_in { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 169 | __u32 handle; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 170 | __u32 _pad; |
| 171 | }; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 172 | struct drm_amdgpu_gem_mmap_out { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 173 | __u64 addr_ptr; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 174 | }; |
| 175 | union drm_amdgpu_gem_mmap { |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 176 | struct drm_amdgpu_gem_mmap_in in; |
| 177 | struct drm_amdgpu_gem_mmap_out out; |
| 178 | }; |
| 179 | struct drm_amdgpu_gem_wait_idle_in { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 180 | __u32 handle; |
| 181 | __u32 flags; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 182 | __u64 timeout; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 183 | }; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 184 | struct drm_amdgpu_gem_wait_idle_out { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 185 | __u32 status; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 186 | __u32 domain; |
| 187 | }; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 188 | union drm_amdgpu_gem_wait_idle { |
| 189 | struct drm_amdgpu_gem_wait_idle_in in; |
| 190 | struct drm_amdgpu_gem_wait_idle_out out; |
| 191 | }; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 192 | struct drm_amdgpu_wait_cs_in { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 193 | __u64 handle; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 194 | __u64 timeout; |
| 195 | __u32 ip_type; |
| 196 | __u32 ip_instance; |
| 197 | __u32 ring; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 198 | __u32 ctx_id; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 199 | }; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 200 | struct drm_amdgpu_wait_cs_out { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 201 | __u64 status; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 202 | }; |
| 203 | union drm_amdgpu_wait_cs { |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 204 | struct drm_amdgpu_wait_cs_in in; |
| 205 | struct drm_amdgpu_wait_cs_out out; |
| 206 | }; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 207 | struct drm_amdgpu_fence { |
| 208 | __u32 ctx_id; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 209 | __u32 ip_type; |
| 210 | __u32 ip_instance; |
| 211 | __u32 ring; |
| 212 | __u64 seq_no; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 213 | }; |
| 214 | struct drm_amdgpu_wait_fences_in { |
| 215 | __u64 fences; |
| 216 | __u32 fence_count; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 217 | __u32 wait_all; |
| 218 | __u64 timeout_ns; |
| 219 | }; |
| 220 | struct drm_amdgpu_wait_fences_out { |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 221 | __u32 status; |
| 222 | __u32 first_signaled; |
| 223 | }; |
| 224 | union drm_amdgpu_wait_fences { |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 225 | struct drm_amdgpu_wait_fences_in in; |
| 226 | struct drm_amdgpu_wait_fences_out out; |
| 227 | }; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 228 | #define AMDGPU_GEM_OP_GET_GEM_CREATE_INFO 0 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 229 | #define AMDGPU_GEM_OP_SET_PLACEMENT 1 |
| 230 | struct drm_amdgpu_gem_op { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 231 | __u32 handle; |
| 232 | __u32 op; |
| 233 | __u64 value; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 234 | }; |
| 235 | #define AMDGPU_VA_OP_MAP 1 |
| 236 | #define AMDGPU_VA_OP_UNMAP 2 |
Christopher Ferris | 525ce91 | 2017-07-26 13:12:53 -0700 | [diff] [blame^] | 237 | #define AMDGPU_VA_OP_CLEAR 3 |
| 238 | #define AMDGPU_VA_OP_REPLACE 4 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 239 | #define AMDGPU_VM_DELAY_UPDATE (1 << 0) |
| 240 | #define AMDGPU_VM_PAGE_READABLE (1 << 1) |
| 241 | #define AMDGPU_VM_PAGE_WRITEABLE (1 << 2) |
| 242 | #define AMDGPU_VM_PAGE_EXECUTABLE (1 << 3) |
Christopher Ferris | 525ce91 | 2017-07-26 13:12:53 -0700 | [diff] [blame^] | 243 | #define AMDGPU_VM_PAGE_PRT (1 << 4) |
| 244 | #define AMDGPU_VM_MTYPE_MASK (0xf << 5) |
| 245 | #define AMDGPU_VM_MTYPE_DEFAULT (0 << 5) |
| 246 | #define AMDGPU_VM_MTYPE_NC (1 << 5) |
| 247 | #define AMDGPU_VM_MTYPE_WC (2 << 5) |
| 248 | #define AMDGPU_VM_MTYPE_CC (3 << 5) |
| 249 | #define AMDGPU_VM_MTYPE_UC (4 << 5) |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 250 | struct drm_amdgpu_gem_va { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 251 | __u32 handle; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 252 | __u32 _pad; |
| 253 | __u32 operation; |
| 254 | __u32 flags; |
| 255 | __u64 va_address; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 256 | __u64 offset_in_bo; |
| 257 | __u64 map_size; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 258 | }; |
| 259 | #define AMDGPU_HW_IP_GFX 0 |
| 260 | #define AMDGPU_HW_IP_COMPUTE 1 |
| 261 | #define AMDGPU_HW_IP_DMA 2 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 262 | #define AMDGPU_HW_IP_UVD 3 |
| 263 | #define AMDGPU_HW_IP_VCE 4 |
Christopher Ferris | 525ce91 | 2017-07-26 13:12:53 -0700 | [diff] [blame^] | 264 | #define AMDGPU_HW_IP_UVD_ENC 5 |
| 265 | #define AMDGPU_HW_IP_NUM 6 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 266 | #define AMDGPU_HW_IP_INSTANCE_MAX_COUNT 1 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 267 | #define AMDGPU_CHUNK_ID_IB 0x01 |
| 268 | #define AMDGPU_CHUNK_ID_FENCE 0x02 |
| 269 | #define AMDGPU_CHUNK_ID_DEPENDENCIES 0x03 |
| 270 | struct drm_amdgpu_cs_chunk { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 271 | __u32 chunk_id; |
| 272 | __u32 length_dw; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 273 | __u64 chunk_data; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 274 | }; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 275 | struct drm_amdgpu_cs_in { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 276 | __u32 ctx_id; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 277 | __u32 bo_list_handle; |
| 278 | __u32 num_chunks; |
| 279 | __u32 _pad; |
| 280 | __u64 chunks; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 281 | }; |
| 282 | struct drm_amdgpu_cs_out { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 283 | __u64 handle; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 284 | }; |
| 285 | union drm_amdgpu_cs { |
| 286 | struct drm_amdgpu_cs_in in; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 287 | struct drm_amdgpu_cs_out out; |
| 288 | }; |
| 289 | #define AMDGPU_IB_FLAG_CE (1 << 0) |
| 290 | #define AMDGPU_IB_FLAG_PREAMBLE (1 << 1) |
Christopher Ferris | 525ce91 | 2017-07-26 13:12:53 -0700 | [diff] [blame^] | 291 | #define AMDGPU_IB_FLAG_PREEMPT (1 << 2) |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 292 | struct drm_amdgpu_cs_chunk_ib { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 293 | __u32 _pad; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 294 | __u32 flags; |
| 295 | __u64 va_start; |
| 296 | __u32 ib_bytes; |
| 297 | __u32 ip_type; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 298 | __u32 ip_instance; |
| 299 | __u32 ring; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 300 | }; |
| 301 | struct drm_amdgpu_cs_chunk_dep { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 302 | __u32 ip_type; |
| 303 | __u32 ip_instance; |
| 304 | __u32 ring; |
| 305 | __u32 ctx_id; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 306 | __u64 handle; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 307 | }; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 308 | struct drm_amdgpu_cs_chunk_fence { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 309 | __u32 handle; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 310 | __u32 offset; |
| 311 | }; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 312 | struct drm_amdgpu_cs_chunk_data { |
| 313 | union { |
| 314 | struct drm_amdgpu_cs_chunk_ib ib_data; |
| 315 | struct drm_amdgpu_cs_chunk_fence fence_data; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 316 | }; |
| 317 | }; |
| 318 | #define AMDGPU_IDS_FLAGS_FUSION 0x1 |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 319 | #define AMDGPU_IDS_FLAGS_PREEMPTION 0x2 |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 320 | #define AMDGPU_INFO_ACCEL_WORKING 0x00 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 321 | #define AMDGPU_INFO_CRTC_FROM_ID 0x01 |
| 322 | #define AMDGPU_INFO_HW_IP_INFO 0x02 |
| 323 | #define AMDGPU_INFO_HW_IP_COUNT 0x03 |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 324 | #define AMDGPU_INFO_TIMESTAMP 0x05 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 325 | #define AMDGPU_INFO_FW_VERSION 0x0e |
| 326 | #define AMDGPU_INFO_FW_VCE 0x1 |
| 327 | #define AMDGPU_INFO_FW_UVD 0x2 |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 328 | #define AMDGPU_INFO_FW_GMC 0x03 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 329 | #define AMDGPU_INFO_FW_GFX_ME 0x04 |
| 330 | #define AMDGPU_INFO_FW_GFX_PFP 0x05 |
| 331 | #define AMDGPU_INFO_FW_GFX_CE 0x06 |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 332 | #define AMDGPU_INFO_FW_GFX_RLC 0x07 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 333 | #define AMDGPU_INFO_FW_GFX_MEC 0x08 |
| 334 | #define AMDGPU_INFO_FW_SMC 0x0a |
| 335 | #define AMDGPU_INFO_FW_SDMA 0x0b |
Christopher Ferris | 525ce91 | 2017-07-26 13:12:53 -0700 | [diff] [blame^] | 336 | #define AMDGPU_INFO_FW_SOS 0x0c |
| 337 | #define AMDGPU_INFO_FW_ASD 0x0d |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 338 | #define AMDGPU_INFO_NUM_BYTES_MOVED 0x0f |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 339 | #define AMDGPU_INFO_VRAM_USAGE 0x10 |
| 340 | #define AMDGPU_INFO_GTT_USAGE 0x11 |
| 341 | #define AMDGPU_INFO_GDS_CONFIG 0x13 |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 342 | #define AMDGPU_INFO_VRAM_GTT 0x14 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 343 | #define AMDGPU_INFO_READ_MMR_REG 0x15 |
| 344 | #define AMDGPU_INFO_DEV_INFO 0x16 |
| 345 | #define AMDGPU_INFO_VIS_VRAM_USAGE 0x17 |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 346 | #define AMDGPU_INFO_NUM_EVICTIONS 0x18 |
| 347 | #define AMDGPU_INFO_MEMORY 0x19 |
| 348 | #define AMDGPU_INFO_VCE_CLOCK_TABLE 0x1A |
| 349 | #define AMDGPU_INFO_VBIOS 0x1B |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 350 | #define AMDGPU_INFO_VBIOS_SIZE 0x1 |
| 351 | #define AMDGPU_INFO_VBIOS_IMAGE 0x2 |
Christopher Ferris | 525ce91 | 2017-07-26 13:12:53 -0700 | [diff] [blame^] | 352 | #define AMDGPU_INFO_NUM_HANDLES 0x1C |
| 353 | #define AMDGPU_INFO_SENSOR 0x1D |
| 354 | #define AMDGPU_INFO_SENSOR_GFX_SCLK 0x1 |
| 355 | #define AMDGPU_INFO_SENSOR_GFX_MCLK 0x2 |
| 356 | #define AMDGPU_INFO_SENSOR_GPU_TEMP 0x3 |
| 357 | #define AMDGPU_INFO_SENSOR_GPU_LOAD 0x4 |
| 358 | #define AMDGPU_INFO_SENSOR_GPU_AVG_POWER 0x5 |
| 359 | #define AMDGPU_INFO_SENSOR_VDDNB 0x6 |
| 360 | #define AMDGPU_INFO_SENSOR_VDDGFX 0x7 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 361 | #define AMDGPU_INFO_MMR_SE_INDEX_SHIFT 0 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 362 | #define AMDGPU_INFO_MMR_SE_INDEX_MASK 0xff |
| 363 | #define AMDGPU_INFO_MMR_SH_INDEX_SHIFT 8 |
| 364 | #define AMDGPU_INFO_MMR_SH_INDEX_MASK 0xff |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 365 | struct drm_amdgpu_query_fw { |
| 366 | __u32 fw_type; |
| 367 | __u32 ip_instance; |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 368 | __u32 index; |
| 369 | __u32 _pad; |
| 370 | }; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 371 | struct drm_amdgpu_info { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 372 | __u64 return_pointer; |
| 373 | __u32 return_size; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 374 | __u32 query; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 375 | union { |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 376 | struct { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 377 | __u32 id; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 378 | __u32 _pad; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 379 | } mode_crtc; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 380 | struct { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 381 | __u32 type; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 382 | __u32 ip_instance; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 383 | } query_hw_ip; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 384 | struct { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 385 | __u32 dword_offset; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 386 | __u32 count; |
| 387 | __u32 instance; |
| 388 | __u32 flags; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 389 | } read_mmr_reg; |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 390 | struct drm_amdgpu_query_fw query_fw; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 391 | struct { |
| 392 | __u32 type; |
| 393 | __u32 offset; |
| 394 | } vbios_info; |
Christopher Ferris | 525ce91 | 2017-07-26 13:12:53 -0700 | [diff] [blame^] | 395 | struct { |
| 396 | __u32 type; |
| 397 | } sensor_info; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 398 | }; |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 399 | }; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 400 | struct drm_amdgpu_info_gds { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 401 | __u32 gds_gfx_partition_size; |
| 402 | __u32 compute_partition_size; |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 403 | __u32 gds_total_size; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 404 | __u32 gws_per_gfx_partition; |
| 405 | __u32 gws_per_compute_partition; |
| 406 | __u32 oa_per_gfx_partition; |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 407 | __u32 oa_per_compute_partition; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 408 | __u32 _pad; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 409 | }; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 410 | struct drm_amdgpu_info_vram_gtt { |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 411 | __u64 vram_size; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 412 | __u64 vram_cpu_accessible_size; |
| 413 | __u64 gtt_size; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 414 | }; |
| 415 | struct drm_amdgpu_heap_info { |
| 416 | __u64 total_heap_size; |
| 417 | __u64 usable_heap_size; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 418 | __u64 heap_usage; |
| 419 | __u64 max_allocation; |
| 420 | }; |
| 421 | struct drm_amdgpu_memory_info { |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 422 | struct drm_amdgpu_heap_info vram; |
| 423 | struct drm_amdgpu_heap_info cpu_accessible_vram; |
| 424 | struct drm_amdgpu_heap_info gtt; |
| 425 | }; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 426 | struct drm_amdgpu_info_firmware { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 427 | __u32 ver; |
| 428 | __u32 feature; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 429 | }; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 430 | #define AMDGPU_VRAM_TYPE_UNKNOWN 0 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 431 | #define AMDGPU_VRAM_TYPE_GDDR1 1 |
| 432 | #define AMDGPU_VRAM_TYPE_DDR2 2 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 433 | #define AMDGPU_VRAM_TYPE_GDDR3 3 |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 434 | #define AMDGPU_VRAM_TYPE_GDDR4 4 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 435 | #define AMDGPU_VRAM_TYPE_GDDR5 5 |
| 436 | #define AMDGPU_VRAM_TYPE_HBM 6 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 437 | #define AMDGPU_VRAM_TYPE_DDR3 7 |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 438 | struct drm_amdgpu_info_device { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 439 | __u32 device_id; |
| 440 | __u32 chip_rev; |
| 441 | __u32 external_rev; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 442 | __u32 pci_rev; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 443 | __u32 family; |
| 444 | __u32 num_shader_engines; |
| 445 | __u32 num_shader_arrays_per_engine; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 446 | __u32 gpu_counter_freq; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 447 | __u64 max_engine_clock; |
| 448 | __u64 max_memory_clock; |
| 449 | __u32 cu_active_number; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 450 | __u32 cu_ao_mask; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 451 | __u32 cu_bitmap[4][4]; |
| 452 | __u32 enabled_rb_pipes_mask; |
| 453 | __u32 num_rb_pipes; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 454 | __u32 num_hw_gfx_contexts; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 455 | __u32 _pad; |
| 456 | __u64 ids_flags; |
| 457 | __u64 virtual_address_offset; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 458 | __u64 virtual_address_max; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 459 | __u32 virtual_address_alignment; |
| 460 | __u32 pte_fragment_size; |
| 461 | __u32 gart_page_size; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 462 | __u32 ce_ram_size; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 463 | __u32 vram_type; |
| 464 | __u32 vram_bit_width; |
| 465 | __u32 vce_harvest_config; |
Christopher Ferris | 525ce91 | 2017-07-26 13:12:53 -0700 | [diff] [blame^] | 466 | __u32 gc_double_offchip_lds_buf; |
| 467 | __u64 prim_buf_gpu_addr; |
| 468 | __u64 pos_buf_gpu_addr; |
| 469 | __u64 cntl_sb_buf_gpu_addr; |
| 470 | __u64 param_buf_gpu_addr; |
| 471 | __u32 prim_buf_size; |
| 472 | __u32 pos_buf_size; |
| 473 | __u32 cntl_sb_buf_size; |
| 474 | __u32 param_buf_size; |
| 475 | __u32 wave_front_size; |
| 476 | __u32 num_shader_visible_vgprs; |
| 477 | __u32 num_cu_per_sh; |
| 478 | __u32 num_tcc_blocks; |
| 479 | __u32 gs_vgt_table_depth; |
| 480 | __u32 gs_prim_buffer_depth; |
| 481 | __u32 max_gs_waves_per_vgt; |
| 482 | __u32 _pad1; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 483 | }; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 484 | struct drm_amdgpu_info_hw_ip { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 485 | __u32 hw_ip_version_major; |
| 486 | __u32 hw_ip_version_minor; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 487 | __u64 capabilities_flags; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 488 | __u32 ib_start_alignment; |
| 489 | __u32 ib_size_alignment; |
| 490 | __u32 available_rings; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 491 | __u32 _pad; |
| 492 | }; |
Christopher Ferris | 525ce91 | 2017-07-26 13:12:53 -0700 | [diff] [blame^] | 493 | struct drm_amdgpu_info_num_handles { |
| 494 | __u32 uvd_max_handles; |
| 495 | __u32 uvd_used_handles; |
| 496 | }; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 497 | #define AMDGPU_VCE_CLOCK_TABLE_ENTRIES 6 |
| 498 | struct drm_amdgpu_info_vce_clock_table_entry { |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 499 | __u32 sclk; |
| 500 | __u32 mclk; |
| 501 | __u32 eclk; |
| 502 | __u32 pad; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 503 | }; |
| 504 | struct drm_amdgpu_info_vce_clock_table { |
| 505 | struct drm_amdgpu_info_vce_clock_table_entry entries[AMDGPU_VCE_CLOCK_TABLE_ENTRIES]; |
| 506 | __u32 num_valid_entries; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 507 | __u32 pad; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 508 | }; |
| 509 | #define AMDGPU_FAMILY_UNKNOWN 0 |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 510 | #define AMDGPU_FAMILY_SI 110 |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 511 | #define AMDGPU_FAMILY_CI 120 |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 512 | #define AMDGPU_FAMILY_KV 125 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 513 | #define AMDGPU_FAMILY_VI 130 |
| 514 | #define AMDGPU_FAMILY_CZ 135 |
Christopher Ferris | 525ce91 | 2017-07-26 13:12:53 -0700 | [diff] [blame^] | 515 | #define AMDGPU_FAMILY_AI 141 |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 516 | #ifdef __cplusplus |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 517 | #endif |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 518 | #endif |