First acceleration function implemented (DrawSolid)
This commit is contained in:
parent
47436a8af8
commit
c231856a13
|
@ -1,6 +1,7 @@
|
||||||
2004-04-10 Franco Catrin L. <fcatrin@tuxpan.com>
|
2004-04-10 Franco Catrin L. <fcatrin@tuxpan.com>
|
||||||
* MMIO enabled after switching to new VT
|
* MMIO enabled after switching to new VT
|
||||||
|
* First acceleration function implemented (DrawSolid)
|
||||||
|
|
||||||
2004-04-06 Franco Catrin L. <fcatrin@tuxpan.com>
|
2004-04-06 Franco Catrin L. <fcatrin@tuxpan.com>
|
||||||
* Returned to a working state. Brent will
|
* Returned to a working state. Brent will
|
||||||
continue working on a backend in a separate CVS branch
|
continue working on a backend in a separate CVS branch
|
||||||
|
|
|
@ -47,12 +47,8 @@ CARD32 fgColor;
|
||||||
static void neoWaitIdle(NeoCardInfo *neoc)
|
static void neoWaitIdle(NeoCardInfo *neoc)
|
||||||
{
|
{
|
||||||
// if MMIO is not working it may halt the machine
|
// if MMIO is not working it may halt the machine
|
||||||
DBGOUT("Waiting for idle...\n");
|
|
||||||
DBGOUT("blStat %lx=%lx\n", &mmio->bltStat, mmio->bltStat);
|
|
||||||
unsigned int i = 0;
|
unsigned int i = 0;
|
||||||
while ((mmio->bltStat & 1) && ++i<100000);
|
while ((mmio->bltStat & 1) && ++i<100000);
|
||||||
if (i>=100000) DBGOUT("Wait Idle timeout\n");
|
|
||||||
else DBGOUT("*** Wait Idle ok\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void neoWaitFifo(NeoCardInfo *neoc, int requested_fifo_space)
|
static void neoWaitFifo(NeoCardInfo *neoc, int requested_fifo_space)
|
||||||
|
@ -71,19 +67,12 @@ static Bool neoPrepareSolid(PixmapPtr pPixmap,
|
||||||
return FALSE;
|
return FALSE;
|
||||||
} else {
|
} else {
|
||||||
fgColor = fg;
|
fgColor = fg;
|
||||||
/* set blt control */
|
|
||||||
/* NEO_BC0_SRC_IS_FG |
|
|
||||||
NEO_BC3_SRC_XY_ADDR |
|
|
||||||
NEO_BC3_DST_XY_ADDR |
|
|
||||||
NEO_BC3_SKIP_MAPPING | 0x0c0000; */
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void neoSolid (int x1, int y1, int x2, int y2)
|
static void neoSolid (int x1, int y1, int x2, int y2)
|
||||||
{
|
{
|
||||||
DBGOUT("Solid (%i, %i) - (%i, %i). \n", x1, y1, x2, y2);
|
|
||||||
int x, y, w, h;
|
int x, y, w, h;
|
||||||
x = x1;
|
x = x1;
|
||||||
y = y1;
|
y = y1;
|
||||||
|
@ -97,12 +86,6 @@ static void neoSolid (int x1, int y1, int x2, int y2)
|
||||||
y = y2;
|
y = y2;
|
||||||
h = -h;
|
h = -h;
|
||||||
}
|
}
|
||||||
|
|
||||||
int pitch = 16;
|
|
||||||
|
|
||||||
neoWaitIdle(card);
|
|
||||||
mmio->bltStat = NEO_MODE1_DEPTH16 << 16;
|
|
||||||
mmio->pitch = (pitch << 16) | (pitch & 0xffff);
|
|
||||||
|
|
||||||
neoWaitIdle(card);
|
neoWaitIdle(card);
|
||||||
mmio->fgColor = fgColor;
|
mmio->fgColor = fgColor;
|
||||||
|
@ -110,11 +93,9 @@ static void neoSolid (int x1, int y1, int x2, int y2)
|
||||||
NEO_BC3_FIFO_EN |
|
NEO_BC3_FIFO_EN |
|
||||||
NEO_BC0_SRC_IS_FG |
|
NEO_BC0_SRC_IS_FG |
|
||||||
NEO_BC3_SKIP_MAPPING | 0x0c0000;
|
NEO_BC3_SKIP_MAPPING | 0x0c0000;
|
||||||
mmio->dstStart = (y <<16) | (x & 0xffff);
|
mmio->dstStart = y * screen->pitch + x * screen->depth;
|
||||||
|
|
||||||
mmio->xyExt = (h << 16) | (w & 0xffff);
|
mmio->xyExt = (unsigned long)(h << 16) | (w & 0xffff);
|
||||||
DBGOUT("Solid (%i, %i) - (%i, %i). Color %li\n", x, y, w, h, fgColor);
|
|
||||||
// DBGOUT("Offset %lx. Extent %lx\n",mmio->dstStart, mmio->xyExt);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -169,10 +150,9 @@ void neoDrawEnable (ScreenPtr pScreen)
|
||||||
screen = neos;
|
screen = neos;
|
||||||
card = neoc;
|
card = neoc;
|
||||||
mmio = neoc->mmio;
|
mmio = neoc->mmio;
|
||||||
DBGOUT("NEO AA MMIO=%p\n", mmio);
|
screen->depth = screen->backendScreen.mode.BitsPerPixel/8;
|
||||||
// screen->depth = screen->vesa.mode.BitsPerPixel/8;
|
screen->pitch = screen->backendScreen.mode.BytesPerScanLine;
|
||||||
// screen->pitch = screen->vesa.mode.BytesPerScanLine;
|
DBGOUT("NEO depth=%x, pitch=%x\n", screen->depth, screen->pitch);
|
||||||
// DBGOUT("NEO depth=%x, pitch=%x\n", screen->depth, screen->pitch);
|
|
||||||
LEAVE();
|
LEAVE();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,6 @@ struct NeoChipInfo neoChips[] = {
|
||||||
static Bool
|
static Bool
|
||||||
neoCardInit(KdCardInfo *card)
|
neoCardInit(KdCardInfo *card)
|
||||||
{
|
{
|
||||||
ENTER();
|
|
||||||
NeoCardInfo *neoc;
|
NeoCardInfo *neoc;
|
||||||
struct NeoChipInfo *chip;
|
struct NeoChipInfo *chip;
|
||||||
|
|
||||||
|
@ -79,14 +78,12 @@ neoCardInit(KdCardInfo *card)
|
||||||
|
|
||||||
card->driver = neoc;
|
card->driver = neoc;
|
||||||
|
|
||||||
LEAVE();
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Bool
|
static Bool
|
||||||
neoScreenInit(KdScreenInfo *screen)
|
neoScreenInit(KdScreenInfo *screen)
|
||||||
{
|
{
|
||||||
ENTER();
|
|
||||||
NeoScreenInfo *neos;
|
NeoScreenInfo *neos;
|
||||||
neoCardInfo(screen);
|
neoCardInfo(screen);
|
||||||
int screen_size, memory;
|
int screen_size, memory;
|
||||||
|
@ -122,7 +119,6 @@ neoScreenInit(KdScreenInfo *screen)
|
||||||
|
|
||||||
screen->driver = neos;
|
screen->driver = neos;
|
||||||
|
|
||||||
LEAVE();
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -185,7 +181,6 @@ static void neoUnlock(NeoCardInfo *neoc){
|
||||||
Bool
|
Bool
|
||||||
neoMapReg(KdCardInfo *card, NeoCardInfo *neoc)
|
neoMapReg(KdCardInfo *card, NeoCardInfo *neoc)
|
||||||
{
|
{
|
||||||
ENTER();
|
|
||||||
neoc->reg_base = card->attr.address[1] & 0xFFF80000;
|
neoc->reg_base = card->attr.address[1] & 0xFFF80000;
|
||||||
if(!neoc->reg_base) {
|
if(!neoc->reg_base) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -198,18 +193,12 @@ neoMapReg(KdCardInfo *card, NeoCardInfo *neoc)
|
||||||
|
|
||||||
KdSetMappedMode(neoc->reg_base, NEO_REG_SIZE(card), KD_MAPPED_MODE_REGISTERS);
|
KdSetMappedMode(neoc->reg_base, NEO_REG_SIZE(card), KD_MAPPED_MODE_REGISTERS);
|
||||||
|
|
||||||
// if you see the cursor sprite them MMIO is working
|
|
||||||
|
|
||||||
*(((CARD32 *)neoc->mmio)+0x400) =(CARD32)8;
|
|
||||||
//neoSetIndex(neoc, 0x3ce, 0x82,8);
|
|
||||||
LEAVE();
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
neoUnmapReg(KdCardInfo *card, NeoCardInfo *neoc)
|
neoUnmapReg(KdCardInfo *card, NeoCardInfo *neoc)
|
||||||
{
|
{
|
||||||
ENTER();
|
|
||||||
if(neoc->reg_base)
|
if(neoc->reg_base)
|
||||||
{
|
{
|
||||||
neoSetIndex(neoc, 0x3ce, 0x82,0);
|
neoSetIndex(neoc, 0x3ce, 0x82,0);
|
||||||
|
@ -217,7 +206,6 @@ neoUnmapReg(KdCardInfo *card, NeoCardInfo *neoc)
|
||||||
KdUnmapDevice((void *)neoc->mmio, NEO_REG_SIZE(card));
|
KdUnmapDevice((void *)neoc->mmio, NEO_REG_SIZE(card));
|
||||||
neoc->reg_base = 0;
|
neoc->reg_base = 0;
|
||||||
}
|
}
|
||||||
LEAVE();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -247,7 +235,6 @@ neoEnable(ScreenPtr pScreen)
|
||||||
}
|
}
|
||||||
|
|
||||||
neoSetMMIO(pScreenPriv->card, neoc);
|
neoSetMMIO(pScreenPriv->card, neoc);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue