diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2009-02-11 11:45:18 -0500 |
---|---|---|
committer | Alex Deucher <alexdeucher@gmail.com> | 2009-02-11 11:45:18 -0500 |
commit | de5d3f92c0b4415edbfe43aa460a0edfb1898152 (patch) | |
tree | 596555aa1a1b710205ada72fa4bb533c68cf4ea8 | |
parent | cb4d4decf961670aeba4b915c6f07f662436b48b (diff) |
R6xx/R7xx Xv: add support for packed uploads
-rw-r--r-- | src/rhd_video.c | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/src/rhd_video.c b/src/rhd_video.c index c99849d..ab8ad8d 100644 --- a/src/rhd_video.c +++ b/src/rhd_video.c @@ -552,22 +552,16 @@ R600CopyPlanar(ScrnInfoPtr pScrn, } static void -R600CopyPacked(unsigned char *src, unsigned char *dst, +R600CopyPacked(ScrnInfoPtr pScrn, + unsigned char *src, uint32_t dst_mc_addr, int srcPitch, int dstPitch, int w, int h) { - int i; - - if (srcPitch == dstPitch) { - memcpy(dst, src, srcPitch * h); - dst += (dstPitch * h); - } else { - for (i = 0; i < h; i++) { - memcpy(dst, src, srcPitch); - src += srcPitch; - dst += dstPitch; - } - } + /* YUV */ + R600CopyToVRAM(pScrn, + (char *)src, srcPitch, + dstPitch >> 2, dst_mc_addr, h, 32, + 0, 0, w >> 1, h); } /* @@ -710,7 +704,7 @@ rhdPutImageTextured(ScrnInfoPtr pScrn, default: if (rhdPtr->ChipSet >= RHD_R600) { pPriv->BufferPitch = ALIGN(2 * width, 256); - R600CopyPacked(buf, FBBuf, + R600CopyPacked(pScrn, buf, pPriv->BufferOffset + rhdPtr->FbIntAddress + rhdPtr->FbScanoutStart, 2 * width, pPriv->BufferPitch, width, height); } else if (rhdPtr->CS->Type == RHD_CS_CPDMA) |