summaryrefslogtreecommitdiff
path: root/xc/programs/Xserver/hw/xfree86/drivers/tseng/tseng_driver.c
diff options
context:
space:
mode:
Diffstat (limited to 'xc/programs/Xserver/hw/xfree86/drivers/tseng/tseng_driver.c')
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/tseng/tseng_driver.c69
1 files changed, 22 insertions, 47 deletions
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/tseng/tseng_driver.c b/xc/programs/Xserver/hw/xfree86/drivers/tseng/tseng_driver.c
index 76911b3b6..2b624a5b6 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/tseng/tseng_driver.c
+++ b/xc/programs/Xserver/hw/xfree86/drivers/tseng/tseng_driver.c
@@ -1,5 +1,5 @@
/*
- * $XFree86: xc/programs/Xserver/hw/xfree86/drivers/tseng/tseng_driver.c,v 1.79 2000/12/14 16:33:10 eich Exp $
+ * $XFree86: xc/programs/Xserver/hw/xfree86/drivers/tseng/tseng_driver.c,v 1.82 2001/02/15 17:54:55 eich Exp $
*
* Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany.
*
@@ -44,14 +44,16 @@
#include "mibstore.h"
#include "fb.h"
-#ifdef RENDER
-#include "picturestr.h"
-#endif
#include "xf86RAC.h"
#include "xf86Resources.h"
#include "xf86int10.h"
+#ifdef XvExtension
+#include "xf86xv.h"
+#include "Xv.h"
+#endif
+
/*** Chip-specific includes ***/
/* #include "tseng_acl.h" */
@@ -118,9 +120,6 @@ DriverRec TSENG =
{
VERSION,
TSENG_DRIVER_NAME,
-#if 0
- "unaccelerated driver for Tseng Labs ET4000, accelerated driver for Tseng Labs ET4000W32, W32i, W32p, ET6000 and ET6100 cards",
-#endif
TsengIdentify,
TsengProbe,
TsengAvailableOptions,
@@ -244,7 +243,6 @@ static const char* fbSymbols[] = {
"xf1bppScreenInit",
"xf4bppScreenInit",
"fbScreenInit",
- "fbScreenInit",
"fbPictureInit",
NULL
};
@@ -1690,10 +1688,19 @@ TsengPreInit(ScrnInfoPtr pScrn, int flags)
/* Set weight/mask/offset for depth > 8 */
if (pScrn->depth > 8) {
/* The defaults are OK for us */
- rgb zeros =
- {0, 0, 0};
+ rgb zeros = {0, 0, 0};
+ rgb mask;
+
+ /*
+ * Initialize mask here.
+ * Currently we only treat the ICS5341 RAMDAC special
+ */
+ if ((pScrn->depth == 24) && (pScrn->bitsPerPixel == 24))
+ mask = pTseng->DacInfo.rgb24packed;
+ else
+ mask = zeros;
- if (!xf86SetWeight(pScrn, zeros, zeros)) {
+ if (!xf86SetWeight(pScrn, zeros, mask)) {
return FALSE;
} else {
/* XXX check that weight returned is supported */
@@ -1834,11 +1841,8 @@ TsengPreInit(ScrnInfoPtr pScrn, int flags)
TsengFreeRec(pScrn);
return FALSE;
}
- xf86LoaderReqSymbols("fbScreenInit", NULL);
-#ifdef RENDER
- xf86LoaderReqSymbols("fbPictureInit", NULL);
-#endif
- break;
+ xf86LoaderReqSymbols("fbScreenInit", "fbPictureInit", NULL);
+ break;
}
/* Load XAA if needed */
@@ -2029,8 +2033,8 @@ TsengScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
* support TrueColor and not DirectColor. To deal with this, call
* miSetVisualTypes for each visual supported.
*/
- if (!miSetVisualTypes(pScrn->depth, TrueColorMask, pScrn->rgbBits,
- pScrn->defaultVisual))
+ if (!miSetVisualTypes(pScrn->depth, miGetDefaultVisualMask(pScrn->depth),
+ pScrn->rgbBits, pScrn->defaultVisual))
return FALSE;
miSetPixmapDepths ();
@@ -2058,10 +2062,8 @@ TsengScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
pScrn->virtualX, pScrn->virtualY,
pScrn->xDpi, pScrn->yDpi,
pScrn->displayWidth, pScrn->bitsPerPixel);
-#ifdef RENDER
if (ret)
fbPictureInit(pScreen, 0, 0);
-#endif
break;
}
@@ -2150,7 +2152,6 @@ TsengScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
/* Wrap the current CloseScreen and SaveScreen functions */
pScreen->SaveScreen = TsengSaveScreen;
-#ifdef DPMSExtension
/* Support for DPMS, the ET4000W32Pc and newer uses a different and
* simpler method than the older cards.
*/
@@ -2159,7 +2160,6 @@ TsengScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
} else {
xf86DPMSInit(pScreen, (DPMSSetProcPtr)TsengHVSyncDPMSSet, 0);
}
-#endif
pTseng->CloseScreen = pScreen->CloseScreen;
pScreen->CloseScreen = TsengCloseScreen;
@@ -2197,18 +2197,6 @@ TsengLeaveVT(int scrnIndex, int flags)
ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
TsengPtr pTseng = TsengPTR(pScrn);
-#ifdef TODO
-#ifdef XFreeXDGA
- if (pScrn->bitsPerPixel >= 8) {
- if (pScrn->directMode & XF86DGADirectGraphics) {
- if (vgaHWCursor.Initialized == TRUE)
- TsengHideCursor();
- return;
- }
- }
-#endif
-#endif
-
PDEBUG(" TsengLeaveVT\n");
TsengRestore(pScrn, &(VGAHWPTR(pScrn)->SavedReg),
&pTseng->SavedReg,VGA_SR_ALL);
@@ -2742,15 +2730,6 @@ TsengAdjustFrame(int scrnIndex, int x, int y, int flags)
outw(iobase + 4, ((Base & 0x00FF) << 8) | 0x0D);
outw(iobase + 4, ((Base & 0x0F0000) >> 8) | 0x33);
-#ifdef TODO
-#ifdef XFreeXDGA
- if (pScrn->directMode & XF86DGADirectGraphics) {
- /* Wait until vertical retrace is in progress. */
- while (inb(iobase + 0xA) & 0x08) ;
- while (!(inb(iobase + 0xA) & 0x08)) ;
- }
-#endif
-#endif
}
ModeStatus
@@ -3272,10 +3251,6 @@ ET4000Probe()
...
vga256InfoRec.bankedMono = TRUE;
-#ifdef XFreeXDGA
- if (pScrn->bitsPerPixel >= 8)
- vga256InfoRec.directMode = XF86DGADirectPresent;
-#endif
...