diff options
author | Franco Catrin L <fcatrin@tuxpan.com> | 2004-06-07 05:05:10 +0000 |
---|---|---|
committer | Franco Catrin L <fcatrin@tuxpan.com> | 2004-06-07 05:05:10 +0000 |
commit | 893ea125597f3c6273f45a51673d4dc514e754e9 (patch) | |
tree | 4c4e6768424e70ec7714b796817f6b7c089598cb | |
parent | d9cca52feba13b69f3eea9e1d958b8a4711e7d67 (diff) |
small fixes. README added
-rw-r--r-- | hw/kdrive/neomagic/ChangeLog | 3 | ||||
-rw-r--r-- | hw/kdrive/neomagic/README | 15 | ||||
-rw-r--r-- | hw/kdrive/neomagic/neo_draw.c | 11 | ||||
-rw-r--r-- | hw/kdrive/neomagic/neomagic.c | 5 |
4 files changed, 26 insertions, 8 deletions
diff --git a/hw/kdrive/neomagic/ChangeLog b/hw/kdrive/neomagic/ChangeLog index 997d7c152..8ea6bf91f 100644 --- a/hw/kdrive/neomagic/ChangeLog +++ b/hw/kdrive/neomagic/ChangeLog @@ -1,3 +1,6 @@ +2004-06-07 Franco Catrin L. <fcatrin@tuxpan.com> + * Small fix for depth calculation + 2004-04-11 Franco Catrin L. <fcatrin@tuxpan.com> * Basic bitblt implementation diff --git a/hw/kdrive/neomagic/README b/hw/kdrive/neomagic/README new file mode 100644 index 000000000..2b086d75c --- /dev/null +++ b/hw/kdrive/neomagic/README @@ -0,0 +1,15 @@ +Neomagic KDrive driver for xserver + +This is a very simple implementation for Neomagic based cards. +Almost all functions are handled by the VESA driver, and +only solid drawing and bitblt are done with acceleration, + +This driver has been tested in MagicGraph 256AV+(NM2230) card +but it should work on other cards as well. + +The only warning is to choose a working mode. You can ask +for supported modes using -listmodes. I use -mode 0x117. + +-- +Franco Catrin L. +fcatrin@tuxpan.com diff --git a/hw/kdrive/neomagic/neo_draw.c b/hw/kdrive/neomagic/neo_draw.c index e4f1441da..b6419e73c 100644 --- a/hw/kdrive/neomagic/neo_draw.c +++ b/hw/kdrive/neomagic/neo_draw.c @@ -108,6 +108,7 @@ static void neoSolid (int x1, int y1, int x2, int y2) mmio->dstStart = y * screen->pitch + x * screen->depth; mmio->xyExt = (unsigned long)(h << 16) | (w & 0xffff); + } @@ -139,7 +140,7 @@ static void neoCopy (int srcX, int srcY, int dstX, int dstY, int w, int h) NEO_BC0_DST_Y_DEC | NEO_BC0_SRC_Y_DEC | NEO_BC3_FIFO_EN | - NEO_BC3_SKIP_MAPPING | 0x0c0000; + NEO_BC3_SKIP_MAPPING | rop; srcX+=w-1; dstX+=w-1; srcY+=h-1; @@ -168,15 +169,9 @@ KaaScreenInfoRec neoKaa = { Bool neoDrawInit (ScreenPtr pScreen) { ENTER(); -// SetupNeo(pScreen); -// PictureScreenPtr ps = GetPictureScreen(pScreen); - if (!kaaDrawInit (pScreen, &neoKaa)) { return FALSE; } - -// if (ps && tridents->off_screen) -// ps->Composite = tridentComposite; LEAVE(); return TRUE; } @@ -188,7 +183,7 @@ void neoDrawEnable (ScreenPtr pScreen) screen = neos; card = neoc; mmio = neoc->mmio; - screen->depth = screen->backendScreen.mode.BitsPerPixel/8; + screen->depth = (screen->backendScreen.mode.BitsPerPixel+7)/8; screen->pitch = screen->backendScreen.mode.BytesPerScanLine; DBGOUT("NEO depth=%x, pitch=%x\n", screen->depth, screen->pitch); LEAVE(); diff --git a/hw/kdrive/neomagic/neomagic.c b/hw/kdrive/neomagic/neomagic.c index 8ac29cbb6..68dbb9172 100644 --- a/hw/kdrive/neomagic/neomagic.c +++ b/hw/kdrive/neomagic/neomagic.c @@ -300,6 +300,11 @@ neoCardFini(KdCardInfo *card) #define neoCursorDisable 0 // disableCursor #define neoCursorFini 0 // finiCursor */ #define neoRecolorCursor 0 // recolorCursor */ +//#define neoDrawInit 0 // initAccel +//#define neoDrawEnable 0 // enableAccel +//#define neoDrawSync 0 // syncAccel +//#define neoDrawDisable 0 // disableAccel +//#define neoDrawFini 0 // finiAccel KdCardFuncs neoFuncs = { neoCardInit, // cardinit |