xorg/vmwgfx: Don't clip video to viewport
authorThomas Hellstrom <thellstrom@vmware.com>
Fri, 26 Nov 2010 09:12:32 +0000 (10:12 +0100)
committerThomas Hellstrom <thellstrom@vmware.com>
Fri, 26 Nov 2010 09:28:01 +0000 (10:28 +0100)
Since the viewport is not updated on RandR12 mode switches anymore,
clipping to viewport may incorrectly clip away the video.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
src/gallium/targets/xorg-vmwgfx/vmw_video.c

index 3d907575ece1115b6e204a42503be0938d7410f7..7979209993dbc96ad3b5ed544adcc348eecd8562 100644 (file)
@@ -450,7 +450,16 @@ vmw_video_init_adaptor(ScrnInfoPtr pScrn, struct vmw_customizer *vmw)
     vmw->video_priv = video;
 
     adaptor->type = XvInputMask | XvImageMask | XvWindowMask;
-    adaptor->flags = VIDEO_OVERLAID_IMAGES | VIDEO_CLIP_TO_VIEWPORT;
+
+    /**
+     * Note: CLIP_TO_VIEWPORT was removed from the flags, since with the
+     * crtc/output based modesetting, the viewport is not updated on
+     * RandR modeswitches. Hence the video may incorrectly be clipped away.
+     * The correct approach, (if needed) would be to clip against the
+     * scanout area union of all active crtcs. Revisit if needed.
+     */
+
+    adaptor->flags = VIDEO_OVERLAID_IMAGES;
     adaptor->name = "VMware Video Engine";
     adaptor->nEncodings = VMWARE_VID_NUM_ENCODINGS;
     adaptor->pEncodings = vmwareVideoEncodings;