summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2003-12-02 01:59:38 +0000
committerKeith Packard <keithp@keithp.com>2003-12-02 01:59:38 +0000
commit33fdd50a94baab1db342bfce442907db8f8ad03e (patch)
tree478f78b1f3939a9c5571f38e60a19c8d7823c3ff
parent6db77925406a0ee600998ad558a50190ba631649 (diff)
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 Initialize client private 'critical' value Clean up pixmap bounds checking code to only affect contents allocated by fb. Oops. Call SourceValidate for Composite operations. Add Xchips server (vesa based)
-rw-r--r--hw/kdrive/Makefile.am2
-rw-r--r--hw/kdrive/chips/Imakefile14
-rw-r--r--hw/kdrive/chips/Makefile.am28
-rw-r--r--hw/kdrive/chips/chips.c40
-rw-r--r--hw/kdrive/chips/chipsdraw.c60
5 files changed, 98 insertions, 46 deletions
diff --git a/hw/kdrive/Makefile.am b/hw/kdrive/Makefile.am
index 1ff8a0d50..0e2fe358d 100644
--- a/hw/kdrive/Makefile.am
+++ b/hw/kdrive/Makefile.am
@@ -1,5 +1,5 @@
if KDRIVEVESA
-VESA_SUBDIRS = vesa mach64 mga nvidia r128 smi
+VESA_SUBDIRS = vesa mach64 mga nvidia r128 smi chips
endif
if KDRIVEFBDEV
diff --git a/hw/kdrive/chips/Imakefile b/hw/kdrive/chips/Imakefile
deleted file mode 100644
index 72970d837..000000000
--- a/hw/kdrive/chips/Imakefile
+++ /dev/null
@@ -1,14 +0,0 @@
-XCOMM $XConsortium: Imakefile /main/10 1996/12/02 10:20:33 lehors $
-XCOMM $RCSId: xc/programs/Xserver/hw/kdrive/chips/Imakefile,v 1.6 2000/10/20 00:19:51 keithp Exp $
-KDRIVE=..
-#include "../Kdrive.tmpl"
-
-SRCS = chips.c chipsdraw.c chipsstub.c
-
-OBJS = chips.o chipsdraw.o chipsstub.o
-
-INCLUDES = -I. $(KDINCS) -I$(KDRIVE)/vesa
-
-NormalLibraryObjectRule()
-NormalLibraryTarget(chips,$(OBJS))
-DependTarget()
diff --git a/hw/kdrive/chips/Makefile.am b/hw/kdrive/chips/Makefile.am
new file mode 100644
index 000000000..6e7481e90
--- /dev/null
+++ b/hw/kdrive/chips/Makefile.am
@@ -0,0 +1,28 @@
+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)
+
diff --git a/hw/kdrive/chips/chips.c b/hw/kdrive/chips/chips.c
index c0b0bb6a8..ccaac5d2b 100644
--- a/hw/kdrive/chips/chips.c
+++ b/hw/kdrive/chips/chips.c
@@ -131,10 +131,45 @@ chipsInitScreen (ScreenPtr pScreen)
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 @@ KdCardFuncs chipsFuncs = {
chipsCardInit, /* cardinit */
chipsScreenInit, /* scrinit */
chipsInitScreen, /* initScreen */
+ chipsFinishInitScreen, /* finishInitScreen */
+ chipsCreateResources, /* createRes */
chipsPreserve, /* preserve */
chipsEnable, /* enable */
vesaDPMS, /* dpms */
@@ -301,5 +338,4 @@ KdCardFuncs chipsFuncs = {
vesaGetColors, /* getColors */
vesaPutColors, /* putColors */
- chipsFinishInitScreen /* finishInitScreen */
};
diff --git a/hw/kdrive/chips/chipsdraw.c b/hw/kdrive/chips/chipsdraw.c
index 4fc210597..e27508c09 100644
--- a/hw/kdrive/chips/chipsdraw.c
+++ b/hw/kdrive/chips/chipsdraw.c
@@ -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 byteStride;
static CARD32 bytesPerPixel;
static CARD32 pixelStride;
-void
+static void
chipsSet (ScreenPtr pScreen)
{
KdScreenPriv(pScreen);
@@ -182,7 +182,7 @@ chipsSet (ScreenPtr pScreen)
#define DBG(x)
-void
+static void
chipsPitch (int src, int dst)
{
CARD32 p;
@@ -196,7 +196,7 @@ chipsPitch (int src, int dst)
#endif
}
-void
+static void
chipsBg (Pixel bg)
{
DBG(ErrorF ("\tbg 0x%x\n", bg));
@@ -207,7 +207,7 @@ chipsBg (Pixel bg)
#endif
}
-void
+static void
chipsFg (Pixel fg)
{
DBG(ErrorF ("\tfg 0x%x\n", fg));
@@ -218,7 +218,7 @@ chipsFg (Pixel fg)
#endif
}
-void
+static void
chipsOp (CARD32 op)
{
DBG(ErrorF ("\top 0x%x\n", op));
@@ -229,7 +229,7 @@ chipsOp (CARD32 op)
#endif
}
-void
+static void
chipsRopSolid (int rop)
{
CARD32 op;
@@ -238,7 +238,7 @@ chipsRopSolid (int rop)
chipsOp (op);
}
-void
+static void
chipsSrc (int addr)
{
DBG(ErrorF ("\tsrc 0x%x\n", addr));
@@ -249,7 +249,7 @@ chipsSrc (int addr)
#endif
}
-void
+static void
chipsDst (int addr)
{
DBG(ErrorF ("\tdst 0x%x\n", addr));
@@ -260,7 +260,7 @@ chipsDst (int addr)
#endif
}
-void
+static void
chipsWidthHeightGo (int w, int h)
{
DBG(ErrorF ("\twidth height %d/%d\n", w, h));
@@ -271,8 +271,8 @@ chipsWidthHeightGo (int w, int h)
#endif
}
-void
-chipsWaitIdle ()
+static void
+chipsWaitIdle (void)
{
#ifdef HIQV
int timeout = 0;
@@ -304,8 +304,8 @@ chipsWaitIdle ()
#endif
}
-Bool
-chipsPrepareSolid (DrawablePtr pDrawable,
+static Bool
+chipsPrepareSolid (PixmapPtr pPixmap,
int alu,
Pixel pm,
Pixel fg)
@@ -313,14 +313,14 @@ chipsPrepareSolid (DrawablePtr pDrawable,
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 @@ chipsPrepareSolid (DrawablePtr pDrawable,
}
}
-void
+static void
chipsSolid (int x1, int y1, int x2, int y2)
{
CARD32 dst;
@@ -344,15 +344,16 @@ chipsSolid (int x1, int y1, int x2, int y2)
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 @@ chipsPrepareCopy (DrawablePtr pSrcDrawable,
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 @@ chipsPrepareCopy (DrawablePtr pSrcDrawable,
copyOp |= ctLEFT2RIGHT;
else
copyOp |= ctRIGHT2LEFT;
- chipsSet (pDstDrawable->pScreen);
+ chipsSet (pDstPixmap->drawable.pScreen);
chipsWaitIdle ();
chipsOp (copyOp);
chipsPitch (byteStride, byteStride);
@@ -383,7 +384,7 @@ chipsPrepareCopy (DrawablePtr pSrcDrawable,
}
}
-void
+static void
chipsCopy (int srcX,
int srcY,
int dstX,
@@ -418,12 +419,12 @@ chipsCopy (int srcX,
chipsWidthHeightGo (w * bytesPerPixel, h);
}
-void
+static void
chipsDoneCopy (void)
{
}
-KaaScreenPrivRec chipsKaa = {
+KaaScreenInfoRec chipsKaa = {
chipsPrepareSolid,
chipsSolid,
chipsDoneSolid,
@@ -431,13 +432,14 @@ KaaScreenPrivRec chipsKaa = {
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 @@ chipsDrawEnable (ScreenPtr pScreen)
{
KdScreenPriv(pScreen);
chipsScreenInfo(pScreenPriv);
- CARD8 mode;
+ CARD8 mode = 0x00;
switch (pScreenPriv->screen->fb[0].bitsPerPixel) {
case 8: