summaryrefslogtreecommitdiff
path: root/hw/kdrive/src/kdrive.h
diff options
context:
space:
mode:
authorEric Anholt <anholt@freebsd.org>2005-06-09 10:44:45 +0000
committerEric Anholt <anholt@freebsd.org>2005-06-09 10:44:45 +0000
commit545c082cf9c86f2a809ea6b4dca33643afb0c3d3 (patch)
tree5bf8f4861202fe3a120826e9c8d170cf27de1508 /hw/kdrive/src/kdrive.h
parent72ca8e1b5432db57401e66af8a07fcd8cbbbb9f1 (diff)
- 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).
Diffstat (limited to 'hw/kdrive/src/kdrive.h')
-rw-r--r--hw/kdrive/src/kdrive.h25
1 files changed, 9 insertions, 16 deletions
diff --git a/hw/kdrive/src/kdrive.h b/hw/kdrive/src/kdrive.h
index 5289ae0bd..c371263d3 100644
--- a/hw/kdrive/src/kdrive.h
+++ b/hw/kdrive/src/kdrive.h
@@ -89,7 +89,9 @@ typedef struct _KdCardInfo {
struct _KdScreenInfo *screenList;
int selected;
struct _KdCardInfo *next;
+
Bool needSync;
+ int lastMarker;
} KdCardInfo;
extern KdCardInfo *kdCardInfo;
@@ -180,7 +182,6 @@ typedef struct _KdCardFuncs {
Bool (*initAccel) (ScreenPtr);
void (*enableAccel) (ScreenPtr);
- void (*syncAccel) (ScreenPtr);
void (*disableAccel) (ScreenPtr);
void (*finiAccel) (ScreenPtr);
@@ -316,6 +317,13 @@ typedef struct _KaaTrapezoid {
} KaaTrapezoid;
typedef struct _KaaScreenInfo {
+ int offsetAlign;
+ int pitchAlign;
+ int flags;
+
+ int (*markSync) (ScreenPtr pScreen);
+ void (*waitMarker) (ScreenPtr pScreen, int marker);
+
Bool (*PrepareSolid) (PixmapPtr pPixmap,
int alu,
Pixel planemask,
@@ -337,10 +345,6 @@ typedef struct _KaaScreenInfo {
int height);
void (*DoneCopy) (void);
- int offscreenByteAlign;
- int offscreenPitch;
- int flags;
-
Bool (*PrepareBlend) (int op,
PicturePtr pSrcPicture,
PicturePtr pDstPicture,
@@ -421,17 +425,6 @@ extern KdOsFuncs *kdOsFuncs;
(pointer) v)
#define KdScreenPriv(pScreen) KdPrivScreenPtr pScreenPriv = KdGetScreenPriv(pScreen)
-#define KdCheckSync(s) { \
- KdScreenPriv(s); \
- KdCardInfo *card = pScreenPriv->card; \
- if (card->needSync) { \
- card->needSync = FALSE; \
- (*card->cfuncs->syncAccel) (s); \
- } \
-}
-
-#define KdMarkSync(s) (KdGetScreenPriv(s)->card->needSync = TRUE)
-
/* kaa.c */
Bool
kaaDrawInit (ScreenPtr pScreen,