diff options
-rw-r--r-- | src/i830_driver.c | 12 | ||||
-rw-r--r-- | src/i830_hwmc.c | 4 |
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; |