summaryrefslogtreecommitdiff
path: root/src/savage_driver.h
diff options
context:
space:
mode:
authorAlexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de>2004-09-15 16:34:02 +0000
committerAlexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de>2004-09-15 16:34:02 +0000
commit1b368984e8802e9d148af57bda5ba9f5562415ed (patch)
treeeea7adb5c6c9984f73ea5dd459c5e16e29b5fdaf /src/savage_driver.h
parent70a541832e31fafcc5c26488992f5bf45812da2e (diff)
Diffstat (limited to 'src/savage_driver.h')
-rw-r--r--src/savage_driver.h34
1 files changed, 30 insertions, 4 deletions
diff --git a/src/savage_driver.h b/src/savage_driver.h
index 4375302..ccf3972 100644
--- a/src/savage_driver.h
+++ b/src/savage_driver.h
@@ -3,6 +3,8 @@
#ifndef SAVAGE_VGAHWMMIO_H
#define SAVAGE_VGAHWMMIO_H
+#define MODE_24 24
+
#include "xf86_ansic.h"
#include "compiler.h"
#include "vgaHW.h"
@@ -15,6 +17,7 @@
#include "mipointer.h"
#include "micmap.h"
#include "fb.h"
+#include "fboverlay.h"
#include "xf86cmap.h"
#include "vbe.h"
#include "xaa.h"
@@ -70,6 +73,10 @@ typedef struct {
unsigned int MMPR0, MMPR1, MMPR2, MMPR3;
} SavageRegRec, *SavageRegPtr;
+typedef struct {
+ CARD32 redMask, greenMask, blueMask;
+ int redShift, greenShift, blueShift;
+} savageOverlayRec;
typedef struct _Savage {
SavageRegRec SavedReg;
@@ -85,7 +92,7 @@ typedef struct _Savage {
int videoRambytes;
int videoRamKbytes;
int MemOffScreen;
- CARD32 CursorKByte;
+ int CursorKByte;
/* These are physical addresses. */
unsigned long FrameBufferBase;
@@ -178,8 +185,6 @@ typedef struct _Savage {
unsigned int SavedSbdOffset;
unsigned int SavedSbd;
- /* Support for Int10 processing */
- xf86Int10InfoPtr pInt10;
SavageModeTablePtr ModeTable;
/* Support for the Savage command overflow buffer. */
@@ -203,6 +208,11 @@ typedef struct _Savage {
int dwBCIWait2DIdle;
XF86OffscreenImagePtr offscreenImages;
+ /* Support for Overlays */
+ unsigned char * FBStart2nd;
+ savageOverlayRec overlay;
+ int overlayDepth;
+ int primStreamBpp;
} SavageRec, *SavagePtr;
/* Video flags. */
@@ -213,7 +223,6 @@ typedef struct _Savage {
/* Make the names of these externals driver-unique */
#define gpScrn savagegpScrn
-#define myOUTREG savageOUTREG
#define readdw savagereaddw
#define readfb savagereadfb
#define writedw savagewritedw
@@ -272,5 +281,22 @@ unsigned short SavageGetBIOSModes(
void SavageInitVideo( ScreenPtr pScreen );
+/* In savage_streams.c */
+
+void SavageStreamsOn(ScrnInfoPtr pScrn);
+void SavageStreamsOff(ScrnInfoPtr pScrn);
+void SavageInitSecondaryStream(ScrnInfoPtr pScrn);
+
+#if (MODE_24 == 32)
+# define BYTES_PP24 4
+#else
+# define BYTES_PP24 3
+#endif
+
+
+#define DEPTH_BPP(depth) (depth == 24 ? (BYTES_PP24 << 3) : (depth + 7) & ~0x7)
+#define DEPTH_2ND(pScrn) (pScrn->depth > 8 ? pScrn->depth\
+ : SAVPTR(pScrn)->overlayDepth)
+
#endif /* SAVAGE_VGAHWMMIO_H */