diff options
-rw-r--r-- | driver/xf86-video-sis/src/sis310_accel.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/driver/xf86-video-sis/src/sis310_accel.c b/driver/xf86-video-sis/src/sis310_accel.c index 2c17f9f19..f4dc436ea 100644 --- a/driver/xf86-video-sis/src/sis310_accel.c +++ b/driver/xf86-video-sis/src/sis310_accel.c @@ -1874,7 +1874,7 @@ SiSUploadToScreen(PixmapPtr pDst, int x, int y, int w, int h, char *src, int src { ScrnInfoPtr pScrn = xf86ScreenToScrn(pDst->drawable.pScreen); SISPtr pSiS = SISPTR(pScrn); - unsigned char *dst = pDst->devPrivate.ptr; + unsigned char *dst = ((unsigned char *) pSiS->FbBase) + exaGetPixmapOffset(pDst); int dst_pitch = exaGetPixmapPitch(pDst); (pSiS->SyncAccel)(pScrn); @@ -1885,7 +1885,7 @@ SiSUploadToScreen(PixmapPtr pDst, int x, int y, int w, int h, char *src, int src if(pDst->drawable.bitsPerPixel < 8) return FALSE; - dst += (x * pDst->drawable.bitsPerPixel / 8) + (y * src_pitch); + dst += (x * pDst->drawable.bitsPerPixel / 8) + (y * dst_pitch); while(h--) { SiSMemCopyToVideoRam(pSiS, dst, (unsigned char *)src, (w * pDst->drawable.bitsPerPixel / 8)); @@ -1956,7 +1956,7 @@ SiSDownloadFromScreen(PixmapPtr pSrc, int x, int y, int w, int h, char *dst, int { ScrnInfoPtr pScrn = xf86ScreenToScrn(pSrc->drawable.pScreen); SISPtr pSiS = SISPTR(pScrn); - unsigned char *src = pSrc->devPrivate.ptr; + unsigned char *src = ((unsigned char *) pSiS->FbBase) + exaGetPixmapOffset(pSrc); int src_pitch = exaGetPixmapPitch(pSrc); int size = src_pitch < dst_pitch ? src_pitch : dst_pitch; @@ -1967,7 +1967,7 @@ SiSDownloadFromScreen(PixmapPtr pSrc, int x, int y, int w, int h, char *dst, int src += (x * pSrc->drawable.bitsPerPixel / 8) + (y * src_pitch); while(h--) { - SiSMemCopyFromVideoRam(pSiS, (unsigned char *)dst, src, size); + SiSMemCopyFromVideoRam(pSiS, (unsigned char *)dst, src, (w * pSrc->drawable.bitsPerPixel / 8)); src += src_pitch; dst += dst_pitch; } |