diff options
author | Carl Worth <cworth@cworth.org> | 2008-07-17 00:38:54 -0700 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2008-07-17 00:38:54 -0700 |
commit | a6ad50402cb879b08de95f94959bb1f59701c1ff (patch) | |
tree | 9ee9fc89a52d8791b272721a910ea5c11d4e4aa7 /src/i915_video.c | |
parent | e9916b9d496fd0b4df717892dda33f81a2e2990a (diff) | |
parent | c4565a9811487402d899d0933cc63e27ffe1ff08 (diff) |
Merge branch 'master' into drm-gem
Conflicts:
configure.ac
src/reg_dumper/Makefile.am
Diffstat (limited to 'src/i915_video.c')
-rw-r--r-- | src/i915_video.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/i915_video.c b/src/i915_video.c index e27854ee..e2954a76 100644 --- a/src/i915_video.c +++ b/src/i915_video.c @@ -42,7 +42,7 @@ void I915DisplayVideoTextured(ScrnInfoPtr pScrn, I830PortPrivPtr pPriv, int id, RegionPtr dstRegion, - short width, short height, int video_pitch, + short width, short height, int video_pitch, int video_pitch2, int x1, int y1, int x2, int y2, short src_w, short src_h, short drw_w, short drw_h, PixmapPtr pPixmap) @@ -271,7 +271,13 @@ I915DisplayVideoTextured(ScrnInfoPtr pScrn, I830PortPrivPtr pPriv, int id, ms3 |= (height - 1) << MS3_HEIGHT_SHIFT; ms3 |= (width - 1) << MS3_WIDTH_SHIFT; OUT_BATCH(ms3); - OUT_BATCH(((video_pitch * 2 / 4) - 1) << MS4_PITCH_SHIFT); + /* check to see if Y has special pitch than normal double u/v pitch, + * e.g i915 XvMC hw requires at least 1K alignment, so Y pitch might + * be same as U/V's.*/ + if (video_pitch2) + OUT_BATCH(((video_pitch2 / 4) - 1) << MS4_PITCH_SHIFT); + else + OUT_BATCH(((video_pitch * 2 / 4) - 1) << MS4_PITCH_SHIFT); OUT_BATCH(pPriv->UBuf0offset); ms3 = MAPSURF_8BIT | MT_8BIT_I8 | MS3_USE_FENCE_REGS; |