diff options
Diffstat (limited to 'hw/kdrive/smi')
-rw-r--r-- | hw/kdrive/smi/smi.c | 3 | ||||
-rw-r--r-- | hw/kdrive/smi/smi.h | 4 | ||||
-rw-r--r-- | hw/kdrive/smi/smidraw.c | 41 |
3 files changed, 23 insertions, 25 deletions
diff --git a/hw/kdrive/smi/smi.c b/hw/kdrive/smi/smi.c index 635fca4da..05151aae9 100644 --- a/hw/kdrive/smi/smi.c +++ b/hw/kdrive/smi/smi.c @@ -108,7 +108,7 @@ smiRandRSetConfig (ScreenPtr pScreen, Bool ret; ENTER (); - KdCheckSync (pScreen); + kaaWaitSync (pScreen); ret = subRandRSetConfig (pScreen, randr, rate, pSize); LEAVE(); @@ -335,7 +335,6 @@ KdCardFuncs smiFuncs = { smiDrawInit, /* initAccel */ smiDrawEnable, /* enableAccel */ - smiDrawSync, /* syncAccel */ smiDrawDisable, /* disableAccel */ smiDrawFini, /* finiAccel */ diff --git a/hw/kdrive/smi/smi.h b/hw/kdrive/smi/smi.h index d4733213f..93b856939 100644 --- a/hw/kdrive/smi/smi.h +++ b/hw/kdrive/smi/smi.h @@ -186,6 +186,7 @@ typedef struct _smiScreenInfo { CARD32 stride; CARD32 data_format; CARD8 dpr_vpr_enable; + KaaScreenInfoRec kaa; } SmiScreenInfo; #define getSmiScreenInfo(kd) ((SmiScreenInfo *) ((kd)->screen->driver)) @@ -243,9 +244,6 @@ void smiDrawEnable (ScreenPtr pScreen); void -smiDrawSync (ScreenPtr pScreen); - -void smiDrawDisable (ScreenPtr pScreen); void diff --git a/hw/kdrive/smi/smidraw.c b/hw/kdrive/smi/smidraw.c index d1691fce0..a85382816 100644 --- a/hw/kdrive/smi/smidraw.c +++ b/hw/kdrive/smi/smidraw.c @@ -41,6 +41,7 @@ #include "migc.h" #include "miline.h" #include "picturestr.h" +#include "kaa.h" CARD8 smiBltRop[16] = { /* GXclear */ 0x00, /* 0 */ @@ -143,6 +144,15 @@ smiSetup (ScreenPtr pScreen, int wait) return TRUE; } +static void +smiWaitMarker (ScreenPtr pScreen, int marker) +{ + KdScreenPriv(pScreen); + smic = getSmiCardInfo(pScreenPriv); + + smiWaitIdle (smic); +} + static Bool smiPrepareSolid (PixmapPtr pPixmap, int alu, @@ -229,15 +239,6 @@ smiDoneCopy (void) { } -KaaScreenInfoRec smiKaa = { - smiPrepareSolid, - smiSolid, - smiDoneSolid, - - smiPrepareCopy, - smiCopy, - smiDoneCopy, -}; Bool smiDrawInit (ScreenPtr pScreen) @@ -258,7 +259,16 @@ smiDrawInit (ScreenPtr pScreen) return FALSE; } - if (!kaaDrawInit (pScreen, &smiKaa)) + memset(&smis->kaa, 0, sizeof(KaaScreenInfoRec)); + smis->kaa.PrepareSolid = smiPrepareSolid; + smis->kaa.Solid = smiSolid; + smis->kaa.DoneSolid = smiDoneSolid; + smis->kaa.PrepareCopy = smiPrepareCopy; + smis->kaa.Copy = smiCopy; + smis->kaa.DoneCopy = smiDoneCopy; + smis->kaa.waitMarker = smiWaitMarker; + + if (!kaaDrawInit (pScreen, &smis->kaa)) { LEAVE (); return FALSE; @@ -311,7 +321,7 @@ smiDrawEnable (ScreenPtr pScreen) } smiSetup (pScreen, 0); - KdMarkSync (pScreen); + kaaMarkSync (pScreen); LEAVE (); } @@ -332,12 +342,3 @@ smiDrawFini (ScreenPtr pScreen) ENTER (); LEAVE (); } - -void -smiDrawSync (ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - smic = getSmiCardInfo(pScreenPriv); - - smiWaitIdle (smic); -} |