xserver/hw/kdrive/neomagic ChangeLog, NONE, 1.1 neomagic.c, 1.5, 1.6 neomagic.h, 1.4, 1.5

Franco Catrin L. xserver-commit at pdx.freedesktop.org
Tue Apr 6 11:09:47 PDT 2004


Committed by: fcatrin

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

Modified Files:
	neomagic.c neomagic.h 
Added Files:
	ChangeLog 
Log Message:
Return back to VESA only version

--- NEW FILE: ChangeLog ---
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: neomagic.c
===================================================================
RCS file: /cvs/xserver/xserver/hw/kdrive/neomagic/neomagic.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- a/neomagic.c	5 Apr 2004 18:19:34 -0000	1.5
+++ b/neomagic.c	6 Apr 2004 18:09:44 -0000	1.6
@@ -61,7 +61,7 @@
         return FALSE;
     }
 
-    if(!backendInitialize(card, &neoc->backendCard)) {
+    if(!vesaInitialize(card, &neoc->backendCard)) {
         xfree(neoc);
         return FALSE;
     }
@@ -101,31 +101,16 @@
 	memset (neos, '\0', sizeof (NeoScreenInfo));
 
 
-    if(!backendScreenInitialize(screen, &neos->backendScreen, &neoc->backendCard)) {
+    if(!vesaScreenInitialize(screen, &neos->backendScreen)) {
         xfree(neos);
         return FALSE;
     }
 
     screen->softCursor = TRUE;    // no hardware color cursor available
 
-    switch(neoc->backendCard.type) {
-#ifdef KDRIVEFBDEV
-        case FBDEV:
-            neos->screen = neoc->backendCard.priv.fbdev.fb;
-            break;
-#endif
-#ifdef KDRIVEVESA
-        case VESA:
-            neos->screen = neos->backendScreen.vesa.fb;
-            break;
-#endif
-        default:
-            ErrorF("Unhandled backend, we should never get here.\n");
-            xfree(neos);
-            return FALSE;
-    }
+	neos->screen = neos->backendScreen.fb;
 
-    memory = neoc->chip->linearSize * 1024;
+	memory = neos->backendScreen.fb_size;
     screen_size = screen->fb[0].byteStride * screen->height;
     memory -= screen_size;
 
@@ -146,37 +131,25 @@
 static Bool
 neoInitScreen(ScreenPtr pScreen)
 {
-    ENTER();
-    KdScreenPriv(pScreen);
-    neoCardInfo(pScreenPriv);
-    
-    return neoc->backendCard.initScreen(pScreen);
-    LEAVE();
+    return vesaInitScreen(pScreen);
 }
 
 static Bool
 neoFinishInitScreen(ScreenPtr pScreen)
 {
-    KdScreenPriv(pScreen);
-    neoCardInfo(pScreenPriv);
-    
-    return neoc->backendCard.finishInitScreen(pScreen);
+    return vesaFinishInitScreen(pScreen);
 }
 
 static Bool
 neoCreateResources(ScreenPtr pScreen)
 {
-    KdScreenPriv(pScreen);
-    neoCardInfo(pScreenPriv);
-
-    return neoc->backendCard.createRes(pScreen);
+    return vesaCreateResources(pScreen);
 }
 
 void
 neoPreserve(KdCardInfo *card)
 {
-    NeoCardInfo *neoc = card->driver;
-    neoc->backendCard.preserve(card);
+	vesaPreserve(card);
 }
 
 CARD8
@@ -269,7 +242,7 @@
     KdScreenPriv(pScreen);
     neoCardInfo(pScreenPriv);
 
-    if(!neoc->backendCard.enable(pScreen)) {
+    if(!vesaEnable(pScreen)) {
         return FALSE;
     }
 
@@ -286,34 +259,25 @@
 
     neoResetMMIO(pScreenPriv->card, neoc);
 
-    neoc->backendCard.disable(pScreen);
+    vesaDisable(pScreen);
 }
 
 static void
 neoGetColors(ScreenPtr pScreen, int fb, int n, xColorItem *pdefs)
 {
-    KdScreenPriv(pScreen);
-    neoCardInfo(pScreenPriv);
-
-    neoc->backendCard.getColors(pScreen, fb, n, pdefs);
+    vesaGetColors(pScreen, fb, n, pdefs);
 }
 
 static void
 neoPutColors(ScreenPtr pScreen, int fb, int n, xColorItem *pdefs)
 {
-    KdScreenPriv(pScreen);
-    neoCardInfo(pScreenPriv);
-
-    neoc->backendCard.putColors(pScreen, fb, n, pdefs);
+    vesaPutColors(pScreen, fb, n, pdefs);
 }
 
 static Bool
 neoDPMS(ScreenPtr pScreen, int mode)
 {
-    KdScreenPriv(pScreen);
-    neoCardInfo(pScreenPriv);
-
-    return neoc->backendCard.dpms(pScreen, mode);
+    return vesaDPMS(pScreen, mode);
 }
 
 static void
@@ -322,16 +286,15 @@
     NeoCardInfo *neoc = card->driver;
 
     neoResetMMIO(card, neoc);
-    neoc->backendCard.restore(card);
+    vesaRestore(card);
 }
 
 static void
 neoScreenFini(KdScreenInfo *screen)
 {
     NeoScreenInfo *neos =(NeoScreenInfo *) screen->driver;
-    NeoCardInfo *neoc = screen->card->driver;
 
-    neoc->backendCard.scrfini(screen);
+    vesaScreenFini(screen);
     xfree(neos);
     screen->driver = 0;
 }
@@ -341,8 +304,8 @@
 {
     NeoCardInfo *neoc = card->driver;
 
-    neoUnmapReg(card, neoc);
-    neoc->backendCard.cardfini(card);
+	neoUnmapReg(card, neoc);
+	vesaCardFini(card);
 }
 
 #define neoCursorInit 0       // initCursor

Index: neomagic.h
===================================================================
RCS file: /cvs/xserver/xserver/hw/kdrive/neomagic/neomagic.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- a/neomagic.h	5 Apr 2004 02:52:35 -0000	1.4
+++ b/neomagic.h	6 Apr 2004 18:09:44 -0000	1.5
@@ -110,7 +110,7 @@
 } NeoMMIO;
 
 typedef struct _neoCardInfo {
-    BackendInfo backendCard;
+    VesaCardPrivRec backendCard;
 
     CARD32 reg_base;
     NeoMMIO *mmio;
@@ -146,7 +146,7 @@
 #define neoCardInfo(kd) NeoCardInfo *neoc = getNeoCardInfo(kd)
 
 typedef struct _neoScreenInfo {
-    BackendScreen backendScreen;
+    VesaScreenPrivRec backendScreen;
 
     CARD8 *screen;
     CARD8 *off_screen;




More information about the xserver-commit mailing list