gl: updated glxext.h to version 27
[mesa.git] / src / gallium / winsys / drm / vmware / core / vmwgfx_drm.h
index 6bf3183ff54f952ae0d7560c3a38b4609dc50596..47914bdb7112523922668ab572a3657d952a626f 100644 (file)
  *
  **************************************************************************/
 
-#ifndef _VMWGFX_DRM_H_
-#define _VMWGFX_DRM_H_
+#ifndef __VMWGFX_DRM_H__
+#define __VMWGFX_DRM_H__
 
 #define DRM_VMW_MAX_SURFACE_FACES 6
 #define DRM_VMW_MAX_MIP_LEVELS 24
 
 #define DRM_VMW_EXT_NAME_LEN 128
 
-#define DRM_VMW_GET_PARAM            1
-#define DRM_VMW_EXTENSION            2
-#define DRM_VMW_CREATE_CONTEXT       3
-#define DRM_VMW_UNREF_CONTEXT        4
-#define DRM_VMW_CREATE_SURFACE       5
-#define DRM_VMW_UNREF_SURFACE        6
-#define DRM_VMW_REF_SURFACE          7
-#define DRM_VMW_EXECBUF              8
-#define DRM_VMW_ALLOC_DMABUF         9
-#define DRM_VMW_UNREF_DMABUF         10
-#define DRM_VMW_FIFO_DEBUG           11
-#define DRM_VMW_FENCE_WAIT           12
-#define DRM_VMW_OVERLAY              13
+#define DRM_VMW_GET_PARAM            0
+#define DRM_VMW_ALLOC_DMABUF         1
+#define DRM_VMW_UNREF_DMABUF         2
+#define DRM_VMW_CURSOR_BYPASS        3
+/* guarded by DRM_VMW_PARAM_NUM_STREAMS != 0*/
+#define DRM_VMW_CONTROL_STREAM       4
+#define DRM_VMW_CLAIM_STREAM         5
+#define DRM_VMW_UNREF_STREAM         6
+/* guarded by DRM_VMW_PARAM_3D == 1 */
+#define DRM_VMW_CREATE_CONTEXT       7
+#define DRM_VMW_UNREF_CONTEXT        8
+#define DRM_VMW_CREATE_SURFACE       9
+#define DRM_VMW_UNREF_SURFACE        10
+#define DRM_VMW_REF_SURFACE          11
+#define DRM_VMW_EXECBUF              12
+#define DRM_VMW_FIFO_DEBUG           13
+#define DRM_VMW_FENCE_WAIT           14
+
 
 /*************************************************************************/
 /**
  * DRM_VMW_GET_PARAM - get device information.
  *
- * Currently we support only one parameter:
- *
  * DRM_VMW_PARAM_FIFO_OFFSET:
  * Offset to use to map the first page of the FIFO read-only.
  * The fifo is mapped using the mmap() system call on the drm device.
+ *
+ * DRM_VMW_PARAM_OVERLAY_IOCTL:
+ * Does the driver support the overlay ioctl.
  */
 
-#define DRM_VMW_PARAM_FIFO_OFFSET    0
+#define DRM_VMW_PARAM_NUM_STREAMS      0
+#define DRM_VMW_PARAM_NUM_FREE_STREAMS 1
+#define DRM_VMW_PARAM_3D               2
+#define DRM_VMW_PARAM_FIFO_OFFSET      3
+#define DRM_VMW_PARAM_HW_CAPS          4
+#define DRM_VMW_PARAM_FIFO_CAPS        5
 
 /**
  * struct drm_vmw_getparam_arg
@@ -75,49 +86,6 @@ struct drm_vmw_getparam_arg {
        uint32_t pad64;
 };
 
-/*************************************************************************/
-/**
- * DRM_VMW_EXTENSION - Query device extensions.
- */
-
-/**
- * struct drm_vmw_extension_rep
- *
- * @exists: The queried extension exists.
- * @driver_ioctl_offset: Ioctl number of the first ioctl in the extension.
- * @driver_sarea_offset: Offset to any space in the DRI SAREA
- * used by the extension.
- * @major: Major version number of the extension.
- * @minor: Minor version number of the extension.
- * @pl: Patch level version number of the extension.
- *
- * Output argument to the DRM_VMW_EXTENSION Ioctl.
- */
-
-struct drm_vmw_extension_rep {
-       int32_t exists;
-       uint32_t driver_ioctl_offset;
-       uint32_t driver_sarea_offset;
-       uint32_t major;
-       uint32_t minor;
-       uint32_t pl;
-       uint32_t pad64;
-};
-
-/**
- * union drm_vmw_extension_arg
- *
- * @extension - Ascii name of the extension to be queried. //In
- * @rep - Reply as defined above. //Out
- *
- * Argument to the DRM_VMW_EXTENSION Ioctl.
- */
-
-union drm_vmw_extension_arg {
-       char extension[DRM_VMW_EXT_NAME_LEN];
-       struct drm_vmw_extension_rep rep;
-};
-
 /*************************************************************************/
 /**
  * DRM_VMW_CREATE_CONTEXT - Create a host context.
@@ -171,6 +139,8 @@ struct drm_vmw_context_arg {
  * The size of the array should equal the total number of mipmap levels.
  * @shareable: Boolean whether other clients (as identified by file descriptors)
  * may reference this surface.
+ * @scanout: Boolean whether the surface is intended to be used as a
+ * scanout.
  *
  * Input data to the DRM_VMW_CREATE_SURFACE Ioctl.
  * Output data from the DRM_VMW_REF_SURFACE Ioctl.
@@ -182,7 +152,7 @@ struct drm_vmw_surface_create_req {
        uint32_t mip_levels[DRM_VMW_MAX_SURFACE_FACES];
        uint64_t size_addr;
        int32_t shareable;
-       uint32_t pad64;
+       int32_t scanout;
 };
 
 /**
@@ -285,17 +255,28 @@ union drm_vmw_surface_reference_arg {
  *
  * @commands: User-space address of a command buffer cast to an uint64_t.
  * @command-size: Size in bytes of the command buffer.
+ * @throttle-us: Sleep until software is less than @throttle_us
+ * microseconds ahead of hardware. The driver may round this value
+ * to the nearest kernel tick.
  * @fence_rep: User-space address of a struct drm_vmw_fence_rep cast to an
  * uint64_t.
+ * @version: Allows expanding the execbuf ioctl parameters without breaking
+ * backwards compatibility, since user-space will always tell the kernel
+ * which version it uses.
+ * @flags: Execbuf flags. None currently.
  *
  * Argument to the DRM_VMW_EXECBUF Ioctl.
  */
 
+#define DRM_VMW_EXECBUF_VERSION 0
+
 struct drm_vmw_execbuf_arg {
        uint64_t commands;
        uint32_t command_size;
-       uint32_t pad64;
+       uint32_t throttle_us;
        uint64_t fence_rep;
+        uint32_t version;
+        uint32_t flags;
 };
 
 /**
@@ -441,7 +422,7 @@ struct drm_vmw_fence_wait_arg {
 
 /*************************************************************************/
 /**
- * DRM_VMW_OVERLAY - Control overlays.
+ * DRM_VMW_CONTROL_STREAM - Control overlays, aka streams.
  *
  * This IOCTL controls the overlay units of the svga device.
  * The SVGA overlay units does not work like regular hardware units in
@@ -466,7 +447,7 @@ struct drm_vmw_rect {
 };
 
 /**
- * struct drm_vmw_overlay_arg
+ * struct drm_vmw_control_stream_arg
  *
  * @stream_id: Stearm to control
  * @enabled: If false all following arguments are ignored.
@@ -480,10 +461,10 @@ struct drm_vmw_rect {
  * @src: Source rect, must be within the defined area above.
  * @dst: Destination rect, x and y may be negative.
  *
- * Argument to the DRM_VMW_OVERLAY Ioctl.
+ * Argument to the DRM_VMW_CONTROL_STREAM Ioctl.
  */
 
-struct drm_vmw_overlay_arg {
+struct drm_vmw_control_stream_arg {
        uint32_t stream_id;
        uint32_t enabled;
 
@@ -503,4 +484,62 @@ struct drm_vmw_overlay_arg {
        struct drm_vmw_rect dst;
 };
 
+/*************************************************************************/
+/**
+ * DRM_VMW_CURSOR_BYPASS - Give extra information about cursor bypass.
+ *
+ */
+
+#define DRM_VMW_CURSOR_BYPASS_ALL    (1 << 0)
+#define DRM_VMW_CURSOR_BYPASS_FLAGS       (1)
+
+/**
+ * struct drm_vmw_cursor_bypass_arg
+ *
+ * @flags: Flags.
+ * @crtc_id: Crtc id, only used if DMR_CURSOR_BYPASS_ALL isn't passed.
+ * @xpos: X position of cursor.
+ * @ypos: Y position of cursor.
+ * @xhot: X hotspot.
+ * @yhot: Y hotspot.
+ *
+ * Argument to the DRM_VMW_CURSOR_BYPASS Ioctl.
+ */
+
+struct drm_vmw_cursor_bypass_arg {
+       uint32_t flags;
+       uint32_t crtc_id;
+       int32_t xpos;
+       int32_t ypos;
+       int32_t xhot;
+       int32_t yhot;
+};
+
+/*************************************************************************/
+/**
+ * DRM_VMW_CLAIM_STREAM - Claim a single stream.
+ */
+
+/**
+ * struct drm_vmw_context_arg
+ *
+ * @stream_id: Device unique context ID.
+ *
+ * Output argument to the DRM_VMW_CREATE_CONTEXT Ioctl.
+ * Input argument to the DRM_VMW_UNREF_CONTEXT Ioctl.
+ */
+
+struct drm_vmw_stream_arg {
+       uint32_t stream_id;
+       uint32_t pad64;
+};
+
+/*************************************************************************/
+/**
+ * DRM_VMW_UNREF_STREAM - Unclaim a stream.
+ *
+ * Return a single stream that was claimed by this process. Also makes
+ * sure that the stream has been stopped.
+ */
+
 #endif