summaryrefslogtreecommitdiff
path: root/src/gallium/winsys/drm/vmware/xorg/vmw_video.c
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2009-12-11 10:04:07 -0700
committerBrian Paul <brianp@vmware.com>2009-12-11 10:04:07 -0700
commita087eb590d780cb82b49464e05ffc85123adce7e (patch)
treea2ac3ec2cc0b9001b350664d6e7915aba5e087a9 /src/gallium/winsys/drm/vmware/xorg/vmw_video.c
parentcb640c8d40c4ee34160a14d646c244f44a5013f6 (diff)
parente128cc205e30540597ecd57849060a6bf4714d9f (diff)
Merge branch 'mesa_7_7_branch'
Conflicts: src/gallium/state_trackers/xorg/xorg_xv.c src/mesa/drivers/dri/intel/intel_span.c
Diffstat (limited to 'src/gallium/winsys/drm/vmware/xorg/vmw_video.c')
-rw-r--r--src/gallium/winsys/drm/vmware/xorg/vmw_video.c40
1 files changed, 39 insertions, 1 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..5674e4f352 100644
--- a/src/gallium/winsys/drm/vmware/xorg/vmw_video.c
+++ b/src/gallium/winsys/drm/vmware/xorg/vmw_video.c
@@ -276,6 +276,11 @@ vmw_video_init(ScrnInfoPtr pScrn, struct vmw_driver *vmw)
debug_printf("%s: enter\n", __func__);
+ if (vmw_ioctl_supports_overlay(vmw) != 0) {
+ debug_printf("No overlay ioctl support\n");
+ return FALSE;
+ }
+
numAdaptors = xf86XVListGenericAdaptors(pScrn, &overlayAdaptors);
newAdaptor = vmw_video_init_adaptor(pScrn, vmw);
@@ -346,7 +351,8 @@ vmw_video_close(ScrnInfoPtr pScrn, struct vmw_driver *vmw)
return TRUE;
for (i = 0; i < VMWARE_VID_NUM_PORTS; ++i) {
- vmw_video_port_cleanup(pScrn, &video->port[i]);
+ /* make sure the port is stoped as well */
+ vmw_xv_stop_video(pScrn, &video->port[i], TRUE);
}
/* XXX: I'm sure this function is missing code for turning off Xv */
@@ -361,6 +367,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