No functional change.
Showing the changes to include/uapi (1 of 1 file). Show all
Unified · Split
| @@ -141,12 +141,17 @@ union drm_amdgpu_bo_list { · 140 unmodified lines | ||
| 141 | 141 | |
| 142 | 142 | /* GPU reset status */ |
| 143 | 143 | #define AMDGPU_CTX_NO_RESET 0 |
| 144 | −#define AMDGPU_CTX_GUILTY_RESET 1 /* this the context caused it */ | |
| 145 | −#define AMDGPU_CTX_INNOCENT_RESET 2 /* some other context caused it */ | |
| 146 | −#define AMDGPU_CTX_UNKNOWN_RESET 3 /* unknown cause */ | |
| 144 | +/* this the context caused it */ | |
| 145 | +#define AMDGPU_CTX_GUILTY_RESET 1 | |
| 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 | |
| 148 | 151 | struct drm_amdgpu_ctx_in { |
| 152 | + /** AMDGPU_CTX_OP_* */ | |
| 149 | 153 | uint32_t op; |
| 154 | + /** For future use, no flags defined so far */ | |
| 150 | 155 | uint32_t flags; |
| 151 | 156 | uint32_t ctx_id; |
| 152 | 157 | uint32_t _pad; |
| @@ -159,6 +164,7 @@ union drm_amdgpu_ctx_out { · 6 unmodified lines | ||
| 159 | 164 | } alloc; |
| 160 | 165 | |
| 161 | 166 | struct { |
| 167 | + /** For future use, no flags defined so far */ | |
| 162 | 168 | uint64_t flags; |
| 163 | 169 | /** Number of resets caused by this context so far. */ |
| 164 | 170 | uint32_t hangs; |
| @@ -185,7 +191,9 @@ union drm_amdgpu_ctx { · 20 unmodified lines | ||
| 185 | 191 | struct drm_amdgpu_gem_userptr { |
| 186 | 192 | uint64_t addr; |
| 187 | 193 | uint64_t size; |
| 194 | + /* AMDGPU_GEM_USERPTR_* */ | |
| 188 | 195 | uint32_t flags; |
| 196 | + /* Resulting GEM handle */ | |
| 189 | 197 | uint32_t handle; |
| 190 | 198 | }; |
| 191 | 199 | |
| @@ -217,23 +225,29 @@ struct drm_amdgpu_gem_userptr { · 25 unmodified lines | ||
| 217 | 225 | |
| 218 | 226 | /** The same structure is shared for input/output */ |
| 219 | 227 | struct drm_amdgpu_gem_metadata { |
| 220 | − uint32_t handle; /* GEM Object handle */ | |
| 221 | − uint32_t op; /** Do we want get or set metadata */ | |
| 228 | + /** GEM Object handle */ | |
| 229 | + uint32_t handle; | |
| 230 | + /** Do we want get or set metadata */ | |
| 231 | + uint32_t op; | |
| 222 | 232 | struct { |
| 233 | + /** For future use, no flags defined so far */ | |
| 223 | 234 | uint64_t flags; |
| 224 | − uint64_t tiling_info; /* family specific tiling info */ | |
| 235 | + /** family specific tiling info */ | |
| 236 | + uint64_t tiling_info; | |
| 225 | 237 | uint32_t data_size_bytes; |
| 226 | 238 | uint32_t data[64]; |
| 227 | 239 | } data; |
| 228 | 240 | }; |
| 229 | 241 | |
| 230 | 242 | struct drm_amdgpu_gem_mmap_in { |
| 231 | − uint32_t handle; /** the GEM object handle */ | |
| 243 | + /** the GEM object handle */ | |
| 244 | + uint32_t handle; | |
| 232 | 245 | uint32_t _pad; |
| 233 | 246 | }; |
| 234 | 247 | |
| 235 | 248 | struct 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 | |
| 239 | 253 | union drm_amdgpu_gem_mmap { |
| @@ -242,14 +256,19 @@ union drm_amdgpu_gem_mmap { · 2 unmodified lines | ||
| 242 | 256 | }; |
| 243 | 257 | |
| 244 | 258 | struct 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 | 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 | |
| 250 | 267 | struct drm_amdgpu_gem_wait_idle_out { |
| 251 | − uint32_t status; /* BO status: 0 - BO is idle, 1 - BO is busy */ | |
| 252 | − uint32_t domain; /* Returned current memory domain */ | |
| 268 | + /** BO status: 0 - BO is idle, 1 - BO is busy */ | |
| 269 | + uint32_t status; | |
| 270 | + /** Returned current memory domain */ | |
| 271 | + uint32_t domain; | |
| 253 | 272 | }; |
| 254 | 273 | |
| 255 | 274 | union drm_amdgpu_gem_wait_idle { |
| @@ -258,7 +277,9 @@ union drm_amdgpu_gem_wait_idle { · 2 unmodified lines | ||
| 258 | 277 | }; |
| 259 | 278 | |
| 260 | 279 | struct drm_amdgpu_wait_cs_in { |
| 280 | + /** Command submission handle */ | |
| 261 | 281 | uint64_t handle; |
| 282 | + /** Absolute timeout to wait */ | |
| 262 | 283 | uint64_t timeout; |
| 263 | 284 | uint32_t ip_type; |
| 264 | 285 | uint32_t ip_instance; |
| @@ -267,6 +288,7 @@ struct drm_amdgpu_wait_cs_in { · 2 unmodified lines | ||
| 267 | 288 | }; |
| 268 | 289 | |
| 269 | 290 | struct drm_amdgpu_wait_cs_out { |
| 291 | + /** CS status: 0 - CS completed, 1 - CS still busy */ | |
| 270 | 292 | uint64_t status; |
| 271 | 293 | }; |
| 272 | 294 | |
| @@ -275,16 +297,19 @@ union drm_amdgpu_wait_cs { · 2 unmodified lines | ||
| 275 | 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 | 303 | /* Sets or returns a value associated with a buffer. */ |
| 279 | 304 | struct drm_amdgpu_gem_op { |
| 280 | − uint32_t handle; /* buffer */ | |
| 281 | − uint32_t op; /* AMDGPU_GEM_OP_* */ | |
| 282 | − uint64_t value; /* input or return value */ | |
| 305 | + /** GEM object handle */ | |
| 306 | + uint32_t handle; | |
| 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 | 313 | #define AMDGPU_VA_OP_MAP 1 |
| 289 | 314 | #define AMDGPU_VA_OP_UNMAP 2 |
| 290 | 315 | |
| @@ -297,19 +322,18 @@ struct drm_amdgpu_gem_op { · 6 unmodified lines | ||
| 297 | 322 | #define AMDGPU_VM_PAGE_EXECUTABLE (1 << 3) |
| 298 | 323 | |
| 299 | 324 | struct drm_amdgpu_gem_va { |
| 300 | − /* GEM object handle */ | |
| 325 | + /** GEM object handle */ | |
| 301 | 326 | uint32_t handle; |
| 302 | 327 | uint32_t _pad; |
| 303 | − /* map or unmap*/ | |
| 328 | + /** AMDGPU_VA_OP_* */ | |
| 304 | 329 | uint32_t operation; |
| 305 | − /* specify mapping flags */ | |
| 330 | + /** AMDGPU_VM_PAGE_* */ | |
| 306 | 331 | uint32_t flags; |
| 307 | − /* va address to assign . Must be correctly aligned.*/ | |
| 332 | + /** va address to assign . Must be correctly aligned.*/ | |
| 308 | 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 | 335 | uint64_t offset_in_bo; |
| 311 | − /* Specify mapping size. If 0 and offset is 0 then map the whole BO.*/ | |
| 312 | − /* Must be correctly aligned. */ | |
| 336 | + /** Specify mapping size. Must be correctly aligned. */ | |
| 313 | 337 | uint64_t map_size; |
| 314 | 338 | }; |
| 315 | 339 | |
| @@ -324,6 +348,7 @@ struct drm_amdgpu_gem_va { · 8 unmodified lines | ||
| 324 | 348 | |
| 325 | 349 | #define AMDGPU_CHUNK_ID_IB 0x01 |
| 326 | 350 | #define AMDGPU_CHUNK_ID_FENCE 0x02 |
| 351 | + | |
| 327 | 352 | struct drm_amdgpu_cs_chunk { |
| 328 | 353 | uint32_t chunk_id; |
| 329 | 354 | uint32_t length_dw; |
| @@ -337,7 +362,7 @@ struct drm_amdgpu_cs_in { · 7 unmodified lines | ||
| 337 | 362 | uint32_t bo_list_handle; |
| 338 | 363 | uint32_t num_chunks; |
| 339 | 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 | 366 | uint64_t chunks; |
| 342 | 367 | }; |
| 343 | 368 | |
| @@ -346,8 +371,8 @@ struct drm_amdgpu_cs_out { · 2 unmodified lines | ||
| 346 | 371 | }; |
| 347 | 372 | |
| 348 | 373 | union drm_amdgpu_cs { |
| 349 | − struct drm_amdgpu_cs_in in; | |
| 350 | − struct drm_amdgpu_cs_out out; | |
| 374 | + struct drm_amdgpu_cs_in in; | |
| 375 | + struct drm_amdgpu_cs_out out; | |
| 351 | 376 | }; |
| 352 | 377 | |
| 353 | 378 | /* Specify flags to be used for IB */ |
| @@ -360,12 +385,18 @@ union drm_amdgpu_cs { · 6 unmodified lines | ||
| 360 | 385 | |
| 361 | 386 | struct drm_amdgpu_cs_chunk_ib { |
| 362 | 387 | uint32_t _pad; |
| 363 | − uint32_t flags; /* IB Flags */ | |
| 364 | − uint64_t va_start; /* Virtual address to begin IB execution */ | |
| 365 | − uint32_t ib_bytes; /* Size of submission */ | |
| 366 | − uint32_t ip_type; /* HW IP to submit to */ | |
| 367 | − uint32_t ip_instance; /* HW IP index of the same type to submit to */ | |
| 368 | − uint32_t ring; /* Ring index to submit to */ | |
| 388 | + /** AMDGPU_IB_FLAG_* */ | |
| 389 | + uint32_t flags; | |
| 390 | + /** Virtual address to begin IB execution */ | |
| 391 | + uint64_t va_start; | |
| 392 | + /** Size of submission */ | |
| 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 | |
| 371 | 402 | struct drm_amdgpu_cs_chunk_fence { |
| @@ -460,23 +491,28 @@ struct drm_amdgpu_info { · 88 unmodified lines | ||
| 460 | 491 | /** AMDGPU_HW_IP_* */ |
| 461 | 492 | uint32_t type; |
| 462 | 493 | /** |
| 463 | − * Index of the IP if there are more IPs of the same type. | |
| 464 | − * Ignored by AMDGPU_INFO_HW_IP_COUNT. | |
| 494 | + * Index of the IP if there are more IPs of the same | |
| 495 | + * type. Ignored by AMDGPU_INFO_HW_IP_COUNT. | |
| 465 | 496 | */ |
| 466 | 497 | uint32_t ip_instance; |
| 467 | 498 | } query_hw_ip; |
| 468 | 499 | |
| 469 | 500 | struct { |
| 470 | 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 | 504 | uint32_t instance; |
| 505 | + /** For future use, no flags defined so far */ | |
| 473 | 506 | uint32_t flags; |
| 474 | 507 | } read_mmr_reg; |
| 475 | 508 | |
| 476 | 509 | struct { |
| 477 | 510 | /** AMDGPU_INFO_FW_* */ |
| 478 | 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 | 516 | uint32_t ip_instance; |
| 481 | 517 | /** |
| 482 | 518 | * Index of the engine. Whether this is used depends |
| @@ -537,9 +573,10 @@ struct drm_amdgpu_info_device { · 54 unmodified lines | ||
| 537 | 573 | uint32_t family; |
| 538 | 574 | uint32_t num_shader_engines; |
| 539 | 575 | uint32_t num_shader_arrays_per_engine; |
| 540 | − uint32_t gpu_counter_freq; /* in KHz */ | |
| 541 | − uint64_t max_engine_clock; /* in KHz */ | |
| 542 | − uint64_t max_memory_clock; /* in KHz */ | |
| 576 | + /* in KHz */ | |
| 577 | + uint32_t gpu_counter_freq; | |
| 578 | + uint64_t max_engine_clock; | |
| 579 | + uint64_t max_memory_clock; | |
| 543 | 580 | /* cu information */ |
| 544 | 581 | uint32_t cu_active_number; |
| 545 | 582 | uint32_t cu_ao_mask; |