Elliott Hughes | 180edef | 2023-11-02 00:08:05 +0000 | [diff] [blame] | 1 | /* |
| 2 | * This file is auto-generated. Modifications will be lost. |
| 3 | * |
| 4 | * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/ |
| 5 | * for more information. |
| 6 | */ |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 7 | #ifndef __VMWGFX_DRM_H__ |
| 8 | #define __VMWGFX_DRM_H__ |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 9 | #include "drm.h" |
| 10 | #ifdef __cplusplus |
Christopher Ferris | 48fe0ae | 2019-01-10 15:59:33 -0800 | [diff] [blame] | 11 | extern "C" { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 12 | #endif |
| 13 | #define DRM_VMW_MAX_SURFACE_FACES 6 |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 14 | #define DRM_VMW_MAX_MIP_LEVELS 24 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 15 | #define DRM_VMW_GET_PARAM 0 |
| 16 | #define DRM_VMW_ALLOC_DMABUF 1 |
Christopher Ferris | 9ce2884 | 2018-10-25 12:11:39 -0700 | [diff] [blame] | 17 | #define DRM_VMW_ALLOC_BO 1 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 18 | #define DRM_VMW_UNREF_DMABUF 2 |
Christopher Ferris | 525ce91 | 2017-07-26 13:12:53 -0700 | [diff] [blame] | 19 | #define DRM_VMW_HANDLE_CLOSE 2 |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 20 | #define DRM_VMW_CURSOR_BYPASS 3 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 21 | #define DRM_VMW_CONTROL_STREAM 4 |
| 22 | #define DRM_VMW_CLAIM_STREAM 5 |
| 23 | #define DRM_VMW_UNREF_STREAM 6 |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 24 | #define DRM_VMW_CREATE_CONTEXT 7 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 25 | #define DRM_VMW_UNREF_CONTEXT 8 |
| 26 | #define DRM_VMW_CREATE_SURFACE 9 |
| 27 | #define DRM_VMW_UNREF_SURFACE 10 |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 28 | #define DRM_VMW_REF_SURFACE 11 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 29 | #define DRM_VMW_EXECBUF 12 |
| 30 | #define DRM_VMW_GET_3D_CAP 13 |
| 31 | #define DRM_VMW_FENCE_WAIT 14 |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 32 | #define DRM_VMW_FENCE_SIGNALED 15 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 33 | #define DRM_VMW_FENCE_UNREF 16 |
| 34 | #define DRM_VMW_FENCE_EVENT 17 |
| 35 | #define DRM_VMW_PRESENT 18 |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 36 | #define DRM_VMW_PRESENT_READBACK 19 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 37 | #define DRM_VMW_UPDATE_LAYOUT 20 |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 38 | #define DRM_VMW_CREATE_SHADER 21 |
| 39 | #define DRM_VMW_UNREF_SHADER 22 |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 40 | #define DRM_VMW_GB_SURFACE_CREATE 23 |
| 41 | #define DRM_VMW_GB_SURFACE_REF 24 |
| 42 | #define DRM_VMW_SYNCCPU 25 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 43 | #define DRM_VMW_CREATE_EXTENDED_CONTEXT 26 |
Christopher Ferris | 9ce2884 | 2018-10-25 12:11:39 -0700 | [diff] [blame] | 44 | #define DRM_VMW_GB_SURFACE_CREATE_EXT 27 |
| 45 | #define DRM_VMW_GB_SURFACE_REF_EXT 28 |
Christopher Ferris | bb9fcb4 | 2020-04-06 11:38:04 -0700 | [diff] [blame] | 46 | #define DRM_VMW_MSG 29 |
Christopher Ferris | 2abfa9e | 2021-11-01 16:26:06 -0700 | [diff] [blame] | 47 | #define DRM_VMW_MKSSTAT_RESET 30 |
| 48 | #define DRM_VMW_MKSSTAT_ADD 31 |
| 49 | #define DRM_VMW_MKSSTAT_REMOVE 32 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 50 | #define DRM_VMW_PARAM_NUM_STREAMS 0 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 51 | #define DRM_VMW_PARAM_NUM_FREE_STREAMS 1 |
| 52 | #define DRM_VMW_PARAM_3D 2 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 53 | #define DRM_VMW_PARAM_HW_CAPS 3 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 54 | #define DRM_VMW_PARAM_FIFO_CAPS 4 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 55 | #define DRM_VMW_PARAM_MAX_FB_SIZE 5 |
| 56 | #define DRM_VMW_PARAM_FIFO_HW_VERSION 6 |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 57 | #define DRM_VMW_PARAM_MAX_SURF_MEMORY 7 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 58 | #define DRM_VMW_PARAM_3D_CAPS_SIZE 8 |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 59 | #define DRM_VMW_PARAM_MAX_MOB_MEMORY 9 |
| 60 | #define DRM_VMW_PARAM_MAX_MOB_SIZE 10 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 61 | #define DRM_VMW_PARAM_SCREEN_TARGET 11 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 62 | #define DRM_VMW_PARAM_DX 12 |
Christopher Ferris | 9ce2884 | 2018-10-25 12:11:39 -0700 | [diff] [blame] | 63 | #define DRM_VMW_PARAM_HW_CAPS2 13 |
| 64 | #define DRM_VMW_PARAM_SM4_1 14 |
Christopher Ferris | af09c70 | 2020-06-01 20:29:29 -0700 | [diff] [blame] | 65 | #define DRM_VMW_PARAM_SM5 15 |
Christopher Ferris | 1ed5534 | 2022-03-22 16:06:25 -0700 | [diff] [blame] | 66 | #define DRM_VMW_PARAM_GL43 16 |
Christopher Ferris | 80ae69d | 2022-08-02 16:32:21 -0700 | [diff] [blame] | 67 | #define DRM_VMW_PARAM_DEVICE_ID 17 |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 68 | enum drm_vmw_handle_type { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 69 | DRM_VMW_HANDLE_LEGACY = 0, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 70 | DRM_VMW_HANDLE_PRIME = 1 |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 71 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 72 | struct drm_vmw_getparam_arg { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 73 | __u64 value; |
| 74 | __u32 param; |
| 75 | __u32 pad64; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 76 | }; |
| 77 | struct drm_vmw_context_arg { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 78 | __s32 cid; |
| 79 | __u32 pad64; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 80 | }; |
| 81 | struct drm_vmw_surface_create_req { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 82 | __u32 flags; |
| 83 | __u32 format; |
| 84 | __u32 mip_levels[DRM_VMW_MAX_SURFACE_FACES]; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 85 | __u64 size_addr; |
| 86 | __s32 shareable; |
| 87 | __s32 scanout; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 88 | }; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 89 | struct drm_vmw_surface_arg { |
| 90 | __s32 sid; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 91 | enum drm_vmw_handle_type handle_type; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 92 | }; |
| 93 | struct drm_vmw_size { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 94 | __u32 width; |
| 95 | __u32 height; |
| 96 | __u32 depth; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 97 | __u32 pad64; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 98 | }; |
| 99 | union drm_vmw_surface_create_arg { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 100 | struct drm_vmw_surface_arg rep; |
| 101 | struct drm_vmw_surface_create_req req; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 102 | }; |
| 103 | union drm_vmw_surface_reference_arg { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 104 | struct drm_vmw_surface_create_req rep; |
| 105 | struct drm_vmw_surface_arg req; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 106 | }; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 107 | #define DRM_VMW_EXECBUF_VERSION 2 |
Christopher Ferris | 1308ad3 | 2017-11-14 17:32:13 -0800 | [diff] [blame] | 108 | #define DRM_VMW_EXECBUF_FLAG_IMPORT_FENCE_FD (1 << 0) |
| 109 | #define DRM_VMW_EXECBUF_FLAG_EXPORT_FENCE_FD (1 << 1) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 110 | struct drm_vmw_execbuf_arg { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 111 | __u64 commands; |
| 112 | __u32 command_size; |
| 113 | __u32 throttle_us; |
| 114 | __u64 fence_rep; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 115 | __u32 version; |
| 116 | __u32 flags; |
| 117 | __u32 context_handle; |
Christopher Ferris | 1308ad3 | 2017-11-14 17:32:13 -0800 | [diff] [blame] | 118 | __s32 imported_fence_fd; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 119 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 120 | struct drm_vmw_fence_rep { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 121 | __u32 handle; |
| 122 | __u32 mask; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 123 | __u32 seqno; |
| 124 | __u32 passed_seqno; |
Christopher Ferris | 1308ad3 | 2017-11-14 17:32:13 -0800 | [diff] [blame] | 125 | __s32 fd; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 126 | __s32 error; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 127 | }; |
Christopher Ferris | 9ce2884 | 2018-10-25 12:11:39 -0700 | [diff] [blame] | 128 | struct drm_vmw_alloc_bo_req { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 129 | __u32 size; |
| 130 | __u32 pad64; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 131 | }; |
Christopher Ferris | 9ce2884 | 2018-10-25 12:11:39 -0700 | [diff] [blame] | 132 | #define drm_vmw_alloc_dmabuf_req drm_vmw_alloc_bo_req |
| 133 | struct drm_vmw_bo_rep { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 134 | __u64 map_handle; |
| 135 | __u32 handle; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 136 | __u32 cur_gmr_id; |
| 137 | __u32 cur_gmr_offset; |
| 138 | __u32 pad64; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 139 | }; |
Christopher Ferris | 9ce2884 | 2018-10-25 12:11:39 -0700 | [diff] [blame] | 140 | #define drm_vmw_dmabuf_rep drm_vmw_bo_rep |
| 141 | union drm_vmw_alloc_bo_arg { |
| 142 | struct drm_vmw_alloc_bo_req req; |
| 143 | struct drm_vmw_bo_rep rep; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 144 | }; |
Christopher Ferris | 9ce2884 | 2018-10-25 12:11:39 -0700 | [diff] [blame] | 145 | #define drm_vmw_alloc_dmabuf_arg drm_vmw_alloc_bo_arg |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 146 | struct drm_vmw_rect { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 147 | __s32 x; |
| 148 | __s32 y; |
| 149 | __u32 w; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 150 | __u32 h; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 151 | }; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 152 | struct drm_vmw_control_stream_arg { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 153 | __u32 stream_id; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 154 | __u32 enabled; |
| 155 | __u32 flags; |
| 156 | __u32 color_key; |
| 157 | __u32 handle; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 158 | __u32 offset; |
| 159 | __s32 format; |
| 160 | __u32 size; |
| 161 | __u32 width; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 162 | __u32 height; |
| 163 | __u32 pitch[3]; |
| 164 | __u32 pad64; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 165 | struct drm_vmw_rect src; |
| 166 | struct drm_vmw_rect dst; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 167 | }; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 168 | #define DRM_VMW_CURSOR_BYPASS_ALL (1 << 0) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 169 | #define DRM_VMW_CURSOR_BYPASS_FLAGS (1) |
| 170 | struct drm_vmw_cursor_bypass_arg { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 171 | __u32 flags; |
| 172 | __u32 crtc_id; |
| 173 | __s32 xpos; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 174 | __s32 ypos; |
| 175 | __s32 xhot; |
| 176 | __s32 yhot; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 177 | }; |
| 178 | struct drm_vmw_stream_arg { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 179 | __u32 stream_id; |
| 180 | __u32 pad64; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 181 | }; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 182 | struct drm_vmw_get_3d_cap_arg { |
| 183 | __u64 buffer; |
| 184 | __u32 max_size; |
| 185 | __u32 pad64; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 186 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 187 | #define DRM_VMW_FENCE_FLAG_EXEC (1 << 0) |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 188 | #define DRM_VMW_FENCE_FLAG_QUERY (1 << 1) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 189 | #define DRM_VMW_WAIT_OPTION_UNREF (1 << 0) |
| 190 | struct drm_vmw_fence_wait_arg { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 191 | __u32 handle; |
| 192 | __s32 cookie_valid; |
| 193 | __u64 kernel_cookie; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 194 | __u64 timeout_us; |
| 195 | __s32 lazy; |
| 196 | __s32 flags; |
| 197 | __s32 wait_options; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 198 | __s32 pad64; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 199 | }; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 200 | struct drm_vmw_fence_signaled_arg { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 201 | __u32 handle; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 202 | __u32 flags; |
| 203 | __s32 signaled; |
| 204 | __u32 passed_seqno; |
| 205 | __u32 signaled_flags; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 206 | __u32 pad64; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 207 | }; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 208 | struct drm_vmw_fence_arg { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 209 | __u32 handle; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 210 | __u32 pad64; |
| 211 | }; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 212 | #define DRM_VMW_EVENT_FENCE_SIGNALED 0x80000000 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 213 | struct drm_vmw_event_fence { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 214 | struct drm_event base; |
| 215 | __u64 user_data; |
| 216 | __u32 tv_sec; |
| 217 | __u32 tv_usec; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 218 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 219 | #define DRM_VMW_FE_FLAG_REQ_TIME (1 << 0) |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 220 | struct drm_vmw_fence_event_arg { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 221 | __u64 fence_rep; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 222 | __u64 user_data; |
| 223 | __u32 handle; |
| 224 | __u32 flags; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 225 | }; |
| 226 | struct drm_vmw_present_arg { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 227 | __u32 fb_id; |
| 228 | __u32 sid; |
| 229 | __s32 dest_x; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 230 | __s32 dest_y; |
| 231 | __u64 clips_ptr; |
| 232 | __u32 num_clips; |
| 233 | __u32 pad64; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 234 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 235 | struct drm_vmw_present_readback_arg { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 236 | __u32 fb_id; |
| 237 | __u32 num_clips; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 238 | __u64 clips_ptr; |
| 239 | __u64 fence_rep; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 240 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 241 | struct drm_vmw_update_layout_arg { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 242 | __u32 num_outputs; |
| 243 | __u32 pad64; |
| 244 | __u64 rects; |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 245 | }; |
| 246 | enum drm_vmw_shader_type { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 247 | drm_vmw_shader_type_vs = 0, |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 248 | drm_vmw_shader_type_ps, |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 249 | }; |
| 250 | struct drm_vmw_shader_create_arg { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 251 | enum drm_vmw_shader_type shader_type; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 252 | __u32 size; |
| 253 | __u32 buffer_handle; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 254 | __u32 shader_handle; |
| 255 | __u64 offset; |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 256 | }; |
| 257 | struct drm_vmw_shader_arg { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 258 | __u32 handle; |
| 259 | __u32 pad64; |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 260 | }; |
| 261 | enum drm_vmw_surface_flags { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 262 | drm_vmw_surface_flag_shareable = (1 << 0), |
| 263 | drm_vmw_surface_flag_scanout = (1 << 1), |
Christopher Ferris | d32ca14 | 2020-02-04 16:16:51 -0800 | [diff] [blame] | 264 | drm_vmw_surface_flag_create_buffer = (1 << 2), |
| 265 | drm_vmw_surface_flag_coherent = (1 << 3), |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 266 | }; |
| 267 | struct drm_vmw_gb_surface_create_req { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 268 | __u32 svga3d_flags; |
| 269 | __u32 format; |
| 270 | __u32 mip_levels; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 271 | enum drm_vmw_surface_flags drm_surface_flags; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 272 | __u32 multisample_count; |
| 273 | __u32 autogen_filter; |
| 274 | __u32 buffer_handle; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 275 | __u32 array_size; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 276 | struct drm_vmw_size base_size; |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 277 | }; |
| 278 | struct drm_vmw_gb_surface_create_rep { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 279 | __u32 handle; |
| 280 | __u32 backup_size; |
| 281 | __u32 buffer_handle; |
| 282 | __u32 buffer_size; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 283 | __u64 buffer_map_handle; |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 284 | }; |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 285 | union drm_vmw_gb_surface_create_arg { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 286 | struct drm_vmw_gb_surface_create_rep rep; |
| 287 | struct drm_vmw_gb_surface_create_req req; |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 288 | }; |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 289 | struct drm_vmw_gb_surface_ref_rep { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 290 | struct drm_vmw_gb_surface_create_req creq; |
| 291 | struct drm_vmw_gb_surface_create_rep crep; |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 292 | }; |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 293 | union drm_vmw_gb_surface_reference_arg { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 294 | struct drm_vmw_gb_surface_ref_rep rep; |
| 295 | struct drm_vmw_surface_arg req; |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 296 | }; |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 297 | enum drm_vmw_synccpu_flags { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 298 | drm_vmw_synccpu_read = (1 << 0), |
| 299 | drm_vmw_synccpu_write = (1 << 1), |
| 300 | drm_vmw_synccpu_dontblock = (1 << 2), |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 301 | drm_vmw_synccpu_allow_cs = (1 << 3) |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 302 | }; |
| 303 | enum drm_vmw_synccpu_op { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 304 | drm_vmw_synccpu_grab, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 305 | drm_vmw_synccpu_release |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 306 | }; |
| 307 | struct drm_vmw_synccpu_arg { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 308 | enum drm_vmw_synccpu_op op; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 309 | enum drm_vmw_synccpu_flags flags; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 310 | __u32 handle; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 311 | __u32 pad64; |
| 312 | }; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 313 | enum drm_vmw_extended_context { |
| 314 | drm_vmw_context_legacy, |
| 315 | drm_vmw_context_dx |
| 316 | }; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 317 | union drm_vmw_extended_context_arg { |
| 318 | enum drm_vmw_extended_context req; |
| 319 | struct drm_vmw_context_arg rep; |
| 320 | }; |
Christopher Ferris | 525ce91 | 2017-07-26 13:12:53 -0700 | [diff] [blame] | 321 | struct drm_vmw_handle_close_arg { |
| 322 | __u32 handle; |
| 323 | __u32 pad64; |
| 324 | }; |
Christopher Ferris | 9ce2884 | 2018-10-25 12:11:39 -0700 | [diff] [blame] | 325 | #define drm_vmw_unref_dmabuf_arg drm_vmw_handle_close_arg |
| 326 | enum drm_vmw_surface_version { |
Christopher Ferris | af09c70 | 2020-06-01 20:29:29 -0700 | [diff] [blame] | 327 | drm_vmw_gb_surface_v1, |
Christopher Ferris | 9ce2884 | 2018-10-25 12:11:39 -0700 | [diff] [blame] | 328 | }; |
| 329 | struct drm_vmw_gb_surface_create_ext_req { |
| 330 | struct drm_vmw_gb_surface_create_req base; |
| 331 | enum drm_vmw_surface_version version; |
Christopher Ferris | af09c70 | 2020-06-01 20:29:29 -0700 | [diff] [blame] | 332 | __u32 svga3d_flags_upper_32_bits; |
| 333 | __u32 multisample_pattern; |
| 334 | __u32 quality_level; |
| 335 | __u32 buffer_byte_stride; |
| 336 | __u32 must_be_zero; |
Christopher Ferris | 9ce2884 | 2018-10-25 12:11:39 -0700 | [diff] [blame] | 337 | }; |
| 338 | union drm_vmw_gb_surface_create_ext_arg { |
| 339 | struct drm_vmw_gb_surface_create_rep rep; |
| 340 | struct drm_vmw_gb_surface_create_ext_req req; |
| 341 | }; |
| 342 | struct drm_vmw_gb_surface_ref_ext_rep { |
| 343 | struct drm_vmw_gb_surface_create_ext_req creq; |
| 344 | struct drm_vmw_gb_surface_create_rep crep; |
| 345 | }; |
| 346 | union drm_vmw_gb_surface_reference_ext_arg { |
| 347 | struct drm_vmw_gb_surface_ref_ext_rep rep; |
| 348 | struct drm_vmw_surface_arg req; |
| 349 | }; |
Christopher Ferris | bb9fcb4 | 2020-04-06 11:38:04 -0700 | [diff] [blame] | 350 | struct drm_vmw_msg_arg { |
| 351 | __u64 send; |
| 352 | __u64 receive; |
| 353 | __s32 send_only; |
| 354 | __u32 receive_len; |
| 355 | }; |
Christopher Ferris | 2abfa9e | 2021-11-01 16:26:06 -0700 | [diff] [blame] | 356 | struct drm_vmw_mksstat_add_arg { |
| 357 | __u64 stat; |
| 358 | __u64 info; |
| 359 | __u64 strs; |
| 360 | __u64 stat_len; |
| 361 | __u64 info_len; |
| 362 | __u64 strs_len; |
| 363 | __u64 description; |
| 364 | __u64 id; |
| 365 | }; |
| 366 | struct drm_vmw_mksstat_remove_arg { |
| 367 | __u64 id; |
| 368 | }; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 369 | #ifdef __cplusplus |
Christopher Ferris | 48fe0ae | 2019-01-10 15:59:33 -0800 | [diff] [blame] | 370 | } |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 371 | #endif |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 372 | #endif |