summaryrefslogtreecommitdiff
path: root/src/savage_exa.c
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2008-05-21 16:03:25 -0400
committerAdam Jackson <ajax@redhat.com>2008-05-21 16:03:25 -0400
commit5c0617874a49533f16b97277cd42584abb80f720 (patch)
treed4efda282bc7decce6ba4066c9c03ea16c5853cd /src/savage_exa.c
parent97a9d2476868befc989b7ddb8067ac791bf2672e (diff)
parenta01c9d12938f977a4310e0547866f01517059a3e (diff)
Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/driver/xf86-video-savage
Diffstat (limited to 'src/savage_exa.c')
-rw-r--r--src/savage_exa.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/savage_exa.c b/src/savage_exa.c
index aa6905a..6320e18 100644
--- a/src/savage_exa.c
+++ b/src/savage_exa.c
@@ -460,7 +460,6 @@ SavageUploadToScreen(PixmapPtr pDst, int x, int y, int w, int h, char *src, int
CARD32 * srcp;
Bpp = pDst->drawable.bitsPerPixel / 8;
- dwords = (((w * Bpp) + 3) >> 2) * h;
psav->sbd_offset = exaGetPixmapOffset(pDst);
psav->sbd_high = SavageSetBD(psav, pDst);
@@ -486,17 +485,19 @@ SavageUploadToScreen(PixmapPtr pDst, int x, int y, int w, int h, char *src, int
BCI_SEND(BCI_X_Y(x, y));
BCI_SEND(BCI_W_H(w, h));
- srcp = (CARD32 *)src;
queue = 120 * 1024;
- while (dwords) {
- if (queue < 4) {
- BCI_RESET;
- queue = 120 * 1024;
+ dwords = (((w * Bpp) + 3) >> 2);
+ for (i = 0; i < h; i++) {
+ srcp = (CARD32 *)src;
+ for (j = 0; j < dwords; j++) {
+ if (queue < 4) {
+ BCI_RESET;
+ queue = 120 * 1024;
+ }
+ BCI_SEND(*srcp++);
+ queue -= 4;
}
- BCI_SEND(*srcp);
- queue -= 4;
- dwords--;
- srcp++;
+ src += src_pitch;
}
/*exaWaitSync(pDst->drawable.pScreen);*/