[PATCH xf86-video-sis] Remove upload / download EXA hooks

Connor Behan connor.behan at gmail.com
Mon Aug 3 10:24:49 PDT 2015


Support based on something other than libc memcpy was never added, so
these functions did not improve upon software fallback at all.

Signed-off-by: Connor Behan <connor.behan at gmail.com>
---
 src/sis300_accel.c |  7 -------
 src/sis310_accel.c | 54 ------------------------------------------------------
 src/sis_accel.c    |  6 ------
 3 files changed, 67 deletions(-)

diff --git a/src/sis300_accel.c b/src/sis300_accel.c
index af0527d..7176b4f 100644
--- a/src/sis300_accel.c
+++ b/src/sis300_accel.c
@@ -59,10 +59,7 @@
 
 #ifdef SIS_USE_EXA
 extern void SiSScratchSave(ScreenPtr pScreen, ExaOffscreenArea *area);
-extern Bool SiSUploadToScreen(PixmapPtr pDst, int x, int y, int w, int h, char *src, int src_pitch);
 extern Bool SiSUploadToScratch(PixmapPtr pSrc, PixmapPtr pDst);
-extern Bool SiSDownloadFromScreen(PixmapPtr pSrc, int x, int y, int w, int h,
-				char *dst, int dst_pitch);
 #endif /* EXA */
 
 extern UChar SiSGetCopyROP(int rop);
@@ -1273,10 +1270,6 @@ SiS300AccelInit(ScreenPtr pScreen)
 
 		 /* Composite not supported */
 
-		 /* Upload, download to/from Screen */
-		 pSiS->EXADriverPtr->UploadToScreen = SiSUploadToScreen;
-		 pSiS->EXADriverPtr->DownloadFromScreen = SiSDownloadFromScreen;
-
 	      } else {
 
 		 xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
diff --git a/src/sis310_accel.c b/src/sis310_accel.c
index 1a6f639..40b6941 100644
--- a/src/sis310_accel.c
+++ b/src/sis310_accel.c
@@ -129,9 +129,7 @@ static CARD32 SiSDstTextureFormats32[3] = { PICT_x8r8g8b8, PICT_a8r8g8b8, 0 };
 
 #ifdef SIS_USE_EXA		/* EXA */
 void SiSScratchSave(ScreenPtr pScreen, ExaOffscreenArea *area);
-Bool SiSUploadToScreen(PixmapPtr pDst, int x, int y, int w, int h, char *src, int src_pitch);
 Bool SiSUploadToScratch(PixmapPtr pSrc, PixmapPtr pDst);
-Bool SiSDownloadFromScreen(PixmapPtr pSrc, int x, int y, int w, int h, char *dst, int dst_pitch);
 #endif /* EXA */
 
 #ifdef INCL_YUV_BLIT_ADAPTOR
@@ -1870,30 +1868,6 @@ SiSDoneComposite(PixmapPtr pDst)
 #endif
 
 Bool
-SiSUploadToScreen(PixmapPtr pDst, int x, int y, int w, int h, char *src, int src_pitch)
-{
-	ScrnInfoPtr pScrn = xf86ScreenToScrn(pDst->drawable.pScreen);
-	SISPtr pSiS = SISPTR(pScrn);
-	unsigned char *dst = pDst->devPrivate.ptr;
-	int dst_pitch = exaGetPixmapPitch(pDst);
-
-	(pSiS->SyncAccel)(pScrn);
-
-	if(pDst->drawable.bitsPerPixel < 8)
-	   return FALSE;
-
-	dst += (x * pDst->drawable.bitsPerPixel / 8) + (y * src_pitch);
-	while(h--) {
-	   SiSMemCopyToVideoRam(pSiS, dst, (unsigned char *)src,
-				(w * pDst->drawable.bitsPerPixel / 8));
-	   src += src_pitch;
-	   dst += dst_pitch;
-	}
-
-	return TRUE;
-}
-
-Bool
 SiSUploadToScratch(PixmapPtr pSrc, PixmapPtr pDst)
 {
 	ScrnInfoPtr pScrn = xf86ScreenToScrn(pSrc->drawable.pScreen);
@@ -1947,30 +1921,6 @@ SiSUploadToScratch(PixmapPtr pSrc, PixmapPtr pDst)
 
 	return TRUE;
 }
-
-Bool
-SiSDownloadFromScreen(PixmapPtr pSrc, int x, int y, int w, int h, char *dst, int dst_pitch)
-{
-	ScrnInfoPtr pScrn = xf86ScreenToScrn(pSrc->drawable.pScreen);
-	SISPtr pSiS = SISPTR(pScrn);
-	unsigned char *src = pSrc->devPrivate.ptr;
-	int src_pitch = exaGetPixmapPitch(pSrc);
-	int size = src_pitch < dst_pitch ? src_pitch : dst_pitch;
-
-	(pSiS->SyncAccel)(pScrn);
-
-	if(pSrc->drawable.bitsPerPixel < 8)
-	   return FALSE;
-
-	src += (x * pSrc->drawable.bitsPerPixel / 8) + (y * src_pitch);
-	while(h--) {
-	   SiSMemCopyFromVideoRam(pSiS, (unsigned char *)dst, src, size);
-	   src += src_pitch;
-	   dst += dst_pitch;
-	}
-
-	return TRUE;
-}
 #endif /* EXA */
 
 /* Helper for xv video blitter */
@@ -2303,10 +2253,6 @@ SiS315AccelInit(ScreenPtr pScreen)
 	      }
 #endif
 
-	      /* Upload, download to/from Screen */
-	      pSiS->EXADriverPtr->UploadToScreen = SiSUploadToScreen;
-	      pSiS->EXADriverPtr->DownloadFromScreen = SiSDownloadFromScreen;
-
 	   }
 #endif
 
diff --git a/src/sis_accel.c b/src/sis_accel.c
index c2c24c7..dc45f2b 100644
--- a/src/sis_accel.c
+++ b/src/sis_accel.c
@@ -53,9 +53,7 @@
 
 #ifdef SIS_USE_EXA
 extern void SiSScratchSave(ScreenPtr pScreen, ExaOffscreenArea *area);
-extern Bool SiSUploadToScreen(PixmapPtr pDst, int x, int y, int w, int h, char *src, int src_pitch);
 extern Bool SiSUploadToScratch(PixmapPtr pSrc, PixmapPtr pDst);
-extern Bool SiSDownloadFromScreen(PixmapPtr pSrc, int x, int y, int w, int h, char *dst, int dst_pitch);
 #endif /* EXA */
 
 extern UChar SiSGetCopyROP(int rop);
@@ -801,10 +799,6 @@ SiSAccelInit(ScreenPtr pScreen)
 
 	  /* Composite not supported */
 
-	  /* Upload, download to/from Screen */
-	  pSiS->EXADriverPtr->UploadToScreen = SiSUploadToScreen;
-	  pSiS->EXADriverPtr->DownloadFromScreen = SiSDownloadFromScreen;
-
        }
 #endif /* EXA */
 
-- 
2.4.5



More information about the xorg-devel mailing list