提交 29e08b05 编写于 作者: G Gabriel Laskar

drm: use __u{32,64} instead of uint{32,64}_t in virtgpu_drm.h

Signed-off-by: NGabriel Laskar <gabriel@lse.epita.fr>
Reviewed-by: NEmil Velikov <emil.l.velikov@gmail.com>
CC: Emil Velikov <emil.l.velikov@gmail.com>
CC: Mikko Rapeli <mikko.rapeli@iki.fi>
上级 35d0f1d5
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
/* Please note that modifications to all structs defined here are /* Please note that modifications to all structs defined here are
* subject to backwards-compatibility constraints. * subject to backwards-compatibility constraints.
* *
* Do not use pointers, use uint64_t instead for 32 bit / 64 bit user/kernel * Do not use pointers, use __u64 instead for 32 bit / 64 bit user/kernel
* compatibility Keep fields aligned to their size * compatibility Keep fields aligned to their size
*/ */
...@@ -45,88 +45,88 @@ ...@@ -45,88 +45,88 @@
#define DRM_VIRTGPU_GET_CAPS 0x09 #define DRM_VIRTGPU_GET_CAPS 0x09
struct drm_virtgpu_map { struct drm_virtgpu_map {
uint64_t offset; /* use for mmap system call */ __u64 offset; /* use for mmap system call */
uint32_t handle; __u32 handle;
uint32_t pad; __u32 pad;
}; };
struct drm_virtgpu_execbuffer { struct drm_virtgpu_execbuffer {
uint32_t flags; /* for future use */ __u32 flags; /* for future use */
uint32_t size; __u32 size;
uint64_t command; /* void* */ __u64 command; /* void* */
uint64_t bo_handles; __u64 bo_handles;
uint32_t num_bo_handles; __u32 num_bo_handles;
uint32_t pad; __u32 pad;
}; };
#define VIRTGPU_PARAM_3D_FEATURES 1 /* do we have 3D features in the hw */ #define VIRTGPU_PARAM_3D_FEATURES 1 /* do we have 3D features in the hw */
struct drm_virtgpu_getparam { struct drm_virtgpu_getparam {
uint64_t param; __u64 param;
uint64_t value; __u64 value;
}; };
/* NO_BO flags? NO resource flag? */ /* NO_BO flags? NO resource flag? */
/* resource flag for y_0_top */ /* resource flag for y_0_top */
struct drm_virtgpu_resource_create { struct drm_virtgpu_resource_create {
uint32_t target; __u32 target;
uint32_t format; __u32 format;
uint32_t bind; __u32 bind;
uint32_t width; __u32 width;
uint32_t height; __u32 height;
uint32_t depth; __u32 depth;
uint32_t array_size; __u32 array_size;
uint32_t last_level; __u32 last_level;
uint32_t nr_samples; __u32 nr_samples;
uint32_t flags; __u32 flags;
uint32_t bo_handle; /* if this is set - recreate a new resource attached to this bo ? */ __u32 bo_handle; /* if this is set - recreate a new resource attached to this bo ? */
uint32_t res_handle; /* returned by kernel */ __u32 res_handle; /* returned by kernel */
uint32_t size; /* validate transfer in the host */ __u32 size; /* validate transfer in the host */
uint32_t stride; /* validate transfer in the host */ __u32 stride; /* validate transfer in the host */
}; };
struct drm_virtgpu_resource_info { struct drm_virtgpu_resource_info {
uint32_t bo_handle; __u32 bo_handle;
uint32_t res_handle; __u32 res_handle;
uint32_t size; __u32 size;
uint32_t stride; __u32 stride;
}; };
struct drm_virtgpu_3d_box { struct drm_virtgpu_3d_box {
uint32_t x; __u32 x;
uint32_t y; __u32 y;
uint32_t z; __u32 z;
uint32_t w; __u32 w;
uint32_t h; __u32 h;
uint32_t d; __u32 d;
}; };
struct drm_virtgpu_3d_transfer_to_host { struct drm_virtgpu_3d_transfer_to_host {
uint32_t bo_handle; __u32 bo_handle;
struct drm_virtgpu_3d_box box; struct drm_virtgpu_3d_box box;
uint32_t level; __u32 level;
uint32_t offset; __u32 offset;
}; };
struct drm_virtgpu_3d_transfer_from_host { struct drm_virtgpu_3d_transfer_from_host {
uint32_t bo_handle; __u32 bo_handle;
struct drm_virtgpu_3d_box box; struct drm_virtgpu_3d_box box;
uint32_t level; __u32 level;
uint32_t offset; __u32 offset;
}; };
#define VIRTGPU_WAIT_NOWAIT 1 /* like it */ #define VIRTGPU_WAIT_NOWAIT 1 /* like it */
struct drm_virtgpu_3d_wait { struct drm_virtgpu_3d_wait {
uint32_t handle; /* 0 is an invalid handle */ __u32 handle; /* 0 is an invalid handle */
uint32_t flags; __u32 flags;
}; };
struct drm_virtgpu_get_caps { struct drm_virtgpu_get_caps {
uint32_t cap_set_id; __u32 cap_set_id;
uint32_t cap_set_ver; __u32 cap_set_ver;
uint64_t addr; __u64 addr;
uint32_t size; __u32 size;
uint32_t pad; __u32 pad;
}; };
#define DRM_IOCTL_VIRTGPU_MAP \ #define DRM_IOCTL_VIRTGPU_MAP \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册