xserver/hw/kdrive/neomagic ChangeLog,1.3,1.4 neo_draw.c,1.4,1.5

Franco Catrin L. xserver-commit at pdx.freedesktop.org
Sun Apr 11 08:20:19 PDT 2004


Committed by: fcatrin

Update of /cvs/xserver/xserver/hw/kdrive/neomagic
In directory pdx:/tmp/cvs-serv2346

Modified Files:
	ChangeLog neo_draw.c 
Log Message:
Basic bitblt implementation

Index: ChangeLog
===================================================================
RCS file: /cvs/xserver/xserver/hw/kdrive/neomagic/ChangeLog,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- a/ChangeLog	11 Apr 2004 00:53:10 -0000	1.3
+++ b/ChangeLog	11 Apr 2004 15:20:17 -0000	1.4
@@ -1,3 +1,6 @@
+2004-04-11 Franco Catrin L. <fcatrin at tuxpan.com>
+        * Basic bitblt implementation
+
 2004-04-10 Franco Catrin L. <fcatrin at tuxpan.com>
         * MMIO enabled after switching to new VT
 	* First acceleration function implemented (DrawSolid)

Index: neo_draw.c
===================================================================
RCS file: /cvs/xserver/xserver/hw/kdrive/neomagic/neo_draw.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- a/neo_draw.c	11 Apr 2004 00:53:10 -0000	1.4
+++ b/neo_draw.c	11 Apr 2004 15:20:17 -0000	1.5
@@ -111,6 +111,31 @@
 
 static void neoCopy (int srcX, int srcY, int dstX, int dstY, int w, int h)
 {
+	neoWaitIdle(card);
+	
+    if ((dstY < srcY) || ((dstY == srcY) && (dstX < srcX))) {
+		mmio->bltCntl  = 
+					NEO_BC3_FIFO_EN      |
+					NEO_BC3_SKIP_MAPPING |  0x0c0000;
+		mmio->srcStart = srcY * screen->pitch + srcX * screen->depth;
+		mmio->dstStart = dstY * screen->pitch + dstX * screen->depth;
+		
+		mmio->xyExt    = (unsigned long)(h << 16) | (w & 0xffff);
+	} else {
+		mmio->bltCntl  = NEO_BC0_X_DEC |
+					NEO_BC0_DST_Y_DEC |
+					NEO_BC0_SRC_Y_DEC |
+					NEO_BC3_FIFO_EN |
+					NEO_BC3_SKIP_MAPPING |  0x0c0000;
+		srcX+=w-1;
+		dstX+=w-1;
+		srcY+=h-1;
+		dstY+=h-1;
+		mmio->srcStart = srcY * screen->pitch + srcX * screen->depth;
+		mmio->dstStart = dstY * screen->pitch + dstX * screen->depth;
+		mmio->xyExt    = (unsigned long)(h << 16) | (w & 0xffff);
+	}	
+
 }
 
 static void neoDoneCopy (void)
@@ -170,9 +195,7 @@
 
 void neoDrawSync (ScreenPtr pScreen)
 {
-    ENTER();
     SetupNeo(pScreen);
 
     neoWaitIdle(neoc);
-    LEAVE();
 }




More information about the xserver-commit mailing list