From 893ea125597f3c6273f45a51673d4dc514e754e9 Mon Sep 17 00:00:00 2001 From: Franco Catrin L Date: Mon, 7 Jun 2004 05:05:10 +0000 Subject: [PATCH] small fixes. README added --- hw/kdrive/neomagic/ChangeLog | 3 +++ hw/kdrive/neomagic/README | 15 +++++++++++++++ hw/kdrive/neomagic/neo_draw.c | 11 +++-------- hw/kdrive/neomagic/neomagic.c | 5 +++++ 4 files changed, 26 insertions(+), 8 deletions(-) create mode 100644 hw/kdrive/neomagic/README 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. + * Small fix for depth calculation + 2004-04-11 Franco Catrin L. * 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