1 /* 2 * This header was generated from the Linux kernel headers by update_headers.py, 3 * to provide necessary information from kernel to userspace, such as constants, 4 * structures, and macros, and thus, contains no copyrightable information. 5 */ 6 #ifndef QXL_DRM_H 7 #define QXL_DRM_H 8 #include "drm.h" 9 #if defined(__cplusplus) 10 extern "C" { 11 #endif 12 #define QXL_GEM_DOMAIN_CPU 0 13 #define QXL_GEM_DOMAIN_VRAM 1 14 #define QXL_GEM_DOMAIN_SURFACE 2 15 #define DRM_QXL_ALLOC 0x00 16 #define DRM_QXL_MAP 0x01 17 #define DRM_QXL_EXECBUFFER 0x02 18 #define DRM_QXL_UPDATE_AREA 0x03 19 #define DRM_QXL_GETPARAM 0x04 20 #define DRM_QXL_CLIENTCAP 0x05 21 #define DRM_QXL_ALLOC_SURF 0x06 22 struct drm_qxl_alloc { 23 __u32 size; 24 __u32 handle; 25 }; 26 struct drm_qxl_map { 27 __u64 offset; 28 __u32 handle; 29 __u32 pad; 30 }; 31 #define QXL_RELOC_TYPE_BO 1 32 #define QXL_RELOC_TYPE_SURF 2 33 struct drm_qxl_reloc { 34 __u64 src_offset; 35 __u64 dst_offset; 36 __u32 src_handle; 37 __u32 dst_handle; 38 __u32 reloc_type; 39 __u32 pad; 40 }; 41 struct drm_qxl_command { 42 __u64 command; 43 __u64 relocs; 44 __u32 type; 45 __u32 command_size; 46 __u32 relocs_num; 47 __u32 pad; 48 }; 49 struct drm_qxl_execbuffer { 50 __u32 flags; 51 __u32 commands_num; 52 __u64 commands; 53 }; 54 struct drm_qxl_update_area { 55 __u32 handle; 56 __u32 top; 57 __u32 left; 58 __u32 bottom; 59 __u32 right; 60 __u32 pad; 61 }; 62 #define QXL_PARAM_NUM_SURFACES 1 63 #define QXL_PARAM_MAX_RELOCS 2 64 struct drm_qxl_getparam { 65 __u64 param; 66 __u64 value; 67 }; 68 struct drm_qxl_clientcap { 69 __u32 index; 70 __u32 pad; 71 }; 72 struct drm_qxl_alloc_surf { 73 __u32 format; 74 __u32 width; 75 __u32 height; 76 __s32 stride; 77 __u32 handle; 78 __u32 pad; 79 }; 80 #define DRM_IOCTL_QXL_ALLOC \ 81 DRM_IOWR(DRM_COMMAND_BASE + DRM_QXL_ALLOC, struct drm_qxl_alloc) 82 #define DRM_IOCTL_QXL_MAP \ 83 DRM_IOWR(DRM_COMMAND_BASE + DRM_QXL_MAP, struct drm_qxl_map) 84 #define DRM_IOCTL_QXL_EXECBUFFER \ 85 DRM_IOW(DRM_COMMAND_BASE + DRM_QXL_EXECBUFFER,\ 86 struct drm_qxl_execbuffer) 87 #define DRM_IOCTL_QXL_UPDATE_AREA \ 88 DRM_IOW(DRM_COMMAND_BASE + DRM_QXL_UPDATE_AREA,\ 89 struct drm_qxl_update_area) 90 #define DRM_IOCTL_QXL_GETPARAM \ 91 DRM_IOWR(DRM_COMMAND_BASE + DRM_QXL_GETPARAM,\ 92 struct drm_qxl_getparam) 93 #define DRM_IOCTL_QXL_CLIENTCAP \ 94 DRM_IOW(DRM_COMMAND_BASE + DRM_QXL_CLIENTCAP,\ 95 struct drm_qxl_clientcap) 96 #define DRM_IOCTL_QXL_ALLOC_SURF \ 97 DRM_IOWR(DRM_COMMAND_BASE + DRM_QXL_ALLOC_SURF,\ 98 struct drm_qxl_alloc_surf) 99 #if defined(__cplusplus) 100 } 101 #endif 102 #endif 103