History

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’

Mikko Rapeli committed 10 years ago

Commit 2ce9dde1 parent f95d3aa1 file · +145 −145Browse files

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

Unified · Split

include/uapi/drm/amdgpu_drm.h+145−145
@@ -76,19 +76,19 @@ · 75 unmodified lines
7676
7777 struct drm_amdgpu_gem_create_in {
7878 /** the requested memory size */
79− uint64_t bo_size;
79+ __u64 bo_size;
8080 /** physical start_addr alignment in bytes for some HW requirements */
81− uint64_t alignment;
81+ __u64 alignment;
8282 /** the requested memory domains */
83− uint64_t domains;
83+ __u64 domains;
8484 /** allocation flags */
85− uint64_t domain_flags;
85+ __u64 domain_flags;
8686 };
8787
8888 struct drm_amdgpu_gem_create_out {
8989 /** returned GEM object handle */
90− uint32_t handle;
91− uint32_t _pad;
90+ __u32 handle;
91+ __u32 _pad;
9292 };
9393
9494 union drm_amdgpu_gem_create {
@@ -105,28 +105,28 @@ union drm_amdgpu_gem_create { · 10 unmodified lines
105105
106106 struct drm_amdgpu_bo_list_in {
107107 /** Type of operation */
108− uint32_t operation;
108+ __u32 operation;
109109 /** Handle of list or 0 if we want to create one */
110− uint32_t list_handle;
110+ __u32 list_handle;
111111 /** Number of BOs in list */
112− uint32_t bo_number;
112+ __u32 bo_number;
113113 /** Size of each element describing BO */
114− uint32_t bo_info_size;
114+ __u32 bo_info_size;
115115 /** Pointer to array describing BOs */
116− uint64_t bo_info_ptr;
116+ __u64 bo_info_ptr;
117117 };
118118
119119 struct drm_amdgpu_bo_list_entry {
120120 /** Handle of BO */
121− uint32_t bo_handle;
121+ __u32 bo_handle;
122122 /** New (if specified) BO priority to be used during migration */
123− uint32_t bo_priority;
123+ __u32 bo_priority;
124124 };
125125
126126 struct drm_amdgpu_bo_list_out {
127127 /** Handle of resource list */
128− uint32_t list_handle;
129− uint32_t _pad;
128+ __u32 list_handle;
129+ __u32 _pad;
130130 };
131131
132132 union drm_amdgpu_bo_list {
@@ -150,26 +150,26 @@ union drm_amdgpu_bo_list { · 17 unmodified lines
150150
151151 struct drm_amdgpu_ctx_in {
152152 /** AMDGPU_CTX_OP_* */
153− uint32_t op;
153+ __u32 op;
154154 /** 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;
158158 };
159159
160160 union drm_amdgpu_ctx_out {
161161 struct {
162− uint32_t ctx_id;
163− uint32_t _pad;
162+ __u32 ctx_id;
163+ __u32 _pad;
164164 } alloc;
165165
166166 struct {
167167 /** For future use, no flags defined so far */
168− uint64_t flags;
168+ __u64 flags;
169169 /** Number of resets caused by this context so far. */
170− uint32_t hangs;
170+ __u32 hangs;
171171 /** Reset status since the last call of the ioctl. */
172− uint32_t reset_status;
172+ __u32 reset_status;
173173 } state;
174174 };
175175
@@ -189,12 +189,12 @@ union drm_amdgpu_ctx { · 13 unmodified lines
189189 #define AMDGPU_GEM_USERPTR_REGISTER (1 << 3)
190190
191191 struct drm_amdgpu_gem_userptr {
192− uint64_t addr;
193− uint64_t size;
192+ __u64 addr;
193+ __u64 size;
194194 /* AMDGPU_GEM_USERPTR_* */
195− uint32_t flags;
195+ __u32 flags;
196196 /* Resulting GEM handle */
197− uint32_t handle;
197+ __u32 handle;
198198 };
199199
200200 /* same meaning as the GB_TILE_MODE and GL_MACRO_TILE_MODE fields */
@@ -226,28 +226,28 @@ struct drm_amdgpu_gem_userptr { · 25 unmodified lines
226226 /** The same structure is shared for input/output */
227227 struct drm_amdgpu_gem_metadata {
228228 /** GEM Object handle */
229− uint32_t handle;
229+ __u32 handle;
230230 /** Do we want get or set metadata */
231− uint32_t op;
231+ __u32 op;
232232 struct {
233233 /** For future use, no flags defined so far */
234− uint64_t flags;
234+ __u64 flags;
235235 /** 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];
239239 } data;
240240 };
241241
242242 struct drm_amdgpu_gem_mmap_in {
243243 /** the GEM object handle */
244− uint32_t handle;
245− uint32_t _pad;
244+ __u32 handle;
245+ __u32 _pad;
246246 };
247247
248248 struct drm_amdgpu_gem_mmap_out {
249249 /** mmap offset from the vma offset manager */
250− uint64_t addr_ptr;
250+ __u64 addr_ptr;
251251 };
252252
253253 union drm_amdgpu_gem_mmap {
@@ -257,18 +257,18 @@ union drm_amdgpu_gem_mmap { · 3 unmodified lines
257257
258258 struct drm_amdgpu_gem_wait_idle_in {
259259 /** GEM object handle */
260− uint32_t handle;
260+ __u32 handle;
261261 /** For future use, no flags defined so far */
262− uint32_t flags;
262+ __u32 flags;
263263 /** Absolute timeout to wait */
264− uint64_t timeout;
264+ __u64 timeout;
265265 };
266266
267267 struct drm_amdgpu_gem_wait_idle_out {
268268 /** BO status: 0 - BO is idle, 1 - BO is busy */
269− uint32_t status;
269+ __u32 status;
270270 /** Returned current memory domain */
271− uint32_t domain;
271+ __u32 domain;
272272 };
273273
274274 union drm_amdgpu_gem_wait_idle {
@@ -278,18 +278,18 @@ union drm_amdgpu_gem_wait_idle { · 3 unmodified lines
278278
279279 struct drm_amdgpu_wait_cs_in {
280280 /** Command submission handle */
281− uint64_t handle;
281+ __u64 handle;
282282 /** 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;
288288 };
289289
290290 struct drm_amdgpu_wait_cs_out {
291291 /** CS status: 0 - CS completed, 1 - CS still busy */
292− uint64_t status;
292+ __u64 status;
293293 };
294294
295295 union drm_amdgpu_wait_cs {
@@ -303,11 +303,11 @@ union drm_amdgpu_wait_cs { · 7 unmodified lines
303303 /* Sets or returns a value associated with a buffer. */
304304 struct drm_amdgpu_gem_op {
305305 /** GEM object handle */
306− uint32_t handle;
306+ __u32 handle;
307307 /** AMDGPU_GEM_OP_* */
308− uint32_t op;
308+ __u32 op;
309309 /** Input or return value */
310− uint64_t value;
310+ __u64 value;
311311 };
312312
313313 #define AMDGPU_VA_OP_MAP 1
@@ -326,18 +326,18 @@ struct drm_amdgpu_gem_op { · 12 unmodified lines
326326
327327 struct drm_amdgpu_gem_va {
328328 /** GEM object handle */
329− uint32_t handle;
330− uint32_t _pad;
329+ __u32 handle;
330+ __u32 _pad;
331331 /** AMDGPU_VA_OP_* */
332− uint32_t operation;
332+ __u32 operation;
333333 /** AMDGPU_VM_PAGE_* */
334− uint32_t flags;
334+ __u32 flags;
335335 /** va address to assign . Must be correctly aligned.*/
336− uint64_t va_address;
336+ __u64 va_address;
337337 /** Specify offset inside of BO to assign. Must be correctly aligned.*/
338− uint64_t offset_in_bo;
338+ __u64 offset_in_bo;
339339 /** Specify mapping size. Must be correctly aligned. */
340− uint64_t map_size;
340+ __u64 map_size;
341341 };
342342
343343 #define AMDGPU_HW_IP_GFX 0
@@ -354,24 +354,24 @@ struct drm_amdgpu_gem_va { · 10 unmodified lines
354354 #define AMDGPU_CHUNK_ID_DEPENDENCIES 0x03
355355
356356 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;
360360 };
361361
362362 struct drm_amdgpu_cs_in {
363363 /** Rendering context id */
364− uint32_t ctx_id;
364+ __u32 ctx_id;
365365 /** 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;
371371 };
372372
373373 struct drm_amdgpu_cs_out {
374− uint64_t handle;
374+ __u64 handle;
375375 };
376376
377377 union drm_amdgpu_cs {
@@ -388,32 +388,32 @@ union drm_amdgpu_cs { · 10 unmodified lines
388388 #define AMDGPU_IB_FLAG_PREAMBLE (1<<1)
389389
390390 struct drm_amdgpu_cs_chunk_ib {
391− uint32_t _pad;
391+ __u32 _pad;
392392 /** AMDGPU_IB_FLAG_* */
393− uint32_t flags;
393+ __u32 flags;
394394 /** Virtual address to begin IB execution */
395− uint64_t va_start;
395+ __u64 va_start;
396396 /** Size of submission */
397− uint32_t ib_bytes;
397+ __u32 ib_bytes;
398398 /** HW IP to submit to */
399− uint32_t ip_type;
399+ __u32 ip_type;
400400 /** HW IP index of the same type to submit to */
401− uint32_t ip_instance;
401+ __u32 ip_instance;
402402 /** Ring index to submit to */
403− uint32_t ring;
403+ __u32 ring;
404404 };
405405
406406 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;
412412 };
413413
414414 struct drm_amdgpu_cs_chunk_fence {
415− uint32_t handle;
416− uint32_t offset;
415+ __u32 handle;
416+ __u32 offset;
417417 };
418418
419419 struct drm_amdgpu_cs_chunk_data {
@@ -486,83 +486,83 @@ struct drm_amdgpu_cs_chunk_data { · 66 unmodified lines
486486 /* Input structure for the INFO ioctl */
487487 struct drm_amdgpu_info {
488488 /* Where the return value will be stored */
489− uint64_t return_pointer;
489+ __u64 return_pointer;
490490 /* The size of the return value. Just like "size" in "snprintf",
491491 * it limits how many bytes the kernel can write. */
492− uint32_t return_size;
492+ __u32 return_size;
493493 /* The query request id. */
494− uint32_t query;
494+ __u32 query;
495495
496496 union {
497497 struct {
498− uint32_t id;
499− uint32_t _pad;
498+ __u32 id;
499+ __u32 _pad;
500500 } mode_crtc;
501501
502502 struct {
503503 /** AMDGPU_HW_IP_* */
504− uint32_t type;
504+ __u32 type;
505505 /**
506506 * Index of the IP if there are more IPs of the same
507507 * type. Ignored by AMDGPU_INFO_HW_IP_COUNT.
508508 */
509− uint32_t ip_instance;
509+ __u32 ip_instance;
510510 } query_hw_ip;
511511
512512 struct {
513− uint32_t dword_offset;
513+ __u32 dword_offset;
514514 /** number of registers to read */
515− uint32_t count;
516− uint32_t instance;
515+ __u32 count;
516+ __u32 instance;
517517 /** For future use, no flags defined so far */
518− uint32_t flags;
518+ __u32 flags;
519519 } read_mmr_reg;
520520
521521 struct {
522522 /** AMDGPU_INFO_FW_* */
523− uint32_t fw_type;
523+ __u32 fw_type;
524524 /**
525525 * Index of the IP if there are more IPs of
526526 * the same type.
527527 */
528− uint32_t ip_instance;
528+ __u32 ip_instance;
529529 /**
530530 * Index of the engine. Whether this is used depends
531531 * on the firmware type. (e.g. MEC, SDMA)
532532 */
533− uint32_t index;
534− uint32_t _pad;
533+ __u32 index;
534+ __u32 _pad;
535535 } query_fw;
536536 };
537537 };
538538
539539 struct drm_amdgpu_info_gds {
540540 /** GDS GFX partition size */
541− uint32_t gds_gfx_partition_size;
541+ __u32 gds_gfx_partition_size;
542542 /** GDS compute partition size */
543− uint32_t compute_partition_size;
543+ __u32 compute_partition_size;
544544 /** total GDS memory size */
545− uint32_t gds_total_size;
545+ __u32 gds_total_size;
546546 /** GWS size per GFX partition */
547− uint32_t gws_per_gfx_partition;
547+ __u32 gws_per_gfx_partition;
548548 /** GSW size per compute partition */
549− uint32_t gws_per_compute_partition;
549+ __u32 gws_per_compute_partition;
550550 /** OA size per GFX partition */
551− uint32_t oa_per_gfx_partition;
551+ __u32 oa_per_gfx_partition;
552552 /** 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;
555555 };
556556
557557 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;
561561 };
562562
563563 struct drm_amdgpu_info_firmware {
564− uint32_t ver;
565− uint32_t feature;
564+ __u32 ver;
565+ __u32 feature;
566566 };
567567
568568 #define AMDGPU_VRAM_TYPE_UNKNOWN 0
@@ -576,61 +576,61 @@ struct drm_amdgpu_info_firmware { · 7 unmodified lines
576576
577577 struct drm_amdgpu_info_device {
578578 /** PCI Device ID */
579− uint32_t device_id;
579+ __u32 device_id;
580580 /** Internal chip revision: A0, A1, etc.) */
581− uint32_t chip_rev;
582− uint32_t external_rev;
581+ __u32 chip_rev;
582+ __u32 external_rev;
583583 /** 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;
588588 /* 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;
592592 /* 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];
596596 /** 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;
602602 /** Starting virtual address for UMDs. */
603− uint64_t virtual_address_offset;
603+ __u64 virtual_address_offset;
604604 /** The maximum virtual address */
605− uint64_t virtual_address_max;
605+ __u64 virtual_address_max;
606606 /** Required alignment of virtual addresses. */
607− uint32_t virtual_address_alignment;
607+ __u32 virtual_address_alignment;
608608 /** 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;
611611 /** constant engine ram size*/
612− uint32_t ce_ram_size;
612+ __u32 ce_ram_size;
613613 /** video memory type info*/
614− uint32_t vram_type;
614+ __u32 vram_type;
615615 /** video memory bit width*/
616− uint32_t vram_bit_width;
616+ __u32 vram_bit_width;
617617 /* vce harvesting instance */
618− uint32_t vce_harvest_config;
618+ __u32 vce_harvest_config;
619619 };
620620
621621 struct drm_amdgpu_info_hw_ip {
622622 /** 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;
625625 /** Capabilities */
626− uint64_t capabilities_flags;
626+ __u64 capabilities_flags;
627627 /** command buffer address start alignment*/
628− uint32_t ib_start_alignment;
628+ __u32 ib_start_alignment;
629629 /** command buffer size alignment*/
630− uint32_t ib_size_alignment;
630+ __u32 ib_size_alignment;
631631 /** 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;
634634 };
635635
636636 /*

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t