Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

include/uapi/drm/amdgpu_drm.h: use __u32 and __u64 from <linux/types.h>

Kernel headers exported to userspace are supposed to use these.

Fixes compilation errors in userspace:

error: unknown type name ‘uint64_t’
error: unknown type name ‘uint32_t’

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>

authored by

Mikko Rapeli and committed by
Gabriel Laskar
2ce9dde0 f95d3aa4

+145 -145
+145 -145
include/uapi/drm/amdgpu_drm.h
··· 76 76 77 77 struct drm_amdgpu_gem_create_in { 78 78 /** the requested memory size */ 79 - uint64_t bo_size; 79 + __u64 bo_size; 80 80 /** physical start_addr alignment in bytes for some HW requirements */ 81 - uint64_t alignment; 81 + __u64 alignment; 82 82 /** the requested memory domains */ 83 - uint64_t domains; 83 + __u64 domains; 84 84 /** allocation flags */ 85 - uint64_t domain_flags; 85 + __u64 domain_flags; 86 86 }; 87 87 88 88 struct drm_amdgpu_gem_create_out { 89 89 /** returned GEM object handle */ 90 - uint32_t handle; 91 - uint32_t _pad; 90 + __u32 handle; 91 + __u32 _pad; 92 92 }; 93 93 94 94 union drm_amdgpu_gem_create { ··· 105 105 106 106 struct drm_amdgpu_bo_list_in { 107 107 /** Type of operation */ 108 - uint32_t operation; 108 + __u32 operation; 109 109 /** Handle of list or 0 if we want to create one */ 110 - uint32_t list_handle; 110 + __u32 list_handle; 111 111 /** Number of BOs in list */ 112 - uint32_t bo_number; 112 + __u32 bo_number; 113 113 /** Size of each element describing BO */ 114 - uint32_t bo_info_size; 114 + __u32 bo_info_size; 115 115 /** Pointer to array describing BOs */ 116 - uint64_t bo_info_ptr; 116 + __u64 bo_info_ptr; 117 117 }; 118 118 119 119 struct drm_amdgpu_bo_list_entry { 120 120 /** Handle of BO */ 121 - uint32_t bo_handle; 121 + __u32 bo_handle; 122 122 /** New (if specified) BO priority to be used during migration */ 123 - uint32_t bo_priority; 123 + __u32 bo_priority; 124 124 }; 125 125 126 126 struct drm_amdgpu_bo_list_out { 127 127 /** Handle of resource list */ 128 - uint32_t list_handle; 129 - uint32_t _pad; 128 + __u32 list_handle; 129 + __u32 _pad; 130 130 }; 131 131 132 132 union drm_amdgpu_bo_list { ··· 150 150 151 151 struct drm_amdgpu_ctx_in { 152 152 /** AMDGPU_CTX_OP_* */ 153 - uint32_t op; 153 + __u32 op; 154 154 /** For future use, no flags defined so far */ 155 - uint32_t flags; 156 - uint32_t ctx_id; 157 - uint32_t _pad; 155 + __u32 flags; 156 + __u32 ctx_id; 157 + __u32 _pad; 158 158 }; 159 159 160 160 union drm_amdgpu_ctx_out { 161 161 struct { 162 - uint32_t ctx_id; 163 - uint32_t _pad; 162 + __u32 ctx_id; 163 + __u32 _pad; 164 164 } alloc; 165 165 166 166 struct { 167 167 /** For future use, no flags defined so far */ 168 - uint64_t flags; 168 + __u64 flags; 169 169 /** Number of resets caused by this context so far. */ 170 - uint32_t hangs; 170 + __u32 hangs; 171 171 /** Reset status since the last call of the ioctl. */ 172 - uint32_t reset_status; 172 + __u32 reset_status; 173 173 } state; 174 174 }; 175 175 ··· 189 189 #define AMDGPU_GEM_USERPTR_REGISTER (1 << 3) 190 190 191 191 struct drm_amdgpu_gem_userptr { 192 - uint64_t addr; 193 - uint64_t size; 192 + __u64 addr; 193 + __u64 size; 194 194 /* AMDGPU_GEM_USERPTR_* */ 195 - uint32_t flags; 195 + __u32 flags; 196 196 /* Resulting GEM handle */ 197 - uint32_t handle; 197 + __u32 handle; 198 198 }; 199 199 200 200 /* same meaning as the GB_TILE_MODE and GL_MACRO_TILE_MODE fields */ ··· 226 226 /** The same structure is shared for input/output */ 227 227 struct drm_amdgpu_gem_metadata { 228 228 /** GEM Object handle */ 229 - uint32_t handle; 229 + __u32 handle; 230 230 /** Do we want get or set metadata */ 231 - uint32_t op; 231 + __u32 op; 232 232 struct { 233 233 /** For future use, no flags defined so far */ 234 - uint64_t flags; 234 + __u64 flags; 235 235 /** family specific tiling info */ 236 - uint64_t tiling_info; 237 - uint32_t data_size_bytes; 238 - uint32_t data[64]; 236 + __u64 tiling_info; 237 + __u32 data_size_bytes; 238 + __u32 data[64]; 239 239 } data; 240 240 }; 241 241 242 242 struct drm_amdgpu_gem_mmap_in { 243 243 /** the GEM object handle */ 244 - uint32_t handle; 245 - uint32_t _pad; 244 + __u32 handle; 245 + __u32 _pad; 246 246 }; 247 247 248 248 struct drm_amdgpu_gem_mmap_out { 249 249 /** mmap offset from the vma offset manager */ 250 - uint64_t addr_ptr; 250 + __u64 addr_ptr; 251 251 }; 252 252 253 253 union drm_amdgpu_gem_mmap { ··· 257 257 258 258 struct drm_amdgpu_gem_wait_idle_in { 259 259 /** GEM object handle */ 260 - uint32_t handle; 260 + __u32 handle; 261 261 /** For future use, no flags defined so far */ 262 - uint32_t flags; 262 + __u32 flags; 263 263 /** Absolute timeout to wait */ 264 - uint64_t timeout; 264 + __u64 timeout; 265 265 }; 266 266 267 267 struct drm_amdgpu_gem_wait_idle_out { 268 268 /** BO status: 0 - BO is idle, 1 - BO is busy */ 269 - uint32_t status; 269 + __u32 status; 270 270 /** Returned current memory domain */ 271 - uint32_t domain; 271 + __u32 domain; 272 272 }; 273 273 274 274 union drm_amdgpu_gem_wait_idle { ··· 278 278 279 279 struct drm_amdgpu_wait_cs_in { 280 280 /** Command submission handle */ 281 - uint64_t handle; 281 + __u64 handle; 282 282 /** Absolute timeout to wait */ 283 - uint64_t timeout; 284 - uint32_t ip_type; 285 - uint32_t ip_instance; 286 - uint32_t ring; 287 - uint32_t ctx_id; 283 + __u64 timeout; 284 + __u32 ip_type; 285 + __u32 ip_instance; 286 + __u32 ring; 287 + __u32 ctx_id; 288 288 }; 289 289 290 290 struct drm_amdgpu_wait_cs_out { 291 291 /** CS status: 0 - CS completed, 1 - CS still busy */ 292 - uint64_t status; 292 + __u64 status; 293 293 }; 294 294 295 295 union drm_amdgpu_wait_cs { ··· 303 303 /* Sets or returns a value associated with a buffer. */ 304 304 struct drm_amdgpu_gem_op { 305 305 /** GEM object handle */ 306 - uint32_t handle; 306 + __u32 handle; 307 307 /** AMDGPU_GEM_OP_* */ 308 - uint32_t op; 308 + __u32 op; 309 309 /** Input or return value */ 310 - uint64_t value; 310 + __u64 value; 311 311 }; 312 312 313 313 #define AMDGPU_VA_OP_MAP 1 ··· 326 326 327 327 struct drm_amdgpu_gem_va { 328 328 /** GEM object handle */ 329 - uint32_t handle; 330 - uint32_t _pad; 329 + __u32 handle; 330 + __u32 _pad; 331 331 /** AMDGPU_VA_OP_* */ 332 - uint32_t operation; 332 + __u32 operation; 333 333 /** AMDGPU_VM_PAGE_* */ 334 - uint32_t flags; 334 + __u32 flags; 335 335 /** va address to assign . Must be correctly aligned.*/ 336 - uint64_t va_address; 336 + __u64 va_address; 337 337 /** Specify offset inside of BO to assign. Must be correctly aligned.*/ 338 - uint64_t offset_in_bo; 338 + __u64 offset_in_bo; 339 339 /** Specify mapping size. Must be correctly aligned. */ 340 - uint64_t map_size; 340 + __u64 map_size; 341 341 }; 342 342 343 343 #define AMDGPU_HW_IP_GFX 0 ··· 354 354 #define AMDGPU_CHUNK_ID_DEPENDENCIES 0x03 355 355 356 356 struct drm_amdgpu_cs_chunk { 357 - uint32_t chunk_id; 358 - uint32_t length_dw; 359 - uint64_t chunk_data; 357 + __u32 chunk_id; 358 + __u32 length_dw; 359 + __u64 chunk_data; 360 360 }; 361 361 362 362 struct drm_amdgpu_cs_in { 363 363 /** Rendering context id */ 364 - uint32_t ctx_id; 364 + __u32 ctx_id; 365 365 /** Handle of resource list associated with CS */ 366 - uint32_t bo_list_handle; 367 - uint32_t num_chunks; 368 - uint32_t _pad; 369 - /** this points to uint64_t * which point to cs chunks */ 370 - uint64_t chunks; 366 + __u32 bo_list_handle; 367 + __u32 num_chunks; 368 + __u32 _pad; 369 + /** this points to __u64 * which point to cs chunks */ 370 + __u64 chunks; 371 371 }; 372 372 373 373 struct drm_amdgpu_cs_out { 374 - uint64_t handle; 374 + __u64 handle; 375 375 }; 376 376 377 377 union drm_amdgpu_cs { ··· 388 388 #define AMDGPU_IB_FLAG_PREAMBLE (1<<1) 389 389 390 390 struct drm_amdgpu_cs_chunk_ib { 391 - uint32_t _pad; 391 + __u32 _pad; 392 392 /** AMDGPU_IB_FLAG_* */ 393 - uint32_t flags; 393 + __u32 flags; 394 394 /** Virtual address to begin IB execution */ 395 - uint64_t va_start; 395 + __u64 va_start; 396 396 /** Size of submission */ 397 - uint32_t ib_bytes; 397 + __u32 ib_bytes; 398 398 /** HW IP to submit to */ 399 - uint32_t ip_type; 399 + __u32 ip_type; 400 400 /** HW IP index of the same type to submit to */ 401 - uint32_t ip_instance; 401 + __u32 ip_instance; 402 402 /** Ring index to submit to */ 403 - uint32_t ring; 403 + __u32 ring; 404 404 }; 405 405 406 406 struct drm_amdgpu_cs_chunk_dep { 407 - uint32_t ip_type; 408 - uint32_t ip_instance; 409 - uint32_t ring; 410 - uint32_t ctx_id; 411 - uint64_t handle; 407 + __u32 ip_type; 408 + __u32 ip_instance; 409 + __u32 ring; 410 + __u32 ctx_id; 411 + __u64 handle; 412 412 }; 413 413 414 414 struct drm_amdgpu_cs_chunk_fence { 415 - uint32_t handle; 416 - uint32_t offset; 415 + __u32 handle; 416 + __u32 offset; 417 417 }; 418 418 419 419 struct drm_amdgpu_cs_chunk_data { ··· 486 486 /* Input structure for the INFO ioctl */ 487 487 struct drm_amdgpu_info { 488 488 /* Where the return value will be stored */ 489 - uint64_t return_pointer; 489 + __u64 return_pointer; 490 490 /* The size of the return value. Just like "size" in "snprintf", 491 491 * it limits how many bytes the kernel can write. */ 492 - uint32_t return_size; 492 + __u32 return_size; 493 493 /* The query request id. */ 494 - uint32_t query; 494 + __u32 query; 495 495 496 496 union { 497 497 struct { 498 - uint32_t id; 499 - uint32_t _pad; 498 + __u32 id; 499 + __u32 _pad; 500 500 } mode_crtc; 501 501 502 502 struct { 503 503 /** AMDGPU_HW_IP_* */ 504 - uint32_t type; 504 + __u32 type; 505 505 /** 506 506 * Index of the IP if there are more IPs of the same 507 507 * type. Ignored by AMDGPU_INFO_HW_IP_COUNT. 508 508 */ 509 - uint32_t ip_instance; 509 + __u32 ip_instance; 510 510 } query_hw_ip; 511 511 512 512 struct { 513 - uint32_t dword_offset; 513 + __u32 dword_offset; 514 514 /** number of registers to read */ 515 - uint32_t count; 516 - uint32_t instance; 515 + __u32 count; 516 + __u32 instance; 517 517 /** For future use, no flags defined so far */ 518 - uint32_t flags; 518 + __u32 flags; 519 519 } read_mmr_reg; 520 520 521 521 struct { 522 522 /** AMDGPU_INFO_FW_* */ 523 - uint32_t fw_type; 523 + __u32 fw_type; 524 524 /** 525 525 * Index of the IP if there are more IPs of 526 526 * the same type. 527 527 */ 528 - uint32_t ip_instance; 528 + __u32 ip_instance; 529 529 /** 530 530 * Index of the engine. Whether this is used depends 531 531 * on the firmware type. (e.g. MEC, SDMA) 532 532 */ 533 - uint32_t index; 534 - uint32_t _pad; 533 + __u32 index; 534 + __u32 _pad; 535 535 } query_fw; 536 536 }; 537 537 }; 538 538 539 539 struct drm_amdgpu_info_gds { 540 540 /** GDS GFX partition size */ 541 - uint32_t gds_gfx_partition_size; 541 + __u32 gds_gfx_partition_size; 542 542 /** GDS compute partition size */ 543 - uint32_t compute_partition_size; 543 + __u32 compute_partition_size; 544 544 /** total GDS memory size */ 545 - uint32_t gds_total_size; 545 + __u32 gds_total_size; 546 546 /** GWS size per GFX partition */ 547 - uint32_t gws_per_gfx_partition; 547 + __u32 gws_per_gfx_partition; 548 548 /** GSW size per compute partition */ 549 - uint32_t gws_per_compute_partition; 549 + __u32 gws_per_compute_partition; 550 550 /** OA size per GFX partition */ 551 - uint32_t oa_per_gfx_partition; 551 + __u32 oa_per_gfx_partition; 552 552 /** OA size per compute partition */ 553 - uint32_t oa_per_compute_partition; 554 - uint32_t _pad; 553 + __u32 oa_per_compute_partition; 554 + __u32 _pad; 555 555 }; 556 556 557 557 struct drm_amdgpu_info_vram_gtt { 558 - uint64_t vram_size; 559 - uint64_t vram_cpu_accessible_size; 560 - uint64_t gtt_size; 558 + __u64 vram_size; 559 + __u64 vram_cpu_accessible_size; 560 + __u64 gtt_size; 561 561 }; 562 562 563 563 struct drm_amdgpu_info_firmware { 564 - uint32_t ver; 565 - uint32_t feature; 564 + __u32 ver; 565 + __u32 feature; 566 566 }; 567 567 568 568 #define AMDGPU_VRAM_TYPE_UNKNOWN 0 ··· 576 576 577 577 struct drm_amdgpu_info_device { 578 578 /** PCI Device ID */ 579 - uint32_t device_id; 579 + __u32 device_id; 580 580 /** Internal chip revision: A0, A1, etc.) */ 581 - uint32_t chip_rev; 582 - uint32_t external_rev; 581 + __u32 chip_rev; 582 + __u32 external_rev; 583 583 /** Revision id in PCI Config space */ 584 - uint32_t pci_rev; 585 - uint32_t family; 586 - uint32_t num_shader_engines; 587 - uint32_t num_shader_arrays_per_engine; 584 + __u32 pci_rev; 585 + __u32 family; 586 + __u32 num_shader_engines; 587 + __u32 num_shader_arrays_per_engine; 588 588 /* in KHz */ 589 - uint32_t gpu_counter_freq; 590 - uint64_t max_engine_clock; 591 - uint64_t max_memory_clock; 589 + __u32 gpu_counter_freq; 590 + __u64 max_engine_clock; 591 + __u64 max_memory_clock; 592 592 /* cu information */ 593 - uint32_t cu_active_number; 594 - uint32_t cu_ao_mask; 595 - uint32_t cu_bitmap[4][4]; 593 + __u32 cu_active_number; 594 + __u32 cu_ao_mask; 595 + __u32 cu_bitmap[4][4]; 596 596 /** Render backend pipe mask. One render backend is CB+DB. */ 597 - uint32_t enabled_rb_pipes_mask; 598 - uint32_t num_rb_pipes; 599 - uint32_t num_hw_gfx_contexts; 600 - uint32_t _pad; 601 - uint64_t ids_flags; 597 + __u32 enabled_rb_pipes_mask; 598 + __u32 num_rb_pipes; 599 + __u32 num_hw_gfx_contexts; 600 + __u32 _pad; 601 + __u64 ids_flags; 602 602 /** Starting virtual address for UMDs. */ 603 - uint64_t virtual_address_offset; 603 + __u64 virtual_address_offset; 604 604 /** The maximum virtual address */ 605 - uint64_t virtual_address_max; 605 + __u64 virtual_address_max; 606 606 /** Required alignment of virtual addresses. */ 607 - uint32_t virtual_address_alignment; 607 + __u32 virtual_address_alignment; 608 608 /** Page table entry - fragment size */ 609 - uint32_t pte_fragment_size; 610 - uint32_t gart_page_size; 609 + __u32 pte_fragment_size; 610 + __u32 gart_page_size; 611 611 /** constant engine ram size*/ 612 - uint32_t ce_ram_size; 612 + __u32 ce_ram_size; 613 613 /** video memory type info*/ 614 - uint32_t vram_type; 614 + __u32 vram_type; 615 615 /** video memory bit width*/ 616 - uint32_t vram_bit_width; 616 + __u32 vram_bit_width; 617 617 /* vce harvesting instance */ 618 - uint32_t vce_harvest_config; 618 + __u32 vce_harvest_config; 619 619 }; 620 620 621 621 struct drm_amdgpu_info_hw_ip { 622 622 /** Version of h/w IP */ 623 - uint32_t hw_ip_version_major; 624 - uint32_t hw_ip_version_minor; 623 + __u32 hw_ip_version_major; 624 + __u32 hw_ip_version_minor; 625 625 /** Capabilities */ 626 - uint64_t capabilities_flags; 626 + __u64 capabilities_flags; 627 627 /** command buffer address start alignment*/ 628 - uint32_t ib_start_alignment; 628 + __u32 ib_start_alignment; 629 629 /** command buffer size alignment*/ 630 - uint32_t ib_size_alignment; 630 + __u32 ib_size_alignment; 631 631 /** Bitmask of available rings. Bit 0 means ring 0, etc. */ 632 - uint32_t available_rings; 633 - uint32_t _pad; 632 + __u32 available_rings; 633 + __u32 _pad; 634 634 }; 635 635 636 636 /*