summaryrefslogtreecommitdiff
path: root/xc/programs/Xserver/hw/xfree86/drivers/neomagic/neo_2200.c
diff options
context:
space:
mode:
Diffstat (limited to 'xc/programs/Xserver/hw/xfree86/drivers/neomagic/neo_2200.c')
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/neomagic/neo_2200.c308
1 files changed, 251 insertions, 57 deletions
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/neomagic/neo_2200.c b/xc/programs/Xserver/hw/xfree86/drivers/neomagic/neo_2200.c
index 9df558dc1..fc8e64bb8 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/neomagic/neo_2200.c
+++ b/xc/programs/Xserver/hw/xfree86/drivers/neomagic/neo_2200.c
@@ -1,4 +1,4 @@
-/**********************************************************************
+/********************************************************************
Copyright 1998, 1999 by Precision Insight, Inc., Cedar Park, Texas.
All Rights Reserved
@@ -22,14 +22,13 @@ RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
**********************************************************************/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/neomagic/neo_2200.c,v 1.2 1999/06/27 14:08:09 dawes Exp $ */
-
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/neomagic/neo_2200.c,v 1.18 2002/10/08 22:14:10 tsi Exp $ */
/*
* The original Precision Insight driver for
* XFree86 v.3.3 has been sponsored by Red Hat.
*
* Authors:
- * Jens Owen (jens@precisioninsight.com)
+ * Jens Owen (jens@tungstengraphics.com)
* Kevin E. Martin (kevin@precisioninsight.com)
*
* Port to Xfree86 v.4.0
@@ -55,23 +54,31 @@ static void Neo2200SetupForScreenToScreenCopy(ScrnInfoPtr pScrn, int xdir,
int ydir, int rop,
unsigned int planemask,
int trans_color);
+#ifdef NOT_BROKEN
static void Neo2200SubsequentScreenToScreenCopy(ScrnInfoPtr pScrn, int srcX,
int srcY, int dstX, int dstY,
int w, int h);
+#else
+static void Neo2200SubsequentScreenToScreenCopyBroken(ScrnInfoPtr pScrn, int srcX,
+ int srcY, int dstX, int dstY,
+ int w, int h);
+#endif
static void Neo2200SetupForSolidFillRect(ScrnInfoPtr pScrn, int color, int rop,
unsigned int planemask);
static void Neo2200SubsequentSolidFillRect(ScrnInfoPtr pScrn, int x, int y,
int w, int h);
-#ifdef colorexpandfill
-static void Neo2200SetupForCPUToScreenColorExpandFill(ScrnInfoPtr pScrn,
+static void Neo2200SetupForScanlineCPUToScreenColorExpandFill(
+ ScrnInfoPtr pScrn,
int fg, int bg,
int rop,
unsigned int planemask);
-static void Neo2200SubsequentCPUToScreenColorExpandFill(ScrnInfoPtr pScrn,
+static void Neo2200SubsequentScanlineCPUToScreenColorExpandFill(
+ ScrnInfoPtr pScrn,
int x, int y,
int w, int h,
int skipleft);
-#endif
+static void Neo2200SubsequentColorExpandScanline(ScrnInfoPtr pScrn, int bufno);
+#if 0
static void Neo2200SetupForMono8x8PatternFill(ScrnInfoPtr pScrn,
int patternx,
int patterny,
@@ -84,7 +91,7 @@ static void Neo2200SubsequentMono8x8PatternFill(ScrnInfoPtr pScrn,
int patterny,
int x, int y,
int w, int h);
-
+#endif
static unsigned int neo2200Rop[16] = {
@@ -114,7 +121,6 @@ Neo2200AccelInit(ScreenPtr pScreen)
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
NEOPtr nPtr = NEOPTR(pScrn);
NEOACLPtr nAcl = NEOACLPTR(pScrn);
- BoxRec AvailFBArea;
nPtr->AccelInfoRec = infoPtr = XAACreateInfoRec();
if(!infoPtr) return FALSE;
@@ -122,8 +128,8 @@ Neo2200AccelInit(ScreenPtr pScreen)
/*
* Set up the main acceleration flags.
*/
- infoPtr->Flags |= LINEAR_FRAMEBUFFER | OFFSCREEN_PIXMAPS;
- if(nAcl->cacheEnd > nAcl->cacheStart) infoPtr->Flags = PIXMAP_CACHE;
+ infoPtr->Flags = LINEAR_FRAMEBUFFER | OFFSCREEN_PIXMAPS;
+ if(nAcl->cacheEnd > nAcl->cacheStart) infoPtr->Flags |= PIXMAP_CACHE;
#if 0
infoPtr->PixmapCacheFlags |= DO_NOT_BLIT_STIPPLES;
#endif
@@ -134,8 +140,12 @@ Neo2200AccelInit(ScreenPtr pScreen)
infoPtr->ScreenToScreenCopyFlags = (NO_TRANSPARENCY | NO_PLANEMASK);
infoPtr->SetupForScreenToScreenCopy =
Neo2200SetupForScreenToScreenCopy;
- infoPtr->SubsequentScreenToScreenCopy =
- Neo2200SubsequentScreenToScreenCopy;
+ infoPtr->SubsequentScreenToScreenCopy
+#ifdef NOT_BROKEN
+ = Neo2200SubsequentScreenToScreenCopy;
+#else
+ = Neo2200SubsequentScreenToScreenCopyBroken;
+#endif
/* solid filled rectangles */
infoPtr->SolidFillFlags = NO_PLANEMASK;
@@ -144,28 +154,37 @@ Neo2200AccelInit(ScreenPtr pScreen)
infoPtr->SubsequentSolidFillRect =
Neo2200SubsequentSolidFillRect;
-#ifdef colorexpandfill
- /* We need byte scanline padding before we can use this
- * or does anyone know how to switch the chip to dword
- * padding? if we could do right edge clipping this would
- * help also. Left edge clipping cannot be used since it
- * allows only clipping of up to 8 pixels :-((
- */ /*§§§*/
-
/* cpu to screen color expansion */
- infoPtr->CPUToScreenColorExpandFillFlags = ( NO_PLANEMASK |
- /* SCANLINE_PAD_BYTE | */
- CPU_TRANSFER_PAD_DWORD |
- BIT_ORDER_IN_BYTE_MSBFIRST );
- infoPtr->ColorExpandBase =
- (unsigned char *)(nPtr->NeoMMIOBase + 0x100000);
- infoPtr->ColorExpandRange = 0x100000;
-
- infoPtr->SetupForCPUToScreenColorExpandFill =
- Neo2200SetupForCPUToScreenColorExpandFill;
- infoPtr->SubsequentCPUToScreenColorExpandFill =
- Neo2200SubsequentCPUToScreenColorExpandFill;
+ /*
+ * We do CPUToScreenColorExpand (ab)using the Scanline functions:
+ * the neo chipsets need byte padding however we can only do dword
+ * padding. Fortunately the graphics engine doesn't choke if we
+ * transfer up to 3 bytes more than it wants.
+ */
+
+ if (!nPtr->strangeLockups) {
+
+ infoPtr->ScanlineCPUToScreenColorExpandFillFlags = ( NO_PLANEMASK |
+#ifdef NEO_DO_CLIPPING
+ LEFT_EDGE_CLIPPING |
#endif
+ SCANLINE_PAD_DWORD |
+ CPU_TRANSFER_PAD_DWORD |
+ BIT_ORDER_IN_BYTE_MSBFIRST );
+ infoPtr->ScanlineColorExpandBuffers =
+ (unsigned char **)xnfalloc(sizeof(char*));
+ infoPtr->ScanlineColorExpandBuffers[0] =
+ (unsigned char *)(nPtr->NeoMMIOBase + 0x100000);
+ infoPtr->NumScanlineColorExpandBuffers = 1;
+ infoPtr->SetupForScanlineCPUToScreenColorExpandFill =
+ Neo2200SetupForScanlineCPUToScreenColorExpandFill;
+ infoPtr->SubsequentScanlineCPUToScreenColorExpandFill =
+ Neo2200SubsequentScanlineCPUToScreenColorExpandFill;
+ infoPtr->SubsequentColorExpandScanline =
+ Neo2200SubsequentColorExpandScanline;
+ }
+
+#if 0
/* 8x8 pattern fills */
infoPtr->Mono8x8PatternFillFlags = NO_PLANEMASK
| HARDWARE_PATTERN_PROGRAMMED_ORIGIN
@@ -175,13 +194,13 @@ Neo2200AccelInit(ScreenPtr pScreen)
Neo2200SetupForMono8x8PatternFill;
infoPtr->SubsequentMono8x8PatternFillRect =
Neo2200SubsequentMono8x8PatternFill;
+#endif
/*
* Setup some global variables
*/
- nAcl->Pitch = pScrn->displayWidth * nAcl->PixelWidth;
- /* Initialize for 8bpp or 15/16bpp support accellerated */
+ /* Initialize for 8bpp or 15/16bpp support accelerated */
switch (pScrn->bitsPerPixel) {
case 8:
nAcl->BltModeFlags = NEO_MODE1_DEPTH8;
@@ -193,9 +212,18 @@ Neo2200AccelInit(ScreenPtr pScreen)
nAcl->PixelWidth = 2;
break;
case 24:
+ if (nPtr->noAccelSet || nPtr->NeoChipset == NM2230
+ || nPtr->NeoChipset == NM2360
+ || nPtr->NeoChipset == NM2380) {
+ nAcl->BltModeFlags = NEO_MODE1_DEPTH24;
+ nAcl->PixelWidth = 3;
+ } else
+ return FALSE;
+ break;
default:
return FALSE;
}
+ nAcl->Pitch = pScrn->displayWidth * nAcl->PixelWidth;
/* Initialize for widths */
switch (pScrn->displayWidth) {
@@ -224,15 +252,8 @@ Neo2200AccelInit(ScreenPtr pScreen)
return FALSE;
}
- AvailFBArea.x1 = 0;
- AvailFBArea.y1 = 0;
- AvailFBArea.x2 = pScrn->displayWidth;
- AvailFBArea.y2 = nAcl->cacheEnd /
- (pScrn->displayWidth * (pScrn->bitsPerPixel >> 3));
- xf86InitFBManager(pScreen, &AvailFBArea);
return(XAAInit(pScreen, infoPtr));
-
}
static void
@@ -253,15 +274,16 @@ Neo2200SetupForScreenToScreenCopy(ScrnInfoPtr pScrn, int xdir, int ydir,
NEOACLPtr nAcl = NEOACLPTR(pScrn);
nAcl->tmpBltCntlFlags = (NEO_BC3_SKIP_MAPPING | neo2200Rop[rop]);
-
/* set blt control */
WAIT_ENGINE_IDLE();
- OUTREG16(NEOREG_BLTMODE, nAcl->BltModeFlags);
+ /*OUTREG16(NEOREG_BLTMODE, nAcl->BltModeFlags);*/
+ OUTREG(NEOREG_BLTSTAT, nAcl->BltModeFlags << 16);
OUTREG(NEOREG_BLTCNTL, nAcl->tmpBltCntlFlags);
OUTREG(NEOREG_PITCH, (nAcl->Pitch<<16)
| (nAcl->Pitch & 0xffff));
}
+#ifdef NOT_BROKEN
static void
Neo2200SubsequentScreenToScreenCopy(ScrnInfoPtr pScrn,
int srcX, int srcY,
@@ -274,7 +296,9 @@ Neo2200SubsequentScreenToScreenCopy(ScrnInfoPtr pScrn,
if ((dstY < srcY) || ((dstY == srcY) && (dstX < srcX))) {
/* start with upper left corner */
WAIT_ENGINE_IDLE();
+#if 0
OUTREG(NEOREG_BLTCNTL, nAcl->tmpBltCntlFlags);
+#endif
OUTREG(NEOREG_SRCSTARTOFF,
(srcY * nAcl->Pitch) + (srcX * nAcl->PixelWidth));
OUTREG(NEOREG_DSTSTARTOFF,
@@ -284,10 +308,12 @@ Neo2200SubsequentScreenToScreenCopy(ScrnInfoPtr pScrn,
else {
/* start with lower right corner */
WAIT_ENGINE_IDLE();
+#if 0
OUTREG(NEOREG_BLTCNTL, (nAcl->tmpBltCntlFlags
| NEO_BC0_X_DEC
| NEO_BC0_DST_Y_DEC
| NEO_BC0_SRC_Y_DEC));
+#endif
OUTREG(NEOREG_SRCSTARTOFF,
((srcY+h-1) * nAcl->Pitch) + ((srcX+w-1)
* nAcl->PixelWidth));
@@ -298,6 +324,123 @@ Neo2200SubsequentScreenToScreenCopy(ScrnInfoPtr pScrn,
}
}
+#else /* NOT_BROKEN */
+
+static void
+Neo2200SubsequentScreenToScreenCopyBroken(ScrnInfoPtr pScrn,
+ int srcX, int srcY,
+ int dstX, int dstY,
+ int w, int h)
+{
+ NEOPtr nPtr = NEOPTR(pScrn);
+ NEOACLPtr nAcl = NEOACLPTR(pScrn);
+
+ if ((dstY < srcY) || ((dstY == srcY) && (dstX < srcX))) {
+ if ((((dstX < 64) && ((srcX + w + 64) >= pScrn->displayWidth)) ||
+ ((dstX == 0) && (w > (pScrn->displayWidth - 64)))) && (w > 64)) {
+
+#define COPY_64 \
+ OUTREG(NEOREG_SRCSTARTOFF,\
+ (srcY * nAcl->Pitch) + (srcX * nAcl->PixelWidth));\
+ OUTREG(NEOREG_DSTSTARTOFF,\
+ (dstY * nAcl->Pitch) + (dstX * nAcl->PixelWidth));\
+ OUTREG(NEOREG_XYEXT, (h<<16) | (64));
+#define COPY_W \
+ OUTREG(NEOREG_SRCSTARTOFF,\
+ (srcY * nAcl->Pitch) + (srcX1 * nAcl->PixelWidth));\
+ OUTREG(NEOREG_DSTSTARTOFF,\
+ (dstY * nAcl->Pitch) + (dstX1 * nAcl->PixelWidth));\
+ OUTREG(NEOREG_XYEXT, (h<<16) | (w & 0xffff));
+
+ int srcX1 = srcX + 64;
+ int dstX1 = dstX + 64;
+ w -= 64;
+ /* start with upper left corner */
+ WAIT_ENGINE_IDLE();
+ OUTREG(NEOREG_BLTCNTL, nAcl->tmpBltCntlFlags);
+ if (srcX < dstX) {
+ COPY_W;
+ WAIT_ENGINE_IDLE();
+ COPY_64;
+ } else {
+ COPY_64;
+ WAIT_ENGINE_IDLE();
+ COPY_W;
+ }
+#undef COPY_W
+#undef COPY_64
+ } else {
+ /* start with upper left corner */
+ WAIT_ENGINE_IDLE();
+ OUTREG(NEOREG_BLTCNTL, nAcl->tmpBltCntlFlags);
+ OUTREG(NEOREG_SRCSTARTOFF,
+ (srcY * nAcl->Pitch) + (srcX * nAcl->PixelWidth));
+ OUTREG(NEOREG_DSTSTARTOFF,
+ (dstY * nAcl->Pitch) + (dstX * nAcl->PixelWidth));
+ OUTREG(NEOREG_XYEXT, (h<<16) | (w & 0xffff));
+ }
+ } else {
+ if (((((dstX + w) > (pScrn->displayWidth - 64)) && (srcX == 0))
+ || (((dstX + w + 64) >= pScrn->displayWidth)
+ && (w > (pScrn->displayWidth - 64)))) && (w > 64)) {
+#define COPY_64 \
+ OUTREG(NEOREG_SRCSTARTOFF, \
+ ((srcY+h-1) * nAcl->Pitch) + ((srcX1+64-1) \
+ * nAcl->PixelWidth)); \
+ OUTREG(NEOREG_DSTSTARTOFF, \
+ ((dstY+h-1) * nAcl->Pitch) + ((dstX1+64-1) \
+ * nAcl->PixelWidth)); \
+ OUTREG(NEOREG_XYEXT, (h<<16) | (64 & 0xffff));
+#define COPY_W \
+ OUTREG(NEOREG_SRCSTARTOFF, \
+ ((srcY+h-1) * nAcl->Pitch) + ((srcX + w -1) \
+ * nAcl->PixelWidth)); \
+ OUTREG(NEOREG_DSTSTARTOFF, \
+ ((dstY+h-1) * nAcl->Pitch) + ((dstX + w -1) \
+ * nAcl->PixelWidth)); \
+ OUTREG(NEOREG_XYEXT, (h<<16) | (w & 0xffff));
+
+ int srcX1, dstX1;
+
+ w -= 64;
+ srcX1 = srcX + w;
+ dstX1 = dstX + w;
+ /* start with lower right corner */
+ WAIT_ENGINE_IDLE();
+ OUTREG(NEOREG_BLTCNTL, (nAcl->tmpBltCntlFlags
+ | NEO_BC0_X_DEC
+ | NEO_BC0_DST_Y_DEC
+ | NEO_BC0_SRC_Y_DEC));
+ if (srcX < dstX) {
+ COPY_64;
+ WAIT_ENGINE_IDLE();
+ COPY_W;
+ } else {
+ COPY_W;
+ WAIT_ENGINE_IDLE();
+ COPY_64;
+ }
+#undef COPY_W
+#undef COPY_64
+ } else {
+ /* start with lower right corner */
+ WAIT_ENGINE_IDLE();
+ OUTREG(NEOREG_BLTCNTL, (nAcl->tmpBltCntlFlags
+ | NEO_BC0_X_DEC
+ | NEO_BC0_DST_Y_DEC
+ | NEO_BC0_SRC_Y_DEC));
+ OUTREG(NEOREG_SRCSTARTOFF,
+ ((srcY+h-1) * nAcl->Pitch) + ((srcX+w-1)
+ * nAcl->PixelWidth));
+ OUTREG(NEOREG_DSTSTARTOFF,
+ ((dstY+h-1) * nAcl->Pitch) + ((dstX+w-1)
+ * nAcl->PixelWidth));
+ OUTREG(NEOREG_XYEXT, (h<<16) | (w & 0xffff));
+ }
+ }
+}
+
+#endif /* NOT_BROKEN */
static void
Neo2200SetupForSolidFillRect(ScrnInfoPtr pScrn, int color, int rop,
@@ -309,7 +452,8 @@ Neo2200SetupForSolidFillRect(ScrnInfoPtr pScrn, int color, int rop,
WAIT_ENGINE_IDLE();
/* set blt control */
- OUTREG16(NEOREG_BLTMODE, nAcl->BltModeFlags);
+ /*OUTREG16(NEOREG_BLTMODE, nAcl->BltModeFlags);*/
+ OUTREG(NEOREG_BLTSTAT, nAcl->BltModeFlags << 16);
OUTREG(NEOREG_BLTCNTL, NEO_BC0_SRC_IS_FG |
NEO_BC3_SKIP_MAPPING |
NEO_BC3_DST_XY_ADDR |
@@ -326,14 +470,13 @@ Neo2200SubsequentSolidFillRect(ScrnInfoPtr pScrn, int x, int y, int w, int h)
NEOPtr nPtr = NEOPTR(pScrn);
WAIT_ENGINE_IDLE();
- OUTREG(NEOREG_DSTSTARTOFF, (y<<16) | (x & 0xffff));
+ OUTREG(NEOREG_DSTSTARTOFF, (y <<16) | (x & 0xffff));
OUTREG(NEOREG_XYEXT, (h<<16) | (w & 0xffff));
}
-
-#ifdef colorexpandfill
static void
-Neo2200SetupForCPUToScreenColorExpandFill(ScrnInfoPtr pScrn, int fg, int bg,
+Neo2200SetupForScanlineCPUToScreenColorExpandFill(ScrnInfoPtr pScrn,
+ int fg, int bg,
int rop,
unsigned int planemask)
{
@@ -347,10 +490,14 @@ Neo2200SetupForCPUToScreenColorExpandFill(ScrnInfoPtr pScrn, int fg, int bg,
NEO_BC0_SRC_TRANS |
NEO_BC3_SKIP_MAPPING |
NEO_BC3_DST_XY_ADDR |
- neo2200Rop[rop]);
+#ifdef NEO_DO_CLIPPING
+ NEO_BC3_CLIP_ON |
+#endif
+ neo2200Rop[rop]);
WAIT_ENGINE_IDLE();
- OUTREG16(NEOREG_BLTMODE, nAcl->BltModeFlags);
+ /*OUTREG16(NEOREG_BLTMODE, nAcl->BltModeFlags);*/
+ OUTREG(NEOREG_BLTSTAT, nAcl->BltModeFlags << 16);
OUTREG(NEOREG_BLTCNTL, nAcl->tmpBltCntlFlags);
OUTREG(NEOREG_FGCOLOR, fg);
}
@@ -360,11 +507,14 @@ Neo2200SetupForCPUToScreenColorExpandFill(ScrnInfoPtr pScrn, int fg, int bg,
NEO_BC0_SRC_MONO |
NEO_BC3_SKIP_MAPPING |
NEO_BC3_DST_XY_ADDR |
+#ifdef NEO_DO_CLIPPING
+ NEO_BC3_CLIP_ON |
+#endif
neo2200Rop[rop]);
WAIT_ENGINE_IDLE();
- OUTREG16(NEOREG_BLTMODE, nAcl->BltModeFlags);
- OUTREG(NEOREG_BLTCNTL, nAcl->tmpBltCntlFlags);
+ /*OUTREG16(NEOREG_BLTMODE, nAcl->BltModeFlags);*/
+ OUTREG(NEOREG_BLTSTAT, nAcl->BltModeFlags << 16);
OUTREG(NEOREG_FGCOLOR, fg);
OUTREG(NEOREG_BGCOLOR, bg);
}
@@ -372,7 +522,7 @@ Neo2200SetupForCPUToScreenColorExpandFill(ScrnInfoPtr pScrn, int fg, int bg,
static void
-Neo2200SubsequentCPUToScreenColorExpandFill(ScrnInfoPtr pScrn,
+Neo2200SubsequentScanlineCPUToScreenColorExpandFill(ScrnInfoPtr pScrn,
int x, int y,
int w, int h,
int skipleft)
@@ -380,14 +530,55 @@ Neo2200SubsequentCPUToScreenColorExpandFill(ScrnInfoPtr pScrn,
NEOPtr nPtr = NEOPTR(pScrn);
NEOACLPtr nAcl = NEOACLPTR(pScrn);
+#ifdef NEO_DO_CLIPPING
+ w = (w + 31) & ~31;
+#else
+ nAcl->CPUToScreenColorExpandFill_x = x;
+ nAcl->CPUToScreenColorExpandFill_y = y;
+ nAcl->CPUToScreenColorExpandFill_w = w;
+ nAcl->CPUToScreenColorExpandFill_h = h;
+ nAcl->CPUToScreenColorExpandFill_skipleft = skipleft;
+#endif
OUTREG(NEOREG_BLTCNTL, nAcl->tmpBltCntlFlags
| ((skipleft << 2) & 0x1C));
+ #ifdef NEO_DO_CLIPPING
+ OUTREG(NEOREG_CLIPLT, (y << 16) | (x + skipleft));
+ OUTREG(NEOREG_CLIPRB, ((y + h) << 16) | (x + w));
+#endif
OUTREG(NEOREG_SRCSTARTOFF, 0);
OUTREG(NEOREG_DSTSTARTOFF, (y<<16) | (x & 0xffff));
+#ifdef NEO_DO_CLIPPING
OUTREG(NEOREG_XYEXT, (h<<16) | (w & 0xffff));
+#else
+ OUTREG(NEOREG_XYEXT, (1<<16) | (w & 0xffff));
+#endif
}
+
+static void
+Neo2200SubsequentColorExpandScanline(ScrnInfoPtr pScrn, int bufno)
+{
+ NEOPtr nPtr = NEOPTR(pScrn);
+ NEOACLPtr nAcl = NEOACLPTR(pScrn);
+
+#ifdef NEO_DO_CLIPPING
+ /* Should I be waiting for fifo slots to prevent retries ?
+ How do I do that on this engine ? */
+#else
+ if (!(--nAcl->CPUToScreenColorExpandFill_h))
+ return;
+
+ WAIT_ENGINE_IDLE();
+ OUTREG(NEOREG_BLTCNTL, nAcl->tmpBltCntlFlags
+ | ((nAcl->CPUToScreenColorExpandFill_skipleft << 2) & 0x1C));
+ OUTREG(NEOREG_SRCSTARTOFF, 0);
+ OUTREG(NEOREG_DSTSTARTOFF, ((++nAcl->CPUToScreenColorExpandFill_y)<<16)
+ | (nAcl->CPUToScreenColorExpandFill_x & 0xffff));
+ OUTREG(NEOREG_XYEXT, (1<<16)
+ | (nAcl->CPUToScreenColorExpandFill_w & 0xffff));
#endif
+}
+#if 0
static void
Neo2200SetupForMono8x8PatternFill(ScrnInfoPtr pScrn,
int patternx,
@@ -408,7 +599,8 @@ Neo2200SetupForMono8x8PatternFill(ScrnInfoPtr pScrn,
neo2200Rop[rop]);
WAIT_ENGINE_IDLE();
- OUTREG16(NEOREG_BLTMODE, nAcl->BltModeFlags);
+ /*OUTREG16(NEOREG_BLTMODE, nAcl->BltModeFlags);*/
+ OUTREG(NEOREG_BLTSTAT, nAcl->BltModeFlags << 16);
OUTREG(NEOREG_FGCOLOR, fg);
OUTREG(NEOREG_SRCSTARTOFF,
(patterny * pScrn->displayWidth * pScrn->bitsPerPixel
@@ -423,7 +615,8 @@ Neo2200SetupForMono8x8PatternFill(ScrnInfoPtr pScrn,
neo2200Rop[rop]);
WAIT_ENGINE_IDLE();
- OUTREG16(NEOREG_BLTMODE, nAcl->BltModeFlags);
+ /*OUTREG16(NEOREG_BLTMODE, nAcl->BltModeFlags);*/
+ OUTREG(NEOREG_BLTSTAT, nAcl->BltModeFlags << 16);
OUTREG(NEOREG_FGCOLOR, fg);
OUTREG(NEOREG_BGCOLOR, bg);
OUTREG(NEOREG_SRCSTARTOFF,
@@ -453,3 +646,4 @@ Neo2200SubsequentMono8x8PatternFill(ScrnInfoPtr pScrn,
OUTREG(NEOREG_DSTSTARTOFF, (y<<16) | (x & 0xffff));
OUTREG(NEOREG_XYEXT, (h<<16) | (w & 0xffff));
}
+#endif