summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <anholt@freebsd.org>2004-06-16 09:23:33 +0000
committerEric Anholt <anholt@freebsd.org>2004-06-16 09:23:33 +0000
commitceed4d50d8cb262b571137ac6da6c0152fc4b03e (patch)
treeba82dda4e24bf1a0f5d3bcb37637765c718258f1
parent223ace8b63fb5d663768d260691791e264b4fc37 (diff)
-rw-r--r--CALLMAP2
-rw-r--r--TODO_NOTES2
-rw-r--r--man/s3virge.man15
-rw-r--r--src/s3v_accel.c14
-rw-r--r--src/s3v_driver.c25
-rw-r--r--src/s3v_rop.h2
-rw-r--r--src/s3v_shadow.c2
-rw-r--r--src/s3v_xv.c17
8 files changed, 44 insertions, 35 deletions
diff --git a/CALLMAP b/CALLMAP
index 7ca58e0..b6d1b3f 100644
--- a/CALLMAP
+++ b/CALLMAP
@@ -20,4 +20,4 @@ ChipScreenInit
-$XFree86: xc/programs/Xserver/hw/xfree86/drivers/s3virge/CALLMAP,v 1.1 1998/11/01 12:35:58 dawes Exp $
+$XFree86: xc/programs/Xserver/hw/xfree86/drivers/s3virge/CALLMAP,v 1.2 1998/11/22 10:37:28 dawes Exp $
diff --git a/TODO_NOTES b/TODO_NOTES
index 7d6a878..de5920b 100644
--- a/TODO_NOTES
+++ b/TODO_NOTES
@@ -323,4 +323,4 @@ the new config. management stuff may help here.
-$XFree86: xc/programs/Xserver/hw/xfree86/drivers/s3virge/TODO_NOTES,v 1.22 2003/02/04 02:20:49 dawes Exp $
+$XFree86: xc/programs/Xserver/hw/xfree86/drivers/s3virge/TODO_NOTES,v 1.23 2003/02/13 03:21:33 dawes Exp $
diff --git a/man/s3virge.man b/man/s3virge.man
index 3232130..b0120ec 100644
--- a/man/s3virge.man
+++ b/man/s3virge.man
@@ -1,4 +1,4 @@
-.\" $XFree86: xc/programs/Xserver/hw/xfree86/drivers/s3virge/s3virge.man,v 1.3 2001/11/21 22:43:00 dawes Exp $
+.\" $XFree86: xc/programs/Xserver/hw/xfree86/drivers/s3virge/s3virge.man,v 1.4 2003/02/13 03:21:33 dawes Exp $
.\" shorthand for double quote that works everywhere.
.ds q \N'34'
.TH s3virge __drivermansuffix__ __vendorversion__
@@ -20,7 +20,7 @@ s3virge \- S3 ViRGE video driver
.B EndSection
.SH DESCRIPTION
.B s3virge
-is an __xservername__ driver for S3 based video cards. The driver is fully
+is an XFree86 driver for S3 based video cards. The driver is fully
accelerated, and provides support for the following framebuffer depths:
8, 15, 16, and 24. All
visual types are supported for depth 8, and TrueColor
@@ -61,7 +61,7 @@ driver supports PCI and AGP video cards based on the following S3 chips:
.B Trio 3D/2X
86C362, 86C368
.SH CONFIGURATION DETAILS
-Please refer to __xconfigfile__(__filemansuffix__) for general configuration
+Please refer to XF86Config(__filemansuffix__) for general configuration
details. This section only covers configuration details specific to this
driver. All options names are case and white space insensitive when
parsed by the server, for example, "virge vx" and "VIRGEvx" are equivalent.
@@ -221,7 +221,7 @@ development debug option. Default: off.
Enable or disable a cr3a fix added for ViRGE MX. Default: on.
.SH SEE ALSO
-__xservername__(__appmansuffix__), __xconfigfile__(__filemansuffix__), xorgconfig(__appmansuffix__), Xserver(__appmansuffix__), X(__miscmansuffix__)
+XFree86(1), XF86Config(__filemansuffix__), xf86config(1), Xserver(1), X(__miscmansuffix__)
.SH KNOWN BUGS
The VideoRam generic driver parameter is presently ignored by the
@@ -229,10 +229,11 @@ s3virge driver. On PPC this is reported to cause problems for 2M
cards, because they may autodetect as 4M.
.SH SUPPORT
-For assistance with this driver, or __xservername__ in general, check the web
-site at http://www.x.org. If you find a problem with __xservername__ or have a
+For assistance with this driver, or XFree86 in general, check the XFree86 web
+site at http://www.xfree86.org. A FAQ is available on the web site at
+http://www.xfree86.org/FAQ/. If you find a problem with XFree86 or have a
question not answered in the FAQ please use our bug report form available on
-the web site. When reporting problems
+the web site or send mail to XFree86@XFree86.org. When reporting problems
with the driver send as much detail as possible, including chipset type, a
server output log, and operating system specifics.
diff --git a/src/s3v_accel.c b/src/s3v_accel.c
index e5cb7fe..1c584f9 100644
--- a/src/s3v_accel.c
+++ b/src/s3v_accel.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/s3virge/s3v_accel.c,v 1.25 2003/11/06 18:38:05 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/s3virge/s3v_accel.c,v 1.23 2001/12/13 18:01:50 eich Exp $ */
/*
Copyright (C) 1994-1999 The XFree86 Project, Inc. All Rights Reserved.
@@ -245,7 +245,7 @@ S3VNopAllCmdSets(ScrnInfoPtr pScrn)
if (xf86GetVerbosity() > 1) {
ErrorF("\tTrio3D -- S3VNopAllCmdSets: SubsysStats#1 = 0x%08lx\n",
- (unsigned long)IN_SUBSYS_STAT());
+ IN_SUBSYS_STAT());
}
mem_barrier();
@@ -267,7 +267,7 @@ S3VNopAllCmdSets(ScrnInfoPtr pScrn)
if (xf86GetVerbosity() > 1) {
ErrorF("\tTrio3D -- S3VNopAllCmdSets: SubsysStats#2 = 0x%08lx\n",
- (unsigned long)IN_SUBSYS_STAT());
+ IN_SUBSYS_STAT());
}
}
@@ -335,8 +335,8 @@ S3VGEReset(ScrnInfoPtr pScrn, int from_timeout, int line, char *file)
VGAOUT8(vgaCRReg, tmp & ~0x02);
usleep(10000);
- xf86ErrorFVerb(VERBLEV, " S3VGEReset sub_stat=%lx \n",
- (unsigned long)IN_SUBSYS_STAT()
+ xf86ErrorFVerb(VERBLEV, " S3VGEReset sub_stat=%x \n",
+ IN_SUBSYS_STAT()
);
if (!from_timeout)
@@ -415,8 +415,8 @@ S3VGEReset(ScrnInfoPtr pScrn, int from_timeout, int line, char *file)
if((IN_SUBSYS_STAT() & 0x3f802000 & 0x20002000) != 0x20002000) {
if(xf86GetVerbosity() > 1)
- ErrorF("restarting S3 graphics engine reset %2d ...%lx\n",
- r, (unsigned long)IN_SUBSYS_STAT());
+ ErrorF("restarting S3 graphics engine reset %2d ..."
+ "%lx\n",r,IN_SUBSYS_STAT());
}
else
break;
diff --git a/src/s3v_driver.c b/src/s3v_driver.c
index 9e5f603..7847f8e 100644
--- a/src/s3v_driver.c
+++ b/src/s3v_driver.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/s3virge/s3v_driver.c,v 1.93 2003/11/06 18:38:05 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/s3virge/s3v_driver.c,v 1.90 2003/08/23 16:09:19 dawes Exp $ */
/*
Copyright (C) 1994-1999 The XFree86 Project, Inc. All Rights Reserved.
@@ -364,7 +364,7 @@ static XF86ModuleVersionInfo S3VVersRec =
MODULEVENDORSTRING,
MODINFOSTRING1,
MODINFOSTRING2,
- XORG_VERSION_CURRENT,
+ XF86_VERSION_CURRENT,
S3VIRGE_VERSION_MAJOR, S3VIRGE_VERSION_MINOR, S3VIRGE_PATCHLEVEL,
ABI_CLASS_VIDEODRV, /* This is a video driver */
ABI_VIDEODRV_VERSION,
@@ -1017,7 +1017,7 @@ S3VPreInit(ScrnInfoPtr pScrn, int flags)
vgaCRReg = vgaIOBase + 5;
xf86ErrorFVerb(VERBLEV,
- " S3VPreInit vgaCRIndex=%x, vgaIOBase=%x, MMIOBase=%p\n",
+ " S3VPreInit vgaCRIndex=%x, vgaIOBase=%x, MMIOBase=%x\n",
vgaCRIndex, vgaIOBase, hwp->MMIOBase );
@@ -1348,9 +1348,8 @@ S3VPreInit(ScrnInfoPtr pScrn, int flags)
, lcdclk / 1000.0);
}
- S3VDisableMmio(pScrn);
S3VUnmapMem(pScrn);
-
+
/* And finally set various possible option flags */
ps3v->bankedMono = FALSE;
@@ -1616,8 +1615,6 @@ S3VEnterVT(int scrnIndex, int flags)
#ifdef unmap_always
S3VMapMem(pScrn);
#endif
- S3VEnableMmio(pScrn);
-
S3VSave(pScrn);
return S3VModeInit(pScrn, pScrn->currentMode);
}
@@ -1647,7 +1644,6 @@ S3VLeaveVT(int scrnIndex, int flags)
S3VWriteMode(pScrn, vgaSavePtr, S3VSavePtr);
/* Restore standard register access */
/* and unmap memory. */
- S3VDisableMmio(pScrn);
#ifdef unmap_always
S3VUnmapMem(pScrn);
#endif
@@ -1907,11 +1903,11 @@ S3VSave (ScrnInfoPtr pScrn)
{
xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, VERBLEV,
- "MMPR regs: %08lx %08lx %08lx %08lx\n",
- (unsigned long)INREG(FIFO_CONTROL_REG),
- (unsigned long)INREG(MIU_CONTROL_REG),
- (unsigned long)INREG(STREAMS_TIMEOUT_REG),
- (unsigned long)INREG(MISC_TIMEOUT_REG));
+ "MMPR regs: %08x %08x %08x %08x\n",
+ INREG(FIFO_CONTROL_REG),
+ INREG(MIU_CONTROL_REG),
+ INREG(STREAMS_TIMEOUT_REG),
+ INREG(MISC_TIMEOUT_REG));
}
PVERB5("\n\nViRGE driver: saved current video mode. Register dump:\n\n");
@@ -2478,6 +2474,8 @@ S3VUnmapMem(ScrnInfoPtr pScrn)
ps3v->PrimaryVidMapped = FALSE;
}
+ S3VDisableMmio(pScrn);
+
xf86UnMapVidMem(pScrn->scrnIndex, (pointer)ps3v->MapBase,
S3_NEWMMIO_REGSIZE);
if (ps3v->FBBase)
@@ -3526,7 +3524,6 @@ S3VCloseScreen(int scrnIndex, ScreenPtr pScreen)
if (pScrn->vtSema) {
S3VWriteMode(pScrn, vgaSavePtr, S3VSavePtr);
vgaHWLock(hwp);
- S3VDisableMmio(pScrn);
S3VUnmapMem(pScrn);
}
diff --git a/src/s3v_rop.h b/src/s3v_rop.h
index e4b393a..11e0bd3 100644
--- a/src/s3v_rop.h
+++ b/src/s3v_rop.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/s3virge/s3v_rop.h,v 1.2 1998/11/28 10:43:16 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/s3virge/s3v_rop.h,v 1.3 1999/03/14 03:22:04 dawes Exp $ */
/*
Copyright (C) 1994-1998 The XFree86 Project, Inc. All Rights Reserved.
diff --git a/src/s3v_shadow.c b/src/s3v_shadow.c
index 7499d84..5522aaf 100644
--- a/src/s3v_shadow.c
+++ b/src/s3v_shadow.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/s3virge/s3v_shadow.c,v 1.2 2000/03/06 22:59:30 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/s3virge/s3v_shadow.c,v 1.3 2000/03/31 20:13:33 dawes Exp $ */
/*
Copyright (C) 1994-2000 The XFree86 Project, Inc. All Rights Reserved.
diff --git a/src/s3v_xv.c b/src/s3v_xv.c
index e13c792..9400545 100644
--- a/src/s3v_xv.c
+++ b/src/s3v_xv.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/s3virge/s3v_xv.c,v 1.10tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/s3virge/s3v_xv.c,v 1.8 2003/04/23 21:51:43 tsi Exp $ */
/*
Copyright (C) 2000 The XFree86 Project, Inc. All Rights Reserved.
@@ -458,7 +458,7 @@ S3VSetupImageVideoOverlay(ScreenPtr pScreen)
adapt->QueryImageAttributes = S3VQueryImageAttributes;
/* gotta uninit this someplace */
- REGION_NULL(pScreen, &(ps3v->portPrivate->clip));
+ REGION_INIT(pScreen, &(ps3v->portPrivate->clip), NullBox, 0);
S3VResetVideoOverlay(pScrn);
@@ -472,6 +472,13 @@ S3VStopVideo(ScrnInfoPtr pScrn, pointer data, Bool shutdown)
S3VPtr ps3v = S3VPTR(pScrn);
S3VPortPrivPtr pPriv = ps3v->portPrivate;
+ vgaHWPtr hwp = VGAHWPTR(pScrn);
+ /* S3VPtr ps3v = S3VPTR(pScrn);*/
+ int vgaCRIndex, vgaCRReg, vgaIOBase;
+ vgaIOBase = hwp->IOBase;
+ vgaCRIndex = vgaIOBase + 4;
+ vgaCRReg = vgaIOBase + 5;
+
#if 0
MGAPtr pMga = MGAPTR(pScrn);
MGAPortPrivPtr pPriv = pMga->portPrivate;
@@ -509,8 +516,8 @@ S3VStopVideo(ScrnInfoPtr pScrn, pointer data, Bool shutdown)
pPriv->area = NULL;
}
pPriv->videoStatus = 0;
-#if 0
} else {
+#if 0
if(pPriv->videoStatus & CLIENT_VIDEO_ON) {
pPriv->videoStatus |= OFF_TIMER;
pPriv->offTime = currentTime.milliseconds + OFF_DELAY;
@@ -796,6 +803,8 @@ S3VPutImage(
int top, left, npixels, nlines;
BoxRec dstBox;
CARD32 tmp;
+ static int once = 1;
+ static int once2 = 1;
/* If streams aren't enabled, do nothing */
if(!ps3v->NeedSTREAMS)
@@ -881,6 +890,7 @@ S3VPutImage(
xf86XVCopyYUV12ToPacked(buf + (top * srcPitch) + (left >> 1),
buf + offset2, buf + offset3, dst_start,
srcPitch, srcPitch2, dstPitch, nlines, npixels);
+ once2 = 0;
break;
case FOURCC_UYVY:
case FOURCC_YUY2:
@@ -888,6 +898,7 @@ S3VPutImage(
buf += (top * srcPitch) + left;
nlines = ((y2 + 0xffff) >> 16) - top;
xf86XVCopyPacked(buf, dst_start, srcPitch, dstPitch, nlines, npixels);
+ once = 0;
break;
}