Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 1 | /* amdgpu_drm.h -- Public header for the amdgpu driver -*- linux-c -*- |
| 2 | * |
| 3 | * Copyright 2000 Precision Insight, Inc., Cedar Park, Texas. |
| 4 | * Copyright 2000 VA Linux Systems, Inc., Fremont, California. |
| 5 | * Copyright 2002 Tungsten Graphics, Inc., Cedar Park, Texas. |
| 6 | * Copyright 2014 Advanced Micro Devices, Inc. |
| 7 | * |
| 8 | * Permission is hereby granted, free of charge, to any person obtaining a |
| 9 | * copy of this software and associated documentation files (the "Software"), |
| 10 | * to deal in the Software without restriction, including without limitation |
| 11 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, |
| 12 | * and/or sell copies of the Software, and to permit persons to whom the |
| 13 | * Software is furnished to do so, subject to the following conditions: |
| 14 | * |
| 15 | * The above copyright notice and this permission notice shall be included in |
| 16 | * all copies or substantial portions of the Software. |
| 17 | * |
| 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
| 21 | * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR |
| 22 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, |
| 23 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
| 24 | * OTHER DEALINGS IN THE SOFTWARE. |
| 25 | * |
| 26 | * Authors: |
| 27 | * Kevin E. Martin <martin@valinux.com> |
| 28 | * Gareth Hughes <gareth@valinux.com> |
| 29 | * Keith Whitwell <keith@tungstengraphics.com> |
| 30 | */ |
| 31 | |
| 32 | #ifndef __AMDGPU_DRM_H__ |
| 33 | #define __AMDGPU_DRM_H__ |
| 34 | |
Michel Dänzer | b3fcf36a | 2015-07-22 17:29:01 +0900 | [diff] [blame] | 35 | #include "drm.h" |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 36 | |
Emil Velikov | cfa7152 | 2016-04-07 18:45:18 +0100 | [diff] [blame] | 37 | #if defined(__cplusplus) |
| 38 | extern "C" { |
| 39 | #endif |
| 40 | |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 41 | #define DRM_AMDGPU_GEM_CREATE 0x00 |
| 42 | #define DRM_AMDGPU_GEM_MMAP 0x01 |
| 43 | #define DRM_AMDGPU_CTX 0x02 |
| 44 | #define DRM_AMDGPU_BO_LIST 0x03 |
| 45 | #define DRM_AMDGPU_CS 0x04 |
| 46 | #define DRM_AMDGPU_INFO 0x05 |
| 47 | #define DRM_AMDGPU_GEM_METADATA 0x06 |
| 48 | #define DRM_AMDGPU_GEM_WAIT_IDLE 0x07 |
| 49 | #define DRM_AMDGPU_GEM_VA 0x08 |
| 50 | #define DRM_AMDGPU_WAIT_CS 0x09 |
| 51 | #define DRM_AMDGPU_GEM_OP 0x10 |
| 52 | #define DRM_AMDGPU_GEM_USERPTR 0x11 |
Junwei Zhang | eef18a8 | 2016-11-04 16:16:10 -0400 | [diff] [blame] | 53 | #define DRM_AMDGPU_WAIT_FENCES 0x12 |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 54 | |
| 55 | #define DRM_IOCTL_AMDGPU_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_CREATE, union drm_amdgpu_gem_create) |
| 56 | #define DRM_IOCTL_AMDGPU_GEM_MMAP DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_MMAP, union drm_amdgpu_gem_mmap) |
| 57 | #define DRM_IOCTL_AMDGPU_CTX DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_CTX, union drm_amdgpu_ctx) |
| 58 | #define DRM_IOCTL_AMDGPU_BO_LIST DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_BO_LIST, union drm_amdgpu_bo_list) |
| 59 | #define DRM_IOCTL_AMDGPU_CS DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_CS, union drm_amdgpu_cs) |
| 60 | #define DRM_IOCTL_AMDGPU_INFO DRM_IOW(DRM_COMMAND_BASE + DRM_AMDGPU_INFO, struct drm_amdgpu_info) |
| 61 | #define DRM_IOCTL_AMDGPU_GEM_METADATA DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_METADATA, struct drm_amdgpu_gem_metadata) |
| 62 | #define DRM_IOCTL_AMDGPU_GEM_WAIT_IDLE DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_WAIT_IDLE, union drm_amdgpu_gem_wait_idle) |
Christian König | 34b5f6a | 2015-06-08 15:03:00 +0200 | [diff] [blame] | 63 | #define DRM_IOCTL_AMDGPU_GEM_VA DRM_IOW(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_VA, struct drm_amdgpu_gem_va) |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 64 | #define DRM_IOCTL_AMDGPU_WAIT_CS DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_WAIT_CS, union drm_amdgpu_wait_cs) |
| 65 | #define DRM_IOCTL_AMDGPU_GEM_OP DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_OP, struct drm_amdgpu_gem_op) |
| 66 | #define DRM_IOCTL_AMDGPU_GEM_USERPTR DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_USERPTR, struct drm_amdgpu_gem_userptr) |
Junwei Zhang | eef18a8 | 2016-11-04 16:16:10 -0400 | [diff] [blame] | 67 | #define DRM_IOCTL_AMDGPU_WAIT_FENCES DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_WAIT_FENCES, union drm_amdgpu_wait_fences) |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 68 | |
| 69 | #define AMDGPU_GEM_DOMAIN_CPU 0x1 |
| 70 | #define AMDGPU_GEM_DOMAIN_GTT 0x2 |
| 71 | #define AMDGPU_GEM_DOMAIN_VRAM 0x4 |
| 72 | #define AMDGPU_GEM_DOMAIN_GDS 0x8 |
| 73 | #define AMDGPU_GEM_DOMAIN_GWS 0x10 |
| 74 | #define AMDGPU_GEM_DOMAIN_OA 0x20 |
| 75 | |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 76 | /* Flag that CPU access will be required for the case of VRAM domain */ |
| 77 | #define AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED (1 << 0) |
| 78 | /* Flag that CPU access will not work, this VRAM domain is invisible */ |
| 79 | #define AMDGPU_GEM_CREATE_NO_CPU_ACCESS (1 << 1) |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 80 | /* Flag that USWC attributes should be used for GTT */ |
Jammy Zhou | 8867128 | 2015-05-06 18:44:29 +0800 | [diff] [blame] | 81 | #define AMDGPU_GEM_CREATE_CPU_GTT_USWC (1 << 2) |
Flora Cui | 4fea83f | 2016-07-20 14:44:38 +0800 | [diff] [blame] | 82 | /* Flag that the memory should be in VRAM and cleared */ |
| 83 | #define AMDGPU_GEM_CREATE_VRAM_CLEARED (1 << 3) |
Chunming Zhou | e7893c4 | 2016-07-26 14:13:21 +0800 | [diff] [blame] | 84 | /* Flag that create shadow bo(GTT) while allocating vram bo */ |
| 85 | #define AMDGPU_GEM_CREATE_SHADOW (1 << 4) |
Christian König | 03f48dd | 2016-08-15 17:00:22 +0200 | [diff] [blame] | 86 | /* Flag that allocating the BO should use linear VRAM */ |
| 87 | #define AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS (1 << 5) |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 88 | |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 89 | struct drm_amdgpu_gem_create_in { |
| 90 | /** the requested memory size */ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 91 | __u64 bo_size; |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 92 | /** physical start_addr alignment in bytes for some HW requirements */ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 93 | __u64 alignment; |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 94 | /** the requested memory domains */ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 95 | __u64 domains; |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 96 | /** allocation flags */ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 97 | __u64 domain_flags; |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 98 | }; |
| 99 | |
| 100 | struct drm_amdgpu_gem_create_out { |
| 101 | /** returned GEM object handle */ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 102 | __u32 handle; |
| 103 | __u32 _pad; |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 104 | }; |
| 105 | |
| 106 | union drm_amdgpu_gem_create { |
| 107 | struct drm_amdgpu_gem_create_in in; |
| 108 | struct drm_amdgpu_gem_create_out out; |
| 109 | }; |
| 110 | |
| 111 | /** Opcode to create new residency list. */ |
| 112 | #define AMDGPU_BO_LIST_OP_CREATE 0 |
| 113 | /** Opcode to destroy previously created residency list */ |
| 114 | #define AMDGPU_BO_LIST_OP_DESTROY 1 |
| 115 | /** Opcode to update resource information in the list */ |
| 116 | #define AMDGPU_BO_LIST_OP_UPDATE 2 |
| 117 | |
| 118 | struct drm_amdgpu_bo_list_in { |
| 119 | /** Type of operation */ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 120 | __u32 operation; |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 121 | /** Handle of list or 0 if we want to create one */ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 122 | __u32 list_handle; |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 123 | /** Number of BOs in list */ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 124 | __u32 bo_number; |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 125 | /** Size of each element describing BO */ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 126 | __u32 bo_info_size; |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 127 | /** Pointer to array describing BOs */ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 128 | __u64 bo_info_ptr; |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 129 | }; |
| 130 | |
| 131 | struct drm_amdgpu_bo_list_entry { |
| 132 | /** Handle of BO */ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 133 | __u32 bo_handle; |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 134 | /** New (if specified) BO priority to be used during migration */ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 135 | __u32 bo_priority; |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 136 | }; |
| 137 | |
| 138 | struct drm_amdgpu_bo_list_out { |
| 139 | /** Handle of resource list */ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 140 | __u32 list_handle; |
| 141 | __u32 _pad; |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 142 | }; |
| 143 | |
| 144 | union drm_amdgpu_bo_list { |
| 145 | struct drm_amdgpu_bo_list_in in; |
| 146 | struct drm_amdgpu_bo_list_out out; |
| 147 | }; |
| 148 | |
| 149 | /* context related */ |
| 150 | #define AMDGPU_CTX_OP_ALLOC_CTX 1 |
| 151 | #define AMDGPU_CTX_OP_FREE_CTX 2 |
| 152 | #define AMDGPU_CTX_OP_QUERY_STATE 3 |
| 153 | |
Marek Olšák | d94aed5 | 2015-05-05 21:13:49 +0200 | [diff] [blame] | 154 | /* GPU reset status */ |
| 155 | #define AMDGPU_CTX_NO_RESET 0 |
Christian König | 675da0d | 2015-06-09 15:54:37 +0200 | [diff] [blame] | 156 | /* this the context caused it */ |
| 157 | #define AMDGPU_CTX_GUILTY_RESET 1 |
| 158 | /* some other context caused it */ |
| 159 | #define AMDGPU_CTX_INNOCENT_RESET 2 |
| 160 | /* unknown cause */ |
| 161 | #define AMDGPU_CTX_UNKNOWN_RESET 3 |
Marek Olšák | d94aed5 | 2015-05-05 21:13:49 +0200 | [diff] [blame] | 162 | |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 163 | struct drm_amdgpu_ctx_in { |
Christian König | 675da0d | 2015-06-09 15:54:37 +0200 | [diff] [blame] | 164 | /** AMDGPU_CTX_OP_* */ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 165 | __u32 op; |
Christian König | 675da0d | 2015-06-09 15:54:37 +0200 | [diff] [blame] | 166 | /** For future use, no flags defined so far */ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 167 | __u32 flags; |
| 168 | __u32 ctx_id; |
| 169 | __u32 _pad; |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 170 | }; |
| 171 | |
| 172 | union drm_amdgpu_ctx_out { |
| 173 | struct { |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 174 | __u32 ctx_id; |
| 175 | __u32 _pad; |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 176 | } alloc; |
| 177 | |
| 178 | struct { |
Christian König | 675da0d | 2015-06-09 15:54:37 +0200 | [diff] [blame] | 179 | /** For future use, no flags defined so far */ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 180 | __u64 flags; |
Marek Olšák | d94aed5 | 2015-05-05 21:13:49 +0200 | [diff] [blame] | 181 | /** Number of resets caused by this context so far. */ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 182 | __u32 hangs; |
Marek Olšák | d94aed5 | 2015-05-05 21:13:49 +0200 | [diff] [blame] | 183 | /** Reset status since the last call of the ioctl. */ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 184 | __u32 reset_status; |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 185 | } state; |
| 186 | }; |
| 187 | |
| 188 | union drm_amdgpu_ctx { |
| 189 | struct drm_amdgpu_ctx_in in; |
| 190 | union drm_amdgpu_ctx_out out; |
| 191 | }; |
| 192 | |
| 193 | /* |
| 194 | * This is not a reliable API and you should expect it to fail for any |
| 195 | * number of reasons and have fallback path that do not use userptr to |
| 196 | * perform any operation. |
| 197 | */ |
| 198 | #define AMDGPU_GEM_USERPTR_READONLY (1 << 0) |
| 199 | #define AMDGPU_GEM_USERPTR_ANONONLY (1 << 1) |
| 200 | #define AMDGPU_GEM_USERPTR_VALIDATE (1 << 2) |
| 201 | #define AMDGPU_GEM_USERPTR_REGISTER (1 << 3) |
| 202 | |
| 203 | struct drm_amdgpu_gem_userptr { |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 204 | __u64 addr; |
| 205 | __u64 size; |
Christian König | 675da0d | 2015-06-09 15:54:37 +0200 | [diff] [blame] | 206 | /* AMDGPU_GEM_USERPTR_* */ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 207 | __u32 flags; |
Christian König | 675da0d | 2015-06-09 15:54:37 +0200 | [diff] [blame] | 208 | /* Resulting GEM handle */ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 209 | __u32 handle; |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 210 | }; |
| 211 | |
Alex Deucher | 00ac6f6 | 2017-03-03 16:00:11 -0500 | [diff] [blame] | 212 | /* SI-CI-VI: */ |
Marek Olšák | fbd76d5 | 2015-05-14 23:48:26 +0200 | [diff] [blame] | 213 | /* same meaning as the GB_TILE_MODE and GL_MACRO_TILE_MODE fields */ |
| 214 | #define AMDGPU_TILING_ARRAY_MODE_SHIFT 0 |
| 215 | #define AMDGPU_TILING_ARRAY_MODE_MASK 0xf |
| 216 | #define AMDGPU_TILING_PIPE_CONFIG_SHIFT 4 |
| 217 | #define AMDGPU_TILING_PIPE_CONFIG_MASK 0x1f |
| 218 | #define AMDGPU_TILING_TILE_SPLIT_SHIFT 9 |
| 219 | #define AMDGPU_TILING_TILE_SPLIT_MASK 0x7 |
| 220 | #define AMDGPU_TILING_MICRO_TILE_MODE_SHIFT 12 |
| 221 | #define AMDGPU_TILING_MICRO_TILE_MODE_MASK 0x7 |
| 222 | #define AMDGPU_TILING_BANK_WIDTH_SHIFT 15 |
| 223 | #define AMDGPU_TILING_BANK_WIDTH_MASK 0x3 |
| 224 | #define AMDGPU_TILING_BANK_HEIGHT_SHIFT 17 |
| 225 | #define AMDGPU_TILING_BANK_HEIGHT_MASK 0x3 |
| 226 | #define AMDGPU_TILING_MACRO_TILE_ASPECT_SHIFT 19 |
| 227 | #define AMDGPU_TILING_MACRO_TILE_ASPECT_MASK 0x3 |
| 228 | #define AMDGPU_TILING_NUM_BANKS_SHIFT 21 |
| 229 | #define AMDGPU_TILING_NUM_BANKS_MASK 0x3 |
| 230 | |
Alex Deucher | 00ac6f6 | 2017-03-03 16:00:11 -0500 | [diff] [blame] | 231 | /* GFX9 and later: */ |
| 232 | #define AMDGPU_TILING_SWIZZLE_MODE_SHIFT 0 |
| 233 | #define AMDGPU_TILING_SWIZZLE_MODE_MASK 0x1f |
| 234 | |
| 235 | /* Set/Get helpers for tiling flags. */ |
Marek Olšák | fbd76d5 | 2015-05-14 23:48:26 +0200 | [diff] [blame] | 236 | #define AMDGPU_TILING_SET(field, value) \ |
Alex Deucher | 00ac6f6 | 2017-03-03 16:00:11 -0500 | [diff] [blame] | 237 | (((__u64)(value) & AMDGPU_TILING_##field##_MASK) << AMDGPU_TILING_##field##_SHIFT) |
Marek Olšák | fbd76d5 | 2015-05-14 23:48:26 +0200 | [diff] [blame] | 238 | #define AMDGPU_TILING_GET(value, field) \ |
Alex Deucher | 00ac6f6 | 2017-03-03 16:00:11 -0500 | [diff] [blame] | 239 | (((__u64)(value) >> AMDGPU_TILING_##field##_SHIFT) & AMDGPU_TILING_##field##_MASK) |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 240 | |
| 241 | #define AMDGPU_GEM_METADATA_OP_SET_METADATA 1 |
| 242 | #define AMDGPU_GEM_METADATA_OP_GET_METADATA 2 |
| 243 | |
| 244 | /** The same structure is shared for input/output */ |
| 245 | struct drm_amdgpu_gem_metadata { |
Christian König | 675da0d | 2015-06-09 15:54:37 +0200 | [diff] [blame] | 246 | /** GEM Object handle */ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 247 | __u32 handle; |
Christian König | 675da0d | 2015-06-09 15:54:37 +0200 | [diff] [blame] | 248 | /** Do we want get or set metadata */ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 249 | __u32 op; |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 250 | struct { |
Christian König | 675da0d | 2015-06-09 15:54:37 +0200 | [diff] [blame] | 251 | /** For future use, no flags defined so far */ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 252 | __u64 flags; |
Christian König | 675da0d | 2015-06-09 15:54:37 +0200 | [diff] [blame] | 253 | /** family specific tiling info */ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 254 | __u64 tiling_info; |
| 255 | __u32 data_size_bytes; |
| 256 | __u32 data[64]; |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 257 | } data; |
| 258 | }; |
| 259 | |
| 260 | struct drm_amdgpu_gem_mmap_in { |
Christian König | 675da0d | 2015-06-09 15:54:37 +0200 | [diff] [blame] | 261 | /** the GEM object handle */ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 262 | __u32 handle; |
| 263 | __u32 _pad; |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 264 | }; |
| 265 | |
| 266 | struct drm_amdgpu_gem_mmap_out { |
Christian König | 675da0d | 2015-06-09 15:54:37 +0200 | [diff] [blame] | 267 | /** mmap offset from the vma offset manager */ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 268 | __u64 addr_ptr; |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 269 | }; |
| 270 | |
| 271 | union drm_amdgpu_gem_mmap { |
| 272 | struct drm_amdgpu_gem_mmap_in in; |
| 273 | struct drm_amdgpu_gem_mmap_out out; |
| 274 | }; |
| 275 | |
| 276 | struct drm_amdgpu_gem_wait_idle_in { |
Christian König | 675da0d | 2015-06-09 15:54:37 +0200 | [diff] [blame] | 277 | /** GEM object handle */ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 278 | __u32 handle; |
Christian König | 675da0d | 2015-06-09 15:54:37 +0200 | [diff] [blame] | 279 | /** For future use, no flags defined so far */ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 280 | __u32 flags; |
Christian König | 675da0d | 2015-06-09 15:54:37 +0200 | [diff] [blame] | 281 | /** Absolute timeout to wait */ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 282 | __u64 timeout; |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 283 | }; |
| 284 | |
| 285 | struct drm_amdgpu_gem_wait_idle_out { |
Christian König | 675da0d | 2015-06-09 15:54:37 +0200 | [diff] [blame] | 286 | /** BO status: 0 - BO is idle, 1 - BO is busy */ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 287 | __u32 status; |
Christian König | 675da0d | 2015-06-09 15:54:37 +0200 | [diff] [blame] | 288 | /** Returned current memory domain */ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 289 | __u32 domain; |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 290 | }; |
| 291 | |
| 292 | union drm_amdgpu_gem_wait_idle { |
| 293 | struct drm_amdgpu_gem_wait_idle_in in; |
| 294 | struct drm_amdgpu_gem_wait_idle_out out; |
| 295 | }; |
| 296 | |
| 297 | struct drm_amdgpu_wait_cs_in { |
Monk Liu | d7b1eeb | 2017-04-07 18:39:07 +0800 | [diff] [blame^] | 298 | /* Command submission handle |
| 299 | * handle equals 0 means none to wait for |
| 300 | * handle equal ~0ull meanas wait for the latest sequence number |
| 301 | */ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 302 | __u64 handle; |
Christian König | 675da0d | 2015-06-09 15:54:37 +0200 | [diff] [blame] | 303 | /** Absolute timeout to wait */ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 304 | __u64 timeout; |
| 305 | __u32 ip_type; |
| 306 | __u32 ip_instance; |
| 307 | __u32 ring; |
| 308 | __u32 ctx_id; |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 309 | }; |
| 310 | |
| 311 | struct drm_amdgpu_wait_cs_out { |
Christian König | 675da0d | 2015-06-09 15:54:37 +0200 | [diff] [blame] | 312 | /** CS status: 0 - CS completed, 1 - CS still busy */ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 313 | __u64 status; |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 314 | }; |
| 315 | |
| 316 | union drm_amdgpu_wait_cs { |
| 317 | struct drm_amdgpu_wait_cs_in in; |
| 318 | struct drm_amdgpu_wait_cs_out out; |
| 319 | }; |
| 320 | |
Junwei Zhang | eef18a8 | 2016-11-04 16:16:10 -0400 | [diff] [blame] | 321 | struct drm_amdgpu_fence { |
| 322 | __u32 ctx_id; |
| 323 | __u32 ip_type; |
| 324 | __u32 ip_instance; |
| 325 | __u32 ring; |
| 326 | __u64 seq_no; |
| 327 | }; |
| 328 | |
| 329 | struct drm_amdgpu_wait_fences_in { |
| 330 | /** This points to uint64_t * which points to fences */ |
| 331 | __u64 fences; |
| 332 | __u32 fence_count; |
| 333 | __u32 wait_all; |
| 334 | __u64 timeout_ns; |
| 335 | }; |
| 336 | |
| 337 | struct drm_amdgpu_wait_fences_out { |
| 338 | __u32 status; |
| 339 | __u32 first_signaled; |
| 340 | }; |
| 341 | |
| 342 | union drm_amdgpu_wait_fences { |
| 343 | struct drm_amdgpu_wait_fences_in in; |
| 344 | struct drm_amdgpu_wait_fences_out out; |
| 345 | }; |
| 346 | |
Marek Olšák | d8f65a2 | 2015-05-27 14:30:38 +0200 | [diff] [blame] | 347 | #define AMDGPU_GEM_OP_GET_GEM_CREATE_INFO 0 |
| 348 | #define AMDGPU_GEM_OP_SET_PLACEMENT 1 |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 349 | |
Christian König | 675da0d | 2015-06-09 15:54:37 +0200 | [diff] [blame] | 350 | /* Sets or returns a value associated with a buffer. */ |
| 351 | struct drm_amdgpu_gem_op { |
| 352 | /** GEM object handle */ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 353 | __u32 handle; |
Christian König | 675da0d | 2015-06-09 15:54:37 +0200 | [diff] [blame] | 354 | /** AMDGPU_GEM_OP_* */ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 355 | __u32 op; |
Christian König | 675da0d | 2015-06-09 15:54:37 +0200 | [diff] [blame] | 356 | /** Input or return value */ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 357 | __u64 value; |
Christian König | 675da0d | 2015-06-09 15:54:37 +0200 | [diff] [blame] | 358 | }; |
| 359 | |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 360 | #define AMDGPU_VA_OP_MAP 1 |
| 361 | #define AMDGPU_VA_OP_UNMAP 2 |
Christian König | dc54d3d | 2017-03-13 10:13:38 +0100 | [diff] [blame] | 362 | #define AMDGPU_VA_OP_CLEAR 3 |
Christian König | 80f95c5 | 2017-03-13 10:13:39 +0100 | [diff] [blame] | 363 | #define AMDGPU_VA_OP_REPLACE 4 |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 364 | |
Christian König | fc220f6 | 2015-06-29 17:12:20 +0200 | [diff] [blame] | 365 | /* Delay the page table update till the next CS */ |
| 366 | #define AMDGPU_VM_DELAY_UPDATE (1 << 0) |
| 367 | |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 368 | /* Mapping flags */ |
| 369 | /* readable mapping */ |
| 370 | #define AMDGPU_VM_PAGE_READABLE (1 << 1) |
| 371 | /* writable mapping */ |
| 372 | #define AMDGPU_VM_PAGE_WRITEABLE (1 << 2) |
| 373 | /* executable mapping, new for VI */ |
| 374 | #define AMDGPU_VM_PAGE_EXECUTABLE (1 << 3) |
Junwei Zhang | b85891b | 2017-01-16 13:59:01 +0800 | [diff] [blame] | 375 | /* partially resident texture */ |
| 376 | #define AMDGPU_VM_PAGE_PRT (1 << 4) |
Alex Xie | 66e02bc | 2017-02-14 12:04:52 -0500 | [diff] [blame] | 377 | /* MTYPE flags use bit 5 to 8 */ |
| 378 | #define AMDGPU_VM_MTYPE_MASK (0xf << 5) |
| 379 | /* Default MTYPE. Pre-AI must use this. Recommended for newer ASICs. */ |
| 380 | #define AMDGPU_VM_MTYPE_DEFAULT (0 << 5) |
| 381 | /* Use NC MTYPE instead of default MTYPE */ |
| 382 | #define AMDGPU_VM_MTYPE_NC (1 << 5) |
| 383 | /* Use WC MTYPE instead of default MTYPE */ |
| 384 | #define AMDGPU_VM_MTYPE_WC (2 << 5) |
| 385 | /* Use CC MTYPE instead of default MTYPE */ |
| 386 | #define AMDGPU_VM_MTYPE_CC (3 << 5) |
| 387 | /* Use UC MTYPE instead of default MTYPE */ |
| 388 | #define AMDGPU_VM_MTYPE_UC (4 << 5) |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 389 | |
Christian König | 34b5f6a | 2015-06-08 15:03:00 +0200 | [diff] [blame] | 390 | struct drm_amdgpu_gem_va { |
Christian König | 675da0d | 2015-06-09 15:54:37 +0200 | [diff] [blame] | 391 | /** GEM object handle */ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 392 | __u32 handle; |
| 393 | __u32 _pad; |
Christian König | 675da0d | 2015-06-09 15:54:37 +0200 | [diff] [blame] | 394 | /** AMDGPU_VA_OP_* */ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 395 | __u32 operation; |
Christian König | 675da0d | 2015-06-09 15:54:37 +0200 | [diff] [blame] | 396 | /** AMDGPU_VM_PAGE_* */ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 397 | __u32 flags; |
Christian König | 675da0d | 2015-06-09 15:54:37 +0200 | [diff] [blame] | 398 | /** va address to assign . Must be correctly aligned.*/ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 399 | __u64 va_address; |
Christian König | 675da0d | 2015-06-09 15:54:37 +0200 | [diff] [blame] | 400 | /** Specify offset inside of BO to assign. Must be correctly aligned.*/ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 401 | __u64 offset_in_bo; |
Christian König | 675da0d | 2015-06-09 15:54:37 +0200 | [diff] [blame] | 402 | /** Specify mapping size. Must be correctly aligned. */ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 403 | __u64 map_size; |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 404 | }; |
| 405 | |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 406 | #define AMDGPU_HW_IP_GFX 0 |
| 407 | #define AMDGPU_HW_IP_COMPUTE 1 |
| 408 | #define AMDGPU_HW_IP_DMA 2 |
| 409 | #define AMDGPU_HW_IP_UVD 3 |
| 410 | #define AMDGPU_HW_IP_VCE 4 |
Leo Liu | a50798b | 2017-01-10 11:49:08 -0500 | [diff] [blame] | 411 | #define AMDGPU_HW_IP_UVD_ENC 5 |
| 412 | #define AMDGPU_HW_IP_NUM 6 |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 413 | |
| 414 | #define AMDGPU_HW_IP_INSTANCE_MAX_COUNT 1 |
| 415 | |
| 416 | #define AMDGPU_CHUNK_ID_IB 0x01 |
| 417 | #define AMDGPU_CHUNK_ID_FENCE 0x02 |
Christian König | 2b48d32 | 2015-06-19 17:31:29 +0200 | [diff] [blame] | 418 | #define AMDGPU_CHUNK_ID_DEPENDENCIES 0x03 |
Christian König | 675da0d | 2015-06-09 15:54:37 +0200 | [diff] [blame] | 419 | |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 420 | struct drm_amdgpu_cs_chunk { |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 421 | __u32 chunk_id; |
| 422 | __u32 length_dw; |
| 423 | __u64 chunk_data; |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 424 | }; |
| 425 | |
| 426 | struct drm_amdgpu_cs_in { |
| 427 | /** Rendering context id */ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 428 | __u32 ctx_id; |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 429 | /** Handle of resource list associated with CS */ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 430 | __u32 bo_list_handle; |
| 431 | __u32 num_chunks; |
| 432 | __u32 _pad; |
| 433 | /** this points to __u64 * which point to cs chunks */ |
| 434 | __u64 chunks; |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 435 | }; |
| 436 | |
| 437 | struct drm_amdgpu_cs_out { |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 438 | __u64 handle; |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 439 | }; |
| 440 | |
| 441 | union drm_amdgpu_cs { |
Christian König | 675da0d | 2015-06-09 15:54:37 +0200 | [diff] [blame] | 442 | struct drm_amdgpu_cs_in in; |
| 443 | struct drm_amdgpu_cs_out out; |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 444 | }; |
| 445 | |
| 446 | /* Specify flags to be used for IB */ |
| 447 | |
| 448 | /* This IB should be submitted to CE */ |
| 449 | #define AMDGPU_IB_FLAG_CE (1<<0) |
| 450 | |
Monk Liu | ed834af | 2017-03-08 15:37:00 +0800 | [diff] [blame] | 451 | /* Preamble flag, which means the IB could be dropped if no context switch */ |
Jammy Zhou | cab6d57 | 2015-06-06 04:49:22 +0800 | [diff] [blame] | 452 | #define AMDGPU_IB_FLAG_PREAMBLE (1<<1) |
Jammy Zhou | aa2bdb24 | 2015-05-11 23:49:34 +0800 | [diff] [blame] | 453 | |
Monk Liu | 71aec25 | 2017-03-08 15:38:54 +0800 | [diff] [blame] | 454 | /* Preempt flag, IB should set Pre_enb bit if PREEMPT flag detected */ |
| 455 | #define AMDGPU_IB_FLAG_PREEMPT (1<<2) |
| 456 | |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 457 | struct drm_amdgpu_cs_chunk_ib { |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 458 | __u32 _pad; |
Christian König | 675da0d | 2015-06-09 15:54:37 +0200 | [diff] [blame] | 459 | /** AMDGPU_IB_FLAG_* */ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 460 | __u32 flags; |
Christian König | 675da0d | 2015-06-09 15:54:37 +0200 | [diff] [blame] | 461 | /** Virtual address to begin IB execution */ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 462 | __u64 va_start; |
Christian König | 675da0d | 2015-06-09 15:54:37 +0200 | [diff] [blame] | 463 | /** Size of submission */ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 464 | __u32 ib_bytes; |
Christian König | 675da0d | 2015-06-09 15:54:37 +0200 | [diff] [blame] | 465 | /** HW IP to submit to */ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 466 | __u32 ip_type; |
Christian König | 675da0d | 2015-06-09 15:54:37 +0200 | [diff] [blame] | 467 | /** HW IP index of the same type to submit to */ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 468 | __u32 ip_instance; |
Christian König | 675da0d | 2015-06-09 15:54:37 +0200 | [diff] [blame] | 469 | /** Ring index to submit to */ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 470 | __u32 ring; |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 471 | }; |
| 472 | |
Christian König | 2b48d32 | 2015-06-19 17:31:29 +0200 | [diff] [blame] | 473 | struct drm_amdgpu_cs_chunk_dep { |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 474 | __u32 ip_type; |
| 475 | __u32 ip_instance; |
| 476 | __u32 ring; |
| 477 | __u32 ctx_id; |
| 478 | __u64 handle; |
Christian König | 2b48d32 | 2015-06-19 17:31:29 +0200 | [diff] [blame] | 479 | }; |
| 480 | |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 481 | struct drm_amdgpu_cs_chunk_fence { |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 482 | __u32 handle; |
| 483 | __u32 offset; |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 484 | }; |
| 485 | |
| 486 | struct drm_amdgpu_cs_chunk_data { |
| 487 | union { |
| 488 | struct drm_amdgpu_cs_chunk_ib ib_data; |
| 489 | struct drm_amdgpu_cs_chunk_fence fence_data; |
| 490 | }; |
| 491 | }; |
| 492 | |
| 493 | /** |
| 494 | * Query h/w info: Flag that this is integrated (a.h.a. fusion) GPU |
| 495 | * |
| 496 | */ |
| 497 | #define AMDGPU_IDS_FLAGS_FUSION 0x1 |
Monk Liu | aafcafa | 2016-10-24 11:36:17 +0800 | [diff] [blame] | 498 | #define AMDGPU_IDS_FLAGS_PREEMPTION 0x2 |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 499 | |
| 500 | /* indicate if acceleration can be working */ |
| 501 | #define AMDGPU_INFO_ACCEL_WORKING 0x00 |
| 502 | /* get the crtc_id from the mode object id? */ |
| 503 | #define AMDGPU_INFO_CRTC_FROM_ID 0x01 |
| 504 | /* query hw IP info */ |
| 505 | #define AMDGPU_INFO_HW_IP_INFO 0x02 |
| 506 | /* query hw IP instance count for the specified type */ |
| 507 | #define AMDGPU_INFO_HW_IP_COUNT 0x03 |
| 508 | /* timestamp for GL_ARB_timer_query */ |
| 509 | #define AMDGPU_INFO_TIMESTAMP 0x05 |
| 510 | /* Query the firmware version */ |
| 511 | #define AMDGPU_INFO_FW_VERSION 0x0e |
| 512 | /* Subquery id: Query VCE firmware version */ |
| 513 | #define AMDGPU_INFO_FW_VCE 0x1 |
| 514 | /* Subquery id: Query UVD firmware version */ |
| 515 | #define AMDGPU_INFO_FW_UVD 0x2 |
| 516 | /* Subquery id: Query GMC firmware version */ |
| 517 | #define AMDGPU_INFO_FW_GMC 0x03 |
| 518 | /* Subquery id: Query GFX ME firmware version */ |
| 519 | #define AMDGPU_INFO_FW_GFX_ME 0x04 |
| 520 | /* Subquery id: Query GFX PFP firmware version */ |
| 521 | #define AMDGPU_INFO_FW_GFX_PFP 0x05 |
| 522 | /* Subquery id: Query GFX CE firmware version */ |
| 523 | #define AMDGPU_INFO_FW_GFX_CE 0x06 |
| 524 | /* Subquery id: Query GFX RLC firmware version */ |
| 525 | #define AMDGPU_INFO_FW_GFX_RLC 0x07 |
| 526 | /* Subquery id: Query GFX MEC firmware version */ |
| 527 | #define AMDGPU_INFO_FW_GFX_MEC 0x08 |
| 528 | /* Subquery id: Query SMC firmware version */ |
| 529 | #define AMDGPU_INFO_FW_SMC 0x0a |
| 530 | /* Subquery id: Query SDMA firmware version */ |
| 531 | #define AMDGPU_INFO_FW_SDMA 0x0b |
Huang Rui | 6a7ed07 | 2017-03-03 19:15:26 -0500 | [diff] [blame] | 532 | /* Subquery id: Query PSP SOS firmware version */ |
| 533 | #define AMDGPU_INFO_FW_SOS 0x0c |
| 534 | /* Subquery id: Query PSP ASD firmware version */ |
| 535 | #define AMDGPU_INFO_FW_ASD 0x0d |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 536 | /* number of bytes moved for TTM migration */ |
| 537 | #define AMDGPU_INFO_NUM_BYTES_MOVED 0x0f |
| 538 | /* the used VRAM size */ |
| 539 | #define AMDGPU_INFO_VRAM_USAGE 0x10 |
| 540 | /* the used GTT size */ |
| 541 | #define AMDGPU_INFO_GTT_USAGE 0x11 |
| 542 | /* Information about GDS, etc. resource configuration */ |
| 543 | #define AMDGPU_INFO_GDS_CONFIG 0x13 |
| 544 | /* Query information about VRAM and GTT domains */ |
| 545 | #define AMDGPU_INFO_VRAM_GTT 0x14 |
| 546 | /* Query information about register in MMR address space*/ |
| 547 | #define AMDGPU_INFO_READ_MMR_REG 0x15 |
| 548 | /* Query information about device: rev id, family, etc. */ |
| 549 | #define AMDGPU_INFO_DEV_INFO 0x16 |
| 550 | /* visible vram usage */ |
| 551 | #define AMDGPU_INFO_VIS_VRAM_USAGE 0x17 |
Marek Olšák | 83a59b6 | 2016-08-17 23:58:58 +0200 | [diff] [blame] | 552 | /* number of TTM buffer evictions */ |
| 553 | #define AMDGPU_INFO_NUM_EVICTIONS 0x18 |
Junwei Zhang | e0adf6c | 2016-09-29 09:39:10 +0800 | [diff] [blame] | 554 | /* Query memory about VRAM and GTT domains */ |
| 555 | #define AMDGPU_INFO_MEMORY 0x19 |
Alex Deucher | bbe8797 | 2016-10-07 12:12:46 -0400 | [diff] [blame] | 556 | /* Query vce clock table */ |
| 557 | #define AMDGPU_INFO_VCE_CLOCK_TABLE 0x1A |
Evan Quan | 40ee588 | 2016-12-07 10:05:09 +0800 | [diff] [blame] | 558 | /* Query vbios related information */ |
| 559 | #define AMDGPU_INFO_VBIOS 0x1B |
| 560 | /* Subquery id: Query vbios size */ |
| 561 | #define AMDGPU_INFO_VBIOS_SIZE 0x1 |
| 562 | /* Subquery id: Query vbios image */ |
| 563 | #define AMDGPU_INFO_VBIOS_IMAGE 0x2 |
Arindam Nath | 44879b6 | 2016-12-12 15:29:33 +0530 | [diff] [blame] | 564 | /* Query UVD handles */ |
| 565 | #define AMDGPU_INFO_NUM_HANDLES 0x1C |
Alex Deucher | 5ebbac4 | 2017-03-08 18:25:15 -0500 | [diff] [blame] | 566 | /* Query sensor related information */ |
| 567 | #define AMDGPU_INFO_SENSOR 0x1D |
| 568 | /* Subquery id: Query GPU shader clock */ |
| 569 | #define AMDGPU_INFO_SENSOR_GFX_SCLK 0x1 |
| 570 | /* Subquery id: Query GPU memory clock */ |
| 571 | #define AMDGPU_INFO_SENSOR_GFX_MCLK 0x2 |
| 572 | /* Subquery id: Query GPU temperature */ |
| 573 | #define AMDGPU_INFO_SENSOR_GPU_TEMP 0x3 |
| 574 | /* Subquery id: Query GPU load */ |
| 575 | #define AMDGPU_INFO_SENSOR_GPU_LOAD 0x4 |
| 576 | /* Subquery id: Query average GPU power */ |
| 577 | #define AMDGPU_INFO_SENSOR_GPU_AVG_POWER 0x5 |
| 578 | /* Subquery id: Query northbridge voltage */ |
| 579 | #define AMDGPU_INFO_SENSOR_VDDNB 0x6 |
| 580 | /* Subquery id: Query graphics voltage */ |
| 581 | #define AMDGPU_INFO_SENSOR_VDDGFX 0x7 |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 582 | |
| 583 | #define AMDGPU_INFO_MMR_SE_INDEX_SHIFT 0 |
| 584 | #define AMDGPU_INFO_MMR_SE_INDEX_MASK 0xff |
| 585 | #define AMDGPU_INFO_MMR_SH_INDEX_SHIFT 8 |
| 586 | #define AMDGPU_INFO_MMR_SH_INDEX_MASK 0xff |
| 587 | |
Huang Rui | 000cab9 | 2016-06-12 15:44:44 +0800 | [diff] [blame] | 588 | struct drm_amdgpu_query_fw { |
| 589 | /** AMDGPU_INFO_FW_* */ |
| 590 | __u32 fw_type; |
| 591 | /** |
| 592 | * Index of the IP if there are more IPs of |
| 593 | * the same type. |
| 594 | */ |
| 595 | __u32 ip_instance; |
| 596 | /** |
| 597 | * Index of the engine. Whether this is used depends |
| 598 | * on the firmware type. (e.g. MEC, SDMA) |
| 599 | */ |
| 600 | __u32 index; |
| 601 | __u32 _pad; |
| 602 | }; |
| 603 | |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 604 | /* Input structure for the INFO ioctl */ |
| 605 | struct drm_amdgpu_info { |
| 606 | /* Where the return value will be stored */ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 607 | __u64 return_pointer; |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 608 | /* The size of the return value. Just like "size" in "snprintf", |
| 609 | * it limits how many bytes the kernel can write. */ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 610 | __u32 return_size; |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 611 | /* The query request id. */ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 612 | __u32 query; |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 613 | |
| 614 | union { |
| 615 | struct { |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 616 | __u32 id; |
| 617 | __u32 _pad; |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 618 | } mode_crtc; |
| 619 | |
| 620 | struct { |
| 621 | /** AMDGPU_HW_IP_* */ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 622 | __u32 type; |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 623 | /** |
Christian König | 675da0d | 2015-06-09 15:54:37 +0200 | [diff] [blame] | 624 | * Index of the IP if there are more IPs of the same |
| 625 | * type. Ignored by AMDGPU_INFO_HW_IP_COUNT. |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 626 | */ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 627 | __u32 ip_instance; |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 628 | } query_hw_ip; |
| 629 | |
| 630 | struct { |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 631 | __u32 dword_offset; |
Christian König | 675da0d | 2015-06-09 15:54:37 +0200 | [diff] [blame] | 632 | /** number of registers to read */ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 633 | __u32 count; |
| 634 | __u32 instance; |
Christian König | 675da0d | 2015-06-09 15:54:37 +0200 | [diff] [blame] | 635 | /** For future use, no flags defined so far */ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 636 | __u32 flags; |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 637 | } read_mmr_reg; |
| 638 | |
Huang Rui | 000cab9 | 2016-06-12 15:44:44 +0800 | [diff] [blame] | 639 | struct drm_amdgpu_query_fw query_fw; |
Evan Quan | 40ee588 | 2016-12-07 10:05:09 +0800 | [diff] [blame] | 640 | |
| 641 | struct { |
| 642 | __u32 type; |
| 643 | __u32 offset; |
| 644 | } vbios_info; |
Alex Deucher | 5ebbac4 | 2017-03-08 18:25:15 -0500 | [diff] [blame] | 645 | |
| 646 | struct { |
| 647 | __u32 type; |
| 648 | } sensor_info; |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 649 | }; |
| 650 | }; |
| 651 | |
| 652 | struct drm_amdgpu_info_gds { |
| 653 | /** GDS GFX partition size */ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 654 | __u32 gds_gfx_partition_size; |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 655 | /** GDS compute partition size */ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 656 | __u32 compute_partition_size; |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 657 | /** total GDS memory size */ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 658 | __u32 gds_total_size; |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 659 | /** GWS size per GFX partition */ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 660 | __u32 gws_per_gfx_partition; |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 661 | /** GSW size per compute partition */ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 662 | __u32 gws_per_compute_partition; |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 663 | /** OA size per GFX partition */ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 664 | __u32 oa_per_gfx_partition; |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 665 | /** OA size per compute partition */ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 666 | __u32 oa_per_compute_partition; |
| 667 | __u32 _pad; |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 668 | }; |
| 669 | |
| 670 | struct drm_amdgpu_info_vram_gtt { |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 671 | __u64 vram_size; |
| 672 | __u64 vram_cpu_accessible_size; |
| 673 | __u64 gtt_size; |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 674 | }; |
| 675 | |
Junwei Zhang | e0adf6c | 2016-09-29 09:39:10 +0800 | [diff] [blame] | 676 | struct drm_amdgpu_heap_info { |
| 677 | /** max. physical memory */ |
| 678 | __u64 total_heap_size; |
| 679 | |
| 680 | /** Theoretical max. available memory in the given heap */ |
| 681 | __u64 usable_heap_size; |
| 682 | |
| 683 | /** |
| 684 | * Number of bytes allocated in the heap. This includes all processes |
| 685 | * and private allocations in the kernel. It changes when new buffers |
| 686 | * are allocated, freed, and moved. It cannot be larger than |
| 687 | * heap_size. |
| 688 | */ |
| 689 | __u64 heap_usage; |
| 690 | |
| 691 | /** |
| 692 | * Theoretical possible max. size of buffer which |
| 693 | * could be allocated in the given heap |
| 694 | */ |
| 695 | __u64 max_allocation; |
Junwei Zhang | 9f6163e | 2016-09-21 10:17:22 +0800 | [diff] [blame] | 696 | }; |
| 697 | |
Junwei Zhang | e0adf6c | 2016-09-29 09:39:10 +0800 | [diff] [blame] | 698 | struct drm_amdgpu_memory_info { |
| 699 | struct drm_amdgpu_heap_info vram; |
| 700 | struct drm_amdgpu_heap_info cpu_accessible_vram; |
| 701 | struct drm_amdgpu_heap_info gtt; |
Junwei Zhang | cfa3255 | 2016-09-21 10:33:26 +0800 | [diff] [blame] | 702 | }; |
| 703 | |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 704 | struct drm_amdgpu_info_firmware { |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 705 | __u32 ver; |
| 706 | __u32 feature; |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 707 | }; |
| 708 | |
Ken Wang | 81c59f5 | 2015-06-03 21:02:01 +0800 | [diff] [blame] | 709 | #define AMDGPU_VRAM_TYPE_UNKNOWN 0 |
| 710 | #define AMDGPU_VRAM_TYPE_GDDR1 1 |
| 711 | #define AMDGPU_VRAM_TYPE_DDR2 2 |
| 712 | #define AMDGPU_VRAM_TYPE_GDDR3 3 |
| 713 | #define AMDGPU_VRAM_TYPE_GDDR4 4 |
| 714 | #define AMDGPU_VRAM_TYPE_GDDR5 5 |
| 715 | #define AMDGPU_VRAM_TYPE_HBM 6 |
| 716 | #define AMDGPU_VRAM_TYPE_DDR3 7 |
| 717 | |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 718 | struct drm_amdgpu_info_device { |
| 719 | /** PCI Device ID */ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 720 | __u32 device_id; |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 721 | /** Internal chip revision: A0, A1, etc.) */ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 722 | __u32 chip_rev; |
| 723 | __u32 external_rev; |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 724 | /** Revision id in PCI Config space */ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 725 | __u32 pci_rev; |
| 726 | __u32 family; |
| 727 | __u32 num_shader_engines; |
| 728 | __u32 num_shader_arrays_per_engine; |
Christian König | 675da0d | 2015-06-09 15:54:37 +0200 | [diff] [blame] | 729 | /* in KHz */ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 730 | __u32 gpu_counter_freq; |
| 731 | __u64 max_engine_clock; |
| 732 | __u64 max_memory_clock; |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 733 | /* cu information */ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 734 | __u32 cu_active_number; |
| 735 | __u32 cu_ao_mask; |
| 736 | __u32 cu_bitmap[4][4]; |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 737 | /** Render backend pipe mask. One render backend is CB+DB. */ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 738 | __u32 enabled_rb_pipes_mask; |
| 739 | __u32 num_rb_pipes; |
| 740 | __u32 num_hw_gfx_contexts; |
| 741 | __u32 _pad; |
| 742 | __u64 ids_flags; |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 743 | /** Starting virtual address for UMDs. */ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 744 | __u64 virtual_address_offset; |
Jammy Zhou | 02b70c8 | 2015-05-12 22:46:45 +0800 | [diff] [blame] | 745 | /** The maximum virtual address */ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 746 | __u64 virtual_address_max; |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 747 | /** Required alignment of virtual addresses. */ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 748 | __u32 virtual_address_alignment; |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 749 | /** Page table entry - fragment size */ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 750 | __u32 pte_fragment_size; |
| 751 | __u32 gart_page_size; |
Ken Wang | a101a89 | 2015-06-03 17:47:54 +0800 | [diff] [blame] | 752 | /** constant engine ram size*/ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 753 | __u32 ce_ram_size; |
Jammy Zhou | cab6d57 | 2015-06-06 04:49:22 +0800 | [diff] [blame] | 754 | /** video memory type info*/ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 755 | __u32 vram_type; |
Ken Wang | 81c59f5 | 2015-06-03 21:02:01 +0800 | [diff] [blame] | 756 | /** video memory bit width*/ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 757 | __u32 vram_bit_width; |
Leo Liu | fa92754 | 2015-07-13 12:46:23 -0400 | [diff] [blame] | 758 | /* vce harvesting instance */ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 759 | __u32 vce_harvest_config; |
Junwei Zhang | df6e2c4 | 2017-02-17 11:05:49 +0800 | [diff] [blame] | 760 | /* gfx double offchip LDS buffers */ |
| 761 | __u32 gc_double_offchip_lds_buf; |
Alex Deucher | bce23e0 | 2017-03-28 12:52:08 -0400 | [diff] [blame] | 762 | /* NGG Primitive Buffer */ |
| 763 | __u64 prim_buf_gpu_addr; |
| 764 | /* NGG Position Buffer */ |
| 765 | __u64 pos_buf_gpu_addr; |
| 766 | /* NGG Control Sideband */ |
| 767 | __u64 cntl_sb_buf_gpu_addr; |
| 768 | /* NGG Parameter Cache */ |
| 769 | __u64 param_buf_gpu_addr; |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 770 | }; |
| 771 | |
| 772 | struct drm_amdgpu_info_hw_ip { |
| 773 | /** Version of h/w IP */ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 774 | __u32 hw_ip_version_major; |
| 775 | __u32 hw_ip_version_minor; |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 776 | /** Capabilities */ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 777 | __u64 capabilities_flags; |
Ken Wang | 71062f4 | 2015-06-04 21:26:57 +0800 | [diff] [blame] | 778 | /** command buffer address start alignment*/ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 779 | __u32 ib_start_alignment; |
Ken Wang | 71062f4 | 2015-06-04 21:26:57 +0800 | [diff] [blame] | 780 | /** command buffer size alignment*/ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 781 | __u32 ib_size_alignment; |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 782 | /** Bitmask of available rings. Bit 0 means ring 0, etc. */ |
Mikko Rapeli | 2ce9dde | 2015-12-02 23:44:33 +0100 | [diff] [blame] | 783 | __u32 available_rings; |
| 784 | __u32 _pad; |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 785 | }; |
| 786 | |
Arindam Nath | 44879b6 | 2016-12-12 15:29:33 +0530 | [diff] [blame] | 787 | struct drm_amdgpu_info_num_handles { |
| 788 | /** Max handles as supported by firmware for UVD */ |
| 789 | __u32 uvd_max_handles; |
| 790 | /** Handles currently in use for UVD */ |
| 791 | __u32 uvd_used_handles; |
| 792 | }; |
| 793 | |
Alex Deucher | bbe8797 | 2016-10-07 12:12:46 -0400 | [diff] [blame] | 794 | #define AMDGPU_VCE_CLOCK_TABLE_ENTRIES 6 |
| 795 | |
| 796 | struct drm_amdgpu_info_vce_clock_table_entry { |
| 797 | /** System clock */ |
| 798 | __u32 sclk; |
| 799 | /** Memory clock */ |
| 800 | __u32 mclk; |
| 801 | /** VCE clock */ |
| 802 | __u32 eclk; |
| 803 | __u32 pad; |
| 804 | }; |
| 805 | |
| 806 | struct drm_amdgpu_info_vce_clock_table { |
| 807 | struct drm_amdgpu_info_vce_clock_table_entry entries[AMDGPU_VCE_CLOCK_TABLE_ENTRIES]; |
| 808 | __u32 num_valid_entries; |
| 809 | __u32 pad; |
| 810 | }; |
| 811 | |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 812 | /* |
| 813 | * Supported GPU families |
| 814 | */ |
| 815 | #define AMDGPU_FAMILY_UNKNOWN 0 |
Ken Wang | 295d0da | 2016-05-24 21:02:53 +0800 | [diff] [blame] | 816 | #define AMDGPU_FAMILY_SI 110 /* Hainan, Oland, Verde, Pitcairn, Tahiti */ |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 817 | #define AMDGPU_FAMILY_CI 120 /* Bonaire, Hawaii */ |
| 818 | #define AMDGPU_FAMILY_KV 125 /* Kaveri, Kabini, Mullins */ |
| 819 | #define AMDGPU_FAMILY_VI 130 /* Iceland, Tonga */ |
Samuel Li | 39bb0c9 | 2015-10-08 16:31:43 -0400 | [diff] [blame] | 820 | #define AMDGPU_FAMILY_CZ 135 /* Carrizo, Stoney */ |
Alex Deucher | a8f1f1c | 2017-03-03 15:54:06 -0500 | [diff] [blame] | 821 | #define AMDGPU_FAMILY_AI 141 /* Vega10 */ |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 822 | |
Emil Velikov | cfa7152 | 2016-04-07 18:45:18 +0100 | [diff] [blame] | 823 | #if defined(__cplusplus) |
| 824 | } |
| 825 | #endif |
| 826 | |
Alex Deucher | 81629cb | 2015-04-20 16:42:01 -0400 | [diff] [blame] | 827 | #endif |