summaryrefslogtreecommitdiff
path: root/src/radeon_textured_video.c
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2011-02-23 00:55:28 -0500
committerAlex Deucher <alexdeucher@gmail.com>2011-02-23 00:55:28 -0500
commit91070cfd75d5607c4a72ace780f830f0ddb40e84 (patch)
tree757c8b80a95ed620845ea764a4ac875eb426f101 /src/radeon_textured_video.c
parentacd54a48a6680956ed903fc890204c0c910b6712 (diff)
Xv: use aligned height to calculate Xv buffer size
Make sure it's large enough for the tiling mode so the CS checker doesn't complain. Should fix: https://bugs.freedesktop.org/show_bug.cgi?id=34567 Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Diffstat (limited to 'src/radeon_textured_video.c')
-rw-r--r--src/radeon_textured_video.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/radeon_textured_video.c b/src/radeon_textured_video.c
index f2c8f6aa..65a48718 100644
--- a/src/radeon_textured_video.c
+++ b/src/radeon_textured_video.c
@@ -247,6 +247,7 @@ RADEONPutImageTextured(ScrnInfoPtr pScrn,
int top, nlines, size;
BoxRec dstBox;
int dst_width = width, dst_height = height;
+ int aligned_height;
/* make the compiler happy */
s2offset = s3offset = srcPitch2 = 0;
@@ -298,6 +299,8 @@ RADEONPutImageTextured(ScrnInfoPtr pScrn,
pPriv->hw_align = 64;
}
+ aligned_height = RADEON_ALIGN(dst_height, drmmode_get_height_align(pScrn, 0));
+
switch(id) {
case FOURCC_YV12:
case FOURCC_I420:
@@ -320,7 +323,7 @@ RADEONPutImageTextured(ScrnInfoPtr pScrn,
break;
}
- size = dstPitch * dst_height + 2 * dstPitch2 * ((dst_height + 1) >> 1);
+ size = dstPitch * aligned_height + 2 * dstPitch2 * ((aligned_height + 1) >> 1);
size = RADEON_ALIGN(size, pPriv->hw_align);
if (size != pPriv->size) {