#define DRM_VMW_EXT_NAME_LEN 128
-#define DRM_VMW_GET_PARAM 1
-#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_CURSOR_BYPASS 14
-#define DRM_VMW_CLAIM_STREAM 15
-#define DRM_VMW_UNREF_STREAM 16
+#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
+
/*************************************************************************/
/**
* Does the driver support the overlay ioctl.
*/
-#define DRM_VMW_PARAM_FIFO_OFFSET 0
-#define DRM_VMW_PARAM_OVERLAY_IOCTL 1
+#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_NUM_STREAMS 3
-#define DRM_VMW_PARAM_NUM_FREE_STREAMS 4
+#define DRM_VMW_PARAM_FIFO_OFFSET 3
+
/**
* struct drm_vmw_getparam_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
};
/**
- * struct drm_vmw_overlay_arg
+ * struct drm_vmw_control_stream_arg
*
* @stream_id: Stearm to control
* @enabled: If false all following arguments are ignored.
* @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;
short height, RegionPtr clipBoxes)
{
struct vmw_driver *vmw = vmw_driver(pScrn);
- struct drm_vmw_overlay_arg arg;
+ struct drm_vmw_control_stream_arg arg;
unsigned short w, h;
int size;
int ret;
}
}
- ret = drmCommandWrite(vmw->fd, DRM_VMW_OVERLAY, &arg, sizeof(arg));
+ ret = drmCommandWrite(vmw->fd, DRM_VMW_CONTROL_STREAM, &arg, sizeof(arg));
if (ret) {
vmw_video_port_cleanup(pScrn, port);
return XvBadAlloc;
{
struct vmw_driver *vmw = vmw_driver(pScrn);
struct vmw_video_port *port = data;
- struct drm_vmw_overlay_arg arg;
+ struct drm_vmw_control_stream_arg arg;
int ret;
debug_printf("%s: cleanup is %s\n", __func__, cleanup ? "TRUE" : "FALSE");
arg.stream_id = port->streamId;
arg.enabled = FALSE;
- ret = drmCommandWrite(vmw->fd, DRM_VMW_OVERLAY, &arg, sizeof(arg));
+ ret = drmCommandWrite(vmw->fd, DRM_VMW_CONTROL_STREAM, &arg, sizeof(arg));
assert(ret == 0);
vmw_video_port_cleanup(pScrn, port);