diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2009-02-09 13:33:13 -0500 |
---|---|---|
committer | Alex Deucher <alexdeucher@gmail.com> | 2009-02-09 13:33:13 -0500 |
commit | 90be9fb2c858be9a767da456102f507731a89c18 (patch) | |
tree | 330d48ea3b49219a5f7a1e4a90964bc681984967 | |
parent | 4065d0046d66e28ae41067f7cb2d05893c5598c5 (diff) |
R6xx/R7xx UTS: move actual upload to separate function
So it can be shared with Xv
-rw-r--r-- | src/r600_exa.c | 30 |
1 files changed, 22 insertions, 8 deletions
diff --git a/src/r600_exa.c b/src/r600_exa.c index 08db605..19d3688 100644 --- a/src/r600_exa.c +++ b/src/r600_exa.c @@ -2081,16 +2081,13 @@ R600WaitforIdlePoll(ScrnInfoPtr pScrn) return FALSE; } -static Bool -R600UploadToScreen(PixmapPtr pDst, int x, int y, int w, int h, - char *src, int src_pitch) +Bool +R600CopyToVRAM(ScrnInfoPtr pScrn, + char *src, int src_pitch, + uint32_t dst_pitch, uint32_t dst_mc_addr, uint32_t dst_height, int bpp, + int x, int y, int w, int h) { - ScrnInfoPtr pScrn = xf86Screens[pDst->drawable.pScreen->myNum]; RHDPtr rhdPtr = RHDPTR(pScrn); - uint32_t dst_pitch = exaGetPixmapPitch(pDst) / (pDst->drawable.bitsPerPixel / 8); - uint32_t dst_mc_addr = rhdPtr->FbIntAddress + rhdPtr->FbScanoutStart + exaGetPixmapOffset(pDst); - uint32_t dst_height = pDst->drawable.height; - int bpp = pDst->drawable.bitsPerPixel; uint32_t scratch_mc_addr; int wpass = w * (bpp/8); int scratch_pitch_bytes = (wpass + 255) & ~255; @@ -2154,6 +2151,23 @@ R600UploadToScreen(PixmapPtr pDst, int x, int y, int w, int h, } static Bool +R600UploadToScreen(PixmapPtr pDst, int x, int y, int w, int h, + char *src, int src_pitch) +{ + ScrnInfoPtr pScrn = xf86Screens[pDst->drawable.pScreen->myNum]; + RHDPtr rhdPtr = RHDPTR(pScrn); + uint32_t dst_pitch = exaGetPixmapPitch(pDst) / (pDst->drawable.bitsPerPixel / 8); + uint32_t dst_mc_addr = rhdPtr->FbIntAddress + rhdPtr->FbScanoutStart + exaGetPixmapOffset(pDst); + uint32_t dst_height = pDst->drawable.height; + int bpp = pDst->drawable.bitsPerPixel; + + return R600CopyToVRAM(pScrn, + src, src_pitch, + dst_pitch, dst_mc_addr, dst_height, bpp, + x, y, w, h); +} + +static Bool R600DownloadFromScreen(PixmapPtr pSrc, int x, int y, int w, int h, char *dst, int dst_pitch) { |