diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2011-02-11 13:21:43 -0500 |
---|---|---|
committer | Alex Deucher <alexdeucher@gmail.com> | 2011-02-11 13:21:43 -0500 |
commit | a9c135809945fb372ce390f06918b9fd8e455b3f (patch) | |
tree | 63f5ef372960b3f706bedbd4cf4a5b3fcdabc22b /src | |
parent | e5bd99faa3b6629a55168386d5dfa936ee4e97ae (diff) |
Xv: fix textured video alignment
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/radeon_legacy_memory.c | 2 | ||||
-rw-r--r-- | src/radeon_textured_video.c | 13 |
2 files changed, 11 insertions, 4 deletions
diff --git a/src/radeon_legacy_memory.c b/src/radeon_legacy_memory.c index 32d8c797..5d66c920 100644 --- a/src/radeon_legacy_memory.c +++ b/src/radeon_legacy_memory.c @@ -29,7 +29,7 @@ radeon_legacy_allocate_memory(ScrnInfoPtr pScrn, if (*mem_struct) radeon_legacy_free_memory(pScrn, *mem_struct); - video_bo = radeon_bo_open(info->bufmgr, 0, size, RADEON_GPU_PAGE_SIZE, domain, 0); + video_bo = radeon_bo_open(info->bufmgr, 0, size, align, domain, 0); *mem_struct = video_bo; diff --git a/src/radeon_textured_video.c b/src/radeon_textured_video.c index 163ee48e..301e47a1 100644 --- a/src/radeon_textured_video.c +++ b/src/radeon_textured_video.c @@ -284,10 +284,17 @@ RADEONPutImageTextured(ScrnInfoPtr pScrn, pPriv->bicubic_enabled = FALSE; } - if (info->ChipFamily >= CHIP_FAMILY_R600) - hw_align = 256; +#ifdef XF86DRM_MODE + if (info->cs) + hw_align = drmmode_get_base_align(pScrn, 2, 0); else - hw_align = 64; +#endif + { + if (info->ChipFamily >= CHIP_FAMILY_R600) + hw_align = 256; + else + hw_align = 64; + } switch(id) { case FOURCC_YV12: |