hi I have actually fixed this issue sometime ago.
diff -Nuarp xf86-video-sis-0.10.7/src/sis310_accel.c xf86-video-sis-0.10.7.exautsdfs/src/sis310_accel.c --- xf86-video-sis-0.10.7/src/sis310_accel.c 2012-06-06 16:47:03.000000000 +0800 +++ xf86-video-sis-0.10.7.exautsdfs/src/sis310_accel.c 2012-09-15 13:42:59.535124999 +0800 @@ -1874,7 +1874,7 @@ SiSUploadToScreen(PixmapPtr pDst, int x, { 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); @@ -1882,7 +1882,7 @@ SiSUploadToScreen(PixmapPtr pDst, int x, 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)); @@ -1953,9 +1953,8 @@ SiSDownloadFromScreen(PixmapPtr pSrc, in { 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;
(pSiS->SyncAccel)(pScrn);
@@ -1964,7 +1963,8 @@ SiSDownloadFromScreen(PixmapPtr pSrc, in
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; }
reference page(chinese) http://shuizhuyuanluo.blog.163.com/blog/static/7781812012811102554972/
hi
I have actually fixed this issue sometime ago.
diff -Nuarp xf86-video- sis-0.10. 7/src/sis310_ accel.c xf86-video- sis-0.10. 7.exautsdfs/ src/sis310_ accel.c sis-0.10. 7/src/sis310_ accel.c 2012-06-06 16:47:03.000000000 +0800 sis-0.10. 7.exautsdfs/ src/sis310_ accel.c 2012-09-15 13:42:59.535124999 +0800 en(PixmapPtr pDst, int x, n(pDst- >drawable. pScreen) ; e.ptr; set(pDst) ; ch(pDst) ;
--- xf86-video-
+++ xf86-video-
@@ -1874,7 +1874,7 @@ SiSUploadToScre
{
ScrnInfoPtr pScrn = xf86ScreenToScr
SISPtr pSiS = SISPTR(pScrn);
- unsigned char *dst = pDst->devPrivat
+ unsigned char *dst = ((unsigned char *) pSiS->FbBase) + exaGetPixmapOff
int dst_pitch = exaGetPixmapPit
(pSiS- >SyncAccel) (pScrn) ; en(PixmapPtr pDst, int x, >drawable. bitsPerPixel < 8)
@@ -1882,7 +1882,7 @@ SiSUploadToScre
if(pDst-
return FALSE;
- dst += (x * pDst->drawable. bitsPerPixel / 8) + (y * src_pitch); bitsPerPixel / 8) + (y * dst_pitch); ToVideoRam( pSiS, dst, (unsigned char *)src, bitsPerPixel / 8)); Screen( PixmapPtr pSrc, in n(pSrc- >drawable. pScreen) ; e.ptr; set(pSrc) ; ch(pSrc) ;
+ dst += (x * pDst->drawable.
while(h--) {
SiSMemCopy
(w * pDst->drawable.
@@ -1953,9 +1953,8 @@ SiSDownloadFrom
{
ScrnInfoPtr pScrn = xf86ScreenToScr
SISPtr pSiS = SISPTR(pScrn);
- unsigned char *src = pSrc->devPrivat
+ unsigned char *src = ((unsigned char *) pSiS->FbBase) + exaGetPixmapOff
int src_pitch = exaGetPixmapPit
- int size = src_pitch < dst_pitch ? src_pitch : dst_pitch;
(pSiS- >SyncAccel) (pScrn) ;
@@ -1964,7 +1963,8 @@ SiSDownloadFrom Screen( PixmapPtr pSrc, in
src += (x * pSrc->drawable. bitsPerPixel / 8) + (y * src_pitch); ideoRam( pSiS, (unsigned char *)dst, src, size); ideoRam( pSiS, (unsigned char *)dst, src, bitsPerPixel / 8));
while(h--) {
- SiSMemCopyFromV
+ SiSMemCopyFromV
+ (w * pSrc->drawable.
src += src_pitch;
dst += dst_pitch;
}
reference page(chinese) shuizhuyuanluo. blog.163. com/blog/ static/ 778181201281110 2554972/
http://