vmwgfx_drm.h 37 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292
  1. /**************************************************************************
  2. *
  3. * Copyright © 2009-2022 VMware, Inc., Palo Alto, CA., USA
  4. * All Rights Reserved.
  5. *
  6. * Permission is hereby granted, free of charge, to any person obtaining a
  7. * copy of this software and associated documentation files (the
  8. * "Software"), to deal in the Software without restriction, including
  9. * without limitation the rights to use, copy, modify, merge, publish,
  10. * distribute, sub license, and/or sell copies of the Software, and to
  11. * permit persons to whom the Software is furnished to do so, subject to
  12. * the following conditions:
  13. *
  14. * The above copyright notice and this permission notice (including the
  15. * next paragraph) shall be included in all copies or substantial portions
  16. * of the Software.
  17. *
  18. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  19. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  20. * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
  21. * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM,
  22. * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  23. * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  24. * USE OR OTHER DEALINGS IN THE SOFTWARE.
  25. *
  26. **************************************************************************/
  27. #ifndef __VMWGFX_DRM_H__
  28. #define __VMWGFX_DRM_H__
  29. #include "drm.h"
  30. #if defined(__cplusplus)
  31. extern "C" {
  32. #endif
  33. #define DRM_VMW_MAX_SURFACE_FACES 6
  34. #define DRM_VMW_MAX_MIP_LEVELS 24
  35. #define DRM_VMW_GET_PARAM 0
  36. #define DRM_VMW_ALLOC_DMABUF 1
  37. #define DRM_VMW_ALLOC_BO 1
  38. #define DRM_VMW_UNREF_DMABUF 2
  39. #define DRM_VMW_HANDLE_CLOSE 2
  40. #define DRM_VMW_CURSOR_BYPASS 3
  41. /* guarded by DRM_VMW_PARAM_NUM_STREAMS != 0*/
  42. #define DRM_VMW_CONTROL_STREAM 4
  43. #define DRM_VMW_CLAIM_STREAM 5
  44. #define DRM_VMW_UNREF_STREAM 6
  45. /* guarded by DRM_VMW_PARAM_3D == 1 */
  46. #define DRM_VMW_CREATE_CONTEXT 7
  47. #define DRM_VMW_UNREF_CONTEXT 8
  48. #define DRM_VMW_CREATE_SURFACE 9
  49. #define DRM_VMW_UNREF_SURFACE 10
  50. #define DRM_VMW_REF_SURFACE 11
  51. #define DRM_VMW_EXECBUF 12
  52. #define DRM_VMW_GET_3D_CAP 13
  53. #define DRM_VMW_FENCE_WAIT 14
  54. #define DRM_VMW_FENCE_SIGNALED 15
  55. #define DRM_VMW_FENCE_UNREF 16
  56. #define DRM_VMW_FENCE_EVENT 17
  57. #define DRM_VMW_PRESENT 18
  58. #define DRM_VMW_PRESENT_READBACK 19
  59. #define DRM_VMW_UPDATE_LAYOUT 20
  60. #define DRM_VMW_CREATE_SHADER 21
  61. #define DRM_VMW_UNREF_SHADER 22
  62. #define DRM_VMW_GB_SURFACE_CREATE 23
  63. #define DRM_VMW_GB_SURFACE_REF 24
  64. #define DRM_VMW_SYNCCPU 25
  65. #define DRM_VMW_CREATE_EXTENDED_CONTEXT 26
  66. #define DRM_VMW_GB_SURFACE_CREATE_EXT 27
  67. #define DRM_VMW_GB_SURFACE_REF_EXT 28
  68. #define DRM_VMW_MSG 29
  69. #define DRM_VMW_MKSSTAT_RESET 30
  70. #define DRM_VMW_MKSSTAT_ADD 31
  71. #define DRM_VMW_MKSSTAT_REMOVE 32
  72. /*************************************************************************/
  73. /**
  74. * DRM_VMW_GET_PARAM - get device information.
  75. *
  76. * DRM_VMW_PARAM_FIFO_OFFSET:
  77. * Offset to use to map the first page of the FIFO read-only.
  78. * The fifo is mapped using the mmap() system call on the drm device.
  79. *
  80. * DRM_VMW_PARAM_OVERLAY_IOCTL:
  81. * Does the driver support the overlay ioctl.
  82. *
  83. * DRM_VMW_PARAM_SM4_1
  84. * SM4_1 support is enabled.
  85. *
  86. * DRM_VMW_PARAM_SM5
  87. * SM5 support is enabled.
  88. *
  89. * DRM_VMW_PARAM_GL43
  90. * SM5.1+GL4.3 support is enabled.
  91. *
  92. * DRM_VMW_PARAM_DEVICE_ID
  93. * PCI ID of the underlying SVGA device.
  94. */
  95. #define DRM_VMW_PARAM_NUM_STREAMS 0
  96. #define DRM_VMW_PARAM_NUM_FREE_STREAMS 1
  97. #define DRM_VMW_PARAM_3D 2
  98. #define DRM_VMW_PARAM_HW_CAPS 3
  99. #define DRM_VMW_PARAM_FIFO_CAPS 4
  100. #define DRM_VMW_PARAM_MAX_FB_SIZE 5
  101. #define DRM_VMW_PARAM_FIFO_HW_VERSION 6
  102. #define DRM_VMW_PARAM_MAX_SURF_MEMORY 7
  103. #define DRM_VMW_PARAM_3D_CAPS_SIZE 8
  104. #define DRM_VMW_PARAM_MAX_MOB_MEMORY 9
  105. #define DRM_VMW_PARAM_MAX_MOB_SIZE 10
  106. #define DRM_VMW_PARAM_SCREEN_TARGET 11
  107. #define DRM_VMW_PARAM_DX 12
  108. #define DRM_VMW_PARAM_HW_CAPS2 13
  109. #define DRM_VMW_PARAM_SM4_1 14
  110. #define DRM_VMW_PARAM_SM5 15
  111. #define DRM_VMW_PARAM_GL43 16
  112. #define DRM_VMW_PARAM_DEVICE_ID 17
  113. /**
  114. * enum drm_vmw_handle_type - handle type for ref ioctls
  115. *
  116. */
  117. enum drm_vmw_handle_type {
  118. DRM_VMW_HANDLE_LEGACY = 0,
  119. DRM_VMW_HANDLE_PRIME = 1
  120. };
  121. /**
  122. * struct drm_vmw_getparam_arg
  123. *
  124. * @value: Returned value. //Out
  125. * @param: Parameter to query. //In.
  126. *
  127. * Argument to the DRM_VMW_GET_PARAM Ioctl.
  128. */
  129. struct drm_vmw_getparam_arg {
  130. __u64 value;
  131. __u32 param;
  132. __u32 pad64;
  133. };
  134. /*************************************************************************/
  135. /**
  136. * DRM_VMW_CREATE_CONTEXT - Create a host context.
  137. *
  138. * Allocates a device unique context id, and queues a create context command
  139. * for the host. Does not wait for host completion.
  140. */
  141. /**
  142. * struct drm_vmw_context_arg
  143. *
  144. * @cid: Device unique context ID.
  145. *
  146. * Output argument to the DRM_VMW_CREATE_CONTEXT Ioctl.
  147. * Input argument to the DRM_VMW_UNREF_CONTEXT Ioctl.
  148. */
  149. struct drm_vmw_context_arg {
  150. __s32 cid;
  151. __u32 pad64;
  152. };
  153. /*************************************************************************/
  154. /**
  155. * DRM_VMW_UNREF_CONTEXT - Create a host context.
  156. *
  157. * Frees a global context id, and queues a destroy host command for the host.
  158. * Does not wait for host completion. The context ID can be used directly
  159. * in the command stream and shows up as the same context ID on the host.
  160. */
  161. /*************************************************************************/
  162. /**
  163. * DRM_VMW_CREATE_SURFACE - Create a host suface.
  164. *
  165. * Allocates a device unique surface id, and queues a create surface command
  166. * for the host. Does not wait for host completion. The surface ID can be
  167. * used directly in the command stream and shows up as the same surface
  168. * ID on the host.
  169. */
  170. /**
  171. * struct drm_wmv_surface_create_req
  172. *
  173. * @flags: Surface flags as understood by the host.
  174. * @format: Surface format as understood by the host.
  175. * @mip_levels: Number of mip levels for each face.
  176. * An unused face should have 0 encoded.
  177. * @size_addr: Address of a user-space array of sruct drm_vmw_size
  178. * cast to an __u64 for 32-64 bit compatibility.
  179. * The size of the array should equal the total number of mipmap levels.
  180. * @shareable: Boolean whether other clients (as identified by file descriptors)
  181. * may reference this surface.
  182. * @scanout: Boolean whether the surface is intended to be used as a
  183. * scanout.
  184. *
  185. * Input data to the DRM_VMW_CREATE_SURFACE Ioctl.
  186. * Output data from the DRM_VMW_REF_SURFACE Ioctl.
  187. */
  188. struct drm_vmw_surface_create_req {
  189. __u32 flags;
  190. __u32 format;
  191. __u32 mip_levels[DRM_VMW_MAX_SURFACE_FACES];
  192. __u64 size_addr;
  193. __s32 shareable;
  194. __s32 scanout;
  195. };
  196. /**
  197. * struct drm_wmv_surface_arg
  198. *
  199. * @sid: Surface id of created surface or surface to destroy or reference.
  200. * @handle_type: Handle type for DRM_VMW_REF_SURFACE Ioctl.
  201. *
  202. * Output data from the DRM_VMW_CREATE_SURFACE Ioctl.
  203. * Input argument to the DRM_VMW_UNREF_SURFACE Ioctl.
  204. * Input argument to the DRM_VMW_REF_SURFACE Ioctl.
  205. */
  206. struct drm_vmw_surface_arg {
  207. __s32 sid;
  208. enum drm_vmw_handle_type handle_type;
  209. };
  210. /**
  211. * struct drm_vmw_size ioctl.
  212. *
  213. * @width - mip level width
  214. * @height - mip level height
  215. * @depth - mip level depth
  216. *
  217. * Description of a mip level.
  218. * Input data to the DRM_WMW_CREATE_SURFACE Ioctl.
  219. */
  220. struct drm_vmw_size {
  221. __u32 width;
  222. __u32 height;
  223. __u32 depth;
  224. __u32 pad64;
  225. };
  226. /**
  227. * union drm_vmw_surface_create_arg
  228. *
  229. * @rep: Output data as described above.
  230. * @req: Input data as described above.
  231. *
  232. * Argument to the DRM_VMW_CREATE_SURFACE Ioctl.
  233. */
  234. union drm_vmw_surface_create_arg {
  235. struct drm_vmw_surface_arg rep;
  236. struct drm_vmw_surface_create_req req;
  237. };
  238. /*************************************************************************/
  239. /**
  240. * DRM_VMW_REF_SURFACE - Reference a host surface.
  241. *
  242. * Puts a reference on a host surface with a give sid, as previously
  243. * returned by the DRM_VMW_CREATE_SURFACE ioctl.
  244. * A reference will make sure the surface isn't destroyed while we hold
  245. * it and will allow the calling client to use the surface ID in the command
  246. * stream.
  247. *
  248. * On successful return, the Ioctl returns the surface information given
  249. * in the DRM_VMW_CREATE_SURFACE ioctl.
  250. */
  251. /**
  252. * union drm_vmw_surface_reference_arg
  253. *
  254. * @rep: Output data as described above.
  255. * @req: Input data as described above.
  256. *
  257. * Argument to the DRM_VMW_REF_SURFACE Ioctl.
  258. */
  259. union drm_vmw_surface_reference_arg {
  260. struct drm_vmw_surface_create_req rep;
  261. struct drm_vmw_surface_arg req;
  262. };
  263. /*************************************************************************/
  264. /**
  265. * DRM_VMW_UNREF_SURFACE - Unreference a host surface.
  266. *
  267. * Clear a reference previously put on a host surface.
  268. * When all references are gone, including the one implicitly placed
  269. * on creation,
  270. * a destroy surface command will be queued for the host.
  271. * Does not wait for completion.
  272. */
  273. /*************************************************************************/
  274. /**
  275. * DRM_VMW_EXECBUF
  276. *
  277. * Submit a command buffer for execution on the host, and return a
  278. * fence seqno that when signaled, indicates that the command buffer has
  279. * executed.
  280. */
  281. /**
  282. * struct drm_vmw_execbuf_arg
  283. *
  284. * @commands: User-space address of a command buffer cast to an __u64.
  285. * @command-size: Size in bytes of the command buffer.
  286. * @throttle-us: Sleep until software is less than @throttle_us
  287. * microseconds ahead of hardware. The driver may round this value
  288. * to the nearest kernel tick.
  289. * @fence_rep: User-space address of a struct drm_vmw_fence_rep cast to an
  290. * __u64.
  291. * @version: Allows expanding the execbuf ioctl parameters without breaking
  292. * backwards compatibility, since user-space will always tell the kernel
  293. * which version it uses.
  294. * @flags: Execbuf flags.
  295. * @imported_fence_fd: FD for a fence imported from another device
  296. *
  297. * Argument to the DRM_VMW_EXECBUF Ioctl.
  298. */
  299. #define DRM_VMW_EXECBUF_VERSION 2
  300. #define DRM_VMW_EXECBUF_FLAG_IMPORT_FENCE_FD (1 << 0)
  301. #define DRM_VMW_EXECBUF_FLAG_EXPORT_FENCE_FD (1 << 1)
  302. struct drm_vmw_execbuf_arg {
  303. __u64 commands;
  304. __u32 command_size;
  305. __u32 throttle_us;
  306. __u64 fence_rep;
  307. __u32 version;
  308. __u32 flags;
  309. __u32 context_handle;
  310. __s32 imported_fence_fd;
  311. };
  312. /**
  313. * struct drm_vmw_fence_rep
  314. *
  315. * @handle: Fence object handle for fence associated with a command submission.
  316. * @mask: Fence flags relevant for this fence object.
  317. * @seqno: Fence sequence number in fifo. A fence object with a lower
  318. * seqno will signal the EXEC flag before a fence object with a higher
  319. * seqno. This can be used by user-space to avoid kernel calls to determine
  320. * whether a fence has signaled the EXEC flag. Note that @seqno will
  321. * wrap at 32-bit.
  322. * @passed_seqno: The highest seqno number processed by the hardware
  323. * so far. This can be used to mark user-space fence objects as signaled, and
  324. * to determine whether a fence seqno might be stale.
  325. * @fd: FD associated with the fence, -1 if not exported
  326. * @error: This member should've been set to -EFAULT on submission.
  327. * The following actions should be take on completion:
  328. * error == -EFAULT: Fence communication failed. The host is synchronized.
  329. * Use the last fence id read from the FIFO fence register.
  330. * error != 0 && error != -EFAULT:
  331. * Fence submission failed. The host is synchronized. Use the fence_seq member.
  332. * error == 0: All is OK, The host may not be synchronized.
  333. * Use the fence_seq member.
  334. *
  335. * Input / Output data to the DRM_VMW_EXECBUF Ioctl.
  336. */
  337. struct drm_vmw_fence_rep {
  338. __u32 handle;
  339. __u32 mask;
  340. __u32 seqno;
  341. __u32 passed_seqno;
  342. __s32 fd;
  343. __s32 error;
  344. };
  345. /*************************************************************************/
  346. /**
  347. * DRM_VMW_ALLOC_BO
  348. *
  349. * Allocate a buffer object that is visible also to the host.
  350. * NOTE: The buffer is
  351. * identified by a handle and an offset, which are private to the guest, but
  352. * useable in the command stream. The guest kernel may translate these
  353. * and patch up the command stream accordingly. In the future, the offset may
  354. * be zero at all times, or it may disappear from the interface before it is
  355. * fixed.
  356. *
  357. * The buffer object may stay user-space mapped in the guest at all times,
  358. * and is thus suitable for sub-allocation.
  359. *
  360. * Buffer objects are mapped using the mmap() syscall on the drm device.
  361. */
  362. /**
  363. * struct drm_vmw_alloc_bo_req
  364. *
  365. * @size: Required minimum size of the buffer.
  366. *
  367. * Input data to the DRM_VMW_ALLOC_BO Ioctl.
  368. */
  369. struct drm_vmw_alloc_bo_req {
  370. __u32 size;
  371. __u32 pad64;
  372. };
  373. #define drm_vmw_alloc_dmabuf_req drm_vmw_alloc_bo_req
  374. /**
  375. * struct drm_vmw_bo_rep
  376. *
  377. * @map_handle: Offset to use in the mmap() call used to map the buffer.
  378. * @handle: Handle unique to this buffer. Used for unreferencing.
  379. * @cur_gmr_id: GMR id to use in the command stream when this buffer is
  380. * referenced. See not above.
  381. * @cur_gmr_offset: Offset to use in the command stream when this buffer is
  382. * referenced. See note above.
  383. *
  384. * Output data from the DRM_VMW_ALLOC_BO Ioctl.
  385. */
  386. struct drm_vmw_bo_rep {
  387. __u64 map_handle;
  388. __u32 handle;
  389. __u32 cur_gmr_id;
  390. __u32 cur_gmr_offset;
  391. __u32 pad64;
  392. };
  393. #define drm_vmw_dmabuf_rep drm_vmw_bo_rep
  394. /**
  395. * union drm_vmw_alloc_bo_arg
  396. *
  397. * @req: Input data as described above.
  398. * @rep: Output data as described above.
  399. *
  400. * Argument to the DRM_VMW_ALLOC_BO Ioctl.
  401. */
  402. union drm_vmw_alloc_bo_arg {
  403. struct drm_vmw_alloc_bo_req req;
  404. struct drm_vmw_bo_rep rep;
  405. };
  406. #define drm_vmw_alloc_dmabuf_arg drm_vmw_alloc_bo_arg
  407. /*************************************************************************/
  408. /**
  409. * DRM_VMW_CONTROL_STREAM - Control overlays, aka streams.
  410. *
  411. * This IOCTL controls the overlay units of the svga device.
  412. * The SVGA overlay units does not work like regular hardware units in
  413. * that they do not automaticaly read back the contents of the given dma
  414. * buffer. But instead only read back for each call to this ioctl, and
  415. * at any point between this call being made and a following call that
  416. * either changes the buffer or disables the stream.
  417. */
  418. /**
  419. * struct drm_vmw_rect
  420. *
  421. * Defines a rectangle. Used in the overlay ioctl to define
  422. * source and destination rectangle.
  423. */
  424. struct drm_vmw_rect {
  425. __s32 x;
  426. __s32 y;
  427. __u32 w;
  428. __u32 h;
  429. };
  430. /**
  431. * struct drm_vmw_control_stream_arg
  432. *
  433. * @stream_id: Stearm to control
  434. * @enabled: If false all following arguments are ignored.
  435. * @handle: Handle to buffer for getting data from.
  436. * @format: Format of the overlay as understood by the host.
  437. * @width: Width of the overlay.
  438. * @height: Height of the overlay.
  439. * @size: Size of the overlay in bytes.
  440. * @pitch: Array of pitches, the two last are only used for YUV12 formats.
  441. * @offset: Offset from start of dma buffer to overlay.
  442. * @src: Source rect, must be within the defined area above.
  443. * @dst: Destination rect, x and y may be negative.
  444. *
  445. * Argument to the DRM_VMW_CONTROL_STREAM Ioctl.
  446. */
  447. struct drm_vmw_control_stream_arg {
  448. __u32 stream_id;
  449. __u32 enabled;
  450. __u32 flags;
  451. __u32 color_key;
  452. __u32 handle;
  453. __u32 offset;
  454. __s32 format;
  455. __u32 size;
  456. __u32 width;
  457. __u32 height;
  458. __u32 pitch[3];
  459. __u32 pad64;
  460. struct drm_vmw_rect src;
  461. struct drm_vmw_rect dst;
  462. };
  463. /*************************************************************************/
  464. /**
  465. * DRM_VMW_CURSOR_BYPASS - Give extra information about cursor bypass.
  466. *
  467. */
  468. #define DRM_VMW_CURSOR_BYPASS_ALL (1 << 0)
  469. #define DRM_VMW_CURSOR_BYPASS_FLAGS (1)
  470. /**
  471. * struct drm_vmw_cursor_bypass_arg
  472. *
  473. * @flags: Flags.
  474. * @crtc_id: Crtc id, only used if DMR_CURSOR_BYPASS_ALL isn't passed.
  475. * @xpos: X position of cursor.
  476. * @ypos: Y position of cursor.
  477. * @xhot: X hotspot.
  478. * @yhot: Y hotspot.
  479. *
  480. * Argument to the DRM_VMW_CURSOR_BYPASS Ioctl.
  481. */
  482. struct drm_vmw_cursor_bypass_arg {
  483. __u32 flags;
  484. __u32 crtc_id;
  485. __s32 xpos;
  486. __s32 ypos;
  487. __s32 xhot;
  488. __s32 yhot;
  489. };
  490. /*************************************************************************/
  491. /**
  492. * DRM_VMW_CLAIM_STREAM - Claim a single stream.
  493. */
  494. /**
  495. * struct drm_vmw_context_arg
  496. *
  497. * @stream_id: Device unique context ID.
  498. *
  499. * Output argument to the DRM_VMW_CREATE_CONTEXT Ioctl.
  500. * Input argument to the DRM_VMW_UNREF_CONTEXT Ioctl.
  501. */
  502. struct drm_vmw_stream_arg {
  503. __u32 stream_id;
  504. __u32 pad64;
  505. };
  506. /*************************************************************************/
  507. /**
  508. * DRM_VMW_UNREF_STREAM - Unclaim a stream.
  509. *
  510. * Return a single stream that was claimed by this process. Also makes
  511. * sure that the stream has been stopped.
  512. */
  513. /*************************************************************************/
  514. /**
  515. * DRM_VMW_GET_3D_CAP
  516. *
  517. * Read 3D capabilities from the FIFO
  518. *
  519. */
  520. /**
  521. * struct drm_vmw_get_3d_cap_arg
  522. *
  523. * @buffer: Pointer to a buffer for capability data, cast to an __u64
  524. * @size: Max size to copy
  525. *
  526. * Input argument to the DRM_VMW_GET_3D_CAP_IOCTL
  527. * ioctls.
  528. */
  529. struct drm_vmw_get_3d_cap_arg {
  530. __u64 buffer;
  531. __u32 max_size;
  532. __u32 pad64;
  533. };
  534. /*************************************************************************/
  535. /**
  536. * DRM_VMW_FENCE_WAIT
  537. *
  538. * Waits for a fence object to signal. The wait is interruptible, so that
  539. * signals may be delivered during the interrupt. The wait may timeout,
  540. * in which case the calls returns -EBUSY. If the wait is restarted,
  541. * that is restarting without resetting @cookie_valid to zero,
  542. * the timeout is computed from the first call.
  543. *
  544. * The flags argument to the DRM_VMW_FENCE_WAIT ioctl indicates what to wait
  545. * on:
  546. * DRM_VMW_FENCE_FLAG_EXEC: All commands ahead of the fence in the command
  547. * stream
  548. * have executed.
  549. * DRM_VMW_FENCE_FLAG_QUERY: All query results resulting from query finish
  550. * commands
  551. * in the buffer given to the EXECBUF ioctl returning the fence object handle
  552. * are available to user-space.
  553. *
  554. * DRM_VMW_WAIT_OPTION_UNREF: If this wait option is given, and the
  555. * fenc wait ioctl returns 0, the fence object has been unreferenced after
  556. * the wait.
  557. */
  558. #define DRM_VMW_FENCE_FLAG_EXEC (1 << 0)
  559. #define DRM_VMW_FENCE_FLAG_QUERY (1 << 1)
  560. #define DRM_VMW_WAIT_OPTION_UNREF (1 << 0)
  561. /**
  562. * struct drm_vmw_fence_wait_arg
  563. *
  564. * @handle: Fence object handle as returned by the DRM_VMW_EXECBUF ioctl.
  565. * @cookie_valid: Must be reset to 0 on first call. Left alone on restart.
  566. * @kernel_cookie: Set to 0 on first call. Left alone on restart.
  567. * @timeout_us: Wait timeout in microseconds. 0 for indefinite timeout.
  568. * @lazy: Set to 1 if timing is not critical. Allow more than a kernel tick
  569. * before returning.
  570. * @flags: Fence flags to wait on.
  571. * @wait_options: Options that control the behaviour of the wait ioctl.
  572. *
  573. * Input argument to the DRM_VMW_FENCE_WAIT ioctl.
  574. */
  575. struct drm_vmw_fence_wait_arg {
  576. __u32 handle;
  577. __s32 cookie_valid;
  578. __u64 kernel_cookie;
  579. __u64 timeout_us;
  580. __s32 lazy;
  581. __s32 flags;
  582. __s32 wait_options;
  583. __s32 pad64;
  584. };
  585. /*************************************************************************/
  586. /**
  587. * DRM_VMW_FENCE_SIGNALED
  588. *
  589. * Checks if a fence object is signaled..
  590. */
  591. /**
  592. * struct drm_vmw_fence_signaled_arg
  593. *
  594. * @handle: Fence object handle as returned by the DRM_VMW_EXECBUF ioctl.
  595. * @flags: Fence object flags input to DRM_VMW_FENCE_SIGNALED ioctl
  596. * @signaled: Out: Flags signaled.
  597. * @sequence: Out: Highest sequence passed so far. Can be used to signal the
  598. * EXEC flag of user-space fence objects.
  599. *
  600. * Input/Output argument to the DRM_VMW_FENCE_SIGNALED and DRM_VMW_FENCE_UNREF
  601. * ioctls.
  602. */
  603. struct drm_vmw_fence_signaled_arg {
  604. __u32 handle;
  605. __u32 flags;
  606. __s32 signaled;
  607. __u32 passed_seqno;
  608. __u32 signaled_flags;
  609. __u32 pad64;
  610. };
  611. /*************************************************************************/
  612. /**
  613. * DRM_VMW_FENCE_UNREF
  614. *
  615. * Unreferences a fence object, and causes it to be destroyed if there are no
  616. * other references to it.
  617. *
  618. */
  619. /**
  620. * struct drm_vmw_fence_arg
  621. *
  622. * @handle: Fence object handle as returned by the DRM_VMW_EXECBUF ioctl.
  623. *
  624. * Input/Output argument to the DRM_VMW_FENCE_UNREF ioctl..
  625. */
  626. struct drm_vmw_fence_arg {
  627. __u32 handle;
  628. __u32 pad64;
  629. };
  630. /*************************************************************************/
  631. /**
  632. * DRM_VMW_FENCE_EVENT
  633. *
  634. * Queues an event on a fence to be delivered on the drm character device
  635. * when the fence has signaled the DRM_VMW_FENCE_FLAG_EXEC flag.
  636. * Optionally the approximate time when the fence signaled is
  637. * given by the event.
  638. */
  639. /*
  640. * The event type
  641. */
  642. #define DRM_VMW_EVENT_FENCE_SIGNALED 0x80000000
  643. struct drm_vmw_event_fence {
  644. struct drm_event base;
  645. __u64 user_data;
  646. __u32 tv_sec;
  647. __u32 tv_usec;
  648. };
  649. /*
  650. * Flags that may be given to the command.
  651. */
  652. /* Request fence signaled time on the event. */
  653. #define DRM_VMW_FE_FLAG_REQ_TIME (1 << 0)
  654. /**
  655. * struct drm_vmw_fence_event_arg
  656. *
  657. * @fence_rep: Pointer to fence_rep structure cast to __u64 or 0 if
  658. * the fence is not supposed to be referenced by user-space.
  659. * @user_info: Info to be delivered with the event.
  660. * @handle: Attach the event to this fence only.
  661. * @flags: A set of flags as defined above.
  662. */
  663. struct drm_vmw_fence_event_arg {
  664. __u64 fence_rep;
  665. __u64 user_data;
  666. __u32 handle;
  667. __u32 flags;
  668. };
  669. /*************************************************************************/
  670. /**
  671. * DRM_VMW_PRESENT
  672. *
  673. * Executes an SVGA present on a given fb for a given surface. The surface
  674. * is placed on the framebuffer. Cliprects are given relative to the given
  675. * point (the point disignated by dest_{x|y}).
  676. *
  677. */
  678. /**
  679. * struct drm_vmw_present_arg
  680. * @fb_id: framebuffer id to present / read back from.
  681. * @sid: Surface id to present from.
  682. * @dest_x: X placement coordinate for surface.
  683. * @dest_y: Y placement coordinate for surface.
  684. * @clips_ptr: Pointer to an array of clip rects cast to an __u64.
  685. * @num_clips: Number of cliprects given relative to the framebuffer origin,
  686. * in the same coordinate space as the frame buffer.
  687. * @pad64: Unused 64-bit padding.
  688. *
  689. * Input argument to the DRM_VMW_PRESENT ioctl.
  690. */
  691. struct drm_vmw_present_arg {
  692. __u32 fb_id;
  693. __u32 sid;
  694. __s32 dest_x;
  695. __s32 dest_y;
  696. __u64 clips_ptr;
  697. __u32 num_clips;
  698. __u32 pad64;
  699. };
  700. /*************************************************************************/
  701. /**
  702. * DRM_VMW_PRESENT_READBACK
  703. *
  704. * Executes an SVGA present readback from a given fb to the dma buffer
  705. * currently bound as the fb. If there is no dma buffer bound to the fb,
  706. * an error will be returned.
  707. *
  708. */
  709. /**
  710. * struct drm_vmw_present_arg
  711. * @fb_id: fb_id to present / read back from.
  712. * @num_clips: Number of cliprects.
  713. * @clips_ptr: Pointer to an array of clip rects cast to an __u64.
  714. * @fence_rep: Pointer to a struct drm_vmw_fence_rep, cast to an __u64.
  715. * If this member is NULL, then the ioctl should not return a fence.
  716. */
  717. struct drm_vmw_present_readback_arg {
  718. __u32 fb_id;
  719. __u32 num_clips;
  720. __u64 clips_ptr;
  721. __u64 fence_rep;
  722. };
  723. /*************************************************************************/
  724. /**
  725. * DRM_VMW_UPDATE_LAYOUT - Update layout
  726. *
  727. * Updates the preferred modes and connection status for connectors. The
  728. * command consists of one drm_vmw_update_layout_arg pointing to an array
  729. * of num_outputs drm_vmw_rect's.
  730. */
  731. /**
  732. * struct drm_vmw_update_layout_arg
  733. *
  734. * @num_outputs: number of active connectors
  735. * @rects: pointer to array of drm_vmw_rect cast to an __u64
  736. *
  737. * Input argument to the DRM_VMW_UPDATE_LAYOUT Ioctl.
  738. */
  739. struct drm_vmw_update_layout_arg {
  740. __u32 num_outputs;
  741. __u32 pad64;
  742. __u64 rects;
  743. };
  744. /*************************************************************************/
  745. /**
  746. * DRM_VMW_CREATE_SHADER - Create shader
  747. *
  748. * Creates a shader and optionally binds it to a dma buffer containing
  749. * the shader byte-code.
  750. */
  751. /**
  752. * enum drm_vmw_shader_type - Shader types
  753. */
  754. enum drm_vmw_shader_type {
  755. drm_vmw_shader_type_vs = 0,
  756. drm_vmw_shader_type_ps,
  757. };
  758. /**
  759. * struct drm_vmw_shader_create_arg
  760. *
  761. * @shader_type: Shader type of the shader to create.
  762. * @size: Size of the byte-code in bytes.
  763. * where the shader byte-code starts
  764. * @buffer_handle: Buffer handle identifying the buffer containing the
  765. * shader byte-code
  766. * @shader_handle: On successful completion contains a handle that
  767. * can be used to subsequently identify the shader.
  768. * @offset: Offset in bytes into the buffer given by @buffer_handle,
  769. *
  770. * Input / Output argument to the DRM_VMW_CREATE_SHADER Ioctl.
  771. */
  772. struct drm_vmw_shader_create_arg {
  773. enum drm_vmw_shader_type shader_type;
  774. __u32 size;
  775. __u32 buffer_handle;
  776. __u32 shader_handle;
  777. __u64 offset;
  778. };
  779. /*************************************************************************/
  780. /**
  781. * DRM_VMW_UNREF_SHADER - Unreferences a shader
  782. *
  783. * Destroys a user-space reference to a shader, optionally destroying
  784. * it.
  785. */
  786. /**
  787. * struct drm_vmw_shader_arg
  788. *
  789. * @handle: Handle identifying the shader to destroy.
  790. *
  791. * Input argument to the DRM_VMW_UNREF_SHADER ioctl.
  792. */
  793. struct drm_vmw_shader_arg {
  794. __u32 handle;
  795. __u32 pad64;
  796. };
  797. /*************************************************************************/
  798. /**
  799. * DRM_VMW_GB_SURFACE_CREATE - Create a host guest-backed surface.
  800. *
  801. * Allocates a surface handle and queues a create surface command
  802. * for the host on the first use of the surface. The surface ID can
  803. * be used as the surface ID in commands referencing the surface.
  804. */
  805. /**
  806. * enum drm_vmw_surface_flags
  807. *
  808. * @drm_vmw_surface_flag_shareable: Whether the surface is shareable
  809. * @drm_vmw_surface_flag_scanout: Whether the surface is a scanout
  810. * surface.
  811. * @drm_vmw_surface_flag_create_buffer: Create a backup buffer if none is
  812. * given.
  813. * @drm_vmw_surface_flag_coherent: Back surface with coherent memory.
  814. */
  815. enum drm_vmw_surface_flags {
  816. drm_vmw_surface_flag_shareable = (1 << 0),
  817. drm_vmw_surface_flag_scanout = (1 << 1),
  818. drm_vmw_surface_flag_create_buffer = (1 << 2),
  819. drm_vmw_surface_flag_coherent = (1 << 3),
  820. };
  821. /**
  822. * struct drm_vmw_gb_surface_create_req
  823. *
  824. * @svga3d_flags: SVGA3d surface flags for the device.
  825. * @format: SVGA3d format.
  826. * @mip_level: Number of mip levels for all faces.
  827. * @drm_surface_flags Flags as described above.
  828. * @multisample_count Future use. Set to 0.
  829. * @autogen_filter Future use. Set to 0.
  830. * @buffer_handle Buffer handle of backup buffer. SVGA3D_INVALID_ID
  831. * if none.
  832. * @base_size Size of the base mip level for all faces.
  833. * @array_size Must be zero for non-DX hardware, and if non-zero
  834. * svga3d_flags must have proper bind flags setup.
  835. *
  836. * Input argument to the DRM_VMW_GB_SURFACE_CREATE Ioctl.
  837. * Part of output argument for the DRM_VMW_GB_SURFACE_REF Ioctl.
  838. */
  839. struct drm_vmw_gb_surface_create_req {
  840. __u32 svga3d_flags;
  841. __u32 format;
  842. __u32 mip_levels;
  843. enum drm_vmw_surface_flags drm_surface_flags;
  844. __u32 multisample_count;
  845. __u32 autogen_filter;
  846. __u32 buffer_handle;
  847. __u32 array_size;
  848. struct drm_vmw_size base_size;
  849. };
  850. /**
  851. * struct drm_vmw_gb_surface_create_rep
  852. *
  853. * @handle: Surface handle.
  854. * @backup_size: Size of backup buffers for this surface.
  855. * @buffer_handle: Handle of backup buffer. SVGA3D_INVALID_ID if none.
  856. * @buffer_size: Actual size of the buffer identified by
  857. * @buffer_handle
  858. * @buffer_map_handle: Offset into device address space for the buffer
  859. * identified by @buffer_handle.
  860. *
  861. * Part of output argument for the DRM_VMW_GB_SURFACE_REF ioctl.
  862. * Output argument for the DRM_VMW_GB_SURFACE_CREATE ioctl.
  863. */
  864. struct drm_vmw_gb_surface_create_rep {
  865. __u32 handle;
  866. __u32 backup_size;
  867. __u32 buffer_handle;
  868. __u32 buffer_size;
  869. __u64 buffer_map_handle;
  870. };
  871. /**
  872. * union drm_vmw_gb_surface_create_arg
  873. *
  874. * @req: Input argument as described above.
  875. * @rep: Output argument as described above.
  876. *
  877. * Argument to the DRM_VMW_GB_SURFACE_CREATE ioctl.
  878. */
  879. union drm_vmw_gb_surface_create_arg {
  880. struct drm_vmw_gb_surface_create_rep rep;
  881. struct drm_vmw_gb_surface_create_req req;
  882. };
  883. /*************************************************************************/
  884. /**
  885. * DRM_VMW_GB_SURFACE_REF - Reference a host surface.
  886. *
  887. * Puts a reference on a host surface with a given handle, as previously
  888. * returned by the DRM_VMW_GB_SURFACE_CREATE ioctl.
  889. * A reference will make sure the surface isn't destroyed while we hold
  890. * it and will allow the calling client to use the surface handle in
  891. * the command stream.
  892. *
  893. * On successful return, the Ioctl returns the surface information given
  894. * to and returned from the DRM_VMW_GB_SURFACE_CREATE ioctl.
  895. */
  896. /**
  897. * struct drm_vmw_gb_surface_reference_arg
  898. *
  899. * @creq: The data used as input when the surface was created, as described
  900. * above at "struct drm_vmw_gb_surface_create_req"
  901. * @crep: Additional data output when the surface was created, as described
  902. * above at "struct drm_vmw_gb_surface_create_rep"
  903. *
  904. * Output Argument to the DRM_VMW_GB_SURFACE_REF ioctl.
  905. */
  906. struct drm_vmw_gb_surface_ref_rep {
  907. struct drm_vmw_gb_surface_create_req creq;
  908. struct drm_vmw_gb_surface_create_rep crep;
  909. };
  910. /**
  911. * union drm_vmw_gb_surface_reference_arg
  912. *
  913. * @req: Input data as described above at "struct drm_vmw_surface_arg"
  914. * @rep: Output data as described above at "struct drm_vmw_gb_surface_ref_rep"
  915. *
  916. * Argument to the DRM_VMW_GB_SURFACE_REF Ioctl.
  917. */
  918. union drm_vmw_gb_surface_reference_arg {
  919. struct drm_vmw_gb_surface_ref_rep rep;
  920. struct drm_vmw_surface_arg req;
  921. };
  922. /*************************************************************************/
  923. /**
  924. * DRM_VMW_SYNCCPU - Sync a DMA buffer / MOB for CPU access.
  925. *
  926. * Idles any previously submitted GPU operations on the buffer and
  927. * by default blocks command submissions that reference the buffer.
  928. * If the file descriptor used to grab a blocking CPU sync is closed, the
  929. * cpu sync is released.
  930. * The flags argument indicates how the grab / release operation should be
  931. * performed:
  932. */
  933. /**
  934. * enum drm_vmw_synccpu_flags - Synccpu flags:
  935. *
  936. * @drm_vmw_synccpu_read: Sync for read. If sync is done for read only, it's a
  937. * hint to the kernel to allow command submissions that references the buffer
  938. * for read-only.
  939. * @drm_vmw_synccpu_write: Sync for write. Block all command submissions
  940. * referencing this buffer.
  941. * @drm_vmw_synccpu_dontblock: Dont wait for GPU idle, but rather return
  942. * -EBUSY should the buffer be busy.
  943. * @drm_vmw_synccpu_allow_cs: Allow command submission that touches the buffer
  944. * while the buffer is synced for CPU. This is similar to the GEM bo idle
  945. * behavior.
  946. */
  947. enum drm_vmw_synccpu_flags {
  948. drm_vmw_synccpu_read = (1 << 0),
  949. drm_vmw_synccpu_write = (1 << 1),
  950. drm_vmw_synccpu_dontblock = (1 << 2),
  951. drm_vmw_synccpu_allow_cs = (1 << 3)
  952. };
  953. /**
  954. * enum drm_vmw_synccpu_op - Synccpu operations:
  955. *
  956. * @drm_vmw_synccpu_grab: Grab the buffer for CPU operations
  957. * @drm_vmw_synccpu_release: Release a previous grab.
  958. */
  959. enum drm_vmw_synccpu_op {
  960. drm_vmw_synccpu_grab,
  961. drm_vmw_synccpu_release
  962. };
  963. /**
  964. * struct drm_vmw_synccpu_arg
  965. *
  966. * @op: The synccpu operation as described above.
  967. * @handle: Handle identifying the buffer object.
  968. * @flags: Flags as described above.
  969. */
  970. struct drm_vmw_synccpu_arg {
  971. enum drm_vmw_synccpu_op op;
  972. enum drm_vmw_synccpu_flags flags;
  973. __u32 handle;
  974. __u32 pad64;
  975. };
  976. /*************************************************************************/
  977. /**
  978. * DRM_VMW_CREATE_EXTENDED_CONTEXT - Create a host context.
  979. *
  980. * Allocates a device unique context id, and queues a create context command
  981. * for the host. Does not wait for host completion.
  982. */
  983. enum drm_vmw_extended_context {
  984. drm_vmw_context_legacy,
  985. drm_vmw_context_dx
  986. };
  987. /**
  988. * union drm_vmw_extended_context_arg
  989. *
  990. * @req: Context type.
  991. * @rep: Context identifier.
  992. *
  993. * Argument to the DRM_VMW_CREATE_EXTENDED_CONTEXT Ioctl.
  994. */
  995. union drm_vmw_extended_context_arg {
  996. enum drm_vmw_extended_context req;
  997. struct drm_vmw_context_arg rep;
  998. };
  999. /*************************************************************************/
  1000. /*
  1001. * DRM_VMW_HANDLE_CLOSE - Close a user-space handle and release its
  1002. * underlying resource.
  1003. *
  1004. * Note that this ioctl is overlaid on the deprecated DRM_VMW_UNREF_DMABUF
  1005. * Ioctl.
  1006. */
  1007. /**
  1008. * struct drm_vmw_handle_close_arg
  1009. *
  1010. * @handle: Handle to close.
  1011. *
  1012. * Argument to the DRM_VMW_HANDLE_CLOSE Ioctl.
  1013. */
  1014. struct drm_vmw_handle_close_arg {
  1015. __u32 handle;
  1016. __u32 pad64;
  1017. };
  1018. #define drm_vmw_unref_dmabuf_arg drm_vmw_handle_close_arg
  1019. /*************************************************************************/
  1020. /**
  1021. * DRM_VMW_GB_SURFACE_CREATE_EXT - Create a host guest-backed surface.
  1022. *
  1023. * Allocates a surface handle and queues a create surface command
  1024. * for the host on the first use of the surface. The surface ID can
  1025. * be used as the surface ID in commands referencing the surface.
  1026. *
  1027. * This new command extends DRM_VMW_GB_SURFACE_CREATE by adding version
  1028. * parameter and 64 bit svga flag.
  1029. */
  1030. /**
  1031. * enum drm_vmw_surface_version
  1032. *
  1033. * @drm_vmw_surface_gb_v1: Corresponds to current gb surface format with
  1034. * svga3d surface flags split into 2, upper half and lower half.
  1035. */
  1036. enum drm_vmw_surface_version {
  1037. drm_vmw_gb_surface_v1,
  1038. };
  1039. /**
  1040. * struct drm_vmw_gb_surface_create_ext_req
  1041. *
  1042. * @base: Surface create parameters.
  1043. * @version: Version of surface create ioctl.
  1044. * @svga3d_flags_upper_32_bits: Upper 32 bits of svga3d flags.
  1045. * @multisample_pattern: Multisampling pattern when msaa is supported.
  1046. * @quality_level: Precision settings for each sample.
  1047. * @buffer_byte_stride: Buffer byte stride.
  1048. * @must_be_zero: Reserved for future usage.
  1049. *
  1050. * Input argument to the DRM_VMW_GB_SURFACE_CREATE_EXT Ioctl.
  1051. * Part of output argument for the DRM_VMW_GB_SURFACE_REF_EXT Ioctl.
  1052. */
  1053. struct drm_vmw_gb_surface_create_ext_req {
  1054. struct drm_vmw_gb_surface_create_req base;
  1055. enum drm_vmw_surface_version version;
  1056. __u32 svga3d_flags_upper_32_bits;
  1057. __u32 multisample_pattern;
  1058. __u32 quality_level;
  1059. __u32 buffer_byte_stride;
  1060. __u32 must_be_zero;
  1061. };
  1062. /**
  1063. * union drm_vmw_gb_surface_create_ext_arg
  1064. *
  1065. * @req: Input argument as described above.
  1066. * @rep: Output argument as described above.
  1067. *
  1068. * Argument to the DRM_VMW_GB_SURFACE_CREATE_EXT ioctl.
  1069. */
  1070. union drm_vmw_gb_surface_create_ext_arg {
  1071. struct drm_vmw_gb_surface_create_rep rep;
  1072. struct drm_vmw_gb_surface_create_ext_req req;
  1073. };
  1074. /*************************************************************************/
  1075. /**
  1076. * DRM_VMW_GB_SURFACE_REF_EXT - Reference a host surface.
  1077. *
  1078. * Puts a reference on a host surface with a given handle, as previously
  1079. * returned by the DRM_VMW_GB_SURFACE_CREATE_EXT ioctl.
  1080. * A reference will make sure the surface isn't destroyed while we hold
  1081. * it and will allow the calling client to use the surface handle in
  1082. * the command stream.
  1083. *
  1084. * On successful return, the Ioctl returns the surface information given
  1085. * to and returned from the DRM_VMW_GB_SURFACE_CREATE_EXT ioctl.
  1086. */
  1087. /**
  1088. * struct drm_vmw_gb_surface_ref_ext_rep
  1089. *
  1090. * @creq: The data used as input when the surface was created, as described
  1091. * above at "struct drm_vmw_gb_surface_create_ext_req"
  1092. * @crep: Additional data output when the surface was created, as described
  1093. * above at "struct drm_vmw_gb_surface_create_rep"
  1094. *
  1095. * Output Argument to the DRM_VMW_GB_SURFACE_REF_EXT ioctl.
  1096. */
  1097. struct drm_vmw_gb_surface_ref_ext_rep {
  1098. struct drm_vmw_gb_surface_create_ext_req creq;
  1099. struct drm_vmw_gb_surface_create_rep crep;
  1100. };
  1101. /**
  1102. * union drm_vmw_gb_surface_reference_ext_arg
  1103. *
  1104. * @req: Input data as described above at "struct drm_vmw_surface_arg"
  1105. * @rep: Output data as described above at
  1106. * "struct drm_vmw_gb_surface_ref_ext_rep"
  1107. *
  1108. * Argument to the DRM_VMW_GB_SURFACE_REF Ioctl.
  1109. */
  1110. union drm_vmw_gb_surface_reference_ext_arg {
  1111. struct drm_vmw_gb_surface_ref_ext_rep rep;
  1112. struct drm_vmw_surface_arg req;
  1113. };
  1114. /**
  1115. * struct drm_vmw_msg_arg
  1116. *
  1117. * @send: Pointer to user-space msg string (null terminated).
  1118. * @receive: Pointer to user-space receive buffer.
  1119. * @send_only: Boolean whether this is only sending or receiving too.
  1120. *
  1121. * Argument to the DRM_VMW_MSG ioctl.
  1122. */
  1123. struct drm_vmw_msg_arg {
  1124. __u64 send;
  1125. __u64 receive;
  1126. __s32 send_only;
  1127. __u32 receive_len;
  1128. };
  1129. /**
  1130. * struct drm_vmw_mksstat_add_arg
  1131. *
  1132. * @stat: Pointer to user-space stat-counters array, page-aligned.
  1133. * @info: Pointer to user-space counter-infos array, page-aligned.
  1134. * @strs: Pointer to user-space stat strings, page-aligned.
  1135. * @stat_len: Length in bytes of stat-counters array.
  1136. * @info_len: Length in bytes of counter-infos array.
  1137. * @strs_len: Length in bytes of the stat strings, terminators included.
  1138. * @description: Pointer to instance descriptor string; will be truncated
  1139. * to MKS_GUEST_STAT_INSTANCE_DESC_LENGTH chars.
  1140. * @id: Output identifier of the produced record; -1 if error.
  1141. *
  1142. * Argument to the DRM_VMW_MKSSTAT_ADD ioctl.
  1143. */
  1144. struct drm_vmw_mksstat_add_arg {
  1145. __u64 stat;
  1146. __u64 info;
  1147. __u64 strs;
  1148. __u64 stat_len;
  1149. __u64 info_len;
  1150. __u64 strs_len;
  1151. __u64 description;
  1152. __u64 id;
  1153. };
  1154. /**
  1155. * struct drm_vmw_mksstat_remove_arg
  1156. *
  1157. * @id: Identifier of the record being disposed, originally obtained through
  1158. * DRM_VMW_MKSSTAT_ADD ioctl.
  1159. *
  1160. * Argument to the DRM_VMW_MKSSTAT_REMOVE ioctl.
  1161. */
  1162. struct drm_vmw_mksstat_remove_arg {
  1163. __u64 id;
  1164. };
  1165. #if defined(__cplusplus)
  1166. }
  1167. #endif
  1168. #endif