Hi, I started to see very strange output with Xv (not sure if it's due to the fact that I disabled kms, or that I updated to linux 2.6.32), but anyway, I tracked down the issue.
With 'git bisect' I found the problem was introduced at commit '5473eee', so I started analyzing the code and found that the code labeled "Upload bicubic filter tex" in radeon_load_bicubic_texture is actually not doing anything; if I remove it everything works exactly the same (weird). Then I decided to move it to RADEONPutImageTextured, but only run it once, and now everything works fine. I've no idea what's happening here. I'm attaching the patch I'm using, and this is the output I get: (II) RADEON(0): fc: ba=0xb74b9bc0 (II) RADEON(0): fc: ba=0xb74b9bc0 Any hints? P.S. Please CC me; I'm not subscribed -- Felipe Contreras
>From 4815a1f368d6ae0d9aa1a1da15a00a5f862fdc10 Mon Sep 17 00:00:00 2001 From: Felipe Contreras <[email protected]> Date: Tue, 8 Dec 2009 03:32:34 +0200 Subject: [PATCH] textured-video: upload bicubic texture later Signed-off-by: Felipe Contreras <[email protected]> --- src/radeon_textured_video.c | 64 ++++++++++++++++++++++++++++--------------- 1 files changed, 42 insertions(+), 22 deletions(-) diff --git a/src/radeon_textured_video.c b/src/radeon_textured_video.c index 2e5d763..bbabaab 100644 --- a/src/radeon_textured_video.c +++ b/src/radeon_textured_video.c @@ -218,6 +218,37 @@ R600CopyData( } } +static Bool upload_bicubic_texture(ScrnInfoPtr pScrn) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); + uint8_t *bicubic_addr; + int ret; + if (info->cs) { + ret = radeon_bo_map(info->bicubic_bo, 1); + if (ret) + return FALSE; + + bicubic_addr = info->bicubic_bo->ptr; + } else { + bicubic_addr = (uint8_t *)(info->FB + info->bicubic_offset); + } + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "fc: ba=%p\n", bicubic_addr); + + RADEONCopySwap(bicubic_addr, (uint8_t *)bicubic_tex_512, 1024, +#if X_BYTE_ORDER == X_BIG_ENDIAN + RADEON_HOST_DATA_SWAP_16BIT +#else + RADEON_HOST_DATA_SWAP_NONE +#endif +); + + if (info->cs) + radeon_bo_unmap(info->bicubic_bo); + + return TRUE; +} + static int RADEONPutImageTextured(ScrnInfoPtr pScrn, short src_x, short src_y, @@ -259,6 +290,15 @@ RADEONPutImageTextured(ScrnInfoPtr pScrn, dstBox.y1 = drw_y; dstBox.y2 = drw_y + drw_h; + { + static int init = 0; + if (init == 0) { + /* XXX: this works */ + upload_bicubic_texture(pScrn); + init++; + } + } + if (!xf86XVClipVideoHelper(&dstBox, &x1, &x2, &y1, &y2, clipBoxes, width, height)) return Success; @@ -721,29 +761,9 @@ Bool radeon_load_bicubic_texture(ScrnInfoPtr pScrn) if (info->cs) info->bicubic_bo = info->bicubic_memory; - /* Upload bicubic filter tex */ - if (info->ChipFamily < CHIP_FAMILY_R600) { - uint8_t *bicubic_addr; - int ret; - if (info->cs) { - ret = radeon_bo_map(info->bicubic_bo, 1); - if (ret) - return FALSE; - - bicubic_addr = info->bicubic_bo->ptr; - } else - bicubic_addr = (uint8_t *)(info->FB + info->bicubic_offset); + /* XXX: this is a no-op */ + upload_bicubic_texture(pScrn); - RADEONCopySwap(bicubic_addr, (uint8_t *)bicubic_tex_512, 1024, -#if X_BYTE_ORDER == X_BIG_ENDIAN - RADEON_HOST_DATA_SWAP_16BIT -#else - RADEON_HOST_DATA_SWAP_NONE -#endif -); - if (info->cs) - radeon_bo_unmap(info->bicubic_bo); - } return TRUE; } -- 1.6.6.rc1.39.g9a42
_______________________________________________ xorg-driver-ati mailing list [email protected] http://lists.x.org/mailman/listinfo/xorg-driver-ati
