summaryrefslogtreecommitdiff
path: root/exa/exa.h
diff options
context:
space:
mode:
authorEric Anholt <anholt@freebsd.org>2005-09-11 19:08:10 +0000
committerEric Anholt <anholt@freebsd.org>2005-09-11 19:08:10 +0000
commit1c003ccf5d68baaae6fafdc75eff964f2a62fc35 (patch)
tree309af5414b568d8382bca1e4eb8ac4a221fd86c9 /exa/exa.h
parentca210830bd361e3d91b6bc741c495b61c424d1d2 (diff)
Add a pair of hooks, PrepareAccess() and FinishAccess(), which get called
around CPU access to the framebuffer. This allows the hardware to set up swappers to deal with endianness, or to tell EXA to move the pixmap out to framebuffer if insufficient swappers are available (note: must not fail on front buffer!). Submitted by: benh
Diffstat (limited to 'exa/exa.h')
-rw-r--r--exa/exa.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/exa/exa.h b/exa/exa.h
index 2cf9fe44a..5e850a3cf 100644
--- a/exa/exa.h
+++ b/exa/exa.h
@@ -175,6 +175,24 @@ typedef struct _ExaAccelInfo {
*/
int (*MarkSync) (ScreenPtr pScreen);
void (*WaitMarker) (ScreenPtr pScreen, int marker);
+
+ /* These are wrapping all fb or composite operations that will cause
+ * a direct access to the framebuffer. You can use them to update
+ * endian swappers, force migration to RAM, or whatever else you find
+ * useful at this point. EXA can stack up to 3 calls to Prepare/Finish
+ * access, though they will have a different index. If your hardware
+ * doesn't have enough separate configurable swapper, you can return
+ * FALSE from PrepareAccess() to force EXA to migrate the pixmap to RAM.
+ * Note that DownloadFromScreen and UploadToScreen can both be called
+ * between PrepareAccess() and FinishAccess(). If they need to use a
+ * swapper, they should save & restore its setting.
+ */
+ Bool (*PrepareAccess)(PixmapPtr pPix, int index);
+ void (*FinishAccess)(PixmapPtr pPix, int index);
+ #define EXA_PREPARE_DEST 0
+ #define EXA_PREPARE_SRC 1
+ #define EXA_PREPARE_MASK 2
+
} ExaAccelInfoRec, *ExaAccelInfoPtr;
typedef struct _ExaDriver {
@@ -224,6 +242,9 @@ exaGetPixmapOffset(PixmapPtr pPix);
unsigned long
exaGetPixmapPitch(PixmapPtr pPix);
+unsigned long
+exaGetPixmapSize(PixmapPtr pPix);
+
#define exaInitCard(exa, sync, memory_base, off_screen_base, memory_size, \
offscreen_byte_align, offscreen_pitch, flags, \
max_x, max_y) \