xserver/hw/kdrive/neomagic ChangeLog, 1.2, 1.3 neo_draw.c, 1.3, 1.4 neomagic.c, 1.7, 1.8

Franco Catrin L. xserver-commit at pdx.freedesktop.org
Sat Apr 10 17:53:12 PDT 2004


Committed by: fcatrin

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

Modified Files:
	ChangeLog neo_draw.c neomagic.c 
Log Message:
First acceleration function implemented (DrawSolid)

Index: ChangeLog
===================================================================
RCS file: /cvs/xserver/xserver/hw/kdrive/neomagic/ChangeLog,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- a/ChangeLog	11 Apr 2004 00:15:57 -0000	1.2
+++ b/ChangeLog	11 Apr 2004 00:53:10 -0000	1.3
@@ -1,6 +1,7 @@
 2004-04-10 Franco Catrin L. <fcatrin at tuxpan.com>
         * MMIO enabled after switching to new VT
-	
+	* First acceleration function implemented (DrawSolid)
+
 2004-04-06 Franco Catrin L. <fcatrin at tuxpan.com>
         * Returned to a working state.  Brent will
 	  continue working on a backend in a separate CVS branch

Index: neo_draw.c
===================================================================
RCS file: /cvs/xserver/xserver/hw/kdrive/neomagic/neo_draw.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- a/neo_draw.c	11 Apr 2004 00:15:57 -0000	1.3
+++ b/neo_draw.c	11 Apr 2004 00:53:10 -0000	1.4
@@ -47,12 +47,8 @@
 static  void neoWaitIdle(NeoCardInfo *neoc)
 {
     // if MMIO is not working it may halt the machine
-	DBGOUT("Waiting for idle...\n");
-	DBGOUT("blStat %lx=%lx\n", &mmio->bltStat, mmio->bltStat);
     unsigned int i = 0;
     while ((mmio->bltStat & 1) && ++i<100000);
-    if (i>=100000) DBGOUT("Wait Idle timeout\n");
-	else DBGOUT("*** Wait Idle ok\n");
 }
 
 static  void neoWaitFifo(NeoCardInfo *neoc, int requested_fifo_space)
@@ -71,19 +67,12 @@
         return FALSE;
     } else {
         fgColor = fg;
-        /* set blt control */
-/*            NEO_BC0_SRC_IS_FG    |
-            NEO_BC3_SRC_XY_ADDR |
-            NEO_BC3_DST_XY_ADDR | 
-            NEO_BC3_SKIP_MAPPING |  0x0c0000; */
-
         return TRUE;
     }
 }
 
 static void neoSolid (int x1, int y1, int x2, int y2)
 {
-    DBGOUT("Solid (%i, %i) - (%i, %i).  \n", x1, y1, x2, y2);
     int x, y, w, h;
     x = x1;
     y = y1;
@@ -97,12 +86,6 @@
         y = y2;
         h = -h;
     }
-
-	int pitch = 16;
-	
-	neoWaitIdle(card);
-	mmio->bltStat = NEO_MODE1_DEPTH16 << 16;
- 	mmio->pitch = (pitch << 16) | (pitch & 0xffff);
 	
 	neoWaitIdle(card);
 	mmio->fgColor = fgColor;
@@ -110,11 +93,9 @@
 			NEO_BC3_FIFO_EN      |
 			NEO_BC0_SRC_IS_FG    |
 			NEO_BC3_SKIP_MAPPING | 0x0c0000;		
-    mmio->dstStart = (y <<16) | (x & 0xffff);
+    mmio->dstStart = y * screen->pitch + x * screen->depth;
 
-    mmio->xyExt    = (h << 16) | (w & 0xffff);
-    DBGOUT("Solid (%i, %i) - (%i, %i).  Color %li\n", x, y, w, h, fgColor);
-    // DBGOUT("Offset %lx. Extent %lx\n",mmio->dstStart, mmio->xyExt);
+    mmio->xyExt    = (unsigned long)(h << 16) | (w & 0xffff);
 }
 
 
@@ -169,10 +150,9 @@
     screen = neos;
     card = neoc;
     mmio = neoc->mmio;
-    DBGOUT("NEO AA MMIO=%p\n", mmio);
-//    screen->depth = screen->vesa.mode.BitsPerPixel/8;
-//    screen->pitch = screen->vesa.mode.BytesPerScanLine;
-//    DBGOUT("NEO depth=%x, pitch=%x\n", screen->depth, screen->pitch);
+    screen->depth = screen->backendScreen.mode.BitsPerPixel/8;
+    screen->pitch = screen->backendScreen.mode.BytesPerScanLine;
+    DBGOUT("NEO depth=%x, pitch=%x\n", screen->depth, screen->pitch);
     LEAVE();
 }
 

Index: neomagic.c
===================================================================
RCS file: /cvs/xserver/xserver/hw/kdrive/neomagic/neomagic.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- a/neomagic.c	11 Apr 2004 00:15:57 -0000	1.7
+++ b/neomagic.c	11 Apr 2004 00:53:10 -0000	1.8
@@ -52,7 +52,6 @@
 static Bool
 neoCardInit(KdCardInfo *card)
 {
-    ENTER();
     NeoCardInfo    *neoc;
     struct NeoChipInfo *chip;
 
@@ -79,14 +78,12 @@
 
     card->driver = neoc;
 
-    LEAVE();
     return TRUE;
 }
 
 static Bool
 neoScreenInit(KdScreenInfo *screen)
 {
-    ENTER();
     NeoScreenInfo *neos;
     neoCardInfo(screen);
     int screen_size, memory;
@@ -122,7 +119,6 @@
 
     screen->driver = neos;
 
-    LEAVE();
     return TRUE;
 }
 
@@ -185,7 +181,6 @@
 Bool
 neoMapReg(KdCardInfo *card, NeoCardInfo *neoc)
 {
-    ENTER();
     neoc->reg_base = card->attr.address[1] & 0xFFF80000;
     if(!neoc->reg_base) {
         return FALSE;
@@ -198,18 +193,12 @@
 
     KdSetMappedMode(neoc->reg_base, NEO_REG_SIZE(card), KD_MAPPED_MODE_REGISTERS);
 
-    // if you see the cursor sprite them MMIO is working
-
-    *(((CARD32 *)neoc->mmio)+0x400) =(CARD32)8;
-    //neoSetIndex(neoc, 0x3ce, 0x82,8);
-    LEAVE();
     return TRUE;
 }
 
 void
 neoUnmapReg(KdCardInfo *card, NeoCardInfo *neoc)
 {
-    ENTER();
     if(neoc->reg_base)
     {
         neoSetIndex(neoc, 0x3ce, 0x82,0);
@@ -217,7 +206,6 @@
         KdUnmapDevice((void *)neoc->mmio, NEO_REG_SIZE(card));
         neoc->reg_base = 0;
     }
-    LEAVE();
 }
 
 static void
@@ -247,7 +235,6 @@
     }
 
     neoSetMMIO(pScreenPriv->card, neoc);
-
     return TRUE;
 }
 




More information about the xserver-commit mailing list