summaryrefslogtreecommitdiff
path: root/xc/programs
diff options
context:
space:
mode:
authoreswu <empty>1992-01-27 18:01:20 +0000
committereswu <empty>1992-01-27 18:01:20 +0000
commit04fc1fd991ee31a61264d0b6bf2f3dbd8842dcb4 (patch)
tree278e02d0da9723c9f9b87674c1a58ec43eb3a3f3 /xc/programs
parente8b64009dc3cc01f20033cd009452d99da3eea48 (diff)
Get VRAM Base from global variable intead of constant (fixes multihead).perf
Change so PZ=8 (Keith's new cfb code define, instead of PW=4)
Diffstat (limited to 'xc/programs')
-rw-r--r--xc/programs/Xserver/hw/ibm/skyway/Imakefile4
-rw-r--r--xc/programs/Xserver/hw/ibm/skyway/skyFill.c4
-rw-r--r--xc/programs/Xserver/hw/ibm/skyway/skyFillRct.c8
-rw-r--r--xc/programs/Xserver/hw/ibm/skyway/skyHdwr.h21
-rw-r--r--xc/programs/Xserver/hw/ibm/skyway/skyReg.h4
-rw-r--r--xc/programs/Xserver/hw/ibm/skyway/skySGC.c62
-rw-r--r--xc/programs/Xserver/hw/ibm/skyway/skyScrInit.c5
7 files changed, 54 insertions, 54 deletions
diff --git a/xc/programs/Xserver/hw/ibm/skyway/Imakefile b/xc/programs/Xserver/hw/ibm/skyway/Imakefile
index b37e7a89a..4faa32f5e 100644
--- a/xc/programs/Xserver/hw/ibm/skyway/Imakefile
+++ b/xc/programs/Xserver/hw/ibm/skyway/Imakefile
@@ -1,4 +1,4 @@
-XCOMM $XConsortium: Imakefile,v 1.5 91/11/08 18:08:34 eswu Exp $
+XCOMM $XConsortium: Imakefile,v 1.6 91/12/11 21:22:22 eswu Exp $
#include <Server.tmpl>
@@ -31,7 +31,7 @@ OBJS = skyInfo.o \
copyword.o
INCLUDES = -I../ -I../OPERATING_SYSTEM -I../../mfb -I../../cfb -I../ppc -I../../../include -I$(INCLUDESRC) -I../common -I../../mi -I../../../../fonts/include
-STD_DEFINES = ServerDefines
+STD_DEFINES = ServerDefines -DPSZ=8
NormalRelocatableTarget(skyway,$(OBJS))
diff --git a/xc/programs/Xserver/hw/ibm/skyway/skyFill.c b/xc/programs/Xserver/hw/ibm/skyway/skyFill.c
index 593b6aa11..5405df30e 100644
--- a/xc/programs/Xserver/hw/ibm/skyway/skyFill.c
+++ b/xc/programs/Xserver/hw/ibm/skyway/skyFill.c
@@ -1,5 +1,5 @@
/*
- * $XConsortium: $
+ * $XConsortium: skyFill.c,v 1.2 91/12/11 21:40:47 eswu Exp $
*
* Copyright IBM Corporation 1991
*
@@ -137,7 +137,7 @@ skyFindTileStip(scrnNum, tileStipID, size, base)
if (! foundSlot)
entry = HashEntry(tileStipID); /* Use first entry searched */
- *base = SC_INVIS_VRAM_BASE + entry*SKY_MAX_TILESTIP_SIZE;
+ *base = SKY_INVIS_VRAM_BASE(scrnNum) + entry*SKY_MAX_TILESTIP_SIZE;
TRACE(("\tentry=%d, base=0x%x, install=%d\n",
entry, base, id==tileStipID && id != 0));
diff --git a/xc/programs/Xserver/hw/ibm/skyway/skyFillRct.c b/xc/programs/Xserver/hw/ibm/skyway/skyFillRct.c
index 3d6e38a1e..f50039864 100644
--- a/xc/programs/Xserver/hw/ibm/skyway/skyFillRct.c
+++ b/xc/programs/Xserver/hw/ibm/skyway/skyFillRct.c
@@ -1,5 +1,5 @@
/*
- * $XConsortium: $
+ * $XConsortium: skyFillRct.c,v 1.2 91/12/11 21:40:49 eswu Exp $
*
* Copyright IBM Corporation 1987,1988,1989,1990,1991
*
@@ -63,7 +63,7 @@ purpose. It is provided "as is" without express or implied warranty.
/* ------ */
-#if PPW == 4
+#if PSZ == 8
extern void cfb8FillRectOpaqueStippled32();
extern void cfb8FillRectTransparentStippled32();
extern void cfb8FillRectStippledUnnatural();
@@ -171,7 +171,7 @@ skyPolyFillRect(pDrawable, pGC, nrectFill, prectInit)
BoxFill = cfbFillRectTile32General;
}
break;
-#if (PPW == 4)
+#if (PSZ == 8)
case FillStippled:
if (!((cfbPrivGCPtr) pGC->devPrivates[cfbGCPrivateIndex].ptr)->
pRotatedPixmap)
@@ -480,7 +480,7 @@ skyPolyFillRectSolid_1Rect(pDrawable, pGC, nrect, prect)
/* Set boundary rectangle */
SKYSetMaskXY(scrnNum, pClipBox->x1, pClipBox->y1);
- SKYSetPixmap(scrnNum, MaskMap, SC_INVIS_VRAM_BASE,
+ SKYSetPixmap(scrnNum, MaskMap, SKY_INVIS_VRAM_BASE(scrnNum),
pClipBox->x2 - pClipBox->x1,
pClipBox->y2 - pClipBox->y1,
PixSize1);
diff --git a/xc/programs/Xserver/hw/ibm/skyway/skyHdwr.h b/xc/programs/Xserver/hw/ibm/skyway/skyHdwr.h
index 40bcddf43..330043f73 100644
--- a/xc/programs/Xserver/hw/ibm/skyway/skyHdwr.h
+++ b/xc/programs/Xserver/hw/ibm/skyway/skyHdwr.h
@@ -1,5 +1,5 @@
/*
- * $XConsortium: skyHdwr.h,v 1.3 91/07/16 13:17:42 jap Exp $
+ * $XConsortium: skyHdwr.h,v 1.4 91/12/11 21:25:05 eswu Exp $
*
* Copyright IBM Corporation 1987,1988,1989,1990,1991
*
@@ -71,6 +71,8 @@ typedef volatile struct _skyIOReg
*****************************************************************************/
extern ulong SKY_SEGMENT[]; /* Skyway segment address */
+extern ulong SKY_VRAM_BASE[]; /* Offset of VRAM area from */
+ /* segment address */
extern ulong SKY_VRAM_START[]; /* Start of VRAM area */
extern ulong SKY_DMA0[]; /* DMA address 0 */
extern ulong SKY_DMA1[]; /* DMA address 1 */
@@ -144,22 +146,17 @@ extern ulong SKY_TILESTIPID_CTR[]; /* TileStip ID counter */
#define SKY_WIDTH 1280
#define SKY_HEIGHT 1024
-#define SKY_INVISO_SIZE (SC_VRAM_END - SC_INVIS_VRAM_BASE + 1)
+#define SKY_INVISO_SIZE (SC_VRAM_END_OFF - SC_INVIS_VRAM_OFF + 1)
#define SKY_TILESTIP_AREAS 0x8
#define SKY_MAX_TILESTIP_SIZE (SKY_INVISO_SIZE/SKY_TILESTIP_AREAS)
-/* skycolor */
+#define SKY_INVIS_VRAM_BASE(scrnNum) \
+ (SKY_VRAM_BASE[scrnNum] + SC_INVIS_VRAM_OFF)
-#define SC_VRAM_BASE 0x400000 /* Start of screen VRAM */
-#define SC_INVIS_VRAM_BASE 0x540000 /* Start of off-screen VRAM */
-#define SC_VRAM_END 0x5fffff /* Last byte of VRAM */
+/* skycolor-- offsets from SKY_VRAM_BASE[scrnNum] or SKY_VRAM_START[scrnNum] */
-
-/* skymono */
-
-#define SM_VRAM_BASE 0x400000 /* Start of screen VRAM */
-#define SM_INVIS_VRAM_BASE 0x4A0000 /* Start of off-screen VRAM */
-#define SM_VRAM_END 0x4fffff /* Last byte of VRAM */
+#define SC_INVIS_VRAM_OFF 0x140000 /* Start of off-screen VRAM */
+#define SC_VRAM_END_OFF 0x1fffff /* Last byte of VRAM */
/* CRTC REGISTERS */
diff --git a/xc/programs/Xserver/hw/ibm/skyway/skyReg.h b/xc/programs/Xserver/hw/ibm/skyway/skyReg.h
index b02607be0..47919df8e 100644
--- a/xc/programs/Xserver/hw/ibm/skyway/skyReg.h
+++ b/xc/programs/Xserver/hw/ibm/skyway/skyReg.h
@@ -1,5 +1,5 @@
/*
- * $XConsortium: skyReg.h,v 1.2 91/07/16 13:16:14 jap Exp $
+ * $XConsortium: skyReg.h,v 1.3 91/12/11 21:25:42 eswu Exp $
*
* Copyright IBM Corporation 1987,1988,1989,1990,1991
*
@@ -216,7 +216,7 @@ extern skyCopRegRec COPREG_SHADOW[]; /* Coprocessor shadow struct */
PackCoord(x,y), (op))
#define SKYSetupScreenPix(i,pixsize) \
- SKYSetPixmap(i,PixMapC,SC_VRAM_BASE,1280,1024, pixsize)
+ SKYSetPixmap(i,PixMapC,SKY_VRAM_BASE[i],1280,1024, pixsize)
/* Initiates a pixel operation that uses a tile.
diff --git a/xc/programs/Xserver/hw/ibm/skyway/skySGC.c b/xc/programs/Xserver/hw/ibm/skyway/skySGC.c
index db9746499..f28497d54 100644
--- a/xc/programs/Xserver/hw/ibm/skyway/skySGC.c
+++ b/xc/programs/Xserver/hw/ibm/skyway/skySGC.c
@@ -1,5 +1,5 @@
/*
- * $XConsortium: $
+ * $XConsortium: skySGC.c,v 1.6 91/12/11 21:40:54 eswu Exp $
*
* Copyright IBM Corporation 1987,1988,1989,1990,1991
*
@@ -95,7 +95,7 @@ GCOps skyTEOps1Rect_Win = {
skyCopyArea,
cfbCopyPlane,
cfbPolyPoint,
-#if PPW == 4
+#if PSZ == 8
cfb8LineSS1Rect,
cfb8SegmentSS1Rect,
#else
@@ -103,7 +103,7 @@ GCOps skyTEOps1Rect_Win = {
cfbSegmentSS,
#endif
miPolyRectangle,
-#if PPW == 4
+#if PSZ == 8
cfbZeroPolyArcSS8Copy,
#else
miZeroPolyArc,
@@ -115,7 +115,7 @@ GCOps skyTEOps1Rect_Win = {
miPolyText16,
miImageText8,
miImageText16,
-#if PPW == 4
+#if PSZ == 8
cfbTEGlyphBlt8,
cfbPolyGlyphBlt8,
cfbPushPixels8,
@@ -135,7 +135,7 @@ GCOps skyTEOps1Rect = {
skyCopyArea,
cfbCopyPlane,
cfbPolyPoint,
-#if PPW == 4
+#if PSZ == 8
cfb8LineSS1Rect,
cfb8SegmentSS1Rect,
#else
@@ -143,7 +143,7 @@ GCOps skyTEOps1Rect = {
cfbSegmentSS,
#endif
miPolyRectangle,
-#if PPW == 4
+#if PSZ == 8
cfbZeroPolyArcSS8Copy,
#else
miZeroPolyArc,
@@ -155,7 +155,7 @@ GCOps skyTEOps1Rect = {
miPolyText16,
miImageText8,
miImageText16,
-#if PPW == 4
+#if PSZ == 8
cfbTEGlyphBlt8,
cfbPolyGlyphBlt8,
cfbPushPixels8,
@@ -177,7 +177,7 @@ GCOps skyTEOps = {
cfbLineSS,
cfbSegmentSS,
miPolyRectangle,
-#if PPW == 4
+#if PSZ == 8
cfbZeroPolyArcSS8Copy,
#else
miZeroPolyArc,
@@ -189,7 +189,7 @@ GCOps skyTEOps = {
miPolyText16,
miImageText8,
miImageText16,
-#if PPW == 4
+#if PSZ == 8
cfbTEGlyphBlt8,
cfbPolyGlyphBlt8,
cfbPushPixels8,
@@ -209,7 +209,7 @@ GCOps skyNonTEOps1Rect_Win = {
skyCopyArea,
cfbCopyPlane,
cfbPolyPoint,
-#if PPW == 4
+#if PSZ == 8
cfb8LineSS1Rect,
cfb8SegmentSS1Rect,
#else
@@ -217,7 +217,7 @@ GCOps skyNonTEOps1Rect_Win = {
cfbSegmentSS,
#endif
miPolyRectangle,
-#if PPW == 4
+#if PSZ == 8
cfbZeroPolyArcSS8Copy,
#else
miZeroPolyArc,
@@ -243,7 +243,7 @@ GCOps skyNonTEOps1Rect = {
skyCopyArea,
cfbCopyPlane,
cfbPolyPoint,
-#if PPW == 4
+#if PSZ == 8
cfb8LineSS1Rect,
cfb8SegmentSS1Rect,
#else
@@ -251,7 +251,7 @@ GCOps skyNonTEOps1Rect = {
cfbSegmentSS,
#endif
miPolyRectangle,
-#if PPW == 4
+#if PSZ == 8
cfbZeroPolyArcSS8Copy,
#else
miZeroPolyArc,
@@ -279,7 +279,7 @@ GCOps skyNonTEOps = {
cfbLineSS,
cfbSegmentSS,
miPolyRectangle,
-#if PPW == 4
+#if PSZ == 8
cfbZeroPolyArcSS8Copy,
#else
miZeroPolyArc,
@@ -291,7 +291,7 @@ GCOps skyNonTEOps = {
miPolyText16,
miImageText8,
miImageText16,
-#if PPW == 4
+#if PSZ == 8
cfbImageGlyphBlt8,
cfbPolyGlyphBlt8,
cfbPushPixels8,
@@ -323,7 +323,7 @@ skyMatchCommon (pDrawable, pGC, devPriv)
FONTMINBOUNDS(pGC->font,characterWidth) >= 0)
{
if (TERMINALFONT(pGC->font)
-#if PPW == 4
+#if PSZ == 8
&& FONTMAXBOUNDS(pGC->font,characterWidth) >= 4
#endif
)
@@ -465,7 +465,7 @@ skyDestroyOps (ops)
} \
}
-#if PPW == 4
+#if PSZ == 8
/* See if Tile is can be represented as OpaqueStipple. If so, convert tile
* to a packed stipple (no scanline pad). Code borrowed from sunGX.c.
*
@@ -631,7 +631,7 @@ skyCheckDegenerateTile (pPixmap, pGC)
return TRUE;
}
-#endif /* PPW == 4 */
+#endif /* PSZ == 8 */
/* See if tile is not too big. */
@@ -652,7 +652,7 @@ skyCheckTile(pPixmap, pGC)
}
#ifndef NO_DEGEN_TEST
-#if PPW == 4
+#if PSZ == 8
if (skyCheckDegenerateTile(pPixmap, pGC, stipple))
{
pSkyPriv->fillMode = fill_stipple;
@@ -1076,7 +1076,7 @@ skyValidateGC(pGC, changes, pDrawable)
}
}
break;
-#if (PPW == 4)
+#if (PSZ == 8)
case FillStippled:
case FillOpaqueStippled:
{
@@ -1129,7 +1129,7 @@ skyValidateGC(pGC, changes, pDrawable)
new_rrop = FALSE;
else
{
-#if PPW == 4
+#if PSZ == 8
new_line = TRUE;
new_text = TRUE;
#endif
@@ -1176,7 +1176,7 @@ skyValidateGC(pGC, changes, pDrawable)
}
if (pGC->lineWidth == 0)
{
-#if PPW == 4
+#if PSZ == 8
if ((pGC->lineStyle == LineSolid) && (pGC->fillStyle == FillSolid))
{
switch (devPriv->rop)
@@ -1206,7 +1206,7 @@ skyValidateGC(pGC, changes, pDrawable)
{
if (pGC->fillStyle == FillSolid)
{
-#if PPW == 4
+#if PSZ == 8
if (devPriv->oneRect)
{
pGC->ops->Polylines = cfb8LineSS1Rect;
@@ -1247,7 +1247,7 @@ skyValidateGC(pGC, changes, pDrawable)
}
else
{
-#if PPW == 4
+#if PSZ == 8
if (pGC->fillStyle == FillSolid)
{
if (devPriv->rop == GXcopy)
@@ -1261,12 +1261,12 @@ skyValidateGC(pGC, changes, pDrawable)
/* special case ImageGlyphBlt for terminal emulator fonts */
if (TERMINALFONT(pGC->font) &&
(pGC->planemask & PMSK) == PMSK
-#if PPW == 4
+#if PSZ == 8
&& FONTMAXBOUNDS(pGC->font,characterWidth) >= 4
#endif
)
{
-#if PPW == 4
+#if PSZ == 8
pGC->ops->ImageGlyphBlt = cfbTEGlyphBlt8;
#else
pGC->ops->ImageGlyphBlt = cfbTEGlyphBlt;
@@ -1274,7 +1274,7 @@ skyValidateGC(pGC, changes, pDrawable)
}
else
{
-#if PPW == 4
+#if PSZ == 8
if (devPriv->rop == GXcopy &&
pGC->fillStyle == FillSolid &&
(pGC->planemask & PMSK) == PMSK)
@@ -1314,7 +1314,7 @@ skyValidateGC(pGC, changes, pDrawable)
pGC->ops->FillSpans = cfbUnnaturalTileFS;
break;
case FillStippled:
-#if PPW == 4
+#if PSZ == 8
if (devPriv->pRotatedPixmap)
pGC->ops->FillSpans = cfb8Stipple32FS;
else
@@ -1322,7 +1322,7 @@ skyValidateGC(pGC, changes, pDrawable)
pGC->ops->FillSpans = cfbUnnaturalStippleFS;
break;
case FillOpaqueStippled:
-#if PPW == 4
+#if PSZ == 8
if (devPriv->pRotatedPixmap)
pGC->ops->FillSpans = cfb8OpaqueStipple32FS;
else
@@ -1335,7 +1335,7 @@ skyValidateGC(pGC, changes, pDrawable)
} /* end of new_fillspans */
if (new_fillarea) {
-#if PPW != 4
+#if PSZ != 8
pGC->ops->PolyFillRect = miPolyFillRect;
if (pGC->fillStyle == FillSolid || pGC->fillStyle == FillTiled
|| pSkyPriv->fillMode != punt)
@@ -1343,7 +1343,7 @@ skyValidateGC(pGC, changes, pDrawable)
pGC->ops->PolyFillRect = skyPolyFillRect;
}
#endif
-#if PPW == 4
+#if PSZ == 8
pGC->ops->PushPixels = mfbPushPixels;
if (pGC->fillStyle == FillSolid && devPriv->rop == GXcopy)
pGC->ops->PushPixels = cfbPushPixels8;
diff --git a/xc/programs/Xserver/hw/ibm/skyway/skyScrInit.c b/xc/programs/Xserver/hw/ibm/skyway/skyScrInit.c
index e3796d218..097613360 100644
--- a/xc/programs/Xserver/hw/ibm/skyway/skyScrInit.c
+++ b/xc/programs/Xserver/hw/ibm/skyway/skyScrInit.c
@@ -1,5 +1,5 @@
/*
- * $XConsortium: skyScrInit.c,v 1.3 91/10/17 14:43:03 eswu Exp $
+ * $XConsortium: skyScrInit.c,v 1.4 91/12/11 21:25:52 eswu Exp $
*
* Copyright IBM Corporation 1987,1988,1989,1990,1991
*
@@ -61,6 +61,7 @@ unsigned long ddpGCPrivateIndex;
uint skyHandle[MAXSCREENS];
ulong SKY_SEGMENT[MAXSCREENS];
+ulong SKY_VRAM_BASE[MAXSCREENS];
ulong SKY_VRAM_START[MAXSCREENS];
ulong SKY_DMA0[MAXSCREENS];
ulong SKY_DMA1[MAXSCREENS];
@@ -147,6 +148,7 @@ skyScreenInit(scrnNum, pScreen, argc, argv)
segAddr = (ulong) skyHdwrInfo.segment;
SKY_SEGMENT[scrnNum] = segAddr;
+ SKY_VRAM_BASE[scrnNum] = skyRegMap.vr_addr;
SKY_VRAM_START[scrnNum] = segAddr | skyRegMap.vr_addr;
IOREG[scrnNum] = (skyIORegPtr) (segAddr | skyRegMap.io_addr);
COPREG[scrnNum] = (skyCopRegPtr) (segAddr | skyRegMap.cp_addr);
@@ -165,6 +167,7 @@ skyScreenInit(scrnNum, pScreen, argc, argv)
TRACE(("SEGADDR[%d] = %x\n", scrnNum, segAddr));
TRACE(("VRAM_SEGMENT[%d] = %x\n", scrnNum, SKY_SEGMENT[scrnNum]));
+ TRACE(("VRAM_BASE[%d] = %x\n", scrnNum, SKY_VRAM_BASE[scrnNum]));
TRACE(("VRAM_START[%d] = %x\n", scrnNum, SKY_VRAM_START[scrnNum]));
TRACE(("IOREG[%d] = %x\n", scrnNum, IOREG[scrnNum]));
TRACE(("COPREG[%d] = %x\n", scrnNum, COPREG[scrnNum]));