[xserver-commit] xserver/hw/kdrive/chips .cvsignore,NONE,1.1 Makefile.am,NONE,1.1 chips.c,1.3,1.4 chipsdraw.c,1.3,1.4 Imakefile,1.2,NONE

Keith Packard xserver-commit@pdx.freedesktop.org
Mon, 01 Dec 2003 17:59:40 -0800


Committed by: keithp

Update of /cvs/xserver/xserver/hw/kdrive/chips
In directory pdx:/tmp/cvs-serv28394/hw/kdrive/chips

Modified Files:
	chips.c chipsdraw.c 
Added Files:
	.cvsignore Makefile.am 
Removed Files:
	Imakefile 
Log Message:
	* composite/compinit.c: (compCloseScreen), (compScreenInit):
	* composite/compint.h:
	* composite/compwindow.c: (compPositionWindow), (compClipNotify),
	(compWindowUpdateAutomatic):
	Wrap ClipNotify to see region motions during MoveWindow.
	
	Check window reorigin in PositionWindow and bump pixmap
	serial numbers to revalidate GCs.

	Fix picture clip region origin in automatic update
	
	* damageext/damageext.c: (DamageClientCallback):
	Initialize client private 'critical' value
	
	* fb/fbpixmap.c: (fbValidateBits), (fbValidateDrawable):
	* fb/fbscreen.c: (fbFinishScreenInit):
	Clean up pixmap bounds checking code to only affect
	contents allocated by fb.
	
	* render/mipict.c: (miCompositeSourceValidate),
	(miComputeCompositeRegion):
	Oops.  Call SourceValidate for Composite operations.

	* configure.ac:
	* hw/kdrive/Makefile.am:
	* hw/kdrive/chips/.cvsignore:
	* hw/kdrive/chips/Imakefile:
	* hw/kdrive/chips/Makefile.am:
	* hw/kdrive/chips/chips.c: (chipsRandRSetConfig), (chipsRandRInit),
	(chipsFinishInitScreen), (chipsCreateResources):
	* hw/kdrive/chips/chipsdraw.c: (chipsWaitIdle),
	(chipsPrepareSolid), (chipsPrepareCopy), (chipsDrawInit),
	(chipsDrawEnable):
	Add Xchips server (vesa based)


--- NEW FILE: .cvsignore ---
.deps
.libs
Makefile
Makefile.in
Xchips
*.o
*.a

--- NEW FILE: Makefile.am ---
INCLUDES = 					\
	@KDRIVE_INCS@				\
	-I$(top_srcdir)/hw/kdrive/vesa		\
	@XSERVER_CFLAGS@

bin_PROGRAMS = Xchips

if TSLIB
TSLIB_FLAG = -lts
endif

noinst_LIBRARIES = libchips.a

libchips_a_SOURCES = 	\
	chipsdraw.c	\
	chips.c		\
	chips.h	

Xchips_SOURCES = \
	chipsstub.c

Xchips_LDADD = \
	libchips.a 				\
	$(top_builddir)/hw/kdrive/vesa/libvesa.a \
	@KDRIVE_LIBS@				\
	@XSERVER_LIBS@                          \
	$(TSLIB_FLAG)


Index: chips.c
===================================================================
RCS file: /cvs/xserver/xserver/hw/kdrive/chips/chips.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- chips.c	11 Sep 2003 05:12:51 -0000	1.3
+++ chips.c	2 Dec 2003 01:59:38 -0000	1.4
@@ -131,10 +131,45 @@
     return vesaInitScreen (pScreen);
 }
 
+#ifdef RANDR
+static Bool
+chipsRandRSetConfig (ScreenPtr		pScreen,
+		      Rotation		rotation,
+		      int		rate,
+		      RRScreenSizePtr	pSize)
+{
+    KdCheckSync (pScreen);
+
+    if (!vesaRandRSetConfig (pScreen, rotation, rate, pSize))
+	return FALSE;
+    
+    return TRUE;
+}
+
+static void
+chipsRandRInit (ScreenPtr pScreen)
+{
+    rrScrPriv(pScreen);
+
+    pScrPriv->rrSetConfig = chipsRandRSetConfig;
+}
+#endif
+
 Bool
 chipsFinishInitScreen (ScreenPtr pScreen)
 {
-    return vesaFinishInitScreen (pScreen);
+    Bool    ret;
+    ret = vesaFinishInitScreen (pScreen);
+#ifdef RANDR
+    chipsRandRInit (pScreen);
+#endif
+    return ret;
+}
+
+static Bool
+chipsCreateResources (ScreenPtr pScreen)
+{
+    return vesaCreateResources (pScreen);
 }
 
 CARD8
@@ -279,6 +314,8 @@
     chipsCardInit,	    /* cardinit */
     chipsScreenInit,	    /* scrinit */
     chipsInitScreen,	    /* initScreen */
+    chipsFinishInitScreen,  /* finishInitScreen */
+    chipsCreateResources,   /* createRes */
     chipsPreserve,	    /* preserve */
     chipsEnable,	    /* enable */
     vesaDPMS,		    /* dpms */
@@ -301,5 +338,4 @@
     
     vesaGetColors,    	    /* getColors */
     vesaPutColors,	    /* putColors */
-    chipsFinishInitScreen /* finishInitScreen */
 };

Index: chipsdraw.c
===================================================================
RCS file: /cvs/xserver/xserver/hw/kdrive/chips/chipsdraw.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- chipsdraw.c	11 Sep 2003 05:12:51 -0000	1.3
+++ chipsdraw.c	2 Dec 2003 01:59:38 -0000	1.4
@@ -28,7 +28,7 @@
 #endif
 #include "chips.h"
 
-#include	"Xmd.h"
+#include	<X11/Xmd.h>
 #include	"gcstruct.h"
 #include	"scrnintstr.h"
 #include	"pixmapstr.h"
@@ -147,7 +147,7 @@
 static CARD32	bytesPerPixel;
 static CARD32	pixelStride;
 
-void
+static void
 chipsSet (ScreenPtr pScreen)
 {
     KdScreenPriv(pScreen);
@@ -182,7 +182,7 @@
 
 #define DBG(x)
 
-void
+static void
 chipsPitch (int src, int dst)
 {
     CARD32  p;
@@ -196,7 +196,7 @@
 #endif
 }
 
-void
+static void
 chipsBg (Pixel   bg)
 {
     DBG(ErrorF ("\tbg 0x%x\n", bg));
@@ -207,7 +207,7 @@
 #endif
 }
 
-void
+static void
 chipsFg (Pixel   fg)
 {
     DBG(ErrorF ("\tfg 0x%x\n", fg));
@@ -218,7 +218,7 @@
 #endif
 }
 
-void
+static void
 chipsOp (CARD32 op)
 {
     DBG(ErrorF ("\top 0x%x\n", op));
@@ -229,7 +229,7 @@
 #endif
 }
     
-void
+static void
 chipsRopSolid (int rop)
 {
     CARD32  op;
@@ -238,7 +238,7 @@
     chipsOp (op);
 }
 
-void
+static void
 chipsSrc (int addr)
 {
     DBG(ErrorF ("\tsrc 0x%x\n", addr));
@@ -249,7 +249,7 @@
 #endif
 }
 
-void
+static void
 chipsDst (int addr)
 {
     DBG(ErrorF ("\tdst 0x%x\n", addr));
@@ -260,7 +260,7 @@
 #endif
 }
 
-void
+static void
 chipsWidthHeightGo (int w, int h)
 {
     DBG(ErrorF ("\twidth height %d/%d\n", w, h));
@@ -271,8 +271,8 @@
 #endif
 }
 
-void
-chipsWaitIdle ()
+static void
+chipsWaitIdle (void)
 {
 #ifdef HIQV
     int	timeout = 0;
@@ -304,8 +304,8 @@
 #endif
 }
 
-Bool
-chipsPrepareSolid (DrawablePtr  pDrawable,
+static Bool
+chipsPrepareSolid (PixmapPtr	pPixmap,
 		   int		alu,
 		   Pixel	pm,
 		   Pixel	fg)
@@ -313,14 +313,14 @@
     FbBits  depthMask;
     
     DBG(ErrorF ("PrepareSolid %d 0x%x\n", alu, fg));
-    depthMask = FbFullMask(pDrawable->depth);
+    depthMask = FbFullMask(pPixmap->drawable.depth);
     if ((pm & depthMask) != depthMask)
 	return FALSE;
     else
     {
-	chipsSet (pDrawable->pScreen);
+	chipsSet (pPixmap->drawable.pScreen);
 	chipsWaitIdle ();
-	chipsFillPix(pDrawable->bitsPerPixel,fg);
+	chipsFillPix(pPixmap->drawable.bitsPerPixel,fg);
 	chipsFg (fg);
 	chipsBg (fg);
 	chipsRopSolid (alu);
@@ -329,7 +329,7 @@
     }
 }
 
-void
+static void
 chipsSolid (int x1, int y1, int x2, int y2)
 {
     CARD32  dst;
@@ -344,15 +344,16 @@
     chipsWidthHeightGo (w, h);
 }
 
-void
+static void
 chipsDoneSolid (void)
 {
 }
 
 static CARD32	copyOp;
-Bool
-chipsPrepareCopy (DrawablePtr	pSrcDrawable,
-		  DrawablePtr	pDstDrawable,
+
+static Bool
+chipsPrepareCopy (PixmapPtr	pSrcPixmap,
+		  PixmapPtr	pDstPixmap,
 		  int		dx,
 		  int		dy,
 		  int		alu,
@@ -361,7 +362,7 @@
     FbBits  depthMask;
     
     DBG(ErrorF ("PrepareSolid %d 0x%x\n", alu, fg));
-    depthMask = FbFullMask(pDstDrawable->depth);
+    depthMask = FbFullMask(pDstPixmap->drawable.depth);
     if ((pm & depthMask) != depthMask)
 	return FALSE;
     else
@@ -375,7 +376,7 @@
 	    copyOp |= ctLEFT2RIGHT;
 	else
 	    copyOp |= ctRIGHT2LEFT;
-	chipsSet (pDstDrawable->pScreen);
+	chipsSet (pDstPixmap->drawable.pScreen);
 	chipsWaitIdle ();
 	chipsOp (copyOp);
 	chipsPitch (byteStride, byteStride);
@@ -383,7 +384,7 @@
     }
 }
 
-void
+static void
 chipsCopy (int srcX,
 	   int srcY,
 	   int dstX,
@@ -418,12 +419,12 @@
     chipsWidthHeightGo (w * bytesPerPixel, h);
 }
 
-void
+static void
 chipsDoneCopy (void)
 {
 }
 
-KaaScreenPrivRec    chipsKaa = {
+KaaScreenInfoRec    chipsKaa = {
     chipsPrepareSolid,
     chipsSolid,
     chipsDoneSolid,
@@ -431,13 +432,14 @@
     chipsPrepareCopy,
     chipsCopy,
     chipsDoneCopy,
+
+    0, 0, 0
 };
 
 Bool
 chipsDrawInit (ScreenPtr pScreen)
 {
     KdScreenPriv(pScreen);
-    chipsScreenInfo(pScreenPriv);
     
     switch (pScreenPriv->screen->fb[0].bitsPerPixel) {
     case 8:
@@ -458,7 +460,7 @@
 {
     KdScreenPriv(pScreen);
     chipsScreenInfo(pScreenPriv);
-    CARD8   mode;
+    CARD8 mode = 0x00;
     
     switch (pScreenPriv->screen->fb[0].bitsPerPixel) {
     case 8:

--- Imakefile DELETED ---