Commit 21de2fda authored by Mikko Rapeli's avatar Mikko Rapeli Committed by Gabriel Laskar

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’
Signed-off-by: default avatarMikko Rapeli <mikko.rapeli@iki.fi>
parent 5b8573f7
...@@ -111,9 +111,9 @@ enum drm_vmw_handle_type { ...@@ -111,9 +111,9 @@ enum drm_vmw_handle_type {
*/ */
struct drm_vmw_getparam_arg { struct drm_vmw_getparam_arg {
uint64_t value; __u64 value;
uint32_t param; __u32 param;
uint32_t pad64; __u32 pad64;
}; };
/*************************************************************************/ /*************************************************************************/
...@@ -134,8 +134,8 @@ struct drm_vmw_getparam_arg { ...@@ -134,8 +134,8 @@ struct drm_vmw_getparam_arg {
*/ */
struct drm_vmw_context_arg { struct drm_vmw_context_arg {
int32_t cid; __s32 cid;
uint32_t pad64; __u32 pad64;
}; };
/*************************************************************************/ /*************************************************************************/
...@@ -165,7 +165,7 @@ struct drm_vmw_context_arg { ...@@ -165,7 +165,7 @@ struct drm_vmw_context_arg {
* @mip_levels: Number of mip levels for each face. * @mip_levels: Number of mip levels for each face.
* An unused face should have 0 encoded. * An unused face should have 0 encoded.
* @size_addr: Address of a user-space array of sruct drm_vmw_size * @size_addr: Address of a user-space array of sruct drm_vmw_size
* cast to an uint64_t for 32-64 bit compatibility. * cast to an __u64 for 32-64 bit compatibility.
* The size of the array should equal the total number of mipmap levels. * The size of the array should equal the total number of mipmap levels.
* @shareable: Boolean whether other clients (as identified by file descriptors) * @shareable: Boolean whether other clients (as identified by file descriptors)
* may reference this surface. * may reference this surface.
...@@ -177,12 +177,12 @@ struct drm_vmw_context_arg { ...@@ -177,12 +177,12 @@ struct drm_vmw_context_arg {
*/ */
struct drm_vmw_surface_create_req { struct drm_vmw_surface_create_req {
uint32_t flags; __u32 flags;
uint32_t format; __u32 format;
uint32_t mip_levels[DRM_VMW_MAX_SURFACE_FACES]; __u32 mip_levels[DRM_VMW_MAX_SURFACE_FACES];
uint64_t size_addr; __u64 size_addr;
int32_t shareable; __s32 shareable;
int32_t scanout; __s32 scanout;
}; };
/** /**
...@@ -197,7 +197,7 @@ struct drm_vmw_surface_create_req { ...@@ -197,7 +197,7 @@ struct drm_vmw_surface_create_req {
*/ */
struct drm_vmw_surface_arg { struct drm_vmw_surface_arg {
int32_t sid; __s32 sid;
enum drm_vmw_handle_type handle_type; enum drm_vmw_handle_type handle_type;
}; };
...@@ -213,10 +213,10 @@ struct drm_vmw_surface_arg { ...@@ -213,10 +213,10 @@ struct drm_vmw_surface_arg {
*/ */
struct drm_vmw_size { struct drm_vmw_size {
uint32_t width; __u32 width;
uint32_t height; __u32 height;
uint32_t depth; __u32 depth;
uint32_t pad64; __u32 pad64;
}; };
/** /**
...@@ -284,13 +284,13 @@ union drm_vmw_surface_reference_arg { ...@@ -284,13 +284,13 @@ union drm_vmw_surface_reference_arg {
/** /**
* struct drm_vmw_execbuf_arg * struct drm_vmw_execbuf_arg
* *
* @commands: User-space address of a command buffer cast to an uint64_t. * @commands: User-space address of a command buffer cast to an __u64.
* @command-size: Size in bytes of the command buffer. * @command-size: Size in bytes of the command buffer.
* @throttle-us: Sleep until software is less than @throttle_us * @throttle-us: Sleep until software is less than @throttle_us
* microseconds ahead of hardware. The driver may round this value * microseconds ahead of hardware. The driver may round this value
* to the nearest kernel tick. * to the nearest kernel tick.
* @fence_rep: User-space address of a struct drm_vmw_fence_rep cast to an * @fence_rep: User-space address of a struct drm_vmw_fence_rep cast to an
* uint64_t. * __u64.
* @version: Allows expanding the execbuf ioctl parameters without breaking * @version: Allows expanding the execbuf ioctl parameters without breaking
* backwards compatibility, since user-space will always tell the kernel * backwards compatibility, since user-space will always tell the kernel
* which version it uses. * which version it uses.
...@@ -302,14 +302,14 @@ union drm_vmw_surface_reference_arg { ...@@ -302,14 +302,14 @@ union drm_vmw_surface_reference_arg {
#define DRM_VMW_EXECBUF_VERSION 2 #define DRM_VMW_EXECBUF_VERSION 2
struct drm_vmw_execbuf_arg { struct drm_vmw_execbuf_arg {
uint64_t commands; __u64 commands;
uint32_t command_size; __u32 command_size;
uint32_t throttle_us; __u32 throttle_us;
uint64_t fence_rep; __u64 fence_rep;
uint32_t version; __u32 version;
uint32_t flags; __u32 flags;
uint32_t context_handle; __u32 context_handle;
uint32_t pad64; __u32 pad64;
}; };
/** /**
...@@ -338,12 +338,12 @@ struct drm_vmw_execbuf_arg { ...@@ -338,12 +338,12 @@ struct drm_vmw_execbuf_arg {
*/ */
struct drm_vmw_fence_rep { struct drm_vmw_fence_rep {
uint32_t handle; __u32 handle;
uint32_t mask; __u32 mask;
uint32_t seqno; __u32 seqno;
uint32_t passed_seqno; __u32 passed_seqno;
uint32_t pad64; __u32 pad64;
int32_t error; __s32 error;
}; };
/*************************************************************************/ /*************************************************************************/
...@@ -373,8 +373,8 @@ struct drm_vmw_fence_rep { ...@@ -373,8 +373,8 @@ struct drm_vmw_fence_rep {
*/ */
struct drm_vmw_alloc_dmabuf_req { struct drm_vmw_alloc_dmabuf_req {
uint32_t size; __u32 size;
uint32_t pad64; __u32 pad64;
}; };
/** /**
...@@ -391,11 +391,11 @@ struct drm_vmw_alloc_dmabuf_req { ...@@ -391,11 +391,11 @@ struct drm_vmw_alloc_dmabuf_req {
*/ */
struct drm_vmw_dmabuf_rep { struct drm_vmw_dmabuf_rep {
uint64_t map_handle; __u64 map_handle;
uint32_t handle; __u32 handle;
uint32_t cur_gmr_id; __u32 cur_gmr_id;
uint32_t cur_gmr_offset; __u32 cur_gmr_offset;
uint32_t pad64; __u32 pad64;
}; };
/** /**
...@@ -428,8 +428,8 @@ union drm_vmw_alloc_dmabuf_arg { ...@@ -428,8 +428,8 @@ union drm_vmw_alloc_dmabuf_arg {
*/ */
struct drm_vmw_unref_dmabuf_arg { struct drm_vmw_unref_dmabuf_arg {
uint32_t handle; __u32 handle;
uint32_t pad64; __u32 pad64;
}; };
/*************************************************************************/ /*************************************************************************/
...@@ -452,10 +452,10 @@ struct drm_vmw_unref_dmabuf_arg { ...@@ -452,10 +452,10 @@ struct drm_vmw_unref_dmabuf_arg {
*/ */
struct drm_vmw_rect { struct drm_vmw_rect {
int32_t x; __s32 x;
int32_t y; __s32 y;
uint32_t w; __u32 w;
uint32_t h; __u32 h;
}; };
/** /**
...@@ -477,21 +477,21 @@ struct drm_vmw_rect { ...@@ -477,21 +477,21 @@ struct drm_vmw_rect {
*/ */
struct drm_vmw_control_stream_arg { struct drm_vmw_control_stream_arg {
uint32_t stream_id; __u32 stream_id;
uint32_t enabled; __u32 enabled;
uint32_t flags; __u32 flags;
uint32_t color_key; __u32 color_key;
uint32_t handle; __u32 handle;
uint32_t offset; __u32 offset;
int32_t format; __s32 format;
uint32_t size; __u32 size;
uint32_t width; __u32 width;
uint32_t height; __u32 height;
uint32_t pitch[3]; __u32 pitch[3];
uint32_t pad64; __u32 pad64;
struct drm_vmw_rect src; struct drm_vmw_rect src;
struct drm_vmw_rect dst; struct drm_vmw_rect dst;
}; };
...@@ -519,12 +519,12 @@ struct drm_vmw_control_stream_arg { ...@@ -519,12 +519,12 @@ struct drm_vmw_control_stream_arg {
*/ */
struct drm_vmw_cursor_bypass_arg { struct drm_vmw_cursor_bypass_arg {
uint32_t flags; __u32 flags;
uint32_t crtc_id; __u32 crtc_id;
int32_t xpos; __s32 xpos;
int32_t ypos; __s32 ypos;
int32_t xhot; __s32 xhot;
int32_t yhot; __s32 yhot;
}; };
/*************************************************************************/ /*************************************************************************/
...@@ -542,8 +542,8 @@ struct drm_vmw_cursor_bypass_arg { ...@@ -542,8 +542,8 @@ struct drm_vmw_cursor_bypass_arg {
*/ */
struct drm_vmw_stream_arg { struct drm_vmw_stream_arg {
uint32_t stream_id; __u32 stream_id;
uint32_t pad64; __u32 pad64;
}; };
/*************************************************************************/ /*************************************************************************/
...@@ -565,7 +565,7 @@ struct drm_vmw_stream_arg { ...@@ -565,7 +565,7 @@ struct drm_vmw_stream_arg {
/** /**
* struct drm_vmw_get_3d_cap_arg * struct drm_vmw_get_3d_cap_arg
* *
* @buffer: Pointer to a buffer for capability data, cast to an uint64_t * @buffer: Pointer to a buffer for capability data, cast to an __u64
* @size: Max size to copy * @size: Max size to copy
* *
* Input argument to the DRM_VMW_GET_3D_CAP_IOCTL * Input argument to the DRM_VMW_GET_3D_CAP_IOCTL
...@@ -573,9 +573,9 @@ struct drm_vmw_stream_arg { ...@@ -573,9 +573,9 @@ struct drm_vmw_stream_arg {
*/ */
struct drm_vmw_get_3d_cap_arg { struct drm_vmw_get_3d_cap_arg {
uint64_t buffer; __u64 buffer;
uint32_t max_size; __u32 max_size;
uint32_t pad64; __u32 pad64;
}; };
/*************************************************************************/ /*************************************************************************/
...@@ -624,14 +624,14 @@ struct drm_vmw_get_3d_cap_arg { ...@@ -624,14 +624,14 @@ struct drm_vmw_get_3d_cap_arg {
*/ */
struct drm_vmw_fence_wait_arg { struct drm_vmw_fence_wait_arg {
uint32_t handle; __u32 handle;
int32_t cookie_valid; __s32 cookie_valid;
uint64_t kernel_cookie; __u64 kernel_cookie;
uint64_t timeout_us; __u64 timeout_us;
int32_t lazy; __s32 lazy;
int32_t flags; __s32 flags;
int32_t wait_options; __s32 wait_options;
int32_t pad64; __s32 pad64;
}; };
/*************************************************************************/ /*************************************************************************/
...@@ -655,12 +655,12 @@ struct drm_vmw_fence_wait_arg { ...@@ -655,12 +655,12 @@ struct drm_vmw_fence_wait_arg {
*/ */
struct drm_vmw_fence_signaled_arg { struct drm_vmw_fence_signaled_arg {
uint32_t handle; __u32 handle;
uint32_t flags; __u32 flags;
int32_t signaled; __s32 signaled;
uint32_t passed_seqno; __u32 passed_seqno;
uint32_t signaled_flags; __u32 signaled_flags;
uint32_t pad64; __u32 pad64;
}; };
/*************************************************************************/ /*************************************************************************/
...@@ -681,8 +681,8 @@ struct drm_vmw_fence_signaled_arg { ...@@ -681,8 +681,8 @@ struct drm_vmw_fence_signaled_arg {
*/ */
struct drm_vmw_fence_arg { struct drm_vmw_fence_arg {
uint32_t handle; __u32 handle;
uint32_t pad64; __u32 pad64;
}; };
...@@ -703,9 +703,9 @@ struct drm_vmw_fence_arg { ...@@ -703,9 +703,9 @@ struct drm_vmw_fence_arg {
struct drm_vmw_event_fence { struct drm_vmw_event_fence {
struct drm_event base; struct drm_event base;
uint64_t user_data; __u64 user_data;
uint32_t tv_sec; __u32 tv_sec;
uint32_t tv_usec; __u32 tv_usec;
}; };
/* /*
...@@ -717,17 +717,17 @@ struct drm_vmw_event_fence { ...@@ -717,17 +717,17 @@ struct drm_vmw_event_fence {
/** /**
* struct drm_vmw_fence_event_arg * struct drm_vmw_fence_event_arg
* *
* @fence_rep: Pointer to fence_rep structure cast to uint64_t or 0 if * @fence_rep: Pointer to fence_rep structure cast to __u64 or 0 if
* the fence is not supposed to be referenced by user-space. * the fence is not supposed to be referenced by user-space.
* @user_info: Info to be delivered with the event. * @user_info: Info to be delivered with the event.
* @handle: Attach the event to this fence only. * @handle: Attach the event to this fence only.
* @flags: A set of flags as defined above. * @flags: A set of flags as defined above.
*/ */
struct drm_vmw_fence_event_arg { struct drm_vmw_fence_event_arg {
uint64_t fence_rep; __u64 fence_rep;
uint64_t user_data; __u64 user_data;
uint32_t handle; __u32 handle;
uint32_t flags; __u32 flags;
}; };
...@@ -747,7 +747,7 @@ struct drm_vmw_fence_event_arg { ...@@ -747,7 +747,7 @@ struct drm_vmw_fence_event_arg {
* @sid: Surface id to present from. * @sid: Surface id to present from.
* @dest_x: X placement coordinate for surface. * @dest_x: X placement coordinate for surface.
* @dest_y: Y placement coordinate for surface. * @dest_y: Y placement coordinate for surface.
* @clips_ptr: Pointer to an array of clip rects cast to an uint64_t. * @clips_ptr: Pointer to an array of clip rects cast to an __u64.
* @num_clips: Number of cliprects given relative to the framebuffer origin, * @num_clips: Number of cliprects given relative to the framebuffer origin,
* in the same coordinate space as the frame buffer. * in the same coordinate space as the frame buffer.
* @pad64: Unused 64-bit padding. * @pad64: Unused 64-bit padding.
...@@ -756,13 +756,13 @@ struct drm_vmw_fence_event_arg { ...@@ -756,13 +756,13 @@ struct drm_vmw_fence_event_arg {
*/ */
struct drm_vmw_present_arg { struct drm_vmw_present_arg {
uint32_t fb_id; __u32 fb_id;
uint32_t sid; __u32 sid;
int32_t dest_x; __s32 dest_x;
int32_t dest_y; __s32 dest_y;
uint64_t clips_ptr; __u64 clips_ptr;
uint32_t num_clips; __u32 num_clips;
uint32_t pad64; __u32 pad64;
}; };
...@@ -780,16 +780,16 @@ struct drm_vmw_present_arg { ...@@ -780,16 +780,16 @@ struct drm_vmw_present_arg {
* struct drm_vmw_present_arg * struct drm_vmw_present_arg
* @fb_id: fb_id to present / read back from. * @fb_id: fb_id to present / read back from.
* @num_clips: Number of cliprects. * @num_clips: Number of cliprects.
* @clips_ptr: Pointer to an array of clip rects cast to an uint64_t. * @clips_ptr: Pointer to an array of clip rects cast to an __u64.
* @fence_rep: Pointer to a struct drm_vmw_fence_rep, cast to an uint64_t. * @fence_rep: Pointer to a struct drm_vmw_fence_rep, cast to an __u64.
* If this member is NULL, then the ioctl should not return a fence. * If this member is NULL, then the ioctl should not return a fence.
*/ */
struct drm_vmw_present_readback_arg { struct drm_vmw_present_readback_arg {
uint32_t fb_id; __u32 fb_id;
uint32_t num_clips; __u32 num_clips;
uint64_t clips_ptr; __u64 clips_ptr;
uint64_t fence_rep; __u64 fence_rep;
}; };
/*************************************************************************/ /*************************************************************************/
...@@ -805,14 +805,14 @@ struct drm_vmw_present_readback_arg { ...@@ -805,14 +805,14 @@ struct drm_vmw_present_readback_arg {
* struct drm_vmw_update_layout_arg * struct drm_vmw_update_layout_arg
* *
* @num_outputs: number of active connectors * @num_outputs: number of active connectors
* @rects: pointer to array of drm_vmw_rect cast to an uint64_t * @rects: pointer to array of drm_vmw_rect cast to an __u64
* *
* Input argument to the DRM_VMW_UPDATE_LAYOUT Ioctl. * Input argument to the DRM_VMW_UPDATE_LAYOUT Ioctl.
*/ */
struct drm_vmw_update_layout_arg { struct drm_vmw_update_layout_arg {
uint32_t num_outputs; __u32 num_outputs;
uint32_t pad64; __u32 pad64;
uint64_t rects; __u64 rects;
}; };
...@@ -849,10 +849,10 @@ enum drm_vmw_shader_type { ...@@ -849,10 +849,10 @@ enum drm_vmw_shader_type {
*/ */
struct drm_vmw_shader_create_arg { struct drm_vmw_shader_create_arg {
enum drm_vmw_shader_type shader_type; enum drm_vmw_shader_type shader_type;
uint32_t size; __u32 size;
uint32_t buffer_handle; __u32 buffer_handle;
uint32_t shader_handle; __u32 shader_handle;
uint64_t offset; __u64 offset;
}; };
/*************************************************************************/ /*************************************************************************/
...@@ -871,8 +871,8 @@ struct drm_vmw_shader_create_arg { ...@@ -871,8 +871,8 @@ struct drm_vmw_shader_create_arg {
* Input argument to the DRM_VMW_UNREF_SHADER ioctl. * Input argument to the DRM_VMW_UNREF_SHADER ioctl.
*/ */
struct drm_vmw_shader_arg { struct drm_vmw_shader_arg {
uint32_t handle; __u32 handle;
uint32_t pad64; __u32 pad64;
}; };
/*************************************************************************/ /*************************************************************************/
...@@ -918,14 +918,14 @@ enum drm_vmw_surface_flags { ...@@ -918,14 +918,14 @@ enum drm_vmw_surface_flags {
* Part of output argument for the DRM_VMW_GB_SURFACE_REF Ioctl. * Part of output argument for the DRM_VMW_GB_SURFACE_REF Ioctl.
*/ */
struct drm_vmw_gb_surface_create_req { struct drm_vmw_gb_surface_create_req {
uint32_t svga3d_flags; __u32 svga3d_flags;
uint32_t format; __u32 format;
uint32_t mip_levels; __u32 mip_levels;
enum drm_vmw_surface_flags drm_surface_flags; enum drm_vmw_surface_flags drm_surface_flags;
uint32_t multisample_count; __u32 multisample_count;
uint32_t autogen_filter; __u32 autogen_filter;
uint32_t buffer_handle; __u32 buffer_handle;
uint32_t array_size; __u32 array_size;
struct drm_vmw_size base_size; struct drm_vmw_size base_size;
}; };
...@@ -944,11 +944,11 @@ struct drm_vmw_gb_surface_create_req { ...@@ -944,11 +944,11 @@ struct drm_vmw_gb_surface_create_req {
* Output argument for the DRM_VMW_GB_SURFACE_CREATE ioctl. * Output argument for the DRM_VMW_GB_SURFACE_CREATE ioctl.
*/ */
struct drm_vmw_gb_surface_create_rep { struct drm_vmw_gb_surface_create_rep {
uint32_t handle; __u32 handle;
uint32_t backup_size; __u32 backup_size;
uint32_t buffer_handle; __u32 buffer_handle;
uint32_t buffer_size; __u32 buffer_size;
uint64_t buffer_map_handle; __u64 buffer_map_handle;
}; };
/** /**
...@@ -1061,8 +1061,8 @@ enum drm_vmw_synccpu_op { ...@@ -1061,8 +1061,8 @@ enum drm_vmw_synccpu_op {
struct drm_vmw_synccpu_arg { struct drm_vmw_synccpu_arg {
enum drm_vmw_synccpu_op op; enum drm_vmw_synccpu_op op;
enum drm_vmw_synccpu_flags flags; enum drm_vmw_synccpu_flags flags;
uint32_t handle; __u32 handle;
uint32_t pad64; __u32 pad64;
}; };
/*************************************************************************/ /*************************************************************************/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment