History

drm/amdgpu: cleanup UAPI comments

No functional change.

Christian König committed 11 years ago

Commit 675da0d1 parent 692a59e1 file · +78 −41Browse files

Showing the changes to include/uapi (1 of 1 file). Show all

Unified · Split

include/uapi/drm/amdgpu_drm.h+78−41
@@ -141,12 +141,17 @@ union drm_amdgpu_bo_list { · 140 unmodified lines
141 141
142/* GPU reset status */142/* GPU reset status */
143#define AMDGPU_CTX_NO_RESET 0143#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 { · 6 unmodified lines
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 { · 20 unmodified lines
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 { · 25 unmodified lines
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 { · 2 unmodified lines
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 { · 2 unmodified lines
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 { · 2 unmodified lines
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 { · 2 unmodified lines
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 1313#define AMDGPU_VA_OP_MAP 1
289#define AMDGPU_VA_OP_UNMAP 2314#define AMDGPU_VA_OP_UNMAP 2
290 315
@@ -297,19 +322,18 @@ struct drm_amdgpu_gem_op { · 6 unmodified lines
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 { · 8 unmodified lines
324 348
325#define AMDGPU_CHUNK_ID_IB 0x01349#define AMDGPU_CHUNK_ID_IB 0x01
326#define AMDGPU_CHUNK_ID_FENCE 0x02350#define AMDGPU_CHUNK_ID_FENCE 0x02
351
327struct drm_amdgpu_cs_chunk {352struct drm_amdgpu_cs_chunk {
328 uint32_t chunk_id;353 uint32_t chunk_id;
329 uint32_t length_dw;354 uint32_t length_dw;
@@ -337,7 +362,7 @@ struct drm_amdgpu_cs_in { · 7 unmodified lines
337 uint32_t bo_list_handle;362 uint32_t bo_list_handle;
338 uint32_t num_chunks;363 uint32_t num_chunks;
339 uint32_t _pad;364 uint32_t _pad;
340 /* this points to uint64_t * which point to cs chunks */365 /** this points to uint64_t * which point to cs chunks */
341 uint64_t chunks;366 uint64_t chunks;
342};367};
343 368
@@ -346,8 +371,8 @@ struct drm_amdgpu_cs_out { · 2 unmodified lines
346};371};
347 372
348union drm_amdgpu_cs {373union drm_amdgpu_cs {
349 struct drm_amdgpu_cs_in in;374 struct drm_amdgpu_cs_in in;
350 struct drm_amdgpu_cs_out out;375 struct drm_amdgpu_cs_out out;
351};376};
352 377
353/* Specify flags to be used for IB */378/* Specify flags to be used for IB */
@@ -360,12 +385,18 @@ union drm_amdgpu_cs { · 6 unmodified lines
360 385
361struct drm_amdgpu_cs_chunk_ib {386struct drm_amdgpu_cs_chunk_ib {
362 uint32_t _pad;387 uint32_t _pad;
363 uint32_t flags; /* IB Flags */388 /** AMDGPU_IB_FLAG_* */
364 uint64_t va_start; /* Virtual address to begin IB execution */389 uint32_t flags;
365 uint32_t ib_bytes; /* Size of submission */390 /** Virtual address to begin IB execution */
366 uint32_t ip_type; /* HW IP to submit to */391 uint64_t va_start;
367 uint32_t ip_instance; /* HW IP index of the same type to submit to */392 /** Size of submission */
368 uint32_t ring; /* Ring index to submit to */393 uint32_t ib_bytes;
394 /** HW IP to submit to */
395 uint32_t ip_type;
396 /** HW IP index of the same type to submit to */
397 uint32_t ip_instance;
398 /** Ring index to submit to */
399 uint32_t ring;
369};400};
370 401
371struct drm_amdgpu_cs_chunk_fence {402struct drm_amdgpu_cs_chunk_fence {
@@ -460,23 +491,28 @@ struct drm_amdgpu_info { · 88 unmodified lines
460 /** AMDGPU_HW_IP_* */491 /** AMDGPU_HW_IP_* */
461 uint32_t type;492 uint32_t type;
462 /**493 /**
463 * Index of the IP if there are more IPs of the same type.494 * Index of the IP if there are more IPs of the same
464 * Ignored by AMDGPU_INFO_HW_IP_COUNT.495 * type. Ignored by AMDGPU_INFO_HW_IP_COUNT.
465 */496 */
466 uint32_t ip_instance;497 uint32_t ip_instance;
467 } query_hw_ip;498 } query_hw_ip;
468 499
469 struct {500 struct {
470 uint32_t dword_offset;501 uint32_t dword_offset;
471 uint32_t count; /* number of registers to read */502 /** number of registers to read */
503 uint32_t count;
472 uint32_t instance;504 uint32_t instance;
505 /** For future use, no flags defined so far */
473 uint32_t flags;506 uint32_t flags;
474 } read_mmr_reg;507 } read_mmr_reg;
475 508
476 struct {509 struct {
477 /** AMDGPU_INFO_FW_* */510 /** AMDGPU_INFO_FW_* */
478 uint32_t fw_type;511 uint32_t fw_type;
479 /** Index of the IP if there are more IPs of the same type. */512 /**
513 * Index of the IP if there are more IPs of
514 * the same type.
515 */
480 uint32_t ip_instance;516 uint32_t ip_instance;
481 /**517 /**
482 * Index of the engine. Whether this is used depends518 * Index of the engine. Whether this is used depends
@@ -537,9 +573,10 @@ struct drm_amdgpu_info_device { · 54 unmodified lines
537 uint32_t family;573 uint32_t family;
538 uint32_t num_shader_engines;574 uint32_t num_shader_engines;
539 uint32_t num_shader_arrays_per_engine;575 uint32_t num_shader_arrays_per_engine;
540 uint32_t gpu_counter_freq; /* in KHz */576 /* in KHz */
541 uint64_t max_engine_clock; /* in KHz */577 uint32_t gpu_counter_freq;
542 uint64_t max_memory_clock; /* in KHz */578 uint64_t max_engine_clock;
579 uint64_t max_memory_clock;
543 /* cu information */580 /* cu information */
544 uint32_t cu_active_number;581 uint32_t cu_active_number;
545 uint32_t cu_ao_mask;582 uint32_t cu_ao_mask;