[PATCH 2/2] Add an option to turn off textured video

Maxim Levitsky maximlevitsky at gmail.com
Fri Feb 29 09:13:28 PST 2008


From 20416929e91875e9f9a5b46ab142e07e9f9ef27a Mon Sep 17 00:00:00 2001
From: Maxim Levitsky <maximlevitsky at gmail.com>
Date: Fri, 29 Feb 2008 18:29:02 +0200
Subject: [PATCH] Add an option to turn off textured video

Add a Boolean "TexturedVideo" option with default 'true'  value
to be able to turn textured video off.
---
 src/i830.h        |    1 +
 src/i830_driver.c |    6 +++++-
 src/i830_video.c  |    3 ++-
 3 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/i830.h b/src/i830.h
index 132f089..d212df4 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -492,6 +492,7 @@ typedef struct _I830Rec {
 
    Bool XvDisabled;			/* Xv disabled in PreInit. */
    Bool XvEnabled;			/* Xv enabled for this generation. */
+   Bool TexturedXvEnabled; /* Textured video enabled/disabled by user*/
 
 #ifdef I830_XV
    int colorKey;
diff --git a/src/i830_driver.c b/src/i830_driver.c
index 5cd0a34..0a17149 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -298,7 +298,8 @@ typedef enum {
    OPTION_INTELTEXPOOL,
 #endif
    OPTION_TRIPLEBUFFER,
-   OPTION_FORCEENABLEPIPEA
+   OPTION_FORCEENABLEPIPEA,
+   OPTION_TEXTURED_VIDEO
 } I830Opts;
 
 static OptionInfoRec I830Options[] = {
@@ -322,6 +323,7 @@ static OptionInfoRec I830Options[] = {
 #endif
    {OPTION_TRIPLEBUFFER, "TripleBuffer", OPTV_BOOLEAN,	{0},	FALSE},
    {OPTION_FORCEENABLEPIPEA, "ForceEnablePipeA", OPTV_BOOLEAN,	{0},	FALSE},
+   {OPTION_TEXTURED_VIDEO, "TexturedVideo", OPTV_BOOLEAN, {0}, TRUE},
    {-1,			NULL,		OPTV_NONE,	{0},	FALSE}
 };
 /* *INDENT-ON* */
@@ -1571,6 +1573,8 @@ I830PreInit(ScrnInfoPtr pScrn, int flags)
    pI830->XvDisabled =
 	!xf86ReturnOptValBool(pI830->Options, OPTION_XVIDEO, TRUE);
 
+   pI830->TexturedXvEnabled = xf86ReturnOptValBool(pI830->Options, OPTION_TEXTURED_VIDEO, TRUE);
+
 #ifdef I830_XV
    if (xf86GetOptValInteger(pI830->Options, OPTION_VIDEO_KEY,
 			    &(pI830->colorKey))) {
diff --git a/src/i830_video.c b/src/i830_video.c
index 894f55a..1867da4 100644
--- a/src/i830_video.c
+++ b/src/i830_video.c
@@ -566,7 +566,8 @@ I830InitVideo(ScreenPtr pScreen)
     /* Set up textured video if we can do it at this depth and we are on
      * supported hardware.
      */
-    if (pScrn->bitsPerPixel >= 16 && (IS_I9XX(pI830) || IS_I965G(pI830)) &&
+    if (pI830->TexturedXvEnabled && pScrn->bitsPerPixel >= 16
+		&& (IS_I9XX(pI830) || IS_I965G(pI830)) &&
 	!(!IS_I965G(pI830) && pScrn->displayWidth > 2048))
     {
 	texturedAdaptor = I830SetupImageVideoTextured(pScreen);
-- 
1.5.3.8




More information about the xorg mailing list