aboutsummaryrefslogtreecommitdiffstats
path: root/libkms
diff options
context:
space:
mode:
authorJakob Bornecrantz2009-12-14 15:53:10 -0600
committerJakob Bornecrantz2009-12-14 15:53:10 -0600
commit77ddc785660c4ff73706758124744f80e1734812 (patch)
tree4ad9a49bc53e60c21d5235b11acfe637e9406276 /libkms
parent201f5795a26ae7b5580a35b24f4e89e5cd3455b1 (diff)
downloadexternal-libdrm-77ddc785660c4ff73706758124744f80e1734812.tar.gz
external-libdrm-77ddc785660c4ff73706758124744f80e1734812.tar.xz
external-libdrm-77ddc785660c4ff73706758124744f80e1734812.zip
vmwgfx: Fetch the latest header
Diffstat (limited to 'libkms')
-rw-r--r--libkms/vmwgfx_drm.h167
1 files changed, 150 insertions, 17 deletions
diff --git a/libkms/vmwgfx_drm.h b/libkms/vmwgfx_drm.h
index 597ab3c9..2be7e124 100644
--- a/libkms/vmwgfx_drm.h
+++ b/libkms/vmwgfx_drm.h
@@ -25,39 +25,50 @@
25 * 25 *
26 **************************************************************************/ 26 **************************************************************************/
27 27
28#ifndef _VMWGFX_DRM_H_ 28#ifndef __VMWGFX_DRM_H__
29#define _VMWGFX_DRM_H_ 29#define __VMWGFX_DRM_H__
30 30
31#define DRM_VMW_MAX_SURFACE_FACES 6 31#define DRM_VMW_MAX_SURFACE_FACES 6
32#define DRM_VMW_MAX_MIP_LEVELS 24 32#define DRM_VMW_MAX_MIP_LEVELS 24
33 33
34#define DRM_VMW_EXT_NAME_LEN 128 34#define DRM_VMW_EXT_NAME_LEN 128
35 35
36#define DRM_VMW_GET_PARAM 1 36#define DRM_VMW_GET_PARAM 0
37#define DRM_VMW_EXTENSION 2 37#define DRM_VMW_ALLOC_DMABUF 1
38#define DRM_VMW_CREATE_CONTEXT 3 38#define DRM_VMW_UNREF_DMABUF 2
39#define DRM_VMW_UNREF_CONTEXT 4 39#define DRM_VMW_CURSOR_BYPASS 3
40#define DRM_VMW_CREATE_SURFACE 5 40/* guarded by DRM_VMW_PARAM_NUM_STREAMS != 0*/
41#define DRM_VMW_UNREF_SURFACE 6 41#define DRM_VMW_CONTROL_STREAM 4
42#define DRM_VMW_REF_SURFACE 7 42#define DRM_VMW_CLAIM_STREAM 5
43#define DRM_VMW_EXECBUF 8 43#define DRM_VMW_UNREF_STREAM 6
44#define DRM_VMW_ALLOC_DMABUF 9 44/* guarded by DRM_VMW_PARAM_3D == 1 */
45#define DRM_VMW_UNREF_DMABUF 10 45#define DRM_VMW_CREATE_CONTEXT 7
46#define DRM_VMW_FIFO_DEBUG 11 46#define DRM_VMW_UNREF_CONTEXT 8
47#define DRM_VMW_FENCE_WAIT 12 47#define DRM_VMW_CREATE_SURFACE 9
48#define DRM_VMW_UNREF_SURFACE 10
49#define DRM_VMW_REF_SURFACE 11
50#define DRM_VMW_EXECBUF 12
51#define DRM_VMW_FIFO_DEBUG 13
52#define DRM_VMW_FENCE_WAIT 14
53
48 54
49/*************************************************************************/ 55/*************************************************************************/
50/** 56/**
51 * DRM_VMW_GET_PARAM - get device information. 57 * DRM_VMW_GET_PARAM - get device information.
52 * 58 *
53 * Currently we support only one parameter:
54 *
55 * DRM_VMW_PARAM_FIFO_OFFSET: 59 * DRM_VMW_PARAM_FIFO_OFFSET:
56 * Offset to use to map the first page of the FIFO read-only. 60 * Offset to use to map the first page of the FIFO read-only.
57 * The fifo is mapped using the mmap() system call on the drm device. 61 * The fifo is mapped using the mmap() system call on the drm device.
62 *
63 * DRM_VMW_PARAM_OVERLAY_IOCTL:
64 * Does the driver support the overlay ioctl.
58 */ 65 */
59 66
60#define DRM_VMW_PARAM_FIFO_OFFSET 0 67#define DRM_VMW_PARAM_NUM_STREAMS 0
68#define DRM_VMW_PARAM_NUM_FREE_STREAMS 1
69#define DRM_VMW_PARAM_3D 2
70#define DRM_VMW_PARAM_FIFO_OFFSET 3
71
61 72
62/** 73/**
63 * struct drm_vmw_getparam_arg 74 * struct drm_vmw_getparam_arg
@@ -438,4 +449,126 @@ struct drm_vmw_fence_wait_arg {
438 int32_t pad64; 449 int32_t pad64;
439}; 450};
440 451
452/*************************************************************************/
453/**
454 * DRM_VMW_CONTROL_STREAM - Control overlays, aka streams.
455 *
456 * This IOCTL controls the overlay units of the svga device.
457 * The SVGA overlay units does not work like regular hardware units in
458 * that they do not automaticaly read back the contents of the given dma
459 * buffer. But instead only read back for each call to this ioctl, and
460 * at any point between this call being made and a following call that
461 * either changes the buffer or disables the stream.
462 */
463
464/**
465 * struct drm_vmw_rect
466 *
467 * Defines a rectangle. Used in the overlay ioctl to define
468 * source and destination rectangle.
469 */
470
471struct drm_vmw_rect {
472 int32_t x;
473 int32_t y;
474 uint32_t w;
475 uint32_t h;
476};
477
478/**
479 * struct drm_vmw_control_stream_arg
480 *
481 * @stream_id: Stearm to control
482 * @enabled: If false all following arguments are ignored.
483 * @handle: Handle to buffer for getting data from.
484 * @format: Format of the overlay as understood by the host.
485 * @width: Width of the overlay.
486 * @height: Height of the overlay.
487 * @size: Size of the overlay in bytes.
488 * @pitch: Array of pitches, the two last are only used for YUV12 formats.
489 * @offset: Offset from start of dma buffer to overlay.
490 * @src: Source rect, must be within the defined area above.
491 * @dst: Destination rect, x and y may be negative.
492 *
493 * Argument to the DRM_VMW_CONTROL_STREAM Ioctl.
494 */
495
496struct drm_vmw_control_stream_arg {
497 uint32_t stream_id;
498 uint32_t enabled;
499
500 uint32_t flags;
501 uint32_t color_key;
502
503 uint32_t handle;
504 uint32_t offset;
505 int32_t format;
506 uint32_t size;
507 uint32_t width;
508 uint32_t height;
509 uint32_t pitch[3];
510
511 uint32_t pad64;
512 struct drm_vmw_rect src;
513 struct drm_vmw_rect dst;
514};
515
516/*************************************************************************/
517/**
518 * DRM_VMW_CURSOR_BYPASS - Give extra information about cursor bypass.
519 *
520 */
521
522#define DRM_VMW_CURSOR_BYPASS_ALL (1 << 0)
523#define DRM_VMW_CURSOR_BYPASS_FLAGS (1)
524
525/**
526 * struct drm_vmw_cursor_bypass_arg
527 *
528 * @flags: Flags.
529 * @crtc_id: Crtc id, only used if DMR_CURSOR_BYPASS_ALL isn't passed.
530 * @xpos: X position of cursor.
531 * @ypos: Y position of cursor.
532 * @xhot: X hotspot.
533 * @yhot: Y hotspot.
534 *
535 * Argument to the DRM_VMW_CURSOR_BYPASS Ioctl.
536 */
537
538struct drm_vmw_cursor_bypass_arg {
539 uint32_t flags;
540 uint32_t crtc_id;
541 int32_t xpos;
542 int32_t ypos;
543 int32_t xhot;
544 int32_t yhot;
545};
546
547/*************************************************************************/
548/**
549 * DRM_VMW_CLAIM_STREAM - Claim a single stream.
550 */
551
552/**
553 * struct drm_vmw_context_arg
554 *
555 * @stream_id: Device unique context ID.
556 *
557 * Output argument to the DRM_VMW_CREATE_CONTEXT Ioctl.
558 * Input argument to the DRM_VMW_UNREF_CONTEXT Ioctl.
559 */
560
561struct drm_vmw_stream_arg {
562 uint32_t stream_id;
563 uint32_t pad64;
564};
565
566/*************************************************************************/
567/**
568 * DRM_VMW_UNREF_STREAM - Unclaim a stream.
569 *
570 * Return a single stream that was claimed by this process. Also makes
571 * sure that the stream has been stopped.
572 */
573
441#endif 574#endif