summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhenyu Wang <zhenyu.z.wang@intel.com>2007-11-29 23:12:16 +0800
committerZhenyu Wang <zhenyu.z.wang@intel.com>2007-11-29 23:12:16 +0800
commit3cf862717688aa679b5e667cd041ddd6f5db0b58 (patch)
treeeb5b218354c9ccf78848b26d028004fa647079fe
parent6da4b7a80cdf730018435fe84485ecdad62bc860 (diff)
xvmc: add "XvMC" option, default is false.
-rw-r--r--src/i830_driver.c12
-rw-r--r--src/i830_hwmc.c4
2 files changed, 15 insertions, 1 deletions
diff --git a/src/i830_driver.c b/src/i830_driver.c
index 0a059348..d2d405d4 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -301,6 +301,9 @@ typedef enum {
OPTION_INTELTEXPOOL,
#endif
OPTION_TRIPLEBUFFER,
+#ifdef XvMCExtension
+ OPTION_XVMC,
+#endif
} I830Opts;
static OptionInfoRec I830Options[] = {
@@ -323,6 +326,9 @@ static OptionInfoRec I830Options[] = {
{OPTION_INTELTEXPOOL,"Legacy3D", OPTV_BOOLEAN, {0}, FALSE},
#endif
{OPTION_TRIPLEBUFFER, "TripleBuffer", OPTV_BOOLEAN, {0}, FALSE},
+#ifdef XvMCExtension
+ {OPTION_XVMC, "XvMC", OPTV_BOOLEAN, {0}, FALSE},
+#endif
{-1, NULL, OPTV_NONE, {0}, FALSE}
};
/* *INDENT-ON* */
@@ -1588,6 +1594,12 @@ I830PreInit(ScrnInfoPtr pScrn, int flags)
pI830->TripleBuffer ? "en" : "dis");
#endif
+#ifdef XvMCExtension
+ pI830->XvMCEnabled = xf86ReturnOptValBool(pI830->Options, OPTION_XVMC, FALSE);
+ xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "Intel XvMC decoder %sabled\n",
+ pI830->XvMCEnabled ? "en" : "dis");
+#endif
+
/*
* If the driver can do gamma correction, it should call xf86SetGamma() here.
*/
diff --git a/src/i830_hwmc.c b/src/i830_hwmc.c
index 721616c1..189c2e56 100644
--- a/src/i830_hwmc.c
+++ b/src/i830_hwmc.c
@@ -52,6 +52,9 @@ Bool intel_xvmc_probe(ScrnInfoPtr pScrn)
I830Ptr pI830 = I830PTR(pScrn);
Bool ret = FALSE;
+ if (!pI830->XvMCEnabled)
+ return FALSE;
+
if (IS_I9XX(pI830)) {
if (!IS_I965G(pI830))
ret = intel_xvmc_set_driver(&i915_xvmc_driver);
@@ -101,7 +104,6 @@ Bool intel_xvmc_screen_init(ScreenPtr pScreen)
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"[XvMC] %s driver initialized.\n",
xvmc_driver->name);
- pI830->XvMCEnabled = TRUE;
} else {
intel_xvmc_finish(pScrn);
pI830->XvMCEnabled = FALSE;