summaryrefslogtreecommitdiff
path: root/src/gallium/winsys/drm/vmware/xorg/vmw_video.c
diff options
context:
space:
mode:
authorJakob Bornecrantz <jakob@vmware.com>2009-12-04 16:25:59 +0100
committerJakob Bornecrantz <jakob@vmware.com>2009-12-04 16:50:20 +0100
commit124f4bc97712acfe7d08807b013a101a4d6276e1 (patch)
tree2c64ffffe147d10e96af03e1753b1a163c2fb634 /src/gallium/winsys/drm/vmware/xorg/vmw_video.c
parentf2e3fc18141d29ede2b711d7ddbb225145be35e3 (diff)
vmware/xorg: Stop video ports on leave vt
Diffstat (limited to 'src/gallium/winsys/drm/vmware/xorg/vmw_video.c')
-rw-r--r--src/gallium/winsys/drm/vmware/xorg/vmw_video.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/gallium/winsys/drm/vmware/xorg/vmw_video.c b/src/gallium/winsys/drm/vmware/xorg/vmw_video.c
index d62c3b7296..ef1e2f1e73 100644
--- a/src/gallium/winsys/drm/vmware/xorg/vmw_video.c
+++ b/src/gallium/winsys/drm/vmware/xorg/vmw_video.c
@@ -361,6 +361,38 @@ vmw_video_close(ScrnInfoPtr pScrn, struct vmw_driver *vmw)
/*
*-----------------------------------------------------------------------------
*
+ * vmw_video_stop_all --
+ *
+ * Stop all video streams from playing.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * All buffers are freed.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+void vmw_video_stop_all(ScrnInfoPtr pScrn, struct vmw_driver *vmw)
+{
+ struct vmw_video_private *video = vmw->video_priv;
+ int i;
+
+ debug_printf("%s: enter\n", __func__);
+
+ if (!video)
+ return;
+
+ for (i = 0; i < VMWARE_VID_NUM_PORTS; ++i) {
+ vmw_xv_stop_video(pScrn, &video->port[i], TRUE);
+ }
+}
+
+
+/*
+ *-----------------------------------------------------------------------------
+ *
* vmw_video_init_adaptor --
*
* Initializes a XF86VideoAdaptor structure with the capabilities and