[pkg-fso-commits] [SCM] xf86-video-glamo, SMedia Glamo video driver for X.Org branch, master, updated. upstream/0.0.0+20090224.git703acea1-15-g25c4b0e

Lars-Peter Clausen lars at metafoo.de
Mon May 18 16:46:41 UTC 2009


The following commit has been merged in the master branch:
commit 20bb485f4a27c16b6faaf8a2ebc6067480889c50
Author: Lars-Peter Clausen <lars at metafoo.de>
Date:   Tue May 5 01:05:50 2009 +0200

    Sync graphics pipeline before uploading/downloading data to/from the graphics
    memory.

diff --git a/src/glamo-draw.c b/src/glamo-draw.c
index ac801df..c7be92b 100644
--- a/src/glamo-draw.c
+++ b/src/glamo-draw.c
@@ -496,24 +496,26 @@ GLAMOExaUploadToScreen(PixmapPtr pDst,
 		       char *src,
 		       int src_pitch)
 {
-	ScrnInfoPtr pScrn = xf86Screens[pDst->drawable.pScreen->myNum];
-	GlamoPtr pGlamo = GlamoPTR(pScrn);
-	int bpp, i;
-	CARD8 *dst_offset;
-	int dst_pitch;
+    ScrnInfoPtr pScrn = xf86Screens[pDst->drawable.pScreen->myNum];
+    GlamoPtr pGlamo = GlamoPTR(pScrn);
+    int bpp, i;
+    CARD8 *dst_offset;
+    int dst_pitch;
 
-	bpp = pDst->drawable.bitsPerPixel / 8;
-	dst_pitch = exaGetPixmapPitch(pDst);
-	dst_offset = pGlamo->exa->memoryBase + exaGetPixmapOffset(pDst)
-						+ x*bpp + y*dst_pitch;
+    exaWaitSync(pScrn->pScreen);
 
-	for (i = 0; i < h; i++) {
-		memcpy(dst_offset, src, w*bpp);
-		dst_offset += dst_pitch;
-		src += src_pitch;
-	}
+    bpp = pDst->drawable.bitsPerPixel / 8;
+    dst_pitch = exaGetPixmapPitch(pDst);
+    dst_offset = pGlamo->exa->memoryBase + exaGetPixmapOffset(pDst)
+                    + x*bpp + y*dst_pitch;
 
-	return TRUE;
+    for (i = 0; i < h; i++) {
+        memcpy(dst_offset, src, w*bpp);
+        dst_offset += dst_pitch;
+        src += src_pitch;
+    }
+
+    return TRUE;
 }
 
 Bool
@@ -523,26 +525,27 @@ GLAMOExaDownloadFromScreen(PixmapPtr pSrc,
 			   char *dst,
 			   int dst_pitch)
 {
-	ScrnInfoPtr pScrn = xf86Screens[pSrc->drawable.pScreen->myNum];
-	GlamoPtr pGlamo = GlamoPTR(pScrn);
-	int bpp, i;
-	CARD8 *dst_offset, *src;
-	int src_pitch;
-
-    bpp = pSrc->drawable.bitsPerPixel;
-	bpp /= 8;
-	src_pitch = exaGetPixmapPitch(pSrc);
-	src = pGlamo->exa->memoryBase + exaGetPixmapOffset(pSrc) +
-						x*bpp + y*src_pitch;
-	dst_offset = (unsigned char*)dst;
-
-	for (i = 0; i < h; i++) {
-		memcpy(dst_offset, src, w*bpp);
-		dst_offset += dst_pitch;
-		src += src_pitch;
-	}
+    ScrnInfoPtr pScrn = xf86Screens[pSrc->drawable.pScreen->myNum];
+    GlamoPtr pGlamo = GlamoPTR(pScrn);
+    int bpp, i;
+    CARD8 *dst_offset, *src;
+    int src_pitch;
+
+    exaWaitSync(pScrn->pScreen);
+
+    bpp = pSrc->drawable.bitsPerPixel / 8;
+    src_pitch = exaGetPixmapPitch(pSrc);
+    src = pGlamo->exa->memoryBase + exaGetPixmapOffset(pSrc) +
+            x*bpp + y*src_pitch;
+    dst_offset = (unsigned char*)dst;
+
+    for (i = 0; i < h; i++) {
+        memcpy(dst_offset, src, w*bpp);
+        dst_offset += dst_pitch;
+        src += src_pitch;
+    }
 
-	return TRUE;
+    return TRUE;
 }
 
 void

-- 
xf86-video-glamo, SMedia Glamo video driver for X.Org



More information about the pkg-fso-commits mailing list