[xserver-commit] xserver/hw/kdrive/mach64 Makefile.am,1.7,1.8 mach64.c,1.15,1.16 mach64.h,1.9,1.10 mach64draw.c,1.14,1.15 mach64video.c,1.15,1.16
Keith Packard
xserver-commit@pdx.freedesktop.org
Sun, 02 Nov 2003 11:56:12 -0800
- Previous message: [xserver-commit] xserver/hw/kdrive/linux Makefile.am,1.6,1.7 agp.c,1.6,1.7 bus.c,1.8,1.9 keyboard.c,1.13,1.14 linux.c,1.14,1.15 mouse.c,1.11,1.12 ms.c,1.6,1.7 ps2.c,1.12,1.13
- Next message: [xserver-commit] xserver/hw/kdrive/mga Makefile.am,1.4,1.5 mga.c,1.3,1.4 mgadraw.c,1.7,1.8
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Committed by: keithp
Update of /cvs/xserver/xserver/hw/kdrive/mach64
In directory pdx:/tmp/cvs-serv23831/hw/kdrive/mach64
Modified Files:
Makefile.am mach64.c mach64.h mach64draw.c mach64video.c
Log Message:
merge xfixes_2_branch back to HEAD
Index: Makefile.am
===================================================================
RCS file: /cvs/xserver/xserver/hw/kdrive/mach64/Makefile.am,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- Makefile.am 15 Oct 2003 04:59:45 -0000 1.7
+++ Makefile.am 2 Nov 2003 19:56:10 -0000 1.8
@@ -1,14 +1,7 @@
INCLUDES = \
- -I$(top_srcdir)/fb \
- -I$(top_srcdir)/hw/kdrive/src \
- -I$(top_srcdir)/hw/kdrive/linux \
+ @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 = Xmach64
@@ -22,28 +15,16 @@
mach64.h \
mach64draw.h
-
Xmach64_SOURCES = \
mach64stub.c
-Xmach64_LDADD = \
- libmach64.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
+MACH64_LIBS = \
+ libmach64.a \
+ $(top_builddir)/hw/kdrive/vesa/libvesa.a
+
+Xmach64_LDADD = \
+ $(MACH64_LIBS) \
+ @KDRIVE_LIBS@ \
+ @XSERVER_LIBS@
+
+Xmach64_DEPENDENCIES = $(MACH64_LIBS) @KDRIVE_LIBS@
Index: mach64.c
===================================================================
RCS file: /cvs/xserver/xserver/hw/kdrive/mach64/mach64.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- mach64.c 15 Oct 2003 05:34:54 -0000 1.15
+++ mach64.c 2 Nov 2003 19:56:10 -0000 1.16
@@ -27,7 +27,7 @@
#include "mach64.h"
#include <sys/io.h>
-Bool
+static Bool
mach64CardInit (KdCardInfo *card)
{
Mach64CardInfo *mach64c;
@@ -50,12 +50,11 @@
return TRUE;
}
-Bool
+static Bool
mach64ScreenInit (KdScreenInfo *screen)
{
Mach64CardInfo *mach64c = screen->card->driver;
Mach64ScreenInfo *mach64s;
- int screen_size, memory;
mach64s = (Mach64ScreenInfo *) xalloc (sizeof (Mach64ScreenInfo));
if (!mach64s)
@@ -70,7 +69,6 @@
screen->dumb = TRUE;
if (mach64s->vesa.mapping != VESA_LINEAR)
screen->dumb = TRUE;
- screen->memory_base = mach64s->vesa.fb;
switch (screen->fb[0].depth) {
case 8:
mach64s->colorKey = 0xff;
@@ -86,30 +84,21 @@
mach64s->colorKey = 1;
break;
}
- memory = mach64s->vesa.fb_size;
- screen_size = screen->fb[0].byteStride * screen->height;
- memory -= screen_size;
- screen->softCursor = TRUE;
- screen->off_screen_base = screen_size;
- screen->off_screen_size = memory;
screen->driver = mach64s;
return TRUE;
}
-Bool
+static Bool
mach64InitScreen (ScreenPtr pScreen)
{
#ifdef XV
- KdScreenPriv(pScreen);
- Mach64CardInfo *mach64c = pScreenPriv->screen->card->driver;
- if (mach64c->media_reg && mach64c->reg)
- mach64InitVideo(pScreen);
+ mach64InitVideo(pScreen);
#endif
return vesaInitScreen (pScreen);
}
#ifdef RANDR
-Bool
+static Bool
mach64RandRSetConfig (ScreenPtr pScreen,
Rotation rotation,
int rate,
@@ -123,7 +112,7 @@
return TRUE;
}
-void
+static void
mach64RandRInit (ScreenPtr pScreen)
{
rrScrPriv(pScreen);
@@ -132,7 +121,7 @@
}
#endif
-Bool
+static Bool
mach64FinishInitScreen (ScreenPtr pScreen)
{
Bool ret;
@@ -143,6 +132,12 @@
return ret;
}
+static Bool
+mach64CreateResources (ScreenPtr pScreen)
+{
+ return vesaCreateResources (pScreen);
+}
+
CARD32
mach64ReadLCD (Reg *reg, int id)
{
@@ -367,7 +362,7 @@
return TRUE;
}
-void
+static void
mach64Restore (KdCardInfo *card)
{
Mach64CardInfo *mach64c = card->driver;
@@ -381,23 +376,26 @@
vesaRestore (card);
}
-void
+static void
mach64ScreenFini (KdScreenInfo *screen)
{
Mach64ScreenInfo *mach64s = (Mach64ScreenInfo *) screen->driver;
-
+#ifdef XV
+ mach64FiniVideo(screen->pScreen);
+#endif
vesaScreenFini (screen);
xfree (mach64s);
screen->driver = 0;
}
-void
+static void
mach64CardFini (KdCardInfo *card)
{
Mach64CardInfo *mach64c = card->driver;
mach64UnmapReg (card, mach64c);
vesaCardFini (card);
+ xfree (mach64c);
}
#define mach64CursorInit 0 /* initCursor */
@@ -410,6 +408,8 @@
mach64CardInit, /* cardinit */
mach64ScreenInit, /* scrinit */
mach64InitScreen, /* initScreen */
+ mach64FinishInitScreen, /* finishInitScreen */
+ mach64CreateResources, /* createRes */
mach64Preserve, /* preserve */
mach64Enable, /* enable */
mach64DPMS, /* dpms */
@@ -432,6 +432,4 @@
vesaGetColors, /* getColors */
vesaPutColors, /* putColors */
-
- mach64FinishInitScreen, /* finishInitScreen */
};
Index: mach64.h
===================================================================
RCS file: /cvs/xserver/xserver/hw/kdrive/mach64/mach64.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- mach64.h 15 Oct 2003 05:34:54 -0000 1.9
+++ mach64.h 2 Nov 2003 19:56:10 -0000 1.10
@@ -557,6 +557,7 @@
} Mach64PortPrivRec, *Mach64PortPrivPtr;
Bool mach64InitVideo(ScreenPtr pScreen);
+void mach64FiniVideo(ScreenPtr pScreen);
typedef struct _mach64ScreenInfo {
VesaScreenPrivRec vesa;
Index: mach64draw.c
===================================================================
RCS file: /cvs/xserver/xserver/hw/kdrive/mach64/mach64draw.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- mach64draw.c 15 Oct 2003 05:34:54 -0000 1.14
+++ mach64draw.c 2 Nov 2003 19:56:10 -0000 1.15
@@ -64,6 +64,10 @@
#define MACH64_DRAW_COMBO_SOLID 0x1
#define MACH64_DRAW_COMBO_COPY 0x8
+#define SYNC_ALWAYS 0
+#if SYNC_ALWAYS
+static ScreenPtr mach64Screen;
+#endif
static Reg *reg;
static CARD32 avail;
static CARD32 triple;
@@ -102,6 +106,9 @@
reg = mach64c->reg;
triple = mach64s->bpp24;
+#if SYNC_ALWAYS
+ mach64Screen = pScreen;
+#endif
if (!reg)
return FALSE;
@@ -140,7 +147,7 @@
return TRUE;
}
-Bool
+static Bool
mach64PrepareSolid (PixmapPtr pPixmap,
int alu,
Pixel pm,
@@ -154,7 +161,7 @@
return TRUE;
}
-void
+static void
mach64Solid (int x1, int y1, int x2, int y2)
{
if (triple)
@@ -176,16 +183,19 @@
reg->DST_WIDTH_HEIGHT = MACH64_XY(x2-x1,y2-y1);
}
-void
+static void
mach64DoneSolid (void)
{
+#if SYNC_ALWAYS
+ KdCheckSync (mach64Screen);
+#endif
}
static int copyDx;
static int copyDy;
static CARD32 copyCombo;
-Bool
+static Bool
mach64PrepareCopy (PixmapPtr pSrcPixmap,
PixmapPtr pDstPixmap,
int dx,
@@ -217,7 +227,7 @@
return TRUE;
}
-void
+static void
mach64Copy (int srcX,
int srcY,
int dstX,
@@ -260,9 +270,12 @@
reg->DST_HEIGHT_WIDTH = MACH64_YX(w,h);
}
-void
+static void
mach64DoneCopy (void)
{
+#if SYNC_ALWAYS
+ KdCheckSync (mach64Screen);
+#endif
}
KaaScreenInfoRec mach64Kaa = {
@@ -449,6 +462,7 @@
void
mach64DrawFini (ScreenPtr pScreen)
{
+ kaaDrawFini (pScreen);
}
void
Index: mach64video.c
===================================================================
RCS file: /cvs/xserver/xserver/hw/kdrive/mach64/mach64video.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- mach64video.c 14 Oct 2003 21:33:04 -0000 1.15
+++ mach64video.c 2 Nov 2003 19:56:10 -0000 1.16
@@ -980,7 +980,10 @@
int num_adaptors;
KdCardInfo *card = pScreenPriv->card;
Mach64CardInfo *mach64c = (Mach64CardInfo *) card->driver;
+ Mach64ScreenInfo *mach64s = (Mach64ScreenInfo *) screen->driver;
+ mach64s->pAdaptor = NULL;
+
if (!mach64c->media_reg)
return FALSE;
@@ -1017,3 +1020,18 @@
xfree(newAdaptors);
return TRUE;
}
+
+void
+mach64FiniVideo (ScreenPtr pScreen)
+{
+ KdScreenPriv(pScreen);
+ mach64ScreenInfo(pScreenPriv);
+ KdVideoAdaptorPtr adapt = mach64s->pAdaptor;
+
+ if (adapt)
+ {
+ Mach64PortPrivPtr pPortPriv = (Mach64PortPrivPtr)(&adapt->pPortPrivates[1]);
+ REGION_UNINIT (pScreen, &pPortPriv->clip);
+ xfree (adapt);
+ }
+}
- Previous message: [xserver-commit] xserver/hw/kdrive/linux Makefile.am,1.6,1.7 agp.c,1.6,1.7 bus.c,1.8,1.9 keyboard.c,1.13,1.14 linux.c,1.14,1.15 mouse.c,1.11,1.12 ms.c,1.6,1.7 ps2.c,1.12,1.13
- Next message: [xserver-commit] xserver/hw/kdrive/mga Makefile.am,1.4,1.5 mga.c,1.3,1.4 mgadraw.c,1.7,1.8
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]