[xserver-commit] xserver/hw/kdrive/nvidia Makefile.am,1.2,1.3 nvidia.c,1.1,1.2 nvidia.h,1.1,1.2 nvidiadraw.c,1.2,1.3

Keith Packard xserver-commit@pdx.freedesktop.org
Sun, 02 Nov 2003 11:56:12 -0800


Committed by: keithp

Update of /cvs/xserver/xserver/hw/kdrive/nvidia
In directory pdx:/tmp/cvs-serv23831/hw/kdrive/nvidia

Modified Files:
	Makefile.am nvidia.c nvidia.h nvidiadraw.c 
Log Message:
	merge xfixes_2_branch back to HEAD


Index: Makefile.am
===================================================================
RCS file: /cvs/xserver/xserver/hw/kdrive/nvidia/Makefile.am,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- Makefile.am	15 Oct 2003 04:59:45 -0000	1.2
+++ Makefile.am	2 Nov 2003 19:56:10 -0000	1.3
@@ -1,13 +1,7 @@
 INCLUDES = 					\
-	-I$(top_srcdir)/fb			\
-	-I$(top_srcdir)/hw/kdrive/src		\
+	@KDRIVE_INCS@				\
 	-I$(top_srcdir)/hw/kdrive/vesa		\
-	-I$(top_srcdir)/mi			\
-	-I$(top_srcdir)/miext/layer		\
-	-I$(top_srcdir)/miext/shadow		\
-	-I$(top_srcdir)/randr			\
-	-I$(top_srcdir)/render			\
-	$(XSERVER_CFLAGS)
+	@XSERVER_CFLAGS@
 
 bin_PROGRAMS = Xnvidia
 
@@ -29,21 +23,5 @@
 Xnvidia_LDADD = \
 	libnvidia.a 				\
 	$(top_builddir)/hw/kdrive/vesa/libvesa.a \
-	$(top_builddir)/dix/libdix.a		\
-	$(top_builddir)/os/libos.a		\
-	$(top_builddir)/miext/layer/liblayer.a	\
-	$(top_builddir)/hw/kdrive/src/libkdrive.a  \
-	$(top_builddir)/hw/kdrive/linux/liblinux.a  \
-	$(top_builddir)/miext/shadow/libshadow.a \
-	$(top_builddir)/randr/librandr.a	\
-	$(top_builddir)/render/librender.a	\
-	$(top_builddir)/xfixes/libxfixes.a	\
-	$(top_builddir)/fb/libfb.a		\
-	$(top_builddir)/mi/libmi.a		\
-	$(top_builddir)/Xext/libXext.a		\
-	$(top_builddir)/randr/librandr.a	\
-	$(top_builddir)/render/librender.a	\
-	$(top_builddir)/xfixes/libxfixes.a	\
-	$(top_builddir)/dix/libxpstubs.a	\
-	$(XSERVER_LIBS)				\
-	-lm -lz
+	@KDRIVE_LIBS@				\
+	@XSERVER_LIBS@

Index: nvidia.c
===================================================================
RCS file: /cvs/xserver/xserver/hw/kdrive/nvidia/nvidia.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- nvidia.c	9 Oct 2003 06:36:26 -0000	1.1
+++ nvidia.c	2 Nov 2003 19:56:10 -0000	1.2
@@ -28,7 +28,7 @@
 #include "nvidia.h"
 #include <sys/io.h>
 
-Bool
+static Bool
 nvidiaCardInit (KdCardInfo *card)
 {
     NvidiaCardInfo	*nvidiac;
@@ -50,7 +50,7 @@
     return TRUE;
 }
 
-Bool
+static Bool
 nvidiaScreenInit (KdScreenInfo *screen)
 {
     NvidiaCardInfo	*nvidiac = screen->card->driver;
@@ -96,7 +96,7 @@
     return TRUE;
 }
 
-Bool
+static Bool
 nvidiaInitScreen (ScreenPtr pScreen)
 {
 #if 0
@@ -111,13 +111,12 @@
 }
 
 #ifdef RANDR
+static Bool
 nvidiaRandRSetConfig (ScreenPtr		pScreen,
 		      Rotation		rotation,
 		      int		rate,
 		      RRScreenSizePtr	pSize)
 {
-    KdScreenPriv(pScreen);
-    
     KdCheckSync (pScreen);
 
     if (!vesaRandRSetConfig (pScreen, rotation, rate, pSize))
@@ -126,7 +125,7 @@
     return TRUE;
 }
 
-void
+static void
 nvidiaRandRInit (ScreenPtr pScreen)
 {
     rrScrPriv(pScreen);
@@ -135,7 +134,7 @@
 }
 #endif
 
-Bool
+static Bool
 nvidiaFinishInitScreen (ScreenPtr pScreen)
 {
     Bool    ret;
@@ -149,8 +148,6 @@
 void
 nvidiaPreserve (KdCardInfo *card)
 {
-    NvidiaCardInfo	*nvidiac = card->driver;
-
     vesaPreserve(card);
 }
 
@@ -198,7 +195,7 @@
     LEAVE ();
 }
 
-void nvidiaLockUnlock (NvidiaCardInfo *nvidiac, Bool lock)
+static void nvidiaLockUnlock (NvidiaCardInfo *nvidiac, Bool lock)
 {
     if (NVIDIA_IS_3(nvidiac))
 	nvidiaSetIndex (nvidiac, 0x3c4, 0x3c5, 0x06, lock ? 0x99 : 0x57);
@@ -276,7 +273,6 @@
 	return FALSE;
     
     nvidiaSetMMIO (pScreenPriv->card, nvidiac);
-    nvidiaDPMS (pScreen, KD_DPMS_NORMAL);
 #ifdef XV
     KdXVEnable (pScreen);
 #endif
@@ -296,13 +292,13 @@
     vesaDisable (pScreen);
 }
 
-Bool
+static Bool
 nvidiaDPMS (ScreenPtr pScreen, int mode)
 {
     return vesaDPMS (pScreen, mode);
 }
 
-void
+static void
 nvidiaRestore (KdCardInfo *card)
 {
     NvidiaCardInfo	*nvidiac = card->driver;
@@ -311,7 +307,7 @@
     vesaRestore (card);
 }
 
-void
+static void
 nvidiaScreenFini (KdScreenInfo *screen)
 {
     NvidiaScreenInfo	*nvidias = (NvidiaScreenInfo *) screen->driver;
@@ -321,7 +317,7 @@
     screen->driver = 0;
 }
 
-void
+static void
 nvidiaCardFini (KdCardInfo *card)
 {
     NvidiaCardInfo	*nvidiac = card->driver;
@@ -340,6 +336,8 @@
     nvidiaCardInit,	    /* cardinit */
     nvidiaScreenInit,	    /* scrinit */
     nvidiaInitScreen,	    /* initScreen */
+    nvidiaFinishInitScreen, /* finishInitScreen */
+    vesaCreateResources,    /* createRes */
     nvidiaPreserve,	    /* preserve */
     nvidiaEnable,	    /* enable */
     nvidiaDPMS,		    /* dpms */
@@ -362,6 +360,4 @@
     
     vesaGetColors,    	    /* getColors */
     vesaPutColors,	    /* putColors */
-
-    nvidiaFinishInitScreen, /* finishInitScreen */
 };

Index: nvidia.h
===================================================================
RCS file: /cvs/xserver/xserver/hw/kdrive/nvidia/nvidia.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- nvidia.h	9 Oct 2003 06:36:26 -0000	1.1
+++ nvidia.h	2 Nov 2003 19:56:10 -0000	1.2
@@ -26,6 +26,7 @@
 #define _NVIDIA_H_
 #include <vesa.h>
 #include "kxv.h"
+#include "klinux.h"
 
 /*
  * offset from ioport beginning 

Index: nvidiadraw.c
===================================================================
RCS file: /cvs/xserver/xserver/hw/kdrive/nvidia/nvidiadraw.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- nvidiadraw.c	13 Oct 2003 00:19:58 -0000	1.2
+++ nvidiadraw.c	2 Nov 2003 19:56:10 -0000	1.3
@@ -81,19 +81,18 @@
     }
 }
 
-Bool
-nvidiaPrepareSolid (DrawablePtr    pDrawable,
-		     int	    alu,
-		     Pixel	    pm,
-		     Pixel	    fg)
+static Bool
+nvidiaPrepareSolid (PixmapPtr   pPixmap,
+		    int		alu,
+		    Pixel	pm,
+		    Pixel	fg)
 {
-    ScreenPtr pScreen = pDrawable->pScreen;
+    ScreenPtr pScreen = pPixmap->drawable.pScreen;
     KdScreenPriv(pScreen);
-    nvidiaScreenInfo(pScreenPriv);
     nvidiaCardInfo(pScreenPriv);
     
     card = nvidiac;
-    if (~pm & FbFullMask(pDrawable->depth))
+    if (~pm & FbFullMask(pPixmap->drawable.depth))
 	return FALSE;
     nvidiaWait (nvidiac, &nvidiac->rop->FifoFree, 1);
     nvidiac->rop->Rop3 = nvidiaRop[alu];
@@ -102,7 +101,7 @@
     return TRUE;
 }
 
-void
+static void
 nvidiaSolid (int x1, int y1, int x2, int y2)
 {
     nvidiaWait (card, &card->rect->FifoFree, 2);
@@ -110,34 +109,33 @@
     card->rect->WidthHeight = NVIDIA_XY(x2-x1,y2-y1);
 }
 
-void
+static void
 nvidiaDoneSolid (void)
 {
 }
 
 
-Bool
-nvidiaPrepareCopy (DrawablePtr	pSrcDrawable,
-		   DrawablePtr	pDstDrawable,
+static Bool
+nvidiaPrepareCopy (PixmapPtr	pSrcPixmap,
+		   PixmapPtr	pDstPixmap,
 		   int		dx,
 		   int		dy,
 		   int		alu,
 		   Pixel	pm)
 {
-    ScreenPtr pScreen = pDstDrawable->pScreen;
+    ScreenPtr pScreen = pDstPixmap->drawable.pScreen;
     KdScreenPriv(pScreen);
-    nvidiaScreenInfo(pScreenPriv);
     nvidiaCardInfo(pScreenPriv);
     
     card = nvidiac;
-    if (~pm & FbFullMask(pDstDrawable->depth))
+    if (~pm & FbFullMask(pDstPixmap->drawable.depth))
 	return FALSE;
     nvidiaWait (nvidiac, &card->rop->FifoFree, 1);
     nvidiac->rop->Rop3 = nvidiaRop[alu];
     return TRUE;
 }
 
-void
+static void
 nvidiaCopy (int srcX,
 	    int srcY,
 	    int dstX,
@@ -151,7 +149,7 @@
     card->blt->WidthHeight = NVIDIA_XY(w, h);
 }
 
-void
+static void
 nvidiaDoneCopy (void)
 {
 }
@@ -170,9 +168,8 @@
 nvidiaDrawInit (ScreenPtr pScreen)
 {
     KdScreenPriv(pScreen);
-    nvidiaScreenInfo(pScreenPriv);
     nvidiaCardInfo(pScreenPriv);
-    Bool    ret;
+    Bool    ret = TRUE;
     
     ENTER ();
     if (pScreenPriv->screen->fb[0].depth == 4)
@@ -213,7 +210,6 @@
 nvidiaDrawEnable (ScreenPtr pScreen)
 {
     KdScreenPriv(pScreen);
-    nvidiaScreenInfo(pScreenPriv);
     nvidiaCardInfo(pScreenPriv);
     
     ENTER ();