aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2015-06-09 09:54:37 -0400
committerAlex Deucher <alexander.deucher@amd.com>2015-06-10 09:06:46 -0400
commit675da0ddd6fefa5500488a5a3d500aaaefa95e5d (patch)
tree5266c13a5facbab5e33221000cb449dc16eacec3 /include/uapi
parent692a59e696afe1a4e777d0e4359325336ab0ad89 (diff)
drm/amdgpu: cleanup UAPI comments
No functional change. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'include/uapi')
-rw-r--r--include/uapi/drm/amdgpu_drm.h119
1 files changed, 78 insertions, 41 deletions
diff --git a/include/uapi/drm/amdgpu_drm.h b/include/uapi/drm/amdgpu_drm.h
index a82c0601a294..d3f4832db289 100644
--- a/include/uapi/drm/amdgpu_drm.h
+++ b/include/uapi/drm/amdgpu_drm.h
@@ -141,12 +141,17 @@ union drm_amdgpu_bo_list {
141 141
142/* GPU reset status */ 142/* GPU reset status */
143#define AMDGPU_CTX_NO_RESET 0 143#define AMDGPU_CTX_NO_RESET 0
144#define AMDGPU_CTX_GUILTY_RESET 1 /* this the context caused it */ 144/* this the context caused it */
145#define AMDGPU_CTX_INNOCENT_RESET 2 /* some other context caused it */ 145#define AMDGPU_CTX_GUILTY_RESET 1
146#define AMDGPU_CTX_UNKNOWN_RESET 3 /* unknown cause */ 146/* some other context caused it */
147#define AMDGPU_CTX_INNOCENT_RESET 2
148/* unknown cause */
149#define AMDGPU_CTX_UNKNOWN_RESET 3
147 150
148struct drm_amdgpu_ctx_in { 151struct drm_amdgpu_ctx_in {
152 /** AMDGPU_CTX_OP_* */
149 uint32_t op; 153 uint32_t op;
154 /** For future use, no flags defined so far */
150 uint32_t flags; 155 uint32_t flags;
151 uint32_t ctx_id; 156 uint32_t ctx_id;
152 uint32_t _pad; 157 uint32_t _pad;
@@ -159,6 +164,7 @@ union drm_amdgpu_ctx_out {
159 } alloc; 164 } alloc;
160 165
161 struct { 166 struct {
167 /** For future use, no flags defined so far */
162 uint64_t flags; 168 uint64_t flags;
163 /** Number of resets caused by this context so far. */ 169 /** Number of resets caused by this context so far. */
164 uint32_t hangs; 170 uint32_t hangs;
@@ -185,7 +191,9 @@ union drm_amdgpu_ctx {
185struct drm_amdgpu_gem_userptr { 191struct drm_amdgpu_gem_userptr {
186 uint64_t addr; 192 uint64_t addr;
187 uint64_t size; 193 uint64_t size;
194 /* AMDGPU_GEM_USERPTR_* */
188 uint32_t flags; 195 uint32_t flags;
196 /* Resulting GEM handle */
189 uint32_t handle; 197 uint32_t handle;
190}; 198};
191 199
@@ -217,23 +225,29 @@ struct drm_amdgpu_gem_userptr {
217 225
218/** The same structure is shared for input/output */ 226/** The same structure is shared for input/output */
219struct drm_amdgpu_gem_metadata { 227struct drm_amdgpu_gem_metadata {
220 uint32_t handle; /* GEM Object handle */ 228 /** GEM Object handle */
221 uint32_t op; /** Do we want get or set metadata */ 229 uint32_t handle;
230 /** Do we want get or set metadata */
231 uint32_t op;
222 struct { 232 struct {
233 /** For future use, no flags defined so far */
223 uint64_t flags; 234 uint64_t flags;
224 uint64_t tiling_info; /* family specific tiling info */ 235 /** family specific tiling info */
236 uint64_t tiling_info;
225 uint32_t data_size_bytes; 237 uint32_t data_size_bytes;
226 uint32_t data[64]; 238 uint32_t data[64];
227 } data; 239 } data;
228}; 240};
229 241
230struct drm_amdgpu_gem_mmap_in { 242struct drm_amdgpu_gem_mmap_in {
231 uint32_t handle; /** the GEM object handle */ 243 /** the GEM object handle */
244 uint32_t handle;
232 uint32_t _pad; 245 uint32_t _pad;
233}; 246};
234 247
235struct drm_amdgpu_gem_mmap_out { 248struct drm_amdgpu_gem_mmap_out {
236 uint64_t addr_ptr; /** mmap offset from the vma offset manager */ 249 /** mmap offset from the vma offset manager */
250 uint64_t addr_ptr;
237}; 251};
238 252
239union drm_amdgpu_gem_mmap { 253union drm_amdgpu_gem_mmap {
@@ -242,14 +256,19 @@ union drm_amdgpu_gem_mmap {
242}; 256};
243 257
244struct drm_amdgpu_gem_wait_idle_in { 258struct drm_amdgpu_gem_wait_idle_in {
245 uint32_t handle; /* GEM object handle */ 259 /** GEM object handle */
260 uint32_t handle;
261 /** For future use, no flags defined so far */
246 uint32_t flags; 262 uint32_t flags;
247 uint64_t timeout; /* Timeout to wait. If 0 then returned immediately with the status */ 263 /** Absolute timeout to wait */
264 uint64_t timeout;
248}; 265};
249 266
250struct drm_amdgpu_gem_wait_idle_out { 267struct drm_amdgpu_gem_wait_idle_out {
251 uint32_t status; /* BO status: 0 - BO is idle, 1 - BO is busy */ 268 /** BO status: 0 - BO is idle, 1 - BO is busy */
252 uint32_t domain; /* Returned current memory domain */ 269 uint32_t status;
270 /** Returned current memory domain */
271 uint32_t domain;
253}; 272};
254 273
255union drm_amdgpu_gem_wait_idle { 274union drm_amdgpu_gem_wait_idle {
@@ -258,7 +277,9 @@ union drm_amdgpu_gem_wait_idle {
258}; 277};
259 278
260struct drm_amdgpu_wait_cs_in { 279struct drm_amdgpu_wait_cs_in {
280 /** Command submission handle */
261 uint64_t handle; 281 uint64_t handle;
282 /** Absolute timeout to wait */
262 uint64_t timeout; 283 uint64_t timeout;
263 uint32_t ip_type; 284 uint32_t ip_type;
264 uint32_t ip_instance; 285 uint32_t ip_instance;
@@ -267,6 +288,7 @@ struct drm_amdgpu_wait_cs_in {
267}; 288};
268 289
269struct drm_amdgpu_wait_cs_out { 290struct drm_amdgpu_wait_cs_out {
291 /** CS status: 0 - CS completed, 1 - CS still busy */
270 uint64_t status; 292 uint64_t status;
271}; 293};
272 294
@@ -275,16 +297,19 @@ union drm_amdgpu_wait_cs {
275 struct drm_amdgpu_wait_cs_out out; 297 struct drm_amdgpu_wait_cs_out out;
276}; 298};
277 299
300#define AMDGPU_GEM_OP_GET_GEM_CREATE_INFO 0
301#define AMDGPU_GEM_OP_SET_PLACEMENT 1
302
278/* Sets or returns a value associated with a buffer. */ 303/* Sets or returns a value associated with a buffer. */
279struct drm_amdgpu_gem_op { 304struct drm_amdgpu_gem_op {
280 uint32_t handle; /* buffer */ 305 /** GEM object handle */
281 uint32_t op; /* AMDGPU_GEM_OP_* */ 306 uint32_t handle;
282 uint64_t value; /* input or return value */ 307 /** AMDGPU_GEM_OP_* */
308 uint32_t op;
309 /** Input or return value */
310 uint64_t value;
283}; 311};
284 312
285#define AMDGPU_GEM_OP_GET_GEM_CREATE_INFO 0
286#define AMDGPU_GEM_OP_SET_PLACEMENT 1
287
288#define AMDGPU_VA_OP_MAP 1 313#define AMDGPU_VA_OP_MAP 1
289#define AMDGPU_VA_OP_UNMAP 2 314#define AMDGPU_VA_OP_UNMAP 2
290 315
@@ -297,19 +322,18 @@ struct drm_amdgpu_gem_op {
297#define AMDGPU_VM_PAGE_EXECUTABLE (1 << 3) 322#define AMDGPU_VM_PAGE_EXECUTABLE (1 << 3)
298 323
299struct drm_amdgpu_gem_va { 324struct drm_amdgpu_gem_va {
300 /* GEM object handle */ 325 /** GEM object handle */
301 uint32_t handle; 326 uint32_t handle;
302 uint32_t _pad; 327 uint32_t _pad;
303 /* map or unmap*/ 328 /** AMDGPU_VA_OP_* */
304 uint32_t operation; 329 uint32_t operation;
305 /* specify mapping flags */ 330 /** AMDGPU_VM_PAGE_* */
306 uint32_t flags; 331 uint32_t flags;
307 /* va address to assign . Must be correctly aligned.*/ 332 /** va address to assign . Must be correctly aligned.*/
308 uint64_t va_address; 333 uint64_t va_address;
309 /* Specify offset inside of BO to assign. Must be correctly aligned.*/ 334 /** Specify offset inside of BO to assign. Must be correctly aligned.*/
310 uint64_t offset_in_bo; 335 uint64_t offset_in_bo;
311 /* Specify mapping size. If 0 and offset is 0 then map the whole BO.*/ 336 /** Specify mapping size. Must be correctly aligned. */
312 /* Must be correctly aligned. */
313 uint64_t map_size; 337 uint64_t map_size;
314}; 338};
315 339
@@ -324,6 +348,7 @@ struct drm_amdgpu_gem_va {
324 348
325#define AMDGPU_CHUNK_ID_IB 0x01 349#define AMDGPU_CHUNK_ID_IB 0x01
326#define AMDGPU_CHUNK_ID_FENCE 0x02 350#define AMDGPU_CHUNK_ID_FENCE 0x02
351
327struct drm_amdgpu_cs_chunk {