xf86-video-ati: Branch 'master'

Alex Deucher agd5f at kemper.freedesktop.org
Tue Feb 22 22:03:35 PST 2011


 src/radeon_textured_video.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 91070cfd75d5607c4a72ace780f830f0ddb40e84
Author: Alex Deucher <alexdeucher at gmail.com>
Date:   Wed Feb 23 00:55:28 2011 -0500

    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 at gmail.com>

diff --git a/src/radeon_textured_video.c b/src/radeon_textured_video.c
index f2c8f6a..65a4871 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) {


More information about the xorg-commit mailing list