blob: 29cd9cfdd6115c27dedc68c83f79a730e988533a [file] [log] [blame]
Jakob Bornecrantzfb1d9732009-12-10 00:19:58 +00001/**************************************************************************
2 *
3 * Copyright © 2009 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
28#ifndef __VMWGFX_DRM_H__
29#define __VMWGFX_DRM_H__
30
31#define DRM_VMW_MAX_SURFACE_FACES 6
32#define DRM_VMW_MAX_MIP_LEVELS 24
33
Jakob Bornecrantzfb1d9732009-12-10 00:19:58 +000034
35#define DRM_VMW_GET_PARAM 0
36#define DRM_VMW_ALLOC_DMABUF 1
37#define DRM_VMW_UNREF_DMABUF 2
38#define DRM_VMW_CURSOR_BYPASS 3
39/* guarded by DRM_VMW_PARAM_NUM_STREAMS != 0*/
40#define DRM_VMW_CONTROL_STREAM 4
41#define DRM_VMW_CLAIM_STREAM 5
42#define DRM_VMW_UNREF_STREAM 6
43/* guarded by DRM_VMW_PARAM_3D == 1 */
44#define DRM_VMW_CREATE_CONTEXT 7
45#define DRM_VMW_UNREF_CONTEXT 8
46#define DRM_VMW_CREATE_SURFACE 9
47#define DRM_VMW_UNREF_SURFACE 10
48#define DRM_VMW_REF_SURFACE 11
49#define DRM_VMW_EXECBUF 12
Thomas Hellstromae2a1042011-09-01 20:18:44 +000050#define DRM_VMW_GET_3D_CAP 13
51#define DRM_VMW_FENCE_WAIT 14
52#define DRM_VMW_FENCE_SIGNALED 15
53#define DRM_VMW_FENCE_UNREF 16
54#define DRM_VMW_FENCE_EVENT 17
55
Jakob Bornecrantzfb1d9732009-12-10 00:19:58 +000056
57/*************************************************************************/
58/**
59 * DRM_VMW_GET_PARAM - get device information.
60 *
61 * DRM_VMW_PARAM_FIFO_OFFSET:
62 * Offset to use to map the first page of the FIFO read-only.
63 * The fifo is mapped using the mmap() system call on the drm device.
64 *
65 * DRM_VMW_PARAM_OVERLAY_IOCTL:
66 * Does the driver support the overlay ioctl.
67 */
68
69#define DRM_VMW_PARAM_NUM_STREAMS 0
70#define DRM_VMW_PARAM_NUM_FREE_STREAMS 1
71#define DRM_VMW_PARAM_3D 2
Thomas Hellstrom07999a72011-09-01 20:18:40 +000072#define DRM_VMW_PARAM_HW_CAPS 3
73#define DRM_VMW_PARAM_FIFO_CAPS 4
74#define DRM_VMW_PARAM_MAX_FB_SIZE 5
Thomas Hellstromf63f6a52011-09-01 20:18:41 +000075#define DRM_VMW_PARAM_FIFO_HW_VERSION 6
Jakob Bornecrantzfb1d9732009-12-10 00:19:58 +000076
77/**
78 * struct drm_vmw_getparam_arg
79 *
80 * @value: Returned value. //Out
81 * @param: Parameter to query. //In.
82 *
83 * Argument to the DRM_VMW_GET_PARAM Ioctl.
84 */
85
86struct drm_vmw_getparam_arg {
87 uint64_t value;
88 uint32_t param;
89 uint32_t pad64;
90};
91
92/*************************************************************************/
93/**
Jakob Bornecrantzfb1d9732009-12-10 00:19:58 +000094 * DRM_VMW_CREATE_CONTEXT - Create a host context.
95 *
96 * Allocates a device unique context id, and queues a create context command
97 * for the host. Does not wait for host completion.
98 */
99
100/**
101 * struct drm_vmw_context_arg
102 *
103 * @cid: Device unique context ID.
104 *
105 * Output argument to the DRM_VMW_CREATE_CONTEXT Ioctl.
106 * Input argument to the DRM_VMW_UNREF_CONTEXT Ioctl.
107 */
108
109struct drm_vmw_context_arg {
110 int32_t cid;
111 uint32_t pad64;
112};
113
114/*************************************************************************/
115/**
116 * DRM_VMW_UNREF_CONTEXT - Create a host context.
117 *
118 * Frees a global context id, and queues a destroy host command for the host.
119 * Does not wait for host completion. The context ID can be used directly
120 * in the command stream and shows up as the same context ID on the host.
121 */
122
123/*************************************************************************/
124/**
125 * DRM_VMW_CREATE_SURFACE - Create a host suface.
126 *
127 * Allocates a device unique surface id, and queues a create surface command
128 * for the host. Does not wait for host completion. The surface ID can be
129 * used directly in the command stream and shows up as the same surface
130 * ID on the host.
131 */
132
133/**
134 * struct drm_wmv_surface_create_req
135 *
136 * @flags: Surface flags as understood by the host.
137 * @format: Surface format as understood by the host.
138 * @mip_levels: Number of mip levels for each face.
139 * An unused face should have 0 encoded.
140 * @size_addr: Address of a user-space array of sruct drm_vmw_size
141 * cast to an uint64_t for 32-64 bit compatibility.
142 * The size of the array should equal the total number of mipmap levels.
143 * @shareable: Boolean whether other clients (as identified by file descriptors)
144 * may reference this surface.
Thomas Hellstromf77cef32010-02-09 19:41:55 +0000145 * @scanout: Boolean whether the surface is intended to be used as a
146 * scanout.
Jakob Bornecrantzfb1d9732009-12-10 00:19:58 +0000147 *
148 * Input data to the DRM_VMW_CREATE_SURFACE Ioctl.
149 * Output data from the DRM_VMW_REF_SURFACE Ioctl.
150 */
151
152struct drm_vmw_surface_create_req {
153 uint32_t flags;
154 uint32_t format;
155 uint32_t mip_levels[DRM_VMW_MAX_SURFACE_FACES];
156 uint64_t size_addr;
157 int32_t shareable;
Thomas Hellstromf77cef32010-02-09 19:41:55 +0000158 int32_t scanout;
Jakob Bornecrantzfb1d9732009-12-10 00:19:58 +0000159};
160
161/**
162 * struct drm_wmv_surface_arg
163 *
164 * @sid: Surface id of created surface or surface to destroy or reference.
165 *
166 * Output data from the DRM_VMW_CREATE_SURFACE Ioctl.
167 * Input argument to the DRM_VMW_UNREF_SURFACE Ioctl.
168 * Input argument to the DRM_VMW_REF_SURFACE Ioctl.
169 */
170
171struct drm_vmw_surface_arg {
172 int32_t sid;
173 uint32_t pad64;
174};
175
176/**
177 * struct drm_vmw_size ioctl.
178 *
179 * @width - mip level width
180 * @height - mip level height
181 * @depth - mip level depth
182 *
183 * Description of a mip level.
184 * Input data to the DRM_WMW_CREATE_SURFACE Ioctl.
185 */
186
187struct drm_vmw_size {
188 uint32_t width;
189 uint32_t height;
190 uint32_t depth;
191 uint32_t pad64;
192};
193
194/**
195 * union drm_vmw_surface_create_arg
196 *
197 * @rep: Output data as described above.
198 * @req: Input data as described above.
199 *
200 * Argument to the DRM_VMW_CREATE_SURFACE Ioctl.
201 */
202
203union drm_vmw_surface_create_arg {
204 struct drm_vmw_surface_arg rep;
205 struct drm_vmw_surface_create_req req;
206};
207
208/*************************************************************************/
209/**
210 * DRM_VMW_REF_SURFACE - Reference a host surface.
211 *
212 * Puts a reference on a host surface with a give sid, as previously
213 * returned by the DRM_VMW_CREATE_SURFACE ioctl.
214 * A reference will make sure the surface isn't destroyed while we hold
215 * it and will allow the calling client to use the surface ID in the command
216 * stream.
217 *
218 * On successful return, the Ioctl returns the surface information given
219 * in the DRM_VMW_CREATE_SURFACE ioctl.
220 */
221
222/**
223 * union drm_vmw_surface_reference_arg
224 *
225 * @rep: Output data as described above.
226 * @req: Input data as described above.
227 *
228 * Argument to the DRM_VMW_REF_SURFACE Ioctl.
229 */
230
231union drm_vmw_surface_reference_arg {
232 struct drm_vmw_surface_create_req rep;
233 struct drm_vmw_surface_arg req;
234};
235
236/*************************************************************************/
237/**
238 * DRM_VMW_UNREF_SURFACE - Unreference a host surface.
239 *
240 * Clear a reference previously put on a host surface.
241 * When all references are gone, including the one implicitly placed
242 * on creation,
243 * a destroy surface command will be queued for the host.
244 * Does not wait for completion.
245 */
246
247/*************************************************************************/
248/**
249 * DRM_VMW_EXECBUF
250 *
251 * Submit a command buffer for execution on the host, and return a
Thomas Hellstrom6bcd8d3c2011-09-01 20:18:42 +0000252 * fence seqno that when signaled, indicates that the command buffer has
Jakob Bornecrantzfb1d9732009-12-10 00:19:58 +0000253 * executed.
254 */
255
256/**
257 * struct drm_vmw_execbuf_arg
258 *
259 * @commands: User-space address of a command buffer cast to an uint64_t.
260 * @command-size: Size in bytes of the command buffer.
Thomas Hellstromf77cef32010-02-09 19:41:55 +0000261 * @throttle-us: Sleep until software is less than @throttle_us
262 * microseconds ahead of hardware. The driver may round this value
263 * to the nearest kernel tick.
Jakob Bornecrantzfb1d9732009-12-10 00:19:58 +0000264 * @fence_rep: User-space address of a struct drm_vmw_fence_rep cast to an
265 * uint64_t.
Jakob Bornecrantza87897e2010-02-09 21:29:47 +0000266 * @version: Allows expanding the execbuf ioctl parameters without breaking
267 * backwards compatibility, since user-space will always tell the kernel
268 * which version it uses.
269 * @flags: Execbuf flags. None currently.
Jakob Bornecrantzfb1d9732009-12-10 00:19:58 +0000270 *
271 * Argument to the DRM_VMW_EXECBUF Ioctl.
272 */
273
Thomas Hellstrom2ae7b032011-09-01 20:18:45 +0000274#define DRM_VMW_EXECBUF_VERSION 1
Jakob Bornecrantza87897e2010-02-09 21:29:47 +0000275
Jakob Bornecrantzfb1d9732009-12-10 00:19:58 +0000276struct drm_vmw_execbuf_arg {
277 uint64_t commands;
278 uint32_t command_size;
Thomas Hellstromf77cef32010-02-09 19:41:55 +0000279 uint32_t throttle_us;
Jakob Bornecrantzfb1d9732009-12-10 00:19:58 +0000280 uint64_t fence_rep;
Thomas Hellstromae2a1042011-09-01 20:18:44 +0000281 uint32_t version;
282 uint32_t flags;
Jakob Bornecrantzfb1d9732009-12-10 00:19:58 +0000283};
284
285/**
286 * struct drm_vmw_fence_rep
287 *
Thomas Hellstromae2a1042011-09-01 20:18:44 +0000288 * @handle: Fence object handle for fence associated with a command submission.
289 * @mask: Fence flags relevant for this fence object.
290 * @seqno: Fence sequence number in fifo. A fence object with a lower
291 * seqno will signal the EXEC flag before a fence object with a higher
292 * seqno. This can be used by user-space to avoid kernel calls to determine
293 * whether a fence has signaled the EXEC flag. Note that @seqno will
294 * wrap at 32-bit.
295 * @passed_seqno: The highest seqno number processed by the hardware
296 * so far. This can be used to mark user-space fence objects as signaled, and
297 * to determine whether a fence seqno might be stale.
Jakob Bornecrantzfb1d9732009-12-10 00:19:58 +0000298 * @error: This member should've been set to -EFAULT on submission.
299 * The following actions should be take on completion:
300 * error == -EFAULT: Fence communication failed. The host is synchronized.
301 * Use the last fence id read from the FIFO fence register.
302 * error != 0 && error != -EFAULT:
303 * Fence submission failed. The host is synchronized. Use the fence_seq member.
304 * error == 0: All is OK, The host may not be synchronized.
305 * Use the fence_seq member.
306 *
307 * Input / Output data to the DRM_VMW_EXECBUF Ioctl.
308 */
309
310struct drm_vmw_fence_rep {
Thomas Hellstromae2a1042011-09-01 20:18:44 +0000311 uint32_t handle;
312 uint32_t mask;
313 uint32_t seqno;
314 uint32_t passed_seqno;
Jakob Bornecrantzfb1d9732009-12-10 00:19:58 +0000315 uint32_t pad64;
Thomas Hellstromae2a1042011-09-01 20:18:44 +0000316 int32_t error;
Jakob Bornecrantzfb1d9732009-12-10 00:19:58 +0000317};
318
319/*************************************************************************/
320/**
321 * DRM_VMW_ALLOC_DMABUF
322 *
323 * Allocate a DMA buffer that is visible also to the host.
324 * NOTE: The buffer is
325 * identified by a handle and an offset, which are private to the guest, but
326 * useable in the command stream. The guest kernel may translate these
327 * and patch up the command stream accordingly. In the future, the offset may
328 * be zero at all times, or it may disappear from the interface before it is
329 * fixed.
330 *
331 * The DMA buffer may stay user-space mapped in the guest at all times,
332 * and is thus suitable for sub-allocation.
333 *
334 * DMA buffers are mapped using the mmap() syscall on the drm device.
335 */
336
337/**
338 * struct drm_vmw_alloc_dmabuf_req
339 *
340 * @size: Required minimum size of the buffer.
341 *
342 * Input data to the DRM_VMW_ALLOC_DMABUF Ioctl.
343 */
344
345struct drm_vmw_alloc_dmabuf_req {
346 uint32_t size;
347 uint32_t pad64;
348};
349
350/**
351 * struct drm_vmw_dmabuf_rep
352 *
353 * @map_handle: Offset to use in the mmap() call used to map the buffer.
354 * @handle: Handle unique to this buffer. Used for unreferencing.
355 * @cur_gmr_id: GMR id to use in the command stream when this buffer is
356 * referenced. See not above.
357 * @cur_gmr_offset: Offset to use in the command stream when this buffer is
358 * referenced. See note above.
359 *
360 * Output data from the DRM_VMW_ALLOC_DMABUF Ioctl.
361 */
362
363struct drm_vmw_dmabuf_rep {
364 uint64_t map_handle;
365 uint32_t handle;
366 uint32_t cur_gmr_id;
367 uint32_t cur_gmr_offset;
368 uint32_t pad64;
369};
370
371/**
372 * union drm_vmw_dmabuf_arg
373 *
374 * @req: Input data as described above.
375 * @rep: Output data as described above.
376 *
377 * Argument to the DRM_VMW_ALLOC_DMABUF Ioctl.
378 */
379
380union drm_vmw_alloc_dmabuf_arg {
381 struct drm_vmw_alloc_dmabuf_req req;
382 struct drm_vmw_dmabuf_rep rep;
383};
384
385/*************************************************************************/
386/**
387 * DRM_VMW_UNREF_DMABUF - Free a DMA buffer.
388 *
389 */
390
391/**
392 * struct drm_vmw_unref_dmabuf_arg
393 *
394 * @handle: Handle indicating what buffer to free. Obtained from the
395 * DRM_VMW_ALLOC_DMABUF Ioctl.
396 *
397 * Argument to the DRM_VMW_UNREF_DMABUF Ioctl.
398 */
399
400struct drm_vmw_unref_dmabuf_arg {
401 uint32_t handle;
402 uint32_t pad64;
403};
404
Jakob Bornecrantzfb1d9732009-12-10 00:19:58 +0000405/*************************************************************************/
406/**
407 * DRM_VMW_CONTROL_STREAM - Control overlays, aka streams.
408 *
409 * This IOCTL controls the overlay units of the svga device.
410 * The SVGA overlay units does not work like regular hardware units in
411 * that they do not automaticaly read back the contents of the given dma
412 * buffer. But instead only read back for each call to this ioctl, and
413 * at any point between this call being made and a following call that
414 * either changes the buffer or disables the stream.
415 */
416
417/**
418 * struct drm_vmw_rect
419 *
420 * Defines a rectangle. Used in the overlay ioctl to define
421 * source and destination rectangle.
422 */
423
424struct drm_vmw_rect {
425 int32_t x;
426 int32_t y;
427 uint32_t w;
428 uint32_t h;
429};
430
431/**
432 * struct drm_vmw_control_stream_arg
433 *
434 * @stream_id: Stearm to control
435 * @enabled: If false all following arguments are ignored.
436 * @handle: Handle to buffer for getting data from.
437 * @format: Format of the overlay as understood by the host.
438 * @width: Width of the overlay.
439 * @height: Height of the overlay.
440 * @size: Size of the overlay in bytes.
441 * @pitch: Array of pitches, the two last are only used for YUV12 formats.
442 * @offset: Offset from start of dma buffer to overlay.
443 * @src: Source rect, must be within the defined area above.
444 * @dst: Destination rect, x and y may be negative.
445 *
446 * Argument to the DRM_VMW_CONTROL_STREAM Ioctl.
447 */
448
449struct drm_vmw_control_stream_arg {
450 uint32_t stream_id;
451 uint32_t enabled;
452
453 uint32_t flags;
454 uint32_t color_key;
455
456 uint32_t handle;
457 uint32_t offset;
458 int32_t format;
459 uint32_t size;
460 uint32_t width;
461 uint32_t height;
462 uint32_t pitch[3];
463
464 uint32_t pad64;
465 struct drm_vmw_rect src;
466 struct drm_vmw_rect dst;
467};
468
469/*************************************************************************/
470/**
471 * DRM_VMW_CURSOR_BYPASS - Give extra information about cursor bypass.
472 *
473 */
474
475#define DRM_VMW_CURSOR_BYPASS_ALL (1 << 0)
476#define DRM_VMW_CURSOR_BYPASS_FLAGS (1)
477
478/**
479 * struct drm_vmw_cursor_bypass_arg
480 *
481 * @flags: Flags.
482 * @crtc_id: Crtc id, only used if DMR_CURSOR_BYPASS_ALL isn't passed.
483 * @xpos: X position of cursor.
484 * @ypos: Y position of cursor.
485 * @xhot: X hotspot.
486 * @yhot: Y hotspot.
487 *
488 * Argument to the DRM_VMW_CURSOR_BYPASS Ioctl.
489 */
490
491struct drm_vmw_cursor_bypass_arg {
492 uint32_t flags;
493 uint32_t crtc_id;
494 int32_t xpos;
495 int32_t ypos;
496 int32_t xhot;
497 int32_t yhot;
498};
499
500/*************************************************************************/
501/**
502 * DRM_VMW_CLAIM_STREAM - Claim a single stream.
503 */
504
505/**
506 * struct drm_vmw_context_arg
507 *
508 * @stream_id: Device unique context ID.
509 *
510 * Output argument to the DRM_VMW_CREATE_CONTEXT Ioctl.
511 * Input argument to the DRM_VMW_UNREF_CONTEXT Ioctl.
512 */
513
514struct drm_vmw_stream_arg {
515 uint32_t stream_id;
516 uint32_t pad64;
517};
518
519/*************************************************************************/
520/**
521 * DRM_VMW_UNREF_STREAM - Unclaim a stream.
522 *
523 * Return a single stream that was claimed by this process. Also makes
524 * sure that the stream has been stopped.
525 */
Thomas Hellstromae2a1042011-09-01 20:18:44 +0000526
Thomas Hellstromf63f6a52011-09-01 20:18:41 +0000527/*************************************************************************/
528/**
529 * DRM_VMW_GET_3D_CAP
530 *
531 * Read 3D capabilities from the FIFO
532 *
533 */
534
535/**
536 * struct drm_vmw_get_3d_cap_arg
537 *
538 * @buffer: Pointer to a buffer for capability data, cast to an uint64_t
539 * @size: Max size to copy
540 *
541 * Input argument to the DRM_VMW_GET_3D_CAP_IOCTL
542 * ioctls.
543 */
544
545struct drm_vmw_get_3d_cap_arg {
546 uint64_t buffer;
547 uint32_t max_size;
548 uint32_t pad64;
549};
Jakob Bornecrantzfb1d9732009-12-10 00:19:58 +0000550
Jakob Bornecrantzd8bd19d2010-06-01 11:54:20 +0200551/*************************************************************************/
552/**
553 * DRM_VMW_UPDATE_LAYOUT - Update layout
554 *
Lucas De Marchi25985ed2011-03-30 22:57:33 -0300555 * Updates the preferred modes and connection status for connectors. The
Jakob Bornecrantzd8bd19d2010-06-01 11:54:20 +0200556 * command conisits of one drm_vmw_update_layout_arg pointing out a array
557 * of num_outputs drm_vmw_rect's.
558 */
559
560/**
561 * struct drm_vmw_update_layout_arg
562 *
563 * @num_outputs: number of active
564 * @rects: pointer to array of drm_vmw_rect
565 *
566 * Input argument to the DRM_VMW_UPDATE_LAYOUT Ioctl.
567 */
568
569struct drm_vmw_update_layout_arg {
570 uint32_t num_outputs;
571 uint32_t pad64;
572 uint64_t rects;
573};
574
Thomas Hellstromae2a1042011-09-01 20:18:44 +0000575
576/*************************************************************************/
577/**
578 * DRM_VMW_FENCE_WAIT
579 *
580 * Waits for a fence object to signal. The wait is interruptible, so that
581 * signals may be delivered during the interrupt. The wait may timeout,
582 * in which case the calls returns -EBUSY. If the wait is restarted,
583 * that is restarting without resetting @cookie_valid to zero,
584 * the timeout is computed from the first call.
585 *
586 * The flags argument to the DRM_VMW_FENCE_WAIT ioctl indicates what to wait
587 * on:
588 * DRM_VMW_FENCE_FLAG_EXEC: All commands ahead of the fence in the command
589 * stream
590 * have executed.
591 * DRM_VMW_FENCE_FLAG_QUERY: All query results resulting from query finish
592 * commands
593 * in the buffer given to the EXECBUF ioctl returning the fence object handle
594 * are available to user-space.
595 *
596 * DRM_VMW_WAIT_OPTION_UNREF: If this wait option is given, and the
597 * fenc wait ioctl returns 0, the fence object has been unreferenced after
598 * the wait.
599 */
600
601#define DRM_VMW_FENCE_FLAG_EXEC (1 << 0)
602#define DRM_VMW_FENCE_FLAG_QUERY (1 << 1)
603
604#define DRM_VMW_WAIT_OPTION_UNREF (1 << 0)
605
606/**
607 * struct drm_vmw_fence_wait_arg
608 *
609 * @handle: Fence object handle as returned by the DRM_VMW_EXECBUF ioctl.
610 * @cookie_valid: Must be reset to 0 on first call. Left alone on restart.
611 * @kernel_cookie: Set to 0 on first call. Left alone on restart.
612 * @timeout_us: Wait timeout in microseconds. 0 for indefinite timeout.
613 * @lazy: Set to 1 if timing is not critical. Allow more than a kernel tick
614 * before returning.
615 * @flags: Fence flags to wait on.
616 * @wait_options: Options that control the behaviour of the wait ioctl.
617 *
618 * Input argument to the DRM_VMW_FENCE_WAIT ioctl.
619 */
620
621struct drm_vmw_fence_wait_arg {
622 uint32_t handle;
623 int32_t cookie_valid;
624 uint64_t kernel_cookie;
625 uint64_t timeout_us;
626 int32_t lazy;
627 int32_t flags;
628 int32_t wait_options;
629 int32_t pad64;
630};
631
632/*************************************************************************/
633/**
634 * DRM_VMW_FENCE_SIGNALED
635 *
636 * Checks if a fence object is signaled..
637 */
638
639/**
640 * struct drm_vmw_fence_signaled_arg
641 *
642 * @handle: Fence object handle as returned by the DRM_VMW_EXECBUF ioctl.
643 * @flags: Fence object flags input to DRM_VMW_FENCE_SIGNALED ioctl
644 * @signaled: Out: Flags signaled.
645 * @sequence: Out: Highest sequence passed so far. Can be used to signal the
646 * EXEC flag of user-space fence objects.
647 *
648 * Input/Output argument to the DRM_VMW_FENCE_SIGNALED and DRM_VMW_FENCE_UNREF
649 * ioctls.
650 */
651
652struct drm_vmw_fence_signaled_arg {
653 uint32_t handle;
654 uint32_t flags;
655 int32_t signaled;
656 uint32_t passed_seqno;
657 uint32_t signaled_flags;
658 uint32_t pad64;
659};
660
661/*************************************************************************/
662/**
663 * DRM_VMW_FENCE_UNREF
664 *
665 * Unreferences a fence object, and causes it to be destroyed if there are no
666 * other references to it.
667 *
668 */
669
670/**
671 * struct drm_vmw_fence_arg
672 *
673 * @handle: Fence object handle as returned by the DRM_VMW_EXECBUF ioctl.
674 *
675 * Input/Output argument to the DRM_VMW_FENCE_UNREF ioctl..
676 */
677
678struct drm_vmw_fence_arg {
679 uint32_t handle;
680 uint32_t pad64;
681};
682
683
684
Jakob Bornecrantzfb1d9732009-12-10 00:19:58 +0000685#endif