I stumbled across yet another patch from upstream regarding support
for exa acceleration on several video adapters developed by Silicon
Integrated Systems. It affects file sis310_accel.c mostly regarding
exa acceleration bugs which were not fixed by FreeDesktop.org
upstream, but by Ubuntu.

Patch is as follows:

===================================================================

--- a/src/sis310_accel.c 2012-06-06 16:47:03.000000000 +0800
+++ b/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;
  }

===================================================================

I figured I'd submit it in case any users of LFS had been experiencing problems.

Thanks.
-- 
http://lists.linuxfromscratch.org/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to