[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#453754: Problem really comes from Texturized video



Hi,

The above patch works around the tearing for me (and my Intel 945G).

So : rebuild, and add the following line to the Device section of
/etc/X11/xorg.conf

        Option          "XvPreferOverlay"       "true"

Thanks!

(I had to trivially adapt it because it overlaps with the second patch
in the series... so here it is attached)
diff -rN -u old-xserver-xorg-video-intel-2.3.2/man/intel.man new-xserver-xorg-video-intel-2.3.2/man/intel.man
--- old-xserver-xorg-video-intel-2.3.2/man/intel.man	2008-09-21 20:46:31.000000000 +0000
+++ new-xserver-xorg-video-intel-2.3.2/man/intel.man	2008-09-21 20:46:31.000000000 +0000
@@ -128,6 +128,11 @@
 Disable or enable XVideo support.
 Default: XVideo is enabled for configurations where it is supported.
 .TP
+.BI "Option \*qXvPreferOverlay\*q \*q" boolean \*q
+Make hardware overlay be first XV adapter.
+Some applications assume only one XV adapter present thus use first one.
+Default: Textured video adapter is first and overlay second.
+.TP
 .BI "Option \*qLegacy3D\*q \*q" boolean \*q
 Enable support for the legacy i915_dri.so 3D driver.
 This will, among other things, make the 2D driver tell libGL to
diff -rN -u old-xserver-xorg-video-intel-2.3.2/src/i830_driver.c new-xserver-xorg-video-intel-2.3.2/src/i830_driver.c
--- old-xserver-xorg-video-intel-2.3.2/src/i830_driver.c	2008-09-21 20:46:31.000000000 +0000
+++ new-xserver-xorg-video-intel-2.3.2/src/i830_driver.c	2008-09-21 20:46:31.000000000 +0000
@@ -318,6 +318,7 @@
    OPTION_XVMC,
 #endif
    OPTION_RENDERACCEL,
+   OPTION_PREFER_OVERLAY,
 } I830Opts;
 
 static OptionInfoRec I830Options[] = {
@@ -346,6 +347,7 @@
 #ifdef INTEL_XVMC
    {OPTION_XVMC,	"XvMC",		OPTV_BOOLEAN,	{0},	TRUE},
 #endif
+   {OPTION_PREFER_OVERLAY, "XvPreferOverlay", OPTV_BOOLEAN, {0}, TRUE},
    {OPTION_RENDERACCEL, "RenderAccel",	OPTV_BOOLEAN,	{0},	TRUE},
    {-1,			NULL,		OPTV_NONE,	{0},	FALSE}
 };
@@ -1682,6 +1684,8 @@
    pI830->XvDisabled =
 	!xf86ReturnOptValBool(pI830->Options, OPTION_XVIDEO, TRUE);
 
+   pI830->XvPreferOverlay = xf86ReturnOptValBool(pI830->Options, OPTION_PREFER_OVERLAY, FALSE);
+
 #ifdef I830_XV
    if (xf86GetOptValInteger(pI830->Options, OPTION_VIDEO_KEY,
 			    &(pI830->colorKey))) {
diff -rN -u old-xserver-xorg-video-intel-2.3.2/src/i830.h new-xserver-xorg-video-intel-2.3.2/src/i830.h
--- old-xserver-xorg-video-intel-2.3.2/src/i830.h	2008-09-21 20:46:31.000000000 +0000
+++ new-xserver-xorg-video-intel-2.3.2/src/i830.h	2008-09-21 20:46:31.000000000 +0000
@@ -516,6 +516,7 @@
 
    Bool XvDisabled;			/* Xv disabled in PreInit. */
    Bool XvEnabled;			/* Xv enabled for this generation. */
+   Bool XvPreferOverlay;
 
 #ifdef I830_XV
    int colorKey;
diff -rN -u old-xserver-xorg-video-intel-2.3.2/src/i830_video.c new-xserver-xorg-video-intel-2.3.2/src/i830_video.c
--- old-xserver-xorg-video-intel-2.3.2/src/i830_video.c	2008-09-21 20:46:31.000000000 +0000
+++ new-xserver-xorg-video-intel-2.3.2/src/i830_video.c	2008-09-21 20:46:31.000000000 +0000
@@ -611,7 +611,6 @@
     {
 	texturedAdaptor = I830SetupImageVideoTextured(pScreen);
 	if (texturedAdaptor != NULL) {
-	    adaptors[num_adaptors++] = texturedAdaptor;
 	    xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Set up textured video\n");
 	} else {
 	    xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
@@ -625,7 +624,6 @@
     {
 	overlayAdaptor = I830SetupImageVideoOverlay(pScreen);
 	if (overlayAdaptor != NULL) {
-	    adaptors[num_adaptors++] = overlayAdaptor;
 	    xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Set up overlay video\n");
 	} else {
 	    xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
@@ -633,6 +631,16 @@
 	}
 	I830InitOffscreenImages(pScreen);
     }
+
+    if (overlayAdaptor && pI830->XvPreferOverlay)
+       adaptors[num_adaptors++] = overlayAdaptor;
+
+    if (texturedAdaptor)
+       adaptors[num_adaptors++] = texturedAdaptor;
+
+    if (overlayAdaptor && !pI830->XvPreferOverlay)
+       adaptors[num_adaptors++] = overlayAdaptor;
+
 #ifdef INTEL_XVMC
     if (intel_xvmc_probe(pScrn)) {
 	if (texturedAdaptor)


Reply to: