xserver/hw/kdrive/neomagic ChangeLog, 1.10, 1.11 neo_draw.c, 1.8, 1.9 neomagic.c, 1.9, 1.10 neomagic.h, 1.6, 1.7
Eric Anholt <xserver-commit-u7BhqnqprCWvj1b/[email protected]> Thu, 9 Jun 2005 03:44:47 -0700 (PDT)
| Newsgroups | gmane.comp.freedesktop.xserver.cvs |
|---|---|
| Message-ID | <[email protected]> |
Committed by: anholt Update of /cvs/xserver/xserver/hw/kdrive/neomagic In directory gabe:/tmp/cvs-serv30863/hw/kdrive/neomagic Modified Files: ChangeLog neo_draw.c neomagic.c neomagic.h Log Message: - Replace the syncAccel hook in the kdrive structure with a pair of hooks in the kaa structure: markSync and waitMarker. The first, if set, returns a hardware-dependent marker number which can then be waited for with waitMarker. If markSync is absent (which is the case on all drivers currently), waitMarker must wait for idle on any given marker number. The intention is to allow for more parallelism when we get downloading from framebuffer, or more fine-grained idling. - Replace the KdMarkSync/KdCheckSync functions with kaaMarkSync and kaaWaitSync. These will need to be refined when KAA starts being smart about using them. Merge kpict.c into kasync.c since kasyn.c has all the rest of these fallback funcs. - Restructure all drivers to initialize a KaaInfo structure by hand rather than statically in dubious order. - Whack the i810 driver into shape in hopes that it'll work after this change (it certainly wouldn't have before this). Doesn't support my i845 though. - Make a new KXV helper to avoid duplicated code to fill the region with the necessary color key. Use it in i810 and mach64 (tested). Index: ChangeLog =================================================================== RCS file: /cvs/xserver/xserver/hw/kdrive/neomagic/ChangeLog,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- ChangeLog 8 Feb 2005 22:43:54 -0000 1.10 +++ ChangeLog 9 Jun 2005 10:44:45 -0000 1.11 @@ -1,3 +1,27 @@ +2005-06-09 Eric Anholt <[email protected]> + + * neo_draw.c: (neoWaitMarker), (neoDrawInit): + * neomagic.c: + * neomagic.h: + - Replace the syncAccel hook in the kdrive structure with a pair of + hooks in the kaa structure: markSync and waitMarker. The first, if + set, returns a hardware-dependent marker number which can then be + waited for with waitMarker. If markSync is absent (which is the case + on all drivers currently), waitMarker must wait for idle on any given + marker number. The intention is to allow for more parallelism when + we get downloading from framebuffer, or more fine-grained idling. + - Replace the KdMarkSync/KdCheckSync functions with kaaMarkSync and + kaaWaitSync. These will need to be refined when KAA starts being + smart about using them. Merge kpict.c into kasync.c since kasyn.c has + all the rest of these fallback funcs. + - Restructure all drivers to initialize a KaaInfo structure by hand + rather than statically in dubious order. + - Whack the i810 driver into shape in hopes that it'll work after this + change (it certainly wouldn't have before this). Doesn't support my + i845 though. + - Make a new KXV helper to avoid duplicated code to fill the region + with the necessary color key. Use it in i810 and mach64 (tested). + 2005-02-08 Keith Packard <[email protected]> reviewed by: <delete if not using a buddy> Index: neo_draw.c =================================================================== RCS file: /cvs/xserver/xserver/hw/kdrive/neomagic/neo_draw.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- neo_draw.c 7 Jun 2004 05:05:10 -0000 1.8 +++ neo_draw.c 9 Jun 2005 10:44:45 -0000 1.9 @@ -71,6 +71,14 @@ while ((mmio->bltStat & 1) && ++i<100000); } +static void neoWaitMarker (ScreenPtr pScreen, int marker) +{ + KdScreenPriv(pScreen); + neoCardInfo(pScreenPriv); + + neoWaitIdle(neoc); +} + static void neoWaitFifo(NeoCardInfo *neoc, int requested_fifo_space) { neoWaitIdle( neoc ); @@ -156,20 +164,24 @@ { } -KaaScreenInfoRec neoKaa = { - neoPrepareSolid, - neoSolid, - neoDoneSolid, - - neoPrepareCopy, - neoCopy, - neoDoneCopy -}; Bool neoDrawInit (ScreenPtr pScreen) { + KdScreenPriv(pScreen); + neoScreenInfo(pScreenPriv); + ENTER(); - if (!kaaDrawInit (pScreen, &neoKaa)) { + + memset(&neos->kaa, 0, sizeof(KaaScreenInfoRec)); + neos->kaa.waitMarker = neoWaitMarker; + neos->kaa.PrepareSolid = neoPrepareSolid; + neos->kaa.Solid = neoSolid; + neos->kaa.DoneSolid = neoDoneSolid; + neos->kaa.PrepareCopy = neoPrepareCopy; + neos->kaa.Copy = neoCopy; + neos->kaa.DoneCopy = neoDoneCopy; + + if (!kaaDrawInit (pScreen, &neos->kaa)) { return FALSE; } LEAVE(); @@ -201,9 +213,3 @@ LEAVE(); } -void neoDrawSync (ScreenPtr pScreen) -{ - SetupNeo(pScreen); - - neoWaitIdle(neoc); -} Index: neomagic.c =================================================================== RCS file: /cvs/xserver/xserver/hw/kdrive/neomagic/neomagic.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- neomagic.c 7 Jun 2004 05:05:10 -0000 1.9 +++ neomagic.c 9 Jun 2005 10:44:45 -0000 1.10 @@ -328,7 +328,6 @@ neoDrawInit, // initAccel neoDrawEnable, // enableAccel - neoDrawSync, // syncAccel neoDrawDisable, // disableAccel neoDrawFini, // finiAccel Index: neomagic.h =================================================================== RCS file: /cvs/xserver/xserver/hw/kdrive/neomagic/neomagic.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- neomagic.h 11 Apr 2004 00:15:57 -0000 1.6 +++ neomagic.h 9 Jun 2005 10:44:45 -0000 1.7 @@ -166,6 +166,7 @@ int pitch; int depth; KdVideoAdaptorPtr pAdaptor; + KaaScreenInfoRec kaa; } NeoScreenInfo; #define getNeoScreenInfo(kd) ((NeoScreenInfo *) ((kd)->screen->driver)) @@ -208,9 +209,6 @@ void neoDrawFini (ScreenPtr pScreen); -void -neoDrawSync (ScreenPtr pScreen); - extern KdCardFuncs neoFuncs; #endif /* _NEOMAGIC_H_ */