diff options
author | Xiang, Haihao <haihao.xiang@intel.com> | 2007-06-25 10:17:08 +0800 |
---|---|---|
committer | Xiang, Haihao <haihao.xiang@intel.com> | 2007-07-19 17:28:35 +0800 |
commit | 934da9f2b83716bb37d0719a61b8e6b179fff2cd (patch) | |
tree | f75e779691c0baeadf4dbff4f24f0a6c9e110de5 /src/i830_video.c | |
parent | c7920a0e819308762fca3d6fc7ab194bd565b06a (diff) |
enable XvMC for i915
Diffstat (limited to 'src/i830_video.c')
-rw-r--r-- | src/i830_video.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/i830_video.c b/src/i830_video.c index b4f9e746..4f5ab434 100644 --- a/src/i830_video.c +++ b/src/i830_video.c @@ -74,6 +74,8 @@ #include "dixstruct.h" #include "fourcc.h" +#include "i915_hwmc.h" + #ifndef USE_USLEEP_FOR_VIDEO #define USE_USLEEP_FOR_VIDEO 0 #endif @@ -576,6 +578,11 @@ I830InitVideo(ScreenPtr pScreen) if (texturedAdaptor != NULL) { adaptors[num_adaptors++] = texturedAdaptor; xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Set up textured video\n"); + +#ifdef XF86DRI + if (pI830->XvMCEnabled && IS_I9XX(pI830)) + I915XvMCInitXv(pScrn, texturedAdaptor); +#endif } else { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Failed to set up textured video\n"); @@ -2587,6 +2594,16 @@ I830QueryImageAttributes(ScrnInfoPtr pScrn, ErrorF("size is %d\n", size); #endif break; + case FOURCC_XVMC: + *h = (*h + 1) & ~1; +#ifdef XF86DRI + size = I915XvMCPutImageSize(pScrn); +#else + size = 0; +#endif + if (pitches) + pitches[0] = size; + break; case FOURCC_UYVY: case FOURCC_YUY2: default: |