[xserver-commit] xserver/hw/kdrive/smi smi.c,1.6.2.1,1.6.2.2 smi.h,1.5.2.1,1.5.2.2 smidraw.c,1.6,1.6.2.1 smistub.c,1.4,1.4.2.1

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


Committed by: keithp

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

Modified Files:
      Tag: xfixes_2_branch
	smi.c smi.h smidraw.c smistub.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: smi.c
===================================================================
RCS file: /cvs/xserver/xserver/hw/kdrive/smi/smi.c,v
retrieving revision 1.6.2.1
retrieving revision 1.6.2.2
diff -u -d -r1.6.2.1 -r1.6.2.2
--- smi.c	24 Oct 2003 09:34:33 -0000	1.6.2.1
+++ smi.c	29 Oct 2003 16:26:45 -0000	1.6.2.2
@@ -27,7 +27,7 @@
 #include "smi.h"
 #include <sys/io.h>
 
-Bool
+static Bool
 smiCardInit (KdCardInfo *card)
 {
     SmiCardInfo	*smic;
@@ -51,7 +51,7 @@
     return TRUE;
 }
 
-Bool
+static Bool
 smiScreenInit (KdScreenInfo *screen)
 {
     SmiCardInfo		*smic = screen->card->driver;
@@ -80,7 +80,7 @@
     return TRUE;
 }
 
-Bool
+static Bool
 smiInitScreen (ScreenPtr pScreen)
 {
     Bool    ret;
@@ -99,13 +99,13 @@
 }
 
 #ifdef RANDR
+static Bool
 smiRandRSetConfig (ScreenPtr		pScreen,
 		   Rotation		randr,
 		   int			rate,
 		   RRScreenSizePtr	pSize)
 {
     Bool    ret;
-    KdScreenPriv(pScreen);
     
     ENTER ();
     KdCheckSync (pScreen);
@@ -115,7 +115,7 @@
     return ret;
 }
 
-Bool
+static Bool
 smiRandRInit (ScreenPtr pScreen)
 {
     rrScrPriv(pScreen);
@@ -127,7 +127,7 @@
 }
 #endif
 
-Bool
+static Bool
 smiFinishInitScreen (ScreenPtr pScreen)
 {
     Bool    ret;
@@ -141,8 +141,6 @@
 void
 smiPreserve (KdCardInfo *card)
 {
-    SmiCardInfo	*smic = card->driver;
-
     ENTER ();
     subPreserve(card);
     LEAVE();
@@ -229,6 +227,16 @@
     smiUnmapReg (card, smic);
 }
 
+static Bool
+smiDPMS (ScreenPtr pScreen, int mode)
+{
+    Bool    ret;
+    ENTER ();
+    ret = subDPMS (pScreen, mode);
+    LEAVE ();
+    return ret;
+}
+
 Bool
 smiEnable (ScreenPtr pScreen)
 {
@@ -268,27 +276,15 @@
     LEAVE ();
 }
 
-Bool
-smiDPMS (ScreenPtr pScreen, int mode)
-{
-    Bool    ret;
-    ENTER ();
-    ret = subDPMS (pScreen, mode);
-    LEAVE ();
-    return ret;
-}
-
-void
+static void
 smiRestore (KdCardInfo *card)
 {
-    SmiCardInfo	*smic = card->driver;
-    
     ENTER ();
     subRestore (card);
     LEAVE();
 }
 
-void
+static void
 smiScreenFini (KdScreenInfo *screen)
 {
     SmiScreenInfo	*smis = (SmiScreenInfo *) screen->driver;
@@ -300,7 +296,7 @@
     LEAVE ();
 }
 
-void
+static void
 smiCardFini (KdCardInfo *card)
 {
     SmiCardInfo	*smic = card->driver;

Index: smi.h
===================================================================
RCS file: /cvs/xserver/xserver/hw/kdrive/smi/smi.h,v
retrieving revision 1.5.2.1
retrieving revision 1.5.2.2
diff -u -d -r1.5.2.1 -r1.5.2.2
--- smi.h	24 Oct 2003 09:34:33 -0000	1.5.2.1
+++ smi.h	29 Oct 2003 16:26:45 -0000	1.5.2.2
@@ -199,6 +199,18 @@
 smiUnmapReg (KdCardInfo *card, SmiCardInfo *smic);
 
 void
+smiOutb (CARD16 port, CARD8 val);
+
+CARD8
+smiInb (CARD16 port);
+
+CARD8
+smiGetIndex (SmiCardInfo *smic, CARD16 addr, CARD16 data, CARD8 id);
+
+void
+smiSetIndex (SmiCardInfo *smic, CARD16 addr, CARD16 data, CARD8 id, CARD8 val);
+
+void
 smiSetMMIO (KdCardInfo *card, SmiCardInfo *smic);
 
 void

Index: smidraw.c
===================================================================
RCS file: /cvs/xserver/xserver/hw/kdrive/smi/smidraw.c,v
retrieving revision 1.6
retrieving revision 1.6.2.1
diff -u -d -r1.6 -r1.6.2.1
--- smidraw.c	13 Oct 2003 00:19:58 -0000	1.6
+++ smidraw.c	29 Oct 2003 16:26:45 -0000	1.6.2.1
@@ -143,18 +143,16 @@
     return TRUE;
 }
 
-Bool
-smiPrepareSolid (DrawablePtr    pDrawable,
+static Bool
+smiPrepareSolid (PixmapPtr    pPixmap,
 		 int		alu,
 		 Pixel		pm,
 		 Pixel		fg)
 {
-    KdScreenPriv(pDrawable->pScreen);
-
-    if (~pm & FbFullMask(pDrawable->depth))
+    if (~pm & FbFullMask(pPixmap->drawable.depth))
 	return FALSE;
     
-    if (!smiSetup (pDrawable->pScreen, 3))
+    if (!smiSetup (pPixmap->drawable.pScreen, 3))
 	return FALSE;
     
     accel_cmd = smiSolidRop[alu] | SMI_BITBLT | SMI_START_ENGINE;
@@ -164,7 +162,7 @@
     return TRUE;
 }
 
-void
+static void
 smiSolid (int x1, int y1, int x2, int y2)
 {
     smiWaitAvail(smic,3);
@@ -173,7 +171,7 @@
     dpr->accel_cmd = accel_cmd; 
 }
 
-void
+static void
 smiDoneSolid (void)
 {
 }
@@ -181,20 +179,18 @@
 static int copyDx;
 static int copyDy;
 
-Bool
-smiPrepareCopy (DrawablePtr	pSrcDrawable,
-		   DrawablePtr	pDstDrawable,
-		   int		dx,
-		   int		dy,
-		   int		alu,
-		   Pixel	pm)
+static Bool
+smiPrepareCopy (PixmapPtr	pSrcPixmap,
+		PixmapPtr	pDstPixmap,
+		int		dx,
+		int		dy,
+		int		alu,
+		Pixel		pm)
 {
-    KdScreenPriv(pSrcDrawable->pScreen);
-
-    if (~pm & FbFullMask(pSrcDrawable->depth))
+    if (~pm & FbFullMask(pSrcPixmap->drawable.depth))
 	return FALSE;
     
-    if (!smiSetup (pSrcDrawable->pScreen, 0))
+    if (!smiSetup (pSrcPixmap->drawable.pScreen, 0))
 	return FALSE;
     
     accel_cmd = smiBltRop[alu] | SMI_BITBLT | SMI_START_ENGINE;
@@ -206,7 +202,7 @@
     return TRUE;
 }
 
-void
+static void
 smiCopy (int srcX,
 	    int srcY,
 	    int dstX,
@@ -228,7 +224,7 @@
     dpr->accel_cmd = accel_cmd;
 }
 
-void
+static void
 smiDoneCopy (void)
 {
 }
@@ -248,7 +244,6 @@
 {
     KdScreenPriv(pScreen);
     smiCardInfo (pScreenPriv);
-    smiScreenInfo (pScreenPriv);
     
     ENTER ();
     if (pScreenPriv->screen->fb[0].depth == 4)

Index: smistub.c
===================================================================
RCS file: /cvs/xserver/xserver/hw/kdrive/smi/smistub.c,v
retrieving revision 1.4
retrieving revision 1.4.2.1
diff -u -d -r1.4 -r1.4.2.1
--- smistub.c	9 Oct 2003 06:35:11 -0000	1.4
+++ smistub.c	29 Oct 2003 16:26:45 -0000	1.4.2.1
@@ -28,6 +28,7 @@
 #include <config.h>
 #endif
 #include "smi.h"
+#include "klinux.h"
 
 void
 InitCard (char *name)