[xserver-commit] xserver/hw/kdrive/nvidia nvidia.c,1.1.2.2,1.1.2.3 nvidia.h,1.1,1.1.2.1 nvidiadraw.c,1.2,1.2.2.1

Keith Packard xserver-commit@pdx.freedesktop.org
Wed, 29 Oct 2003 08:27:13 -0800


Committed by: keithp

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

Modified Files:
      Tag: xfixes_2_branch
	nvidia.c nvidia.h nvidiadraw.c 
Log Message:
	* Xext/bigreq.c: (BigReqExtensionInit):
	* Xext/mitmisc.c: (MITMiscExtensionInit):
	* Xext/saver.c: (ScreenSaverExtensionInit):
	* Xext/shm.c: (ShmExtensionInit), (ShmRegisterFuncs),
	(ShmSetPixmapFormat):
	* Xext/shmint.h:
	* Xext/sleepuntil.c: (ClientSleepUntil):
	* Xext/sleepuntil.h:
	* Xext/sync.c: (SyncCreateSystemCounter), (SyncExtensionInit):
	* Xext/syncint.h:
	* Xext/xcmisc.c: (XCMiscExtensionInit):
	* Xext/xext.h:
	* Xext/xres.c:
	* Xext/xtest.c: (XTestExtensionInit):
	* Xext/xtest1di.c: (XTestExtension1Init):
	* Xext/xvmc.c: (XvMCFindXvImage):
	* Xext/xvmcext.h:
	* configure.ac:
	* dix/dispatch.c:
	* dix/extension.c: (CloseDownExtensions):
	* dix/property.c: (NullPropertyReply):
	* dix/xpstubs.c: (XpClientIsBitmapClient), (XpClientIsPrintClient),
	(XprintOptions):
	* hw/kdrive/fbdev/fbdev.c: (fbdevUnmapFramebuffer),
	(fbdevRandRSetConfig):
	* hw/kdrive/fbdev/fbdev.h:
	* hw/kdrive/linux/agp.c: (GARTInit):
	* hw/kdrive/linux/bus.c:
	* hw/kdrive/linux/keyboard.c: (readKernelMapping):
	* hw/kdrive/linux/linux.c: (LinuxInit):
	* hw/kdrive/linux/mouse.c:
	* hw/kdrive/linux/ms.c:
	* hw/kdrive/linux/ps2.c:
	* hw/kdrive/mach64/mach64.c:
	* hw/kdrive/mach64/mach64draw.c:
	* hw/kdrive/mga/mga.c:
	* hw/kdrive/mga/mgadraw.c: (mgaPrepareSolid), (mgaPrepareCopy):
	* hw/kdrive/nvidia/nvidia.c: (nvidiaLockUnlock):
	* hw/kdrive/nvidia/nvidia.h:
	* hw/kdrive/nvidia/nvidiadraw.c: (nvidiaPrepareSolid),
	(nvidiaPrepareCopy), (nvidiaDrawInit), (nvidiaDrawEnable):
	* hw/kdrive/r128/r128.c: (r128ScreenInit), (r128Preserve),
	(r128DPMS):
	* hw/kdrive/r128/r128draw.c: (r128WaitAvail), (r128Setup),
	(r128DrawInit):
	* hw/kdrive/r128/r128stub.c:
	* hw/kdrive/smi/smi.c: (smiRandRSetConfig), (smiPreserve),
	(smiDPMS), (smiRestore):
	* hw/kdrive/smi/smi.h:
	* hw/kdrive/smi/smidraw.c: (smiPrepareSolid), (smiPrepareCopy),
	(smiDrawInit):
	* hw/kdrive/smi/smistub.c:
	* hw/kdrive/src/kaa.c:
	* hw/kdrive/src/kcmap.c:
	* hw/kdrive/src/kcurscol.c:
	* hw/kdrive/src/kdrive.c: (KdCreateScreenResources):
	* hw/kdrive/src/kdrive.h:
	* hw/kdrive/src/kinput.c:
	* hw/kdrive/src/knoop.c:
	* hw/kdrive/src/vga.c:
	* hw/kdrive/src/vga.h:
	* hw/kdrive/vesa/vesa.h:
	* hw/xnest/Color.c: (xnestCreateColormap), (xnestDestroyColormap),
	(xnestCountInstalledColormapWindows),
	(xnestGetInstalledColormapWindows),
	(xnestSameInstalledColormapWindows),
	(xnestSetInstalledColormapWindows),
	(xnestSetScreenSaverColormapWindow), (xnestDirectInstallColormaps),
	(xnestDirectUninstallColormaps), (xnestInstallColormap),
	(xnestUninstallColormap), (xnestListInstalledColormaps),
	(xnestStoreColors), (xnestResolveColor),
	(xnestCreateDefaultColormap):
	* hw/xnest/Color.h:
	* hw/xnest/Cursor.c: (xnestConstrainCursor), (xnestCursorLimits),
	(xnestDisplayCursor), (xnestRealizeCursor), (xnestUnrealizeCursor),
	(xnestRecolorCursor), (xnestSetCursorPosition):
	* hw/xnest/Display.c: (xnestOpenDisplay):
	* hw/xnest/Display.h:
	* hw/xnest/Events.c: (xnestExposurePredicate),
	(xnestNotExposurePredicate), (xnestCollectExposures),
	(xnestCollectEvents):
	* hw/xnest/Events.h:
	* hw/xnest/Font.c: (xnestRealizeFont), (xnestUnrealizeFont):
	* hw/xnest/GC.c: (xnestValidateGC), (xnestChangeGC), (xnestCopyGC),
	(xnestDestroyGC), (xnestDestroyClipHelper), (xnestChangeClip),
	(xnestDestroyClip), (xnestCopyClip), (xnestCreateGC):
	* hw/xnest/GCOps.c: (xnestFillSpans), (xnestSetSpans),
	(xnestGetSpans), (xnestQueryBestSize), (xnestPutImage),
	(xnestGetImage), (xnestBitBlitPredicate), (xnestBitBlitHelper),
	(xnestCopyArea), (xnestCopyPlane), (xnestPolyPoint),
	(xnestPolylines), (xnestPolySegment), (xnestPolyRectangle),
	(xnestPolyArc), (xnestFillPolygon), (xnestPolyFillRect),
	(xnestPolyFillArc), (xnestPolyText8), (xnestPolyText16),
	(xnestImageText8), (xnestImageText16), (xnestImageGlyphBlt),
	(xnestPolyGlyphBlt), (xnestPushPixels):
	* hw/xnest/GCOps.h:
	* hw/xnest/Keyboard.h:
	* hw/xnest/Screen.c: (xnestScreen):
	* hw/xnest/Screen.h:
	* hw/xnest/Visual.c: (xnestVisual), (xnestVisualFromID):
	* hw/xnest/Visual.h:
	* hw/xnest/Window.c: (xnestWindowPtr):
	* hw/xnest/XNCursor.h:
	* hw/xnest/XNFont.h:
	* hw/xnest/XNGC.h:
	* hw/xnest/XNPixmap.h:
	* hw/xnest/XNWindow.h:
	* include/extnsionst.h:
	* mi/Makefile.am:
	* mi/miinitext.c:
	* os/Makefile.am:
	* os/connection.c: (ClientAuthorized):
	* os/hpsocket.c: (set_socket_option), (unset_socket_option):
	* os/xdmauth.c: (XdmCheckCookie), (XdmToID):
	Prototype fixes (various)
	Add GCC warnings (including -Werror.  clean up your code)
	Other warning fixes (unused variables, etc)
	Get rid of unused extension interfaces (aux screen procs)
	Make lots of functions in kdrive static
	Eliminate unused code from os library


Index: nvidia.c
===================================================================
RCS file: /cvs/xserver/xserver/hw/kdrive/nvidia/nvidia.c,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -u -d -r1.1.2.2 -r1.1.2.3
--- nvidia.c	24 Oct 2003 09:34:33 -0000	1.1.2.2
+++ nvidia.c	29 Oct 2003 16:26:41 -0000	1.1.2.3
@@ -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,7 +111,7 @@
 }
 
 #ifdef RANDR
-Bool
+static Bool
 nvidiaRandRSetConfig (ScreenPtr		pScreen,
 		      Rotation		rotation,
 		      int		rate,
@@ -125,7 +125,7 @@
     return TRUE;
 }
 
-void
+static void
 nvidiaRandRInit (ScreenPtr pScreen)
 {
     rrScrPriv(pScreen);
@@ -134,7 +134,7 @@
 }
 #endif
 
-Bool
+static Bool
 nvidiaFinishInitScreen (ScreenPtr pScreen)
 {
     Bool    ret;
@@ -195,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);
@@ -292,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;
@@ -307,7 +307,7 @@
     vesaRestore (card);
 }
 
-void
+static void
 nvidiaScreenFini (KdScreenInfo *screen)
 {
     NvidiaScreenInfo	*nvidias = (NvidiaScreenInfo *) screen->driver;
@@ -317,7 +317,7 @@
     screen->driver = 0;
 }
 
-void
+static void
 nvidiaCardFini (KdCardInfo *card)
 {
     NvidiaCardInfo	*nvidiac = card->driver;

Index: nvidia.h
===================================================================
RCS file: /cvs/xserver/xserver/hw/kdrive/nvidia/nvidia.h,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -u -d -r1.1 -r1.1.2.1
--- nvidia.h	9 Oct 2003 06:36:26 -0000	1.1
+++ nvidia.h	29 Oct 2003 16:26:41 -0000	1.1.2.1
@@ -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.2.2.1
diff -u -d -r1.2 -r1.2.2.1
--- nvidiadraw.c	13 Oct 2003 00:19:58 -0000	1.2
+++ nvidiadraw.c	29 Oct 2003 16:26:41 -0000	1.2.2.1
@@ -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 ();