[xserver-commit] xserver/hw/kdrive/r128 Makefile.am,1.2,1.3 r128.c,1.1,1.2 r128.h,1.1,1.2 r128draw.c,1.2,1.3 r128stub.c,1.1,1.2
Keith Packard
xserver-commit@pdx.freedesktop.org
Sun, 02 Nov 2003 11:56:12 -0800
- Previous message: [xserver-commit] xserver/hw/kdrive/nvidia Makefile.am,1.2,1.3 nvidia.c,1.1,1.2 nvidia.h,1.1,1.2 nvidiadraw.c,1.2,1.3
- Next message: [xserver-commit] xserver/hw/kdrive/smi Makefile.am,1.4,1.5 smi.c,1.6,1.7 smi.h,1.5,1.6 smidraw.c,1.6,1.7 smistub.c,1.4,1.5
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Committed by: keithp
Update of /cvs/xserver/xserver/hw/kdrive/r128
In directory pdx:/tmp/cvs-serv23831/hw/kdrive/r128
Modified Files:
Makefile.am r128.c r128.h r128draw.c r128stub.c
Log Message:
merge xfixes_2_branch back to HEAD
Index: Makefile.am
===================================================================
RCS file: /cvs/xserver/xserver/hw/kdrive/r128/Makefile.am,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- Makefile.am 15 Oct 2003 04:59:45 -0000 1.2
+++ Makefile.am 2 Nov 2003 19:56:10 -0000 1.3
@@ -1,14 +1,7 @@
INCLUDES = \
- -I$(top_srcdir)/fb \
- -I$(top_srcdir)/hw/kdrive/src \
+ @KDRIVE_INCS@ \
-I$(top_srcdir)/hw/kdrive/vesa \
- -I$(top_srcdir)/include \
- -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 = Xr128
@@ -25,21 +18,5 @@
Xr128_LDADD = \
libr128.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
+ @KDRIVE_LIBS@ \
+ @XSERVER_LIBS@
Index: r128.c
===================================================================
RCS file: /cvs/xserver/xserver/hw/kdrive/r128/r128.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- r128.c 11 Oct 2003 19:36:13 -0000 1.1
+++ r128.c 2 Nov 2003 19:56:10 -0000 1.2
@@ -27,7 +27,7 @@
#endif
#include "r128.h"
-Bool
+static Bool
r128CardInit (KdCardInfo *card)
{
R128CardInfo *r128c;
@@ -51,10 +51,9 @@
return TRUE;
}
-Bool
+static Bool
r128ScreenInit (KdScreenInfo *screen)
{
- R128CardInfo *r128c = screen->card->driver;
R128ScreenInfo *r128s;
int screen_size, memory;
@@ -96,13 +95,13 @@
return TRUE;
}
-Bool
+static Bool
r128InitScreen (ScreenPtr pScreen)
{
return vesaInitScreen (pScreen);
}
-Bool
+static Bool
r128FinishInitScreen (ScreenPtr pScreen)
{
Bool ret;
@@ -112,11 +111,9 @@
return ret;
}
-void
+static void
r128Preserve (KdCardInfo *card)
{
- R128CardInfo *r128c = card->driver;
-
vesaPreserve (card);
}
@@ -164,7 +161,15 @@
r128UnmapReg (card, r128c);
}
-Bool
+
+static Bool
+r128DPMS (ScreenPtr pScreen, int mode)
+{
+ /* XXX */
+ return TRUE;
+}
+
+static Bool
r128Enable (ScreenPtr pScreen)
{
KdScreenPriv (pScreen);
@@ -179,7 +184,7 @@
return TRUE;
}
-void
+static void
r128Disable (ScreenPtr pScreen)
{
KdScreenPriv (pScreen);
@@ -189,14 +194,7 @@
vesaDisable (pScreen);
}
-Bool
-r128DPMS (ScreenPtr pScreen, int mode)
-{
- /* XXX */
- return TRUE;
-}
-
-void
+static void
r128Restore (KdCardInfo *card)
{
R128CardInfo *r128c = card->driver;
@@ -205,7 +203,7 @@
vesaRestore (card);
}
-void
+static void
r128ScreenFini (KdScreenInfo *screen)
{
R128ScreenInfo *r128s = (R128ScreenInfo *) screen->driver;
@@ -215,7 +213,7 @@
screen->driver = 0;
}
-void
+static void
r128CardFini (KdCardInfo *card)
{
R128CardInfo *r128c = (R128CardInfo *)card->driver;
@@ -228,6 +226,8 @@
r128CardInit, /* cardinit */
r128ScreenInit, /* scrinit */
r128InitScreen, /* initScreen */
+ r128FinishInitScreen, /* finishInitScreen */
+ vesaCreateResources,/* createRes */
r128Preserve, /* preserve */
r128Enable, /* enable */
r128DPMS, /* dpms */
@@ -250,7 +250,5 @@
vesaGetColors, /* getColors */
vesaPutColors, /* putColors */
-
- r128FinishInitScreen, /* finishInitScreen */
};
Index: r128.h
===================================================================
RCS file: /cvs/xserver/xserver/hw/kdrive/r128/r128.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- r128.h 11 Oct 2003 19:36:13 -0000 1.1
+++ r128.h 2 Nov 2003 19:56:10 -0000 1.2
@@ -45,6 +45,10 @@
#define R128_REG_PC_NGUI_CTLSTAT 0x0184
#define R128_REG_DST_HEIGHT_WIDTH 0x143c
#define R128_REG_SRC_Y_X 0x1434
+#define R128_DEFAULT_SC_BOTTOM_RIGHT 0x16e8
+#define R128_AUX_SC_CNTL 0x1660
+#define R128_SC_TOP_LEFT 0x16ec
+#define R128_SC_BOTTOM_RIGHT 0x16f0
#define R128_GMC_DST_DATATYPE_SHIFT 8
#define R128_GMC_CLR_CMP_CNTL_DIS (1 << 28)
@@ -57,6 +61,8 @@
#define R128_GUI_ACTIVE (1 << 31)
#define R128_PC_BUSY (1 << 31)
#define R128_DP_SRC_SOURCE_MEMORY (2 << 24)
+#define R128_DEFAULT_SC_RIGHT_MAX (0x1fff << 0)
+#define R128_DEFAULT_SC_BOTTOM_MAX (0x1fff << 16)
typedef volatile CARD8 VOL8;
typedef volatile CARD16 VOL16;
Index: r128draw.c
===================================================================
RCS file: /cvs/xserver/xserver/hw/kdrive/r128/r128draw.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- r128draw.c 13 Oct 2003 00:19:58 -0000 1.2
+++ r128draw.c 2 Nov 2003 19:56:10 -0000 1.3
@@ -69,11 +69,9 @@
int fifo_size;
char *mmio;
-void
+static void
r128WaitAvail (int n)
{
- int i;
-
if (fifo_size < n)
{
while ((fifo_size = R128_IN32 (mmio, R128_REG_GUI_STAT) & 0xfff) < n)
@@ -83,7 +81,7 @@
fifo_size -= n;
}
-void
+static void
r128WaitIdle (void)
{
int tries;
@@ -127,15 +125,24 @@
R128_OUT32 (mmio, R128_REG_DEFAULT_OFFSET, 0);
R128_OUT32 (mmio, R128_REG_DEFAULT_PITCH, r128s->pitch);
+ r128WaitAvail (4);
+ R128_OUT32 (mmio, R128_AUX_SC_CNTL, 0);
+ R128_OUT32 (mmio, R128_DEFAULT_SC_BOTTOM_RIGHT, (R128_DEFAULT_SC_RIGHT_MAX
+ | R128_DEFAULT_SC_BOTTOM_MAX));
+ R128_OUT32 (mmio, R128_SC_TOP_LEFT, 0);
+ R128_OUT32 (mmio, R128_SC_BOTTOM_RIGHT, (R128_DEFAULT_SC_RIGHT_MAX
+ | R128_DEFAULT_SC_BOTTOM_MAX));
+ r128WaitAvail (wait);
+ return TRUE;
}
-Bool
-r128PrepareSolid (DrawablePtr pDrawable, int alu, Pixel pm, Pixel fg)
+static Bool
+r128PrepareSolid (PixmapPtr pPixmap, int alu, Pixel pm, Pixel fg)
{
- KdScreenPriv (pDrawable->pScreen);
+ KdScreenPriv (pPixmap->drawable.pScreen);
r128ScreenInfo (pScreenPriv);
- r128Setup (pDrawable->pScreen, 4);
+ r128Setup (pPixmap->drawable.pScreen, 4);
R128_OUT32 (mmio, R128_REG_DP_GUI_MASTER_CNTL, r128s->dp_gui_master_cntl
| R128_GMC_BRUSH_SOLID_COLOR
| R128_GMC_SRC_DATATYPE_COLOR
@@ -148,7 +155,7 @@
return TRUE;
}
-void
+static void
r128Solid (int x1, int y1, int x2, int y2)
{
r128WaitAvail (2);
@@ -157,21 +164,21 @@
}
-void
+static void
r128DoneSolid (void)
{
}
-Bool
-r128PrepareCopy (DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, int dx, int dy, int alu, Pixel pm)
+static Bool
+r128PrepareCopy (PixmapPtr pSrc, PixmapPtr pDst, int dx, int dy, int alu, Pixel pm)
{
- KdScreenPriv (pSrcDrawable->pScreen);
+ KdScreenPriv (pSrc->drawable.pScreen);
r128ScreenInfo (pScreenPriv);
copydx = dx;
copydy = dy;
- r128Setup (pSrcDrawable->pScreen, 3);
+ r128Setup (pSrc->drawable.pScreen, 3);
R128_OUT32 (mmio, R128_REG_DP_GUI_MASTER_CNTL, r128s->dp_gui_master_cntl
| R128_GMC_BRUSH_SOLID_COLOR
| R128_GMC_SRC_DATATYPE_COLOR
@@ -186,7 +193,7 @@
return TRUE;
}
-void
+static void
r128Copy (int srcX, int srcY, int dstX, int dstY, int w, int h)
{
if (copydx < 0)
@@ -207,7 +214,7 @@
R128_OUT32 (mmio, R128_REG_DST_HEIGHT_WIDTH, (h << 16) | w);
}
-void
+static void
r128DoneCopy (void)
{
}
@@ -225,8 +232,6 @@
Bool
r128DrawInit (ScreenPtr pScreen)
{
- KdScreenPriv(pScreen);
-
if (!kaaDrawInit (pScreen, &r128Kaa))
return FALSE;
Index: r128stub.c
===================================================================
RCS file: /cvs/xserver/xserver/hw/kdrive/r128/r128stub.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- r128stub.c 11 Oct 2003 19:36:13 -0000 1.1
+++ r128stub.c 2 Nov 2003 19:56:10 -0000 1.2
@@ -26,6 +26,7 @@
#include <config.h>
#endif
#include "r128.h"
+#include "klinux.h"
void
InitCard (char *name)
@@ -34,6 +35,8 @@
if (LinuxFindPci (0x1002, 0x4c46, 0, &attr))
KdCardInfoAdd (&r128Funcs, &attr, 0);
+ else if (LinuxFindPci (0x1002, 0x5046, 0, &attr))
+ KdCardInfoAdd (&r128Funcs, &attr, 0);
}
void
- Previous message: [xserver-commit] xserver/hw/kdrive/nvidia Makefile.am,1.2,1.3 nvidia.c,1.1,1.2 nvidia.h,1.1,1.2 nvidiadraw.c,1.2,1.3
- Next message: [xserver-commit] xserver/hw/kdrive/smi Makefile.am,1.4,1.5 smi.c,1.6,1.7 smi.h,1.5,1.6 smidraw.c,1.6,1.7 smistub.c,1.4,1.5
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]