History

include/uapi/drm/vmwgfx_drm.h: use __s32, __u32 and __u64 from linux/types.h

Fixes userspace compilation errors like: error: unknown type name ‘uint32_t’

Mikko Rapeli committed 11 years ago

Commit 21de2fd1 parent 5b8573f1 file · +132 −132Browse files

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

Unified · Split

include/uapi/drm/vmwgfx_drm.h+132−132
@@ -111,9 +111,9 @@ enum drm_vmw_handle_type { · 110 unmodified lines
111111 */
112112
113113 struct drm_vmw_getparam_arg {
114− uint64_t value;
115− uint32_t param;
116− uint32_t pad64;
114+ __u64 value;
115+ __u32 param;
116+ __u32 pad64;
117117 };
118118
119119 /*************************************************************************/
@@ -134,8 +134,8 @@ struct drm_vmw_getparam_arg { · 14 unmodified lines
134134 */
135135
136136 struct drm_vmw_context_arg {
137− int32_t cid;
138− uint32_t pad64;
137+ __s32 cid;
138+ __u32 pad64;
139139 };
140140
141141 /*************************************************************************/
@@ -165,7 +165,7 @@ struct drm_vmw_context_arg { · 23 unmodified lines
165165 * @mip_levels: Number of mip levels for each face.
166166 * An unused face should have 0 encoded.
167167 * @size_addr: Address of a user-space array of sruct drm_vmw_size
168− * cast to an uint64_t for 32-64 bit compatibility.
168+ * cast to an __u64 for 32-64 bit compatibility.
169169 * The size of the array should equal the total number of mipmap levels.
170170 * @shareable: Boolean whether other clients (as identified by file descriptors)
171171 * may reference this surface.
@@ -177,12 +177,12 @@ struct drm_vmw_context_arg { · 5 unmodified lines
177177 */
178178
179179 struct drm_vmw_surface_create_req {
180− uint32_t flags;
181− uint32_t format;
182− uint32_t mip_levels[DRM_VMW_MAX_SURFACE_FACES];
183− uint64_t size_addr;
184− int32_t shareable;
185− int32_t scanout;
180+ __u32 flags;
181+ __u32 format;
182+ __u32 mip_levels[DRM_VMW_MAX_SURFACE_FACES];
183+ __u64 size_addr;
184+ __s32 shareable;
185+ __s32 scanout;
186186 };
187187
188188 /**
@@ -197,7 +197,7 @@ struct drm_vmw_surface_create_req { · 8 unmodified lines
197197 */
198198
199199 struct drm_vmw_surface_arg {
200− int32_t sid;
200+ __s32 sid;
201201 enum drm_vmw_handle_type handle_type;
202202 };
203203
@@ -213,10 +213,10 @@ struct drm_vmw_surface_arg { · 9 unmodified lines
213213 */
214214
215215 struct drm_vmw_size {
216− uint32_t width;
217− uint32_t height;
218− uint32_t depth;
219− uint32_t pad64;
216+ __u32 width;
217+ __u32 height;
218+ __u32 depth;
219+ __u32 pad64;
220220 };
221221
222222 /**
@@ -284,13 +284,13 @@ union drm_vmw_surface_reference_arg { · 61 unmodified lines
284284 /**
285285 * struct drm_vmw_execbuf_arg
286286 *
287− * @commands: User-space address of a command buffer cast to an uint64_t.
287+ * @commands: User-space address of a command buffer cast to an __u64.
288288 * @command-size: Size in bytes of the command buffer.
289289 * @throttle-us: Sleep until software is less than @throttle_us
290290 * microseconds ahead of hardware. The driver may round this value
291291 * to the nearest kernel tick.
292292 * @fence_rep: User-space address of a struct drm_vmw_fence_rep cast to an
293− * uint64_t.
293+ * __u64.
294294 * @version: Allows expanding the execbuf ioctl parameters without breaking
295295 * backwards compatibility, since user-space will always tell the kernel
296296 * which version it uses.
@@ -302,14 +302,14 @@ union drm_vmw_surface_reference_arg { · 5 unmodified lines
302302 #define DRM_VMW_EXECBUF_VERSION 2
303303
304304 struct drm_vmw_execbuf_arg {
305− uint64_t commands;
306− uint32_t command_size;
307− uint32_t throttle_us;
308− uint64_t fence_rep;
309− uint32_t version;
310− uint32_t flags;
311− uint32_t context_handle;
312− uint32_t pad64;
305+ __u64 commands;
306+ __u32 command_size;
307+ __u32 throttle_us;
308+ __u64 fence_rep;
309+ __u32 version;
310+ __u32 flags;
311+ __u32 context_handle;
312+ __u32 pad64;
313313 };
314314
315315 /**
@@ -338,12 +338,12 @@ struct drm_vmw_execbuf_arg { · 22 unmodified lines
338338 */
339339
340340 struct drm_vmw_fence_rep {
341− uint32_t handle;
342− uint32_t mask;
343− uint32_t seqno;
344− uint32_t passed_seqno;
345− uint32_t pad64;
346− int32_t error;
341+ __u32 handle;
342+ __u32 mask;
343+ __u32 seqno;
344+ __u32 passed_seqno;
345+ __u32 pad64;
346+ __s32 error;
347347 };
348348
349349 /*************************************************************************/
@@ -373,8 +373,8 @@ struct drm_vmw_fence_rep { · 23 unmodified lines
373373 */
374374
375375 struct drm_vmw_alloc_dmabuf_req {
376− uint32_t size;
377− uint32_t pad64;
376+ __u32 size;
377+ __u32 pad64;
378378 };
379379
380380 /**
@@ -391,11 +391,11 @@ struct drm_vmw_alloc_dmabuf_req { · 10 unmodified lines
391391 */
392392
393393 struct drm_vmw_dmabuf_rep {
394− uint64_t map_handle;
395− uint32_t handle;
396− uint32_t cur_gmr_id;
397− uint32_t cur_gmr_offset;
398− uint32_t pad64;
394+ __u64 map_handle;
395+ __u32 handle;
396+ __u32 cur_gmr_id;
397+ __u32 cur_gmr_offset;
398+ __u32 pad64;
399399 };
400400
401401 /**
@@ -428,8 +428,8 @@ union drm_vmw_alloc_dmabuf_arg { · 26 unmodified lines
428428 */
429429
430430 struct drm_vmw_unref_dmabuf_arg {
431− uint32_t handle;
432− uint32_t pad64;
431+ __u32 handle;
432+ __u32 pad64;
433433 };
434434
435435 /*************************************************************************/
@@ -452,10 +452,10 @@ struct drm_vmw_unref_dmabuf_arg { · 16 unmodified lines
452452 */
453453
454454 struct drm_vmw_rect {
455− int32_t x;
456− int32_t y;
457− uint32_t w;
458− uint32_t h;
455+ __s32 x;
456+ __s32 y;
457+ __u32 w;
458+ __u32 h;
459459 };
460460
461461 /**
@@ -477,21 +477,21 @@ struct drm_vmw_rect { · 15 unmodified lines
477477 */
478478
479479 struct drm_vmw_control_stream_arg {
480− uint32_t stream_id;
481− uint32_t enabled;
480+ __u32 stream_id;
481+ __u32 enabled;
482482
483− uint32_t flags;
484− uint32_t color_key;
483+ __u32 flags;
484+ __u32 color_key;
485485
486− uint32_t handle;
487− uint32_t offset;
488− int32_t format;
489− uint32_t size;
490− uint32_t width;
491− uint32_t height;
492− uint32_t pitch[3];
486+ __u32 handle;
487+ __u32 offset;
488+ __s32 format;
489+ __u32 size;
490+ __u32 width;
491+ __u32 height;
492+ __u32 pitch[3];
493493
494− uint32_t pad64;
494+ __u32 pad64;
495495 struct drm_vmw_rect src;
496496 struct drm_vmw_rect dst;
497497 };
@@ -519,12 +519,12 @@ struct drm_vmw_control_stream_arg { · 21 unmodified lines
519519 */
520520
521521 struct drm_vmw_cursor_bypass_arg {
522− uint32_t flags;
523− uint32_t crtc_id;
524− int32_t xpos;
525− int32_t ypos;
526− int32_t xhot;
527− int32_t yhot;
522+ __u32 flags;
523+ __u32 crtc_id;
524+ __s32 xpos;
525+ __s32 ypos;
526+ __s32 xhot;
527+ __s32 yhot;
528528 };
529529
530530 /*************************************************************************/
@@ -542,8 +542,8 @@ struct drm_vmw_cursor_bypass_arg { · 11 unmodified lines
542542 */
543543
544544 struct drm_vmw_stream_arg {
545− uint32_t stream_id;
546− uint32_t pad64;
545+ __u32 stream_id;
546+ __u32 pad64;
547547 };
548548
549549 /*************************************************************************/
@@ -565,7 +565,7 @@ struct drm_vmw_stream_arg { · 15 unmodified lines
565565 /**
566566 * struct drm_vmw_get_3d_cap_arg
567567 *
568− * @buffer: Pointer to a buffer for capability data, cast to an uint64_t
568+ * @buffer: Pointer to a buffer for capability data, cast to an __u64
569569 * @size: Max size to copy
570570 *
571571 * Input argument to the DRM_VMW_GET_3D_CAP_IOCTL
@@ -573,9 +573,9 @@ struct drm_vmw_stream_arg { · 1 unmodified line
573573 */
574574
575575 struct drm_vmw_get_3d_cap_arg {
576− uint64_t buffer;
577− uint32_t max_size;
578− uint32_t pad64;
576+ __u64 buffer;
577+ __u32 max_size;
578+ __u32 pad64;
579579 };
580580
581581 /*************************************************************************/
@@ -624,14 +624,14 @@ struct drm_vmw_get_3d_cap_arg { · 42 unmodified lines
624624 */
625625
626626 struct drm_vmw_fence_wait_arg {
627− uint32_t handle;
628− int32_t cookie_valid;
629− uint64_t kernel_cookie;
630− uint64_t timeout_us;
631− int32_t lazy;
632− int32_t flags;
633− int32_t wait_options;
634− int32_t pad64;
627+ __u32 handle;
628+ __s32 cookie_valid;
629+ __u64 kernel_cookie;
630+ __u64 timeout_us;
631+ __s32 lazy;
632+ __s32 flags;
633+ __s32 wait_options;
634+ __s32 pad64;
635635 };
636636
637637 /*************************************************************************/
@@ -655,12 +655,12 @@ struct drm_vmw_fence_wait_arg { · 17 unmodified lines
655655 */
656656
657657 struct drm_vmw_fence_signaled_arg {
658− uint32_t handle;
659− uint32_t flags;
660− int32_t signaled;
661− uint32_t passed_seqno;
662− uint32_t signaled_flags;
663− uint32_t pad64;
658+ __u32 handle;
659+ __u32 flags;
660+ __s32 signaled;
661+ __u32 passed_seqno;
662+ __u32 signaled_flags;
663+ __u32 pad64;
664664 };
665665
666666 /*************************************************************************/
@@ -681,8 +681,8 @@ struct drm_vmw_fence_signaled_arg { · 14 unmodified lines
681681 */
682682
683683 struct drm_vmw_fence_arg {
684− uint32_t handle;
685− uint32_t pad64;
684+ __u32 handle;
685+ __u32 pad64;
686686 };
687687
688688
@@ -703,9 +703,9 @@ struct drm_vmw_fence_arg { · 14 unmodified lines
703703
704704 struct drm_vmw_event_fence {
705705 struct drm_event base;
706− uint64_t user_data;
707− uint32_t tv_sec;
708− uint32_t tv_usec;
706+ __u64 user_data;
707+ __u32 tv_sec;
708+ __u32 tv_usec;
709709 };
710710
711711 /*
@@ -717,17 +717,17 @@ struct drm_vmw_event_fence { · 5 unmodified lines
717717 /**
718718 * struct drm_vmw_fence_event_arg
719719 *
720− * @fence_rep: Pointer to fence_rep structure cast to uint64_t or 0 if
720+ * @fence_rep: Pointer to fence_rep structure cast to __u64 or 0 if
721721 * the fence is not supposed to be referenced by user-space.
722722 * @user_info: Info to be delivered with the event.
723723 * @handle: Attach the event to this fence only.
724724 * @flags: A set of flags as defined above.
725725 */
726726 struct drm_vmw_fence_event_arg {
727− uint64_t fence_rep;
728− uint64_t user_data;
729− uint32_t handle;
730− uint32_t flags;
727+ __u64 fence_rep;
728+ __u64 user_data;
729+ __u32 handle;
730+ __u32 flags;
731731 };
732732
733733
@@ -747,7 +747,7 @@ struct drm_vmw_fence_event_arg { · 13 unmodified lines
747747 * @sid: Surface id to present from.
748748 * @dest_x: X placement coordinate for surface.
749749 * @dest_y: Y placement coordinate for surface.
750− * @clips_ptr: Pointer to an array of clip rects cast to an uint64_t.
750+ * @clips_ptr: Pointer to an array of clip rects cast to an __u64.
751751 * @num_clips: Number of cliprects given relative to the framebuffer origin,
752752 * in the same coordinate space as the frame buffer.
753753 * @pad64: Unused 64-bit padding.
@@ -756,13 +756,13 @@ struct drm_vmw_fence_event_arg { · 2 unmodified lines
756756 */
757757
758758 struct drm_vmw_present_arg {
759− uint32_t fb_id;
760− uint32_t sid;
761− int32_t dest_x;
762− int32_t dest_y;
763− uint64_t clips_ptr;
764− uint32_t num_clips;
765− uint32_t pad64;
759+ __u32 fb_id;
760+ __u32 sid;
761+ __s32 dest_x;
762+ __s32 dest_y;
763+ __u64 clips_ptr;
764+ __u32 num_clips;
765+ __u32 pad64;
766766 };
767767
768768
@@ -780,16 +780,16 @@ struct drm_vmw_present_arg { · 11 unmodified lines
780780 * struct drm_vmw_present_arg
781781 * @fb_id: fb_id to present / read back from.
782782 * @num_clips: Number of cliprects.
783− * @clips_ptr: Pointer to an array of clip rects cast to an uint64_t.
784− * @fence_rep: Pointer to a struct drm_vmw_fence_rep, cast to an uint64_t.
783+ * @clips_ptr: Pointer to an array of clip rects cast to an __u64.
784+ * @fence_rep: Pointer to a struct drm_vmw_fence_rep, cast to an __u64.
785785 * If this member is NULL, then the ioctl should not return a fence.
786786 */
787787
788788 struct drm_vmw_present_readback_arg {
789− uint32_t fb_id;
790− uint32_t num_clips;
791− uint64_t clips_ptr;
792− uint64_t fence_rep;
789+ __u32 fb_id;
790+ __u32 num_clips;
791+ __u64 clips_ptr;
792+ __u64 fence_rep;
793793 };
794794
795795 /*************************************************************************/
@@ -805,14 +805,14 @@ struct drm_vmw_present_readback_arg { · 9 unmodified lines
805805 * struct drm_vmw_update_layout_arg
806806 *
807807 * @num_outputs: number of active connectors
808− * @rects: pointer to array of drm_vmw_rect cast to an uint64_t
808+ * @rects: pointer to array of drm_vmw_rect cast to an __u64
809809 *
810810 * Input argument to the DRM_VMW_UPDATE_LAYOUT Ioctl.
811811 */
812812 struct drm_vmw_update_layout_arg {
813− uint32_t num_outputs;
814− uint32_t pad64;
815− uint64_t rects;
813+ __u32 num_outputs;
814+ __u32 pad64;
815+ __u64 rects;
816816 };
817817
818818
@@ -849,10 +849,10 @@ enum drm_vmw_shader_type { · 30 unmodified lines
849849 */
850850 struct drm_vmw_shader_create_arg {
851851 enum drm_vmw_shader_type shader_type;
852− uint32_t size;
853− uint32_t buffer_handle;
854− uint32_t shader_handle;
855− uint64_t offset;
852+ __u32 size;
853+ __u32 buffer_handle;
854+ __u32 shader_handle;
855+ __u64 offset;
856856 };
857857
858858 /*************************************************************************/
@@ -871,8 +871,8 @@ struct drm_vmw_shader_create_arg { · 12 unmodified lines
871871 * Input argument to the DRM_VMW_UNREF_SHADER ioctl.
872872 */
873873 struct drm_vmw_shader_arg {
874− uint32_t handle;
875− uint32_t pad64;
874+ __u32 handle;
875+ __u32 pad64;
876876 };
877877
878878 /*************************************************************************/
@@ -918,14 +918,14 @@ enum drm_vmw_surface_flags { · 39 unmodified lines
918918 * Part of output argument for the DRM_VMW_GB_SURFACE_REF Ioctl.
919919 */
920920 struct drm_vmw_gb_surface_create_req {
921− uint32_t svga3d_flags;
922− uint32_t format;
923− uint32_t mip_levels;
921+ __u32 svga3d_flags;
922+ __u32 format;
923+ __u32 mip_levels;
924924 enum drm_vmw_surface_flags drm_surface_flags;
925− uint32_t multisample_count;
926− uint32_t autogen_filter;
927− uint32_t buffer_handle;
928− uint32_t array_size;
925+ __u32 multisample_count;
926+ __u32 autogen_filter;
927+ __u32 buffer_handle;
928+ __u32 array_size;
929929 struct drm_vmw_size base_size;
930930 };
931931
@@ -944,11 +944,11 @@ struct drm_vmw_gb_surface_create_req { · 12 unmodified lines
944944 * Output argument for the DRM_VMW_GB_SURFACE_CREATE ioctl.
945945 */
946946 struct drm_vmw_gb_surface_create_rep {
947− uint32_t handle;
948− uint32_t backup_size;
949− uint32_t buffer_handle;
950− uint32_t buffer_size;
951− uint64_t buffer_map_handle;
947+ __u32 handle;
948+ __u32 backup_size;
949+ __u32 buffer_handle;
950+ __u32 buffer_size;
951+ __u64 buffer_map_handle;
952952 };
953953
954954 /**
@@ -1061,8 +1061,8 @@ enum drm_vmw_synccpu_op { · 106 unmodified lines
10611061 struct drm_vmw_synccpu_arg {
10621062 enum drm_vmw_synccpu_op op;
10631063 enum drm_vmw_synccpu_flags flags;
1064− uint32_t handle;
1065− uint32_t pad64;
1064+ __u32 handle;
1065+ __u32 pad64;
10661066 };
10671067
10681068 /*************************************************************************/

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