summaryrefslogtreecommitdiff
path: root/xc/programs/Xserver
diff options
context:
space:
mode:
authoralanh <alanh>2000-07-11 11:41:03 +0000
committeralanh <alanh>2000-07-11 11:41:03 +0000
commitedf3ff0d1bc32570fa3aae02f949b22bd973e66c (patch)
tree712fb9dabcfac41c1c9e564655b23a20a2c2528c /xc/programs/Xserver
parente2635dd5f7b5bf66850572481ca39d68c5d91ad3 (diff)
Merge XFree86 4.0.1
Diffstat (limited to 'xc/programs/Xserver')
-rw-r--r--xc/programs/Xserver/GL/dri/dri.c30
-rw-r--r--xc/programs/Xserver/GL/dri/dri.h3
-rw-r--r--xc/programs/Xserver/GL/dri/dristruct.h2
-rw-r--r--xc/programs/Xserver/GL/dri/xf86dri.c4
-rw-r--r--xc/programs/Xserver/GL/glx/glxcmds.c2
-rw-r--r--xc/programs/Xserver/GL/glx/glxscreens.c7
-rw-r--r--xc/programs/Xserver/GL/mesa/include/GL/Imakefile5
-rw-r--r--xc/programs/Xserver/GL/mesa/src/Imakefile2
-rw-r--r--xc/programs/Xserver/GL/mesa/src/X/xf86glx.c7
-rw-r--r--xc/programs/Xserver/Imakefile29
-rw-r--r--xc/programs/Xserver/Xext/panoramiXsrv.h3
-rw-r--r--xc/programs/Xserver/hw/xfree86/XF86Config.cpp286
-rw-r--r--xc/programs/Xserver/hw/xfree86/XFree86.cpp8
-rw-r--r--xc/programs/Xserver/hw/xfree86/common/NOTES.Mice470
-rw-r--r--xc/programs/Xserver/hw/xfree86/common/xf86Config.c57
-rw-r--r--xc/programs/Xserver/hw/xfree86/common/xf86PciInfo.h149
-rw-r--r--xc/programs/Xserver/hw/xfree86/common/xf86isaBus.c4
-rw-r--r--xc/programs/Xserver/hw/xfree86/common/xf86pciBus.c152
-rw-r--r--xc/programs/Xserver/hw/xfree86/ddc/edid2.h59
-rw-r--r--xc/programs/Xserver/hw/xfree86/doc/Install224
-rw-r--r--xc/programs/Xserver/hw/xfree86/doc/README.i8102
-rw-r--r--xc/programs/Xserver/hw/xfree86/doc/sgml/DRI.sgml2
-rw-r--r--xc/programs/Xserver/hw/xfree86/doc/sgml/Install.sgml212
-rw-r--r--xc/programs/Xserver/hw/xfree86/doc/sgml/r128.sgml6
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/apm/apm.cpp20
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/ati/ati.cpp22
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/chips/chips.cpp76
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/cirrus/alp_driver.c26
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/cirrus/cirrus.cpp20
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/cyrix/cyrix.cpp20
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/glint/Imakefile19
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/glint/dualmx_accel.c3
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/glint/dualmx_dac.c88
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/glint/glint.cpp67
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/glint/glint.h65
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/glint/glint_dga.c2
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/glint/glint_dri.c19
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/glint/glint_dri.h2
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/glint/glint_dripriv.h2
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/glint/glint_driver.c1266
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/glint/glint_regs.h2
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/glint/pm2_accel.c7
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/glint/tx_accel.c22
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/i740/i740.cpp20
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/i810/Imakefile10
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/i810/i810.cpp20
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/i810/i810.h44
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/i810/i810_accel.c3
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/i810/i810_dri.c25
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/i810/i810_dri.h2
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/i810/i810_driver.c130
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/i810/i810_io.c26
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/i810/i810_memory.c59
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/mga/Imakefile2
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/mga/mga.h57
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/mga/mga_arc.c4
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/mga/mga_dacG.c22
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/mga/mga_dri.c18
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/mga/mga_dri.h6
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/mga/mga_driver.c157
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/mga/mga_macros.h4
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/mga/mga_storm.c367
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/mga/mga_video.c620
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/mga/mga_warp.c2
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/neomagic/neomagic.cpp20
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/nv/nv_shadow.c54
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/r128/Imakefile7
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/r128/README4
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/r128/r128.cpp26
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/r128/r128.h28
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/r128/r128_accel.c17
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/r128/r128_cursor.c6
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/r128/r128_dri.c6
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/r128/r128_driver.c248
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/r128/r128_reg.h60
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/rendition/accelX.c253
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/rendition/hwcursor.c20
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/rendition/rendition.cpp42
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/rendition/rendition.h8
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/rendition/vloaduc.c18
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/rendition/vmisc.c14
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/rendition/vmisc.h6
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/sis/sis.cpp20
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/tdfx/Imakefile7
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx.cpp20
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx.h2
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_accel.c7
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_dga.c2
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_dri.c21
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_driver.c165
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_io.c2
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_priv.c18
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfxdefs.h2
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/trident/trident.cpp20
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/tseng/tseng.cpp20
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/v4l/v4l.cpp20
-rw-r--r--xc/programs/Xserver/hw/xfree86/etc/Xinstall.sh183
-rw-r--r--xc/programs/Xserver/hw/xfree86/etc/bindist/FreeBSD-aout/set-list5
-rw-r--r--xc/programs/Xserver/hw/xfree86/etc/bindist/FreeBSD/set-list5
-rw-r--r--xc/programs/Xserver/hw/xfree86/etc/bindist/Interactive/set-list5
-rw-r--r--xc/programs/Xserver/hw/xfree86/etc/bindist/Linux-axp/set-list5
-rw-r--r--xc/programs/Xserver/hw/xfree86/etc/bindist/Linux-ix86/set-list5
-rw-r--r--xc/programs/Xserver/hw/xfree86/etc/bindist/Linux-m68k/set-list5
-rw-r--r--xc/programs/Xserver/hw/xfree86/etc/bindist/Linux-ppc/set-list5
-rw-r--r--xc/programs/Xserver/hw/xfree86/etc/bindist/LynxOS/set-list5
-rw-r--r--xc/programs/Xserver/hw/xfree86/etc/bindist/NetBSD-ix86/set-list5
-rw-r--r--xc/programs/Xserver/hw/xfree86/etc/bindist/OpenBSD-ix86/set-list5
-rw-r--r--xc/programs/Xserver/hw/xfree86/etc/bindist/SVR4.0/set-list5
-rw-r--r--xc/programs/Xserver/hw/xfree86/etc/bindist/SVR4.0/var-dir1
-rw-r--r--xc/programs/Xserver/hw/xfree86/etc/bindist/SVR4.0/var-list1
-rw-r--r--xc/programs/Xserver/hw/xfree86/etc/bindist/Solaris/set-list5
-rw-r--r--xc/programs/Xserver/hw/xfree86/etc/bindist/Solaris/var-dir1
-rw-r--r--xc/programs/Xserver/hw/xfree86/etc/bindist/Solaris/var-list1
-rw-r--r--xc/programs/Xserver/hw/xfree86/etc/bindist/UnixWare/set-list5
-rw-r--r--xc/programs/Xserver/hw/xfree86/etc/bindist/UnixWare/var-dir1
-rw-r--r--xc/programs/Xserver/hw/xfree86/etc/bindist/UnixWare/var-list1
-rw-r--r--xc/programs/Xserver/hw/xfree86/input/dynapro/dynapro.cpp23
-rw-r--r--xc/programs/Xserver/hw/xfree86/input/keyboard/keyboard.cpp38
-rw-r--r--xc/programs/Xserver/hw/xfree86/input/microtouch/microtouch.cpp23
-rw-r--r--xc/programs/Xserver/hw/xfree86/input/mouse/mouse.cpp59
-rw-r--r--xc/programs/Xserver/hw/xfree86/input/void/void.cpp20
-rw-r--r--xc/programs/Xserver/hw/xfree86/input/wacom/wacom.cpp23
-rw-r--r--xc/programs/Xserver/hw/xfree86/loader/extsym.c12
-rw-r--r--xc/programs/Xserver/hw/xfree86/loader/xf86sym.c78
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/Imakefile8
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/amoeba/Imakefile7
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/bsd/Imakefile4
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/bsdi/Imakefile7
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/dgux/Imakefile2
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/hurd/Imakefile7
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/linux/Imakefile8
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/linux/agpgart.h1
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/linux/drm/Imakefile2
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/linux/drm/drmmodule.c2
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/Makefile.kernel2
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/i810_dma.c2
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/mga_dma.c26
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/mga_state.c9
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/linux/drm/xf86drm.c15
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/linux/drm/xf86drmHash.c2
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/linux/drm/xf86drmRandom.c2
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/linux/drm/xf86drmSL.c2
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/linux/int10/Imakefile4
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/linux/int10/linux.c38
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/linux/lnxResource.c4
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/lynxos/Imakefile7
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/mach/Imakefile7
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/minix/Imakefile7
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/nto/Imakefile7
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/os2/Imakefile7
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/pmax/Imakefile2
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/qnx4/Imakefile9
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/sco/Imakefile7
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/shared/libc_wrapper.c24
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/shared/mapVT_noop.c43
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/shared/sigio.c40
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/sol8_x86/Imakefile2
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/solx86/Imakefile2
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/sysv/Imakefile2
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/vbe/Imakefile25
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/vbe/vbe.c44
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/vbe/vbe.h4
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/xf86_OSproc.h2
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/xf86_ansic.h38
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/xf86_libc.h2
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/xf86drm.h24
-rw-r--r--xc/programs/Xserver/hw/xfree86/xaa/NOTES1904
-rw-r--r--xc/programs/Xserver/hw/xfree86/xaa/xaaStateChange.c1628
-rw-r--r--xc/programs/Xserver/include/globals.h4
-rw-r--r--xc/programs/Xserver/os/Imakefile11
170 files changed, 5290 insertions, 5480 deletions
diff --git a/xc/programs/Xserver/GL/dri/dri.c b/xc/programs/Xserver/GL/dri/dri.c
index 1d3eeee37..2d1ee7bc9 100644
--- a/xc/programs/Xserver/GL/dri/dri.c
+++ b/xc/programs/Xserver/GL/dri/dri.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/GL/dri/dri.c,v 1.13 2000/03/04 01:53:01 martin Exp $ */
+/* $XFree86: xc/programs/Xserver/GL/dri/dri.c,v 1.19 2000/06/25 16:03:43 tsi Exp $ */
/**************************************************************************
Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
@@ -32,7 +32,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*/
-#if XFree86LOADER
+#ifdef XFree86LOADER
#include "xf86.h"
#include "xf86_ansic.h"
#else
@@ -949,6 +949,13 @@ DRIGetDrawableInfo(ScreenPtr pScreen,
}
}
+ /* If the driver wants to be notified when the index is
+ * set for a drawable, let it know now.
+ */
+ if (pDRIPriv->pDriverInfo->SetDrawableIndex)
+ pDRIPriv->pDriverInfo->SetDrawableIndex(pWin,
+ pDRIDrawablePriv->drawableIndex);
+
/* reinit drawable ID if window is visible */
if ((pWin->viewable) &&
(pDRIPriv->pDriverInfo->bufferRequests != DRI_NO_WINDOWS))
@@ -1055,6 +1062,7 @@ DRICreateInfoRec(void)
inforec->TransitionTo2d = 0;
inforec->TransitionTo3d = 0;
+ inforec->SetDrawableIndex = 0;
return inforec;
}
@@ -1393,10 +1401,10 @@ DRICopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
}
static void
-DRIGetSecs(unsigned long *secs, unsigned long *usecs)
+DRIGetSecs(long *secs, long *usecs)
{
-#if XFree86LOADER
- xf86getsecs(secs,usecs);
+#ifdef XFree86LOADER
+ getsecs(secs,usecs);
#else
struct timeval tv;
@@ -1421,12 +1429,12 @@ DRIComputeMilliSeconds(unsigned long s_secs, unsigned long s_usecs,
static void
DRISpinLockTimeout(drmLock *lock, int val, unsigned long timeout /* in mS */)
{
- int count = 10000;
- char ret;
- unsigned long s_secs, s_usecs;
- unsigned long f_secs, f_usecs;
- unsigned long msecs;
- unsigned long prev = 0;
+ int count = 10000;
+ char ret;
+ long s_secs, s_usecs;
+ long f_secs, f_usecs;
+ long msecs;
+ long prev = 0;
DRIGetSecs(&s_secs, &s_usecs);
diff --git a/xc/programs/Xserver/GL/dri/dri.h b/xc/programs/Xserver/GL/dri/dri.h
index 443ba5e30..e50b6119f 100644
--- a/xc/programs/Xserver/GL/dri/dri.h
+++ b/xc/programs/Xserver/GL/dri/dri.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/GL/dri/dri.h,v 1.9 2000/03/04 01:53:02 martin Exp $ */
+/* $XFree86: xc/programs/Xserver/GL/dri/dri.h,v 1.12 2000/06/23 19:29:41 dawes Exp $ */
/**************************************************************************
Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
@@ -117,6 +117,7 @@ typedef struct {
CARD32 index);
void (*TransitionTo3d)(ScreenPtr pScreen);
void (*TransitionTo2d)(ScreenPtr pScreen);
+ void (*SetDrawableIndex)(WindowPtr pWin, CARD32 index);
/* wrapped functions */
DRIWrappedFuncsRec wrap;
diff --git a/xc/programs/Xserver/GL/dri/dristruct.h b/xc/programs/Xserver/GL/dri/dristruct.h
index d576f40af..02d62ae49 100644
--- a/xc/programs/Xserver/GL/dri/dristruct.h
+++ b/xc/programs/Xserver/GL/dri/dristruct.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/GL/dri/dristruct.h,v 1.7 2000/03/02 16:07:38 martin Exp $ */
+/* $XFree86: xc/programs/Xserver/GL/dri/dristruct.h,v 1.8 2000/06/17 00:03:12 martin Exp $ */
/**************************************************************************
Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
diff --git a/xc/programs/Xserver/GL/dri/xf86dri.c b/xc/programs/Xserver/GL/dri/xf86dri.c
index 776725442..4fd33c2ec 100644
--- a/xc/programs/Xserver/GL/dri/xf86dri.c
+++ b/xc/programs/Xserver/GL/dri/xf86dri.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/GL/dri/xf86dri.c,v 1.6 2000/02/23 04:46:52 martin Exp $ */
+/* $XFree86: xc/programs/Xserver/GL/dri/xf86dri.c,v 1.8 2000/06/25 16:03:43 tsi Exp $ */
/**************************************************************************
Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
@@ -33,7 +33,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*/
-#if XFree86LOADER
+#ifdef XFree86LOADER
#include "xf86.h"
#include "xf86_ansic.h"
#endif
diff --git a/xc/programs/Xserver/GL/glx/glxcmds.c b/xc/programs/Xserver/GL/glx/glxcmds.c
index 6c23fe534..64b28a206 100644
--- a/xc/programs/Xserver/GL/glx/glxcmds.c
+++ b/xc/programs/Xserver/GL/glx/glxcmds.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/GL/glx/glxcmds.c,v 1.4 1999/07/18 08:34:22 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/GL/glx/glxcmds.c,v 1.5 2000/06/17 00:03:12 martin Exp $ */
/*
** The contents of this file are subject to the GLX Public License Version 1.0
** (the "License"). You may not use this file except in compliance with the
diff --git a/xc/programs/Xserver/GL/glx/glxscreens.c b/xc/programs/Xserver/GL/glx/glxscreens.c
index 9e4a3c91c..d68bca06e 100644
--- a/xc/programs/Xserver/GL/glx/glxscreens.c
+++ b/xc/programs/Xserver/GL/glx/glxscreens.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/GL/glx/glxscreens.c,v 1.2 1999/06/14 07:31:32 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/GL/glx/glxscreens.c,v 1.4 2000/06/17 00:03:12 martin Exp $ */
/*
** The contents of this file are subject to the GLX Public License Version 1.0
** (the "License"). You may not use this file except in compliance with the
@@ -20,8 +20,13 @@
** $SGI$
*/
+#ifdef IN_MODULE
+#include <xf86_ansic.h>
+#else
#include <string.h>
#include <signal.h>
+#endif
+
#include <windowstr.h>
#include "glxserver.h"
diff --git a/xc/programs/Xserver/GL/mesa/include/GL/Imakefile b/xc/programs/Xserver/GL/mesa/include/GL/Imakefile
index 3bef7e2db..69ea6c654 100644
--- a/xc/programs/Xserver/GL/mesa/include/GL/Imakefile
+++ b/xc/programs/Xserver/GL/mesa/include/GL/Imakefile
@@ -1,4 +1,4 @@
-XCOMM $XFree86: xc/programs/Xserver/GL/mesa/include/GL/Imakefile,v 1.4 2000/02/23 04:46:55 martin Exp $
+XCOMM $XFree86: xc/programs/Xserver/GL/mesa/include/GL/Imakefile,v 1.5 2000/06/30 18:27:01 dawes Exp $
#define IHaveModules
#include <Server.tmpl>
@@ -6,7 +6,8 @@ XCOMM $XFree86: xc/programs/Xserver/GL/mesa/include/GL/Imakefile,v 1.4 2000/02/2
DEFINES = $(GLX_DEFINES)
LinkSourceFile(gl.h, ../../../../../../extras/Mesa/include/GL)
-LinkSourceFile(glx.h, ../../../../../../extras/Mesa/include/GL)
+LinkSourceFile(glx.h, ../../../../../../../xc/include/GL)
+LinkSourceFile(glxtokens.h, ../../../../../../../xc/include/GL)
LinkSourceFile(xmesa.h, ../../../../../../extras/Mesa/include/GL)
LinkSourceFile(xmesa_x.h, ../../../../../../extras/Mesa/include/GL)
LinkSourceFile(xmesa_xf86.h, ../../../../../../extras/Mesa/include/GL)
diff --git a/xc/programs/Xserver/GL/mesa/src/Imakefile b/xc/programs/Xserver/GL/mesa/src/Imakefile
index b3351b984..42eb72f67 100644
--- a/xc/programs/Xserver/GL/mesa/src/Imakefile
+++ b/xc/programs/Xserver/GL/mesa/src/Imakefile
@@ -1,4 +1,4 @@
-XCOMM $XFree86: xc/programs/Xserver/GL/mesa/src/Imakefile,v 1.13 2000/03/02 16:07:38 martin Exp $
+XCOMM $XFree86: xc/programs/Xserver/GL/mesa/src/Imakefile,v 1.14 2000/06/17 00:03:13 martin Exp $
#define IHaveModules
#include <Server.tmpl>
diff --git a/xc/programs/Xserver/GL/mesa/src/X/xf86glx.c b/xc/programs/Xserver/GL/mesa/src/X/xf86glx.c
index 656c7af5a..00e151147 100644
--- a/xc/programs/Xserver/GL/mesa/src/X/xf86glx.c
+++ b/xc/programs/Xserver/GL/mesa/src/X/xf86glx.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/GL/mesa/src/X/xf86glx.c,v 1.7 2000/02/23 04:46:56 martin Exp $ */
+/* $XFree86: xc/programs/Xserver/GL/mesa/src/X/xf86glx.c,v 1.9 2000/06/17 00:03:13 martin Exp $ */
/**************************************************************************
Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
@@ -488,6 +488,8 @@ static void init_screen_visuals(int screen)
/* Alloc space for the list of XMesa visuals */
pXMesaVisual = (XMesaVisual *)__glXMalloc(MESAScreens[screen].num_vis *
sizeof(XMesaVisual));
+ __glXMemset(pXMesaVisual, 0,
+ MESAScreens[screen].num_vis * sizeof(XMesaVisual));
used = (int *)__glXMalloc(pScreen->numVisuals * sizeof(int));
__glXMemset(used, 0, pScreen->numVisuals * sizeof(int));
@@ -578,7 +580,8 @@ extern void __MESA_resetExtension(void)
for (i = 0; i < screenInfo.numScreens; i++) {
for (j = 0; j < MESAScreens[i].num_vis; j++) {
- XMesaDestroyVisual(MESAScreens[i].xm_vis[j]);
+ if (MESAScreens[i].xm_vis[j])
+ XMesaDestroyVisual(MESAScreens[i].xm_vis[j]);
}
__glXFree(MESAScreens[i].glx_vis);
MESAScreens[i].glx_vis = NULL;
diff --git a/xc/programs/Xserver/Imakefile b/xc/programs/Xserver/Imakefile
index cf9770537..9e28fb7c6 100644
--- a/xc/programs/Xserver/Imakefile
+++ b/xc/programs/Xserver/Imakefile
@@ -2,7 +2,7 @@ XCOMM $TOG: Imakefile /main/249 1997/12/11 11:18:14 kaleb $
/*
* Server Master Makefile
*/
-XCOMM $XFree86: xc/programs/Xserver/Imakefile,v 3.182 2000/02/29 15:24:15 tsi Exp $
+XCOMM $XFree86: xc/programs/Xserver/Imakefile,v 3.184 2000/06/17 00:03:10 martin Exp $
#ifndef InstallXserverSetUID
#define InstallXserverSetUID NO
@@ -729,6 +729,31 @@ $(SAVAGEOBJS) $(XSAVAGE) $(SAVAGELIBS) $(SAVAGESYSLIBS):: $(SAVAGEDIRS)
ServerTarget(Xsavage,$(SAVAGEDIRS),$(SAVAGEOBJS),$(SAVAGELIBS),$(SAVAGESYSLIBS))
#endif /* XSAVAGEServer */
+#if XIgsServer
+XCOMM
+XCOMM server with Keith's S3 Igs driver
+XCOMM
+
+ IGSDIR = $(KDRIVE)/igs
+ IGS = $(IGSDIR)/LibraryTargetName(igs)
+
+ KDDIRS = StdKdDirs
+
+ IGSDIRS = $(STDDIRS) $(KDDIRS) $(IGSDIR)
+
+ IGSLIBS = PreFbLibs $(IGS) KdLibs FbPostFbLibs
+ IGSSYSLIBS = StdKdSysLibs
+
+#if HasParallelMake
+MakeMutex($(IGSDIRS) $(IGSOBJS) $(IGSLIBS) $(IGSSYSLIBS))
+#endif
+#if ForceServerRemake
+$(IGSOBJS) $(XIGS) $(IGSLIBS) $(IGSSYSLIBS):: $(IGSDIRS)
+ @if [ -f $@ ]; then touch $@; fi
+#endif
+ServerTarget(Xigs,$(IGSDIRS),$(IGSOBJS),$(IGSLIBS),$(IGSSYSLIBS))
+#endif /* XIGSServer */
+
#if XTridentServer
XCOMM
XCOMM server with Keith's TRIDENT Cyber9525 driver
@@ -862,7 +887,7 @@ ServerTarget(Xitsy,$(ITSYDIRS),$(ITSYOBJS),$(ITSYLIBS),$(ITSYSYSLIBS))
#endif /* XItsyServer */
KDRIVEDIRS=$(KDDIRS) $(FBDEVDIR) $(SAVAGEDIR) $(TRIDENTDIR) $(SIS530DIR) \
- $(TRIODIR) $(TS300DIR) $(ITSYDIR)
+ $(TRIODIR) $(TS300DIR) $(ITSYDIR) $(IGSDIR)
#if XprtServer && !MakeDllModules
XCOMM
diff --git a/xc/programs/Xserver/Xext/panoramiXsrv.h b/xc/programs/Xserver/Xext/panoramiXsrv.h
index c12986093..afdc4055f 100644
--- a/xc/programs/Xserver/Xext/panoramiXsrv.h
+++ b/xc/programs/Xserver/Xext/panoramiXsrv.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/Xext/panoramiXsrv.h,v 1.5 2000/03/03 22:17:37 mvojkovi Exp $ */
+/* $XFree86: xc/programs/Xserver/Xext/panoramiXsrv.h,v 1.6 2000/03/30 18:20:35 mvojkovi Exp $ */
#ifndef _PANORAMIXSRV_H_
#define _PANORAMIXSRV_H_
@@ -16,6 +16,7 @@ extern PanoramiXRes * PanoramiXFindIDByScrnum(RESTYPE, XID, int);
extern PanoramiXRes * PanoramiXFindIDOnAnyScreen(RESTYPE, XID);
extern WindowPtr PanoramiXChangeWindow(int, WindowPtr);
extern Bool XineramaRegisterConnectionBlockCallback(void (*func)(void));
+extern int XineramaDeleteResource(pointer, XID);
extern RegionRec XineramaScreenRegions[MAXSCREENS];
diff --git a/xc/programs/Xserver/hw/xfree86/XF86Config.cpp b/xc/programs/Xserver/hw/xfree86/XF86Config.cpp
index 7a9ad4780..96597ff11 100644
--- a/xc/programs/Xserver/hw/xfree86/XF86Config.cpp
+++ b/xc/programs/Xserver/hw/xfree86/XF86Config.cpp
@@ -1,5 +1,7 @@
-.\" $XFree86: xc/programs/Xserver/hw/xfree86/XF86Config.cpp,v 1.3 2000/03/08 19:12:44 dawes Exp $
-.TH XF86Config __filemansuffix__ "Version 4.0" "XFree86"
+.\" $XFree86: xc/programs/Xserver/hw/xfree86/XF86Config.cpp,v 1.10 2000/06/20 05:08:42 dawes Exp $
+.\" shorthand for double quote that works everywhere.
+.ds q \N'34'
+.TH XF86Config __filemansuffix__ "Version 4.0.1" "XFree86"
.SH NAME
XF86Config - Configuration File for XFree86
.SH DESCRIPTION
@@ -84,8 +86,10 @@ the form:
.PP
.RS 4
.nf
-.BI "Section """ SectionName """"
-.I " SectionEntry"
+.\" Some man macros don't handle quotes in .BI, etc very well
+.\" \fBSection "\fP\fISectionName\fP\fB"\fP
+.BI "Section \*q" SectionName \*q
+.RI " " SectionEntry
...
.B EndSection
.fi
@@ -162,10 +166,13 @@ on the keyword. The argument types are:
.nf
.BR "Integer " "an integer number in decimal, hex or octal"
.BR "Real " "a floating point number"
-.BR "String " "a string enclosed in double quote marks ("")"
+.BR "String " "a string enclosed in double quote marks (\*q)"
.fi
.RE
.PP
+Note: hex integer values must be prefixed with "0x", and octal values
+with "0".
+.PP
A special keyword called
.B Option
may be used to provide free-form data to various components of the server.
@@ -214,18 +221,18 @@ and the following boolean option values are recognised as
.RE
.PP
If an option name is prefixed with
-.RB """" No """",
+.RB \*q No \*q,
then the option value is negated.
.PP
Example: the following option entries are equivalent:
.PP
.RS 4
.nf
-.B "Option ""Accel"" ""Off"""
-.B "Option ""NoAccel"""
-.B "Option ""NoAccel"" ""On"""
-.B "Option ""Accel"" ""false"""
-.B "Option ""Accel"" ""no"""
+.B "Option \*qAccel\*q \*qOff\*q"
+.B "Option \*qNoAccel\*q"
+.B "Option \*qNoAccel\*q \*qOn\*q"
+.B "Option \*qAccel\*q \*qfalse\*q"
+.B "Option \*qAccel\*q \*qno\*q"
.fi
.RE
.PP
@@ -256,14 +263,14 @@ The command line settings override the values specified in the config
file.
The entries that can appear in this section are:
.TP 7
-.BI "FontPath """ path """"
+.BI "FontPath \*q" path \*q
sets the search path for fonts. This path is a comma separated
list of font path elements which the X server searches for font databases.
Multiple
.B FontPath
entries may be specified, and they will be
concatenated to build up the fontpath used by the server.
-Font path elements may be either absolute directory paths, or the
+Font path elements may be either absolute directory paths, or
a font server identifier. Font server identifiers have the form:
.PP
.RS 11
@@ -318,7 +325,7 @@ Font path elements that are found to be invalid are removed from the
font path when the server starts up.
.RE
.TP 7
-.BI "RGBPath """ path """"
+.BI "RGBPath \*q" path \*q
sets the path name for the RGB color database.
When this entry is not specified in the config file, the server falls back
to the compiled-in default RGB path, which is:
@@ -327,7 +334,7 @@ to the compiled-in default RGB path, which is:
__projectroot__/lib/X11/rgb
.RE
.TP 7
-.BI "ModulePath """ path """"
+.BI "ModulePath \*q" path \*q
sets the search path for loadable X server modules. This path is a
comma separated list of directories which the X server searches for
loadable modules loading in the order specified. Multiple
@@ -337,7 +344,7 @@ module search path used by the server.
.\" The LogFile keyword is not currently implemented
.ig
.TP 7
-.BI "LogFile """ path """"
+.BI "LogFile \*q" path \*q
sets the name of the X server log file. The default log file name is
.PP
.RS 11
@@ -368,7 +375,7 @@ section. Options with command line equivalents are overridden when their
command line equivalent is used. The options recognised by this section
are:
.TP 7
-.BI "Option ""NoTrapSignals"" """ boolean """"
+.BI "Option \*qNoTrapSignals\*q \*q" boolean \*q
This prevents the X server from trapping a range of unexpected
fatal signals and exiting cleanly. Instead, the X server will die
and drop core where the fault occurred. The default behaviour is
@@ -376,14 +383,14 @@ for the X server exit cleanly, but still drop a core file. In
general you never want to use this option unless you are debugging
an X server problem and know how to deal with the consequences.
.TP 7
-.BI "Option ""DontZap"" """ boolean """"
+.BI "Option \*qDontZap\*q \*q" boolean \*q
This disallows the use of the
.B Ctrl+Alt+Backspace
sequence. That sequence is normally used to terminate the X server.
When this option is enabled, that key sequence has no special meaning
and is passed to clients. Default: off.
.TP 7
-.BI "Option ""DontZoom"" """ boolean """"
+.BI "Option \*qDontZoom\*q \*q" boolean \*q
This disallows the use of the
.B Ctrl+Alt+Keypad-Plus
and
@@ -392,29 +399,29 @@ sequences. These sequences allows you to switch between video modes.
When this option is enabled, those key sequences have no special meaning
and are passed to clients. Default: off.
.TP 7
-.BI "Option ""DisableVidModeExtension"" """ boolean """"
+.BI "Option \*qDisableVidModeExtension\*q \*q" boolean \*q
This disables the parts of the VidMode extension used by the xvidtune client
that can be used to change the video modes. Default: the VidMode extension
is enabled.
.TP 7
-.BI "Option ""AllowNonLocalXvidtune"" """ boolean """"
+.BI "Option \*qAllowNonLocalXvidtune\*q \*q" boolean \*q
This allows the xvidtune client (and other clients that use the VidMode
extension) to connect from another host. Default: off.
.TP 7
-.BI "Option ""DisableModInDev"" """ boolean """"
+.BI "Option \*qDisableModInDev\*q \*q" boolean \*q
This disables the parts of the XFree86-Misc extension that can be used to
modify the input device settings dynamically. Default: that functionality
is enabled.
.TP 7
-.BI "Option ""AllowNonLocalModInDev"" """ boolean """"
+.BI "Option \*qAllowNonLocalModInDev\*q \*q" boolean \*q
This allows a client to connect from another host and change keyboard
and mouse settings in the running server. Default: off.
.TP 7
-.BI "Option ""AllowMouseOpenFail"" """ boolean """"
+.BI "Option \*qAllowMouseOpenFail\*q \*q" boolean \*q
This allows the server to start up even if the mouse device can't be
opened/initialised. Default: false.
.TP 7
-.BI "Option ""VTInit"" """ command """"
+.BI "Option \*qVTInit\*q \*q" command \*q
Runs
.I command
after the VT used by the server has been opened.
@@ -423,7 +430,7 @@ real user's id with stdin and stdout set to the VT. The purpose
of this option is to allow system dependent VT initialisation
commands to be run. This option should rarely be needed. Default: not set.
.TP 7
-.BI "Option ""VTSysReq"" """ boolean """"
+.BI "Option \*qVTSysReq\*q \*q" boolean \*q
enables the SYSV-style VT switch sequence for non-SYSV systems
which support VT switching. This sequence is
.B Alt-SysRq
@@ -436,26 +443,26 @@ access them. Default: off.
.\" The following four options are "undocumented".
.ig
.TP 7
-.BI "Option ""PciProbe1"""
+.BI "Option \*qPciProbe1\*q"
Use PCI probe method 1. Default: set.
.TP 7
-.BI "Option ""PciProbe2"""
+.BI "Option \*qPciProbe2\*q"
Use PCI probe method 2. Default: not set.
.TP 7
-.BI "Option ""PciForceConfig1"""
+.BI "Option \*qPciForceConfig1\*q"
Force the use PCI config type 1. Default: not set.
.TP 7
-.BI "Option ""PciForceConfig2"""
+.BI "Option \*qPciForceConfig2\*q"
Force the use PCI config type 2. Default: not set.
..
.TP 7
-.BI "Option ""BlankTime"" """ time """"
+.BI "Option \*qBlankTime\*q \*q" time \*q
sets the inactivity timeout for the blanking phase of the screensaver.
.I time
is in minutes. This is equivalent to the Xserver's `-s' flag, and the
value can be changed at run-time with \fIxset(1)\fP. Default: 10 minutes.
.TP 7
-.BI "Option ""StandbyTime"" """ time """"
+.BI "Option \*qStandbyTime\*q \*q" time \*q
sets the inactivity timeout for the "standby" phase of DPMS mode.
.I time
is in minutes, and the value can be changed at run-time with \fIxset(1)\fP.
@@ -463,10 +470,10 @@ Default: 20 minutes.
This is only suitable for VESA DPMS compatible monitors, and may not be
supported by all video drivers. It is only enabled for screens that
have the
-.B """DPMS"""
-option set.
+.B \*qDPMS\*q
+option set (see the MONITOR section below).
.TP 7
-.BI "Option ""SuspendTime"" """ time """"
+.BI "Option \*qSuspendTime\*q \*q" time \*q
sets the inactivity timeout for the "suspend" phase of DPMS mode.
.I time
is in minutes, and the value can be changed at run-time with \fIxset(1)\fP.
@@ -474,10 +481,10 @@ Default: 30 minutes.
This is only suitable for VESA DPMS compatible monitors, and may not be
supported by all video drivers. It is only enabled for screens that
have the
-.B """DPMS"""
-option set.
+.B \*qDPMS\*q
+option set (see the MONITOR section below).
.TP 7
-.BI "Option ""OffTime"" """ time """"
+.BI "Option \*qOffTime\*q \*q" time \*q
sets the inactivity timeout for the "off" phase of DPMS mode.
.I time
is in minutes, and the value can be changed at run-time with \fIxset(1)\fP.
@@ -485,28 +492,28 @@ Default: 40 minutes.
This is only suitable for VESA DPMS compatible monitors, and may not be
supported by all video drivers. It is only enabled for screens that
have the
-.B """DPMS"""
-option set.
+.B \*qDPMS\*q
+option set (see the MONITOR section below).
.TP 7
-.BI "Option ""Pixmap"" """ bpp """"
+.BI "Option \*qPixmap\*q \*q" bpp \*q
This sets the pixmap format to use for depth 24. Allowed values for
.I bpp
are 24 and 32. Default: 32 unless driver constraints don't allow this
(which is rare). Note: some clients don't behave well when
this value is set to 24.
.TP 7
-.BI "Option ""PC98"" """ boolean """"
+.BI "Option \*qPC98\*q \*q" boolean \*q
Specify that the machine is a Japanese PC-98 machine. This should not
be enabled for anything other than the Japanese-specific PC-98
architecture. Default: auto-detected.
.\" Doubt this should be documented.
.ig
.TP 7
-.BI "Option ""EstimateSizesAggressively"" """ value """"
+.BI "Option \*qEstimateSizesAggressively\*q \*q" value \*q
This option affects the way that bus resource sizes are estimated. Default: 0.
..
.TP 7
-.BI "Option ""NoPM"" """ boolean """"
+.BI "Option \*qNoPM\*q \*q" boolean \*q
Disables something to do with power management events. Default: PM enabled
on platforms that support it.
.SH MODULE SECTION
@@ -523,7 +530,7 @@ used form is an entry that uses the
.B Load
keyword, as described here:
.TP 7
-.BI "Load """ modulename """"
+.BI "Load \*q" modulename \*q
This instructs the server to load the module called
.IR modulename .
The module name given should be the module's standard name, not the
@@ -534,7 +541,7 @@ include the "lib" prefix, or the ".a", ".o", or ".so" suffixes.
Example: the Type 1 font rasteriser can be loaded with the following entry:
.PP
.RS 4
-.B "Load ""type1"""
+.B "Load \*qtype1\*q"
.RE
.RE
.PP
@@ -552,8 +559,8 @@ disabled by using the following entry:
.PP
.RS 4
.nf
-.B "SubSection ""extmod"""
-.B " Option ""omit XFree86-DGA"""
+.B "SubSection \*qextmod\*q"
+.B " Option \*qomit XFree86-DGA\*q"
.B EndSubSection
.fi
.RE
@@ -590,9 +597,9 @@ sections have the following format:
.PP
.RS 4
.nf
-.B "Section ""InputDevice"""
-.BI " Identifier """ name """"
-.BI " Driver """ inputdriver """"
+.B "Section \*qInputDevice\*q"
+.BI " Identifier \*q" name \*q
+.BI " Driver \*q" inputdriver \*q
.I " options"
.I " ..."
.B "EndSection"
@@ -605,7 +612,7 @@ entry specifies the unique name for this input device. The
.B Driver
entry specifies the name of the driver to use for this input device.
When using the loadable server, the input driver module
-.RI """ inputdriver """
+.RI \*q inputdriver \*q
will be loaded for each active
.B InputDevice
section. An
@@ -625,7 +632,7 @@ sections recognise some driver-independent
which are described here. See the individual input driver manual pages
for a description of the device-specific options.
.TP 7
-.BI "Option ""CorePointer"""
+.BI "Option \*qCorePointer\*q"
When this is set, the input device is installed as the core (primary)
pointer device. There must be exactly one core pointer. If this option
is not set here, or in the
@@ -638,7 +645,7 @@ This option is implicitly set when the obsolete
.B Pointer
section is used.
.TP 7
-.BI "Option ""CoreKeyboard"""
+.BI "Option \*qCoreKeyboard\*q"
When this is set, the input device is to be installed as the core
(primary) keyboard device. There must be exactly one core keyboard. If
this option is not set here, in the
@@ -651,18 +658,18 @@ This option is implicitly set when the obsolete
.B Keyboard
section is used.
.TP 7
-.BI "Option ""AlwaysCore"" """ boolean """"
+.BI "Option \*qAlwaysCore\*q \*q" boolean \*q
.TP 7
-.BI "Option ""SendCoreEvents"" """ boolean """"
+.BI "Option \*qSendCoreEvents\*q \*q" boolean \*q
Both of these options are equivalent, and when enabled cause the
input device to always report core events. This can be used, for
example, to allow an additional pointer device to generate core
pointer events (like moving the cursor, etc).
.TP 4
-.BI "Option ""HistorySize"" """ number """"
+.BI "Option \*qHistorySize\*q \*q" number \*q
Sets the motion history size. Default: 0.
.TP 7
-.BI "Option ""SendDragEvents"" """ boolean """"
+.BI "Option \*qSendDragEvents\*q \*q" boolean \*q
???
.SH DEVICE SECTION
The config file may have multiple
@@ -674,9 +681,9 @@ sections have the following format:
.PP
.RS 4
.nf
-.B "Section ""Device"""
-.BI " Identifier """ name """"
-.BI " Driver """ driver """"
+.B "Section \*qDevice\*q"
+.BI " Identifier \*q" name \*q
+.BI " Driver \*q" driver \*q
.I " entries"
.I " ..."
.B "EndSection"
@@ -689,7 +696,7 @@ entry specifies the unique name for this graphics device. The
.B Driver
entry specifies the name of the driver to use for this graphics device.
When using the loadable server, the driver module
-.RI """ driver """
+.RI \*q driver \*q
will be loaded for each active
.B Device
section. A
@@ -714,7 +721,7 @@ section instead of here in the
.B Device
section.
.TP 7
-.BI "BusID """ bus-id """"
+.BI "BusID \*q" bus-id \*q
This specifies the bus location of the graphics card. For PCI/AGP cards,
the
.I bus-id
@@ -730,14 +737,27 @@ can usually be found by running the X server with the
.B \-scanpci
command line option.
.TP 7
-.BI "Chipset """ chipset """"
+.BI "Screen " number
+This option is mandatory for cards where a single PCI entity can drive more
+than one display (i.e., multiple CRTCs sharing a single graphics accelerator
+and video memory). One
+.B Device
+section is required for each head, and this
+parameter determines which head each of the
+.B Device
+sections applies to. The legal values of
+.I number
+range from 0 to one less than the total number of heads per entity.
+Most drivers require that the primary screen (0) be present.
+.TP 7
+.BI "Chipset \*q" chipset \*q
This usually optional entry specifies the chipset used on the graphics
board. In most cases this entry is not required because the drivers
will probe the hardware to determine the chipset type. Don't
specify it unless the driver-specific documentation recommends that you
do.
.TP 7
-.BI "Ramdac """ ramdac-type """"
+.BI "Ramdac \*q" ramdac-type \*q
This optional entry specifies the type of RAMDAC used on the graphics
board. This is only used by a few of the drivers, and in most cases it
is not required because the drivers will probe the hardware to determine
@@ -769,7 +789,7 @@ drivers do not use this entry, and it is only required for some older
boards with non-programmable clocks. Don't specify this entry unless
the driver-specific documentation explicitly recommends that you do.
.TP
-.BI "ClockChip """ clockchip-type """"
+.BI "ClockChip \*q" clockchip-type \*q
This optional entry is used to specify the clock chip type on
graphics boards which have a programmable clock generator. Only
a few X servers support programmable clock chips. For details,
@@ -840,8 +860,8 @@ sections have the following format:
.PP
.RS 4
.nf
-.B "Section ""Monitor"""
-.BI " Identifier """ name """"
+.B "Section \*qMonitor\*q"
+.BI " Identifier \*q" name \*q
.I " entries"
.I " ..."
.B "EndSection"
@@ -871,10 +891,10 @@ The entries that may be used in
.B Monitor
sections are described below.
.TP 7
-.BI "VendorName """ vendor """"
+.BI "VendorName \*q" vendor \*q
This optional entry specifies the monitor's manufacturer.
.TP 7
-.BI "ModelName """ model """"
+.BI "ModelName \*q" model \*q
This optional entry specifies the monitor's model.
.TP 7
.BI "HorizSync " "horizsync-range"
@@ -916,7 +936,7 @@ value or as three separate RGB values. The values should be in the range
0.1 to 10.0, and the default is 1.0. Not all drivers are capable
of using this information.
.TP 7
-.BI "UseModes """ modesection-id """"
+.BI "UseModes \*q" modesection-id \*q
Include the set of modes listed in the
.B Modes
section called
@@ -945,27 +965,27 @@ specifies the horizontal timings for the mode.
.BI "VTimings " "vdisp vsyncstart vsyncend vtotal"
specifies the vertical timings for the mode.
.TP 4
-.BI "Flags """ flag """" " ..."
+.BI "Flags \*q" flag \*q " ..."
specifies an optional set of mode flags, each of which is a separate
string in double quotes.
-.B """Interlace"""
+.B \*qInterlace\*q
indicates that the mode is interlaced.
-.B """DoubleScan"""
+.B \*qDoubleScan\*q
indicates a mode where each scanline is doubled.
-.B """+HSync"""
+.B \*q+HSync\*q
and
-.B """\-HSync"""
+.B \*q\-HSync\*q
can be used to select the polarity of the HSync signal.
-.B """+VSync"""
+.B \*q+VSync\*q
and
-.B """\-VSync"""
+.B \*q\-VSync\*q
can be used to select the polarity of the VSync signal.
-.B """Composite"""
+.B \*qComposite\*q
can be used to specify composite sync on hardware where this is supported.
Additionally, on some hardware,
-.B """+CSync"""
+.B \*q+CSync\*q
and
-.B """\-CSync"""
+.B \*q\-CSync\*q
may be used to select the composite sync polarity.
.TP 4
.BI "HSkew " hskew
@@ -981,12 +1001,12 @@ decreased.
specifies the number of times each scanline is painted on the screen.
Not all drivers use this information. Values less than 1 are treated
as 1, which is the default. Generally, the
-.B """DoubleScan"""
+.B \*qDoubleScan\*q
.B Flag
mentioned above doubles this value.
.RE
.TP 7
-.BI "ModeLine """ name """" " mode-description"
+.BI "ModeLine \*q" name \*q " mode-description"
This entry is a more compact version of the
.B Mode
entry, and it also can be used to specify video modes for the monitor.
@@ -1048,9 +1068,9 @@ Some
flags that may be useful to include in
.B Monitor
sections (when needed) include
-.BR """DPMS""" ,
+.BR \*qDPMS\*q ,
and
-.BR """SyncOnGreen""" .
+.BR \*qSyncOnGreen\*q .
.SH MODES SECTION
The config file may have multiple
@@ -1073,8 +1093,8 @@ sections have the following format:
.PP
.RS 4
.nf
-.B "Section ""Modes"""
-.BI " Identifier """ name """"
+.B "Section \*qModes\*q"
+.BI " Identifier \*q" name \*q
.I " entries"
.I " ..."
.B "EndSection"
@@ -1116,13 +1136,13 @@ sections have the following format:
.PP
.RS 4
.nf
-.B "Section ""Screen"""
-.BI " Identifier """ name """"
-.BI " Device """ devid """"
-.BI " Monitor """ monid """"
+.B "Section \*qScreen\*q"
+.BI " Identifier \*q" name \*q
+.BI " Device \*q" devid \*q
+.BI " Monitor \*q" monid \*q
.I " entries"
.I " ..."
-.BI " SubSection ""Display"""
+.BI " SubSection \*qDisplay\*q"
.I " entries"
.I " ...
.B " EndSubSection"
@@ -1144,7 +1164,7 @@ sections, one for each head.
The entries available
for this section are:
.TP 7
-.BI "Device """ device-id """"
+.BI "Device \*q" device-id \*q
This specifies the
.B Device
section to be used for this screen. This is what ties a specific
@@ -1156,10 +1176,10 @@ of a
.B Device
section in the config file.
.TP 7
-.BI "Monitor """ monitor-id """"
+.BI "Monitor \*q" monitor-id \*q
specifies which monitor description is to be used for this screen.
.TP 7
-.BI "VideoAdaptor """ xv-id """"
+.BI "VideoAdaptor \*q" xv-id \*q
specifies an optional Xv video adaptor description to be used with this
screen.
.TP 7
@@ -1213,7 +1233,7 @@ subsections have the following format:
.PP
.RS 4
.nf
-.B " SubSection ""Display"""
+.B " SubSection \*qDisplay\*q"
.BI " Depth " depth
.I " entries"
.I " ..."
@@ -1277,7 +1297,7 @@ from the resolution of the initial video mode. If this entry is not
given, then the initial display will be centered in the virtual display
area.
.TP 7
-.BI "Modes """ mode-name """" " ..."
+.BI "Modes \*q" mode-name \*q " ..."
This entry is highly desirable for most drivers, and it specifies the list
of video modes to use. Each
.I mode-name
@@ -1297,7 +1317,7 @@ appropriate
.B Monitor
section will be used.
.TP 7
-.BI "Visual """ visual-name """"
+.BI "Visual \*q" visual-name \*q
This optional entry sets the default root visual type. This may also
be specified from the command line (see the
.I Xserver(1)
@@ -1387,11 +1407,11 @@ sections have the following format:
.PP
.RS 4
.nf
-.B "Section ""ServerLayout"""
-.BI " Identifier """ name """"
-.BI " Screen """ screen-id """"
+.B "Section \*qServerLayout\*q"
+.BI " Identifier \*q" name \*q
+.BI " Screen \*q" screen-id \*q
.I " ..."
-.BI " InputDevice """ idev-id """"
+.BI " InputDevice \*q" idev-id \*q
.I " ..."
.I " options"
.I " ..."
@@ -1415,7 +1435,7 @@ section.
.PP
The entries that may be used in this section are described here.
.TP 7
-.BI "Screen """ screen-id """" " screen-num position-information"
+.BI "Screen " "screen-num" " \*qscreen-id\*q " "position-information"
One of these entries must be given for each screen being used in
a session. The
.I screen-id
@@ -1438,19 +1458,19 @@ This says that the upper left corner's coordinates are
If the coordinates are omitted or if no positioning information
is given, (0,0) is assumed.
.TP 4
-.BI "RightOf """ screen-id """"
+.BI "RightOf \*q" screen-id \*q
.TP 4
-.BI "LeftOf """ screen-id """"
+.BI "LeftOf \*q" screen-id \*q
.TP 4
-.BI "Above """ screen-id """"
+.BI "Above \*q" screen-id \*q
.TP 4
-.BI "Below """ screen-id """"
+.BI "Below \*q" screen-id \*q
.TP 4
-.BI "Relative """ screen-id """" " x y"
+.BI "Relative \*q" screen-id \*q " x y"
These give the screen's location relative to another screen.
.RE
.TP 7
-.BI "InputDevice """ idev-id """ """ option """" " ..."
+.BI "InputDevice \*q" idev-id "\*q \*q" option \*q " ..."
One of these entries must be given for each input device being used in
a session. Normally at least two are required, one each for the core
pointer and keyboard devices. The
@@ -1467,9 +1487,9 @@ be used here. The most commonly used options are:
.PP
.RS 11
.nf
-.B """CorePointer"""
-.B """CoreKeyboard"""
-.B """SendCoreEvents"""
+.B \*qCorePointer\*q
+.B \*qCoreKeyboard\*q
+.B \*qSendCoreEvents\*q
.fi
.RE
.PP
@@ -1492,14 +1512,14 @@ section for a dual headed configuration with two mice:
.PP
.RS 4
.nf
-.B "Section ""ServerLayout"""
-.B " Identifier ""Layout 1"""
-.B " Screen ""MGA 1"""
-.B " Screen ""MGA 2"" RightOf ""MGA 1"""
-.B " InputDevice ""Keyboard 1"" ""CoreKeyboard"""
-.B " InputDevice ""Mouse 1"" ""CorePointer"""
-.B " InputDevice ""Mouse 2"" ""SendCoreEvents"""
-.B " Option ""BlankTime"" ""5"""
+.B "Section \*qServerLayout\*q"
+.B " Identifier \*qLayout 1\*q"
+.B " Screen \*qMGA 1\*q"
+.B " Screen \*qMGA 2\*q RightOf \*qMGA 1\*q"
+.B " InputDevice \*qKeyboard 1\*q \*qCoreKeyboard\*q"
+.B " InputDevice \*qMouse 1\*q \*qCorePointer\*q"
+.B " InputDevice \*qMouse 2\*q \*qSendCoreEvents\*q"
+.B " Option \*qBlankTime\*q \*q5\*q"
.B "EndSection"
.fi
.RE
@@ -1526,7 +1546,7 @@ For an example of an XF86Config file, see the file installed as
__projectroot__/lib/X11/XF86Config.eg.
.fi
.SH "SEE ALSO"
-X(1), Xserver(1), XFree86(1),
+X(__miscmansuffix__), Xserver(1), XFree86(1),
apm(__drivermansuffix__),
ati(__drivermansuffix__),
chips(__drivermansuffix__),
@@ -1550,12 +1570,24 @@ trident(__drivermansuffix__),
tseng(__drivermansuffix__),
v4l(__drivermansuffix__),
vga(__drivermansuffix__),
-.IR README ,
-.IR RELNOTES ,
-.IR README.mouse ,
-.IR README.DRI ,
-.IR Status ,
-.IR Install .
+.br
+README
+.IR <http://www.xfree86.org/current/README.html> ,
+.br
+RELNOTES
+.IR <http://www.xfree86.org/current/RELNOTES.html> ,
+.br
+README.mouse
+.IR <http://www.xfree86.org/current/mouse.html> ,
+.br
+README.DRI
+.IR <http://www.xfree86.org/current/DRI.html> ,
+.br
+Status
+.IR <http://www.xfree86.org/current/Status.html> ,
+.br
+Install
+.IR <http://www.xfree86.org/current/Install.html> .
.SH AUTHORS
This manual page was largely rewritten for XFree86 4.0 by David Dawes
.IR <dawes@xfree86.org> .
diff --git a/xc/programs/Xserver/hw/xfree86/XFree86.cpp b/xc/programs/Xserver/hw/xfree86/XFree86.cpp
index b215dc64c..8f9e755dd 100644
--- a/xc/programs/Xserver/hw/xfree86/XFree86.cpp
+++ b/xc/programs/Xserver/hw/xfree86/XFree86.cpp
@@ -1,4 +1,4 @@
-.\" $XFree86: xc/programs/Xserver/hw/xfree86/XFree86.cpp,v 1.1 2000/03/07 01:37:42 dawes Exp $
+.\" $XFree86: xc/programs/Xserver/hw/xfree86/XFree86.cpp,v 1.2 2000/06/15 20:50:02 dawes Exp $
.TH XFree86 1 "Version 4.0" "XFree86"
.SH NAME
XFree86 - X11R6 X server
@@ -559,13 +559,13 @@ Linux/m68k Frame Buffer Device driver
Guenther Kelleter, \fIguenther@Pool.Informatik.RWTH-Aachen.de\fP
Linux/m68k Frame Buffer Device driver
.TP 8
-Frederic Lepied, \fLepied@XFree86.Org\fP
+Frederic Lepied, \fILepied@XFree86.Org\fP
XInput extension integration. Wacom, joystick and extended mouse drivers.
.TP 8
-Patrick Lecoanet, \flecoanet@cena.dgac.fr\fP
+Patrick Lecoanet, \fIlecoanet@cena.dgac.fr\fP
Elographics touchscreen driver.
.TP 8
-Steven Lang, \ftiger@tyger.org\fP
+Steven Lang, \fItiger@tyger.org\fP
SummaSketch tablet driver.
.PP
... and many more people out there on the net who helped with beta-testing
diff --git a/xc/programs/Xserver/hw/xfree86/common/NOTES.Mice b/xc/programs/Xserver/hw/xfree86/common/NOTES.Mice
deleted file mode 100644
index 575615bbb..000000000
--- a/xc/programs/Xserver/hw/xfree86/common/NOTES.Mice
+++ /dev/null
@@ -1,470 +0,0 @@
-Enhancing Mouse Support in the X server
-
-22 January 1998.
-Kazutaka YOKOTA
-yokota@zodiac.mech.utsunomiya-u.ac.jp, yokota@freebsd.org
-
-0. Introduction -------------------------------------------------------
-
-Since Microsoft introduced IntelliMouse to the market, manufacturers
-have added new features, such as a wheel/roller and additional
-buttons, to their mouse products. However, these mice often need
-specific initialization procedure and may use new data format which
-XFree86 servers have not known.
-
-This tar file contains two sets of patches to enhance mouse support in
-the XFree86 servers: one set for 3.3.1 (331.diff) and the other for
-3.9Ac (39Ac.diff).
-
-The diff files modify the following files:
-
-xc/programs/Xserver/hw/xfree86/os-support/xf86_OSlib.h
-xc/programs/Xserver/hw/xfree86/common/xf86.h
-xc/programs/Xserver/hw/xfree86/common/xf86_Config.h
-xc/programs/Xserver/hw/xfree86/common/xf86Config.c
-xc/programs/Xserver/hw/xfree86/common/xf86_Mouse.c
-xc/programs/Xserver/hw/xfree86/common/xf86_PnPMouse.c (NEW FILE)
-xc/programs/Xserver/hw/xfree86/common/xf86Events.c
-xc/programs/Xserver/hw/xfree86/common/xf86Io.c
-xc/programs/Xserver/hw/xfree86/common/xf86Xinput.c
-
-Choose an appropriate diff file and apply it in
-xc/programs/Xserver/hw/xfree86.
-
-%cd xc/programs/Xserver/hw/xfree86
-%patch -p0 < _diff_file_
-
-1. Modifications -----------------------------------------------------
-
-1.1. Support more mice
-
-The patch adds the support for the following mice:
-
-Kensington ThinkingMouse (serial, PS/2¡¤4 buttons)
-ALPS GlidePoint (PS/2¡¤3 buttons)*1
-Genius NetScroll (PS/2¡¤4 buttons, wheel)
-Genius NetMouse (serial, PS/2, 2 buttons + magic button)
-Genius NetMouse Pro (serial, PS/2, 3 buttons + magic button)
-ASCII MieMouse (serial, PS/2, 3 buttons, knob)
-Logitech MouseMan+ (serial, PS/2, 4 buttons, wheel)
-Logitech FirstMouse+ (serial, PS/2, 3 buttons, wheel)
-
-*1 The serial version of GlidePoint has been supported by XFree86
-since 3.2(?).
-
-To support wheel/roller and additional buttons of the above mice, the
-following enhancements were added:
-
-a) Add support for up to 12 buttons. XFree86 3.3.1 and 3.9Ac assumed
-the maximum number of buttons for the mouse is 5.
-
-b) Recognize the wheel/roller/magic_button movement as the Z (third)
-axis movement. I am very aware that the IntelliMouse support in
-XFree86 3.3.1 and 3.9 betas interpret the wheel movement as the button
-4 and 5. However, some mice have more than three buttons AND a wheel
-as you can see in the above list. It is overly restrictive to always
-have the wheel movement treated as the button 4 and 5. Instead, the
-wheel is regarded as the Z axis in this patch.
-
-Ideally, the wheel movement should be handled in the XInput extension
-as the third valuator. I hope this patch will provide the basis for
-such support in the future.
-
-Currently the Z axis movement is NOT reported back to the upper
-routines by xf86MouseProtocol(). In order to let the user to utilize
-this Z axis (wheel) movement, a new option, `ZAxisMapping', is added
-in XF86Config so that the user can choose any pair of buttons or
-another axis (X or Y) to which the Z axis (wheel) movement is
-assigned.
-
-For example, to make the IntelliMouse behave in the same way as
-before, add the following option to XF86Config.
-
- ZAxisMapping 4 5
-
-c) PS/2 mouse initialization
-The above PS/2 mice need specialized initialization procedure to
-enable their features, otherwise they behave like the standard two
-button (or three button) PS/2 mouse. To initialize these mice, the
-host system must send a sequence of commands which is specific to each
-model.
-
-The PS/2 IntelliMouse support code in XFree86 3.9Ac beta already does
-this. The same technique is used to initialize the other PS/2 mice in
-this patch. However, the current implementation works only if the
-PS/2 mouse device allows `write' operation to the device and pass the
-written data as is to the PS/2 mouse. I don't know how many OS
-platforms support this, but suspect Linux is OK.
-
-If the initialization code does not work on the user's OS, s/he has
-to use the mouse as the standard PS/2 mouse by specifying "PS/2" as
-the mouse protocol.
-
-FreeBSD 2.2.5 or earlier certainly can NOT support PS/2 mouse
-initialization this way and the user is forced to use these mice as
-the standard PS/2 mouse ;-< FreeBSD 2.2.6 or later has better mouse
-support code and all these initialization chores are handled in the
-device driver in the kernel and the X server does not need to bother
-about them.
-
-1.2. Automatic protocol detection
-
-1.2.1 Serial mouse detection
-
-The user may specify "Auto" as the Protocol of his/her SERIAL mouse.
-Then, xf86SetupMouse() in xf86_Mouse.c will invoke the PnP COM device
-enumeration procedure (xf86GetPnPMouseProtocol() in xf86_PnPMouse.c)
-and select the appropriate protocol automatically based on the PnP ID
-string.
-
-If the user purchased a serial mouse in the last two, three years,
-there is a good chance that s/he can just write
-
- Protocol "Auto"
- Device "/dev/xxxx" (where xxxx is a serial device)
-
-in XF86Config and the X server is able to detect the right protocol.
-
-This PnP capability is OS-independent and the code should on any
-platforms running XFree86.
-
-1.2.2 Automatic detection in FreeBSD
-
-In FreeBSD 3.0-CURRENT and forthcoming 2.2.6, the user may specify
-"Auto" to the bus mouse, PS/2 mouse and system mouse (sysmouse)
-devices too, as the X server queries the mouse protocol used by these
-drivers via ioctls provided by the drivers.
-
-(FreeBSD 2.2.6 has not been released. But, a snapshot is available
-as ftp://releng22.FreeBSD.ORG/pub/FreeBSD.)
-
-This is made possible because these new versions of FreeBSD have
-improved mouse support. The bus and PS/2 mouse drivers and the mouse
-daemon can handle wide variety of mouse models and offer new services
-in the following area. The drivers can now be instructed to send
-mouse data in the standardized format, the SysMouse format. (The first
-5 bytes of this format are exactly the same as the MouseSystems
-format.)
-
-To maintain compatibility with previous versions of the drivers, the
-concept of operation level is introduced. The drivers are at the
-basic level (level 0) when opened and send data in the previous,
-proprietary format. They will switch to the standard SysMouse format
-after the user program sends an ioctl call to change the level to the
-extended level (level 1).
-
-A set of new ioctl functions is supported by the drivers. The user
-program can obtain various information about the driver and the
-pointing device. These ioctls are useful because even if the user
-failed to specify the correct protocol type in XF86Config, the X
-server can override it with the information obtained from the driver.
-
-To take advantage of the new services, xf86SetupMouse() does the
-followings:
-
-Step 1. Call the ioctl function to set the operation level 1.
-
-Step 2. Call ioctl functions obtain driver and device information.
-Inspect the protocol type the driver uses. If Step 1 was successful,
-we should see the driver is using the SysMouse protocol. If the
-protocol type specified in XF86Config and the one reported by the
-driver do not agree, the latter should be taken as the correct type
-hereafter.
-
-Step 3. If the ioctl functions in Step 2 failed, we must be dealing
-with either a serial mouse or a mouse driver which is incapable of
-serving new functions. If the user specified "Auto" in XF86Config,
-invoke the PnP COM device enumeration procedure to detect the mouse.
-Otherwise use the protocol specified by the user.
-
-Step 4. Complete initialization according to the detected protocol
-type.
-
-FreeBSD-specific code is marked by #if defined(__FreeBSD__) in the
-patch.
-
-1.3. New options in XF86Config
-
-a) New keywords for mouse protocol
-The following strings are accepted in the Protocol statement:
- "ThinkingMouse" (Kensington ThinkingMouse, serial version)
- "ThinkingMousePS/2" (Kensington ThinkingMouse, PS/2 version)
- "GlidePointPS/2" (ALPS GlidePoint, PS/2 version)
- "MouseManPlusPS/2" (Logitech MouseMan+, FistMouse+, PS/2 version)
- "NetMousePS/2" (Genius NetMouse, NetMouse Pro, PS/2 version,
- ASCII MieMouse, PS/2 version)
- "NetScrollPS/2" (Genius NetScroll, PS/2 version)
- "SysMouse" (FreeBSD sysmouse)
- "Auto" (for automatic protocol detection)
-
-(The serial version of MouseMan+, FirstMouse+, NetMouse and MieMouse
-are compatible with MS IntelliMouse: specify "IntelliMouse" in the
-Protocol statement, or "Auto" to invoke the PnP enumeration
-procedure.)
-
-"ThinkingMousePS/2", "GlidePointPS/2", "MouseManPlusPS/2",
-"NetMousePS/2" and "NetScrollPS/2" are NOT supported by FreeBSD 2.2.5
-or earlier, because the OS does not support `write' operation to the
-PS/2 mouse driver, thus, these PS/2 mice cannot be initialized in the
-manner described in 1.1 (c). The user should specify "PS/2" for these
-mice and the X server will use the mice as the standard PS/2 mouse.
-
-These keywords are NOT supported by FreeBSD 2.2.6 or later too,
-because these mice are supported by the PS/2 mouse driver in the
-kernel and the X server does not need to initialize the mice or
-interpret new data format; it should simply read the data in the
-standardized "SysMouse" format passed by the PS/2 mouse driver. The
-user should specify "PS/2", "SysMouse" or "Auto" as the protocol for
-these mice.
-
-b) ZAxisMappping
-The option to map the Z axis (wheel) motion to a pair of buttons or to
-another axis.
-
- ZAxisMapping X
- ZAxisMapping Y
- ZAxisMapping N M
-
-The first example will map the Z axis motion to the X axis motion.
-Whenever the user moves the wheel/roller, its movement is reported as
-the X axis motion. When the wheel/roller stays still, the real X axis
-motion is reported as is. The last example will map negative Z axis
-motion to the button N and positive Z axis motion to the button M. If
-this option is used and the buttons N or M actually exists in the
-mouse, their actions cannot be detected by the X server.
-
-c) Resolution
-The following option will set the mouse device resolution to N, if
-possible:
-
- Resolution N
-
-Not all mice can support this. The PS/2 mouse device driver in
-FreeBSD 3.0-CURRENT and 2.2.6 can support it. I wrote generic code in
-xf86_Mouse.c for other platforms, but have no idea if it works.
-
-2. Some notes on mice ------------------------------------------------
-
-2.1 MS IntelliMouse (serial, PS/2):
-
-This mouse has been supported since XFree86 3.3. However, my patch
-will slightly change its behavior. The wheel movement is recognized
-as the Z axis motion. This behavior is not compatible with XFree86
-3.3, but is more consistent with the support for other mice with
-wheels or rollers. If you want to make the wheel behave like before,
-you can use the new option `ZAxisMapping'.
-
-IntelliMouse supports the PnP COM device specification.
-
-To use this mouse as a serial device:
- Protocol "Auto" or "IntelliMouse"
- Device "/dev/xxxx" (where xxxx is a serial port)
-To use this mouse as the PS/2 device:
- Protocol "IMPS/2"
- Device "/dev/xxxx" (where xxxx is the PS/2 mouse device)
-As the PS/2 device in FreeBSD 2.2.5 or earlier:
- Protocol "PS/2"
- Device "/dev/psm0"
-As the PS/2 device in FreeBSD 2.2.6 or later:
- Protocol "Auto", "SysMouse" or "PS/2"
- Device "/dev/psm0"
-
-2.2 Kensington Thinking Mouse (serial, PS/2):
-
-This mouse has four buttons.
-
-ThinkingMouse supports the PnP COM device specification.
-
-To use this mouse as a serial device:
- Protocol "Auto" or "ThinkingMouse"
- Device "/dev/xxxx" (where xxxx is a serial port)
-To use this mouse as a PS/2 device;
- Protocol "ThinkingMousePS/2"
- Device "/dev/xxxx" (where xxxx is the PS/2 mouse device)
-As the PS/2 device in FreeBSD 2.2.5 or earlier:
- Protocol "PS/2"
- Device "/dev/psm0"
-As the PS/2 device in FreeBSD 2.2.6 or later:
- Protocol "Auto", "SysMouse" or "PS/2"
- Device "/dev/psm0"
-
-2.3 Genius NetScroll (PS/2):
-
-This mouse has four buttons and a roller. The roller movement is
-recognized as the Z axis motion.
-
-To use this mouse as a PS/2 device;
- Protocol "NetScrollPS/2"
- Device "/dev/xxxx" (where xxxx is the PS/2 mouse device)
-As the PS/2 device in FreeBSD 2.2.5 or earlier:
- Protocol "PS/2"
- Device "/dev/psm0"
-As the PS/2 device in FreeBSD 2.2.6 or later:
- Protocol "Auto", "SysMouse" or "PS/2"
- Device "/dev/psm0"
-
-2.4 Genius NetMouse and NetMouse Pro (serial, PS/2):
-
-These mice have a "magic button" which is used like a wheel or a
-roller. The "magic button" action is recognized as the Z axis motion.
-NetMouse Pro is identical to NetMouse except that it has the third
-button on the left hand side.
-
-NetMouse and NetMouse Pro support the PnP COM device specification.
-When used as a serial mouse, they are compatible with MS IntelliMouse.
-
-To use these mice as a serial device:
- Protocol "Auto" or "IntelliMouse"
- Device "/dev/xxxx" (where xxxx is a serial port)
-To use these mice as the PS/2 device:
- Protocol "NetMousePS/2"
- Device "/dev/xxxx" (where xxxx is the PS/2 mouse device)
-As the PS/2 device in FreeBSD 2.2.5 or earlier:
- Protocol "PS/2"
- Device "/dev/psm0"
-As the PS/2 device in FreeBSD 2.2.6 or later:
- Protocol "Auto", "SysMouse" or "PS/2"
- Device "/dev/psm0"
-
-2.5 ALPS GlidePoint (serial, PS/2):
-
-The serial version of this mouse(pad) has been supported since XFree86
-3.2. `Tapping' action is interpreted as the fourth button press.
-(IMHO, the fourth button of GlidePoint should be mapped to the first
-button in order to make this pad behave like the other pad products.)
-
-To use this pad as a serial device:
- Protocol "GlidePoint"
- Device "/dev/xxxx" (where xxxx is a serial port)
-To use this mouse as the PS/2 device:
- Protocol "GlidePointPS/2"
- Device "/dev/xxxx" (where xxxx is the PS/2 mouse device)
-As the PS/2 device in FreeBSD 2.2.5 or earlier:
- Protocol "PS/2"
- Device "/dev/psm0"
-As the PS/2 device in FreeBSD 2.2.6 or later:
- Protocol "Auto", "SysMouse" or "PS/2"
- Device "/dev/psm0"
-
-2.6 ASCII MieMouse (serial, PS/2):
-
-This mouse appears to be OEMed from Genius. Although its shape is
-quite different, it works like Genius NetMouse Pro. This mouse has a
-"knob" which is used like a wheel or a roller. The "knob" action is
-recognized as the Z axis motion.
-
-MieMouse supports the PnP COM device specification. When used as a
-serial mouse, it is compatible with MS IntelliMouse.
-
-To use this mouse as a serial device:
- Protocol "Auto" or "IntelliMouse"
- Device "/dev/xxxx" (where xxxx is a serial port)
-To use this mouse as the PS/2 device:
- Protocol "NetMousePS/2"
- Device "/dev/xxxx" (where xxxx is the PS/2 mouse device)
-As the PS/2 device in FreeBSD 2.2.5 or earlier:
- Protocol "PS/2"
- Device "/dev/psm0"
-As the PS/2 device in FreeBSD 2.2.6 or later:
- Protocol "Auto", "SysMouse" or "PS/2"
- Device "/dev/psm0"
-
-2.7 Logitech MouseMan+ and FirstMouse+ (serial, PS/2):
-
-MouseMan+ has two buttons on top, one side button and a roller.
-FirstMouse+ has two buttons and a roller. The roller movement is
-recognized as the Z axis motion. The roller also acts as the third
-button. The side button is recognized as the fourth button.
-
-MouseMan+ and FirstMouse+ support the PnP COM device specification.
-They have MS IntelliMouse compatible mode when used as a serial mouse.
-
-To use these mice as a serial device:
- Protocol "Auto" or "IntelliMouse"
- Device "/dev/xxxx" (where xxxx is a serial port)
-To use these mice as the PS/2 device:
- Protocol "MouseManPlusPS/2"
- Device "/dev/xxxx" (where xxxx is the PS/2 mouse device)
-As the PS/2 device in FreeBSD 2.2.5 or earlier:
- Protocol "PS/2"
- Device "/dev/psm0"
-As the PS/2 device in FreeBSD 2.2.6 or later:
- Protocol "Auto", "SysMouse" or "PS/2"
- Device "/dev/psm0"
-
-3. TODO ---------------------------------------------------------------
-
-a) xf86 Misc Extention
-ProcXF86MiscGetMouseSettings() and ProcXF86MiscSetMouseSettings()
-should handle newly added protocol types. Expand the struct
-XF86MiscGetMouseSettings to accomodate the device resolution value and
-ZAxisMapping settings?
-
-b) Integration with XInput
-Wheel/roller movement should be processed as the third valuator.
-Currently the core pointer and the extended mouse device code in
-XInput always assume there are only two valuators.
-
-c) XF86Setup, xmseconfig
-Update lib/X11/XF86Setup/mouse.tcl, lib/X11/XF86Setup/scripts/mseconfig.tcl.
-
-4. Comments on the patch ---------------------------------------------
-
-xc/programs/Xserver/hw/xfree86/os-support/xf86_OSlib.h
-
-- Include `machine/mouse.h' for FreeBSD.
-
-xc/programs/Xserver/hw/xfree86/common/xf86.h
-
-- Added `mseModel', `negativeZ', `positiveZ' and `resolution' to
- MouseDevRec.
-- Added prototype for xf86GetPnPMouseProtocol().
-
-xc/programs/Xserver/hw/xfree86/common/xf86_Config.h
-
-- Defined constants and strings for new options and newly supported mice.
-
-xc/programs/Xserver/hw/xfree86/common/xf86Config.c
-
-- Initialize `mseModel', `negativeZ', `positiveZ' and `resolution'
- at the start of configPointerSection().
-- Recognize new keywords.
-
-xc/programs/Xserver/hw/xfree86/common/xf86_Mouse.c
-
-- Added support for the following PS/2 type mice:
- ALPS GlidePoint, MS IntelliMouse, Kensington ThinkingMouse,
- Genius NetScroll, Genius NetMouse, NetMouse Pro, ASCII
- Mie Mouse, Logitech MouseMan+, FirstMouse+
-- Added support for the following SERIAL mice:
- Kensington ThinkingMouse
- (Genius NetMouse, NetMouse Pro, ASCII MieMouse, Logitech MouseMan+
- and FirstMouse+ are compatible with MS IntelliMouse, when connected
- to a serial port, thus requires no explicit support)
-- MS IntelliMouse support code is modified so that the wheel
- movement is recognized as the Z axis motion.
-- Added support for `Auto' to invoke PnP COM device detection code.
-- Added support for `SysMouse' protocol for FreeBSD.
-- Optionally map the Z axis movement to another axis or button events
- based on `negativeZ' and `positiveZ' settings.
-- Reorganized xf86SetupMouse().
-
-xc/programs/Xserver/hw/xfree86/common/xf86_PnPMouse.c
-
-- PnP COM device support. The bulk of the code is taken from the mouse
- daemon code in FreeBSD.
-
-xc/programs/Xserver/hw/xfree86/common/xf86Events.c
-
-- Support up to 12 buttons.
-
-xc/programs/Xserver/hw/xfree86/common/xf86Io.c
-
-- Make xf86MseProcAux() support up to 12 buttons.
-
-xc/programs/Xserver/hw/xfree86/common/xf86Xinput.c
-
-- Make xf86CheckButton() recognize up to 12 buttons.
-
-
------------------------------------------------------------ end of file
diff --git a/xc/programs/Xserver/hw/xfree86/common/xf86Config.c b/xc/programs/Xserver/hw/xfree86/common/xf86Config.c
index e68780d39..7a1927fab 100644
--- a/xc/programs/Xserver/hw/xfree86/common/xf86Config.c
+++ b/xc/programs/Xserver/hw/xfree86/common/xf86Config.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Config.c,v 3.214 2000/03/08 05:38:36 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Config.c,v 3.226 2000/06/20 05:08:43 dawes Exp $ */
/*
@@ -14,6 +14,11 @@
* Author: Dirk Hohndel <hohndel@XFree86.Org>
*/
+#ifdef XF86DRI
+#include <sys/types.h>
+#include <grp.h>
+#endif
+
#include "xf86.h"
#include "xf86Parser.h"
#include "xf86tokens.h"
@@ -42,6 +47,16 @@ extern Bool noPanoramiXExtension;
#define SUPPORT_PC98
#endif
+#ifdef __EMX__
+#define ROOT_CONFIGPATH "%A," "%R," \
+ "%E," \
+ "%D/%X," \
+ "%&/XFree86/lib/X11/%X-%M," "%&/XFree86/lib/X11/%X," "%&XFree86/lib/X11/%X," \
+ "%P/etc/X11/%X.%H," "%P/etc/X11/%X-%M," \
+ "%P/etc/X11/%X,"
+#define USER_CONFIGPATH ROOT_CONFIGPATH
+#endif
+
/*
* These paths define the way the config file search is done. The escape
* sequences are documented in parser/scan.c.
@@ -258,6 +273,7 @@ char **
xf86DriverlistFromConfig()
{
int count = 0;
+ int j;
char **modulearray;
screenLayoutPtr slp;
@@ -275,8 +291,6 @@ xf86DriverlistFromConfig()
* Walk the list of driver lines in active "Device" sections to
* determine now many implicitly loaded modules there are.
*
- * XXX The set of inactive "Device" sections needs to be handled too,
- * when the rest of the supporting code is done.
*/
if (xf86ConfigLayout.screens) {
slp = xf86ConfigLayout.screens;
@@ -285,6 +299,13 @@ xf86DriverlistFromConfig()
}
}
+ /*
+ * Handle the set of inactive "Device" sections.
+ */
+ j = 0;
+ while (xf86ConfigLayout.inactives[j++].identifier)
+ count++;
+
if (count == 0)
return NULL;
@@ -299,6 +320,12 @@ xf86DriverlistFromConfig()
count++;
slp++;
}
+
+ j = 0;
+
+ while (xf86ConfigLayout.inactives[j].identifier)
+ modulearray[count++] = xf86ConfigLayout.inactives[j++].driver;
+
modulearray[count] = NULL;
/* Remove duplicates */
@@ -468,10 +495,9 @@ GenerateDriverlist(char * dirname, char * drivernames)
}
}
- driverlist[count++] = NULL;
+ driverlist[count] = NULL;
xfree(clist);
xfree(dlist);
- driverlist = xnfrealloc(driverlist, count * sizeof(char *));
}
#endif /* XFree86LOADER */
@@ -660,6 +686,7 @@ typedef enum {
FLAG_PCIPROBE2,
FLAG_PCIFORCECONFIG1,
FLAG_PCIFORCECONFIG2,
+ FLAG_PCIOSCONFIG,
FLAG_SAVER_BLANKTIME,
FLAG_DPMS_STANDBYTIME,
FLAG_DPMS_SUSPENDTIME,
@@ -699,6 +726,8 @@ static OptionInfoRec FlagOptions[] = {
{0}, FALSE },
{ FLAG_PCIFORCECONFIG2, "PciForceConfig2", OPTV_BOOLEAN,
{0}, FALSE },
+ { FLAG_PCIOSCONFIG, "PciOsConfig", OPTV_BOOLEAN,
+ {0}, FALSE },
{ FLAG_SAVER_BLANKTIME, "BlankTime" , OPTV_INTEGER,
{0}, FALSE },
{ FLAG_DPMS_STANDBYTIME, "StandbyTime", OPTV_INTEGER,
@@ -809,6 +838,8 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts)
xf86Info.pciFlags = PCIForceConfig1;
if (xf86IsOptionSet(FlagOptions, FLAG_PCIFORCECONFIG2))
xf86Info.pciFlags = PCIForceConfig2;
+ if (xf86IsOptionSet(FlagOptions, FLAG_PCIOSCONFIG))
+ xf86Info.pciFlags = PCIOsConfig;
/*
* XXX This should be handled like a proper boolean option -- see further
* above for examples.
@@ -1472,7 +1503,7 @@ configImpliedLayout(serverLayoutPtr servlayoutp, XF86ConfScreenPtr conf_screen)
return FALSE;
servlayoutp->id = "(implicit)";
servlayoutp->screens = slp;
- servlayoutp->inactives = NULL;
+ servlayoutp->inactives = xnfcalloc(1, sizeof(GDevRec));
servlayoutp->options = NULL;
/* Set up an empty input device list, then look for some core devices. */
indp = xnfalloc(sizeof(IDevRec));
@@ -1821,6 +1852,7 @@ configDevice(GDevPtr devicep, XF86ConfDevicePtr conf_device, Bool active)
devicep->chipRev = conf_device->dev_chiprev;
devicep->options = conf_device->dev_option_lst;
devicep->irq = conf_device->dev_irq;
+ devicep->screen = conf_device->dev_screen;
for (i = 0; i < MAXDACSPEEDS; i++) {
if (i < CONF_MAXDACSPEEDS)
@@ -1846,13 +1878,22 @@ configDRI(XF86ConfDRIPtr drip)
int count = 0;
XF86ConfBuffersPtr bufs;
int i;
+ struct group *grp;
- xf86ConfigDRI.group = drip ? drip->dri_group : NULL;
- xf86ConfigDRI.mode = drip ? drip->dri_mode : NULL;
+ xf86ConfigDRI.group = -1;
+ xf86ConfigDRI.mode = 0;
xf86ConfigDRI.bufs_count = 0;
xf86ConfigDRI.bufs = NULL;
if (drip) {
+ if (drip->dri_group_name) {
+ if ((grp = getgrnam(drip->dri_group_name)))
+ xf86ConfigDRI.group = grp->gr_gid;
+ } else {
+ if (drip->dri_group >= 0)
+ xf86ConfigDRI.group = drip->dri_group;
+ }
+ xf86ConfigDRI.mode = drip->dri_mode;
for (bufs = drip->dri_buffers_lst; bufs; bufs = bufs->list.next)
++count;
diff --git a/xc/programs/Xserver/hw/xfree86/common/xf86PciInfo.h b/xc/programs/Xserver/hw/xfree86/common/xf86PciInfo.h
index c6e6c889a..38e05cc6e 100644
--- a/xc/programs/Xserver/hw/xfree86/common/xf86PciInfo.h
+++ b/xc/programs/Xserver/hw/xfree86/common/xf86PciInfo.h
@@ -1,11 +1,38 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86PciInfo.h,v 1.51 2000/02/24 20:39:14 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86PciInfo.h,v 1.65 2000/06/30 17:15:11 dawes Exp $ */
/*
* PCI Probe
*
- * Copyright 1995-1999 by The XFree86 Project, Inc.
+ * Copyright 1995-2000 by The XFree86 Project, Inc.
*
* A lot of this comes from Robin Cutshaw's scanpci
*
+ * Notes -- Jun 6, 2000 -- Kevin Brosius
+ * Tips on adding Entries:
+ * scanpci output can contain up to 4 numeric entries, 2 for chip and 2 for card
+ * some generic cards don't have any valid info in the card field,
+ * here's what you do;
+ * - Add a vendor entry for your device if it doesn't already exist. The
+ * first number of the pair is generally vendor id. Search for it below
+ * and add a #define for it if it doesn't exist.
+ * ie. 5333 is the vendor id for S3
+ * - Go to xf86PCIVendorNameInfoData[] and add a text name for your vendor id.
+ * ie. PCI_VENDOR_S3 is "S3"
+ * - Add an entry to xf86PCIVendorInfoData[], using the PCI_VENDOR define
+ * you added, and a text description of the chipset.
+ * - If your device has 0000 in the card field,
+ * you've probably got a non-video or generic device. Stop here.
+ *
+ * - If you have info in the card field, and it's just a duplicate of the chip
+ * info, then either stop, or add a 'generic' entry to xf86PCICardInfoData[].
+ * - If you have different info in the card field, check the first entry,
+ * does the vendor match and/or already exist? If not, add it. Then
+ * add an entry describing the card to xf86PCICardInfoData[]
+ * - If you are adding a video card, add a PCI_CHIP #define matching the second
+ * entry in your chip field. This gets used in your card driver as the PCI id.
+ * ie. under the S3 comment, one entry is: PCI_CHIP_VIRGE 0x5631
+ *
+ * Several people recommended http://www.yourvote.com/pci for pci device/vendor info.
+ *
*/
#ifndef _XF86_PCIINFO_H
@@ -25,6 +52,7 @@
#define PCI_VENDOR_NS 0x100B
#define PCI_VENDOR_TSENG 0x100C
#define PCI_VENDOR_WEITEK 0x100E
+#define PCI_VENDOR_VIDEOLOGIC 0x1010
#define PCI_VENDOR_DIGITAL 0x1011
#define PCI_VENDOR_CIRRUS 0x1013
#define PCI_VENDOR_IBM 0x1014
@@ -47,6 +75,7 @@
#define PCI_VENDOR_SGS 0x104A
#define PCI_VENDOR_BUSLOGIC 0x104B
#define PCI_VENDOR_TI 0x104C
+#define PCI_VENDOR_SONY 0x104D
#define PCI_VENDOR_OAK 0x104E
#define PCI_VENDOR_WINBOND 0x1050
#define PCI_VENDOR_MOTOROLA 0x1057
@@ -93,6 +122,7 @@
#define PCI_VENDOR_TRUEVISION 0x10FA
#define PCI_VENDOR_INITIO 0x1101
#define PCI_VENDOR_CREATIVE_2 0x1102
+#define PCI_VENDOR_SIGMADESIGNS_2 0x1105
#define PCI_VENDOR_VIA 0x1106
#define PCI_VENDOR_VORTEX 0x1119
#define PCI_VENDOR_EF 0x111A
@@ -105,16 +135,20 @@
#define PCI_VENDOR_MUTECH 0x1159
#define PCI_VENDOR_RENDITION 0x1163
#define PCI_VENDOR_TOSHIBA 0x1179
+#define PCI_VENDOR_RICOH 0x1180
#define PCI_VENDOR_ZEINET 0x1193
+#define PCI_VENDOR_LITEON 0x11AD
#define PCI_VENDOR_SPECIALIX 0x11CB
#define PCI_VENDOR_CONTROL 0x11FE
#define PCI_VENDOR_CYCLADES 0x120E
#define PCI_VENDOR_3DFX 0x121A
#define PCI_VENDOR_SIGMADESIGNS 0x1236
#define PCI_VENDOR_ENSONIQ 0x1274
+#define PCI_VENDOR_ROCKWELL 0x127A
#define PCI_VENDOR_YOKOGAWA 0x1281
#define PCI_VENDOR_TRITECH 0x1292
#define PCI_VENDOR_NVIDIA_SGS 0x12d2
+#define PCI_VENDOR_NETGEAR 0x1385
#define PCI_VENDOR_SYMPHONY 0x1C1C
#define PCI_VENDOR_TEKRAM_2 0x1DE1
#define PCI_VENDOR_3DLABS 0x3D3D
@@ -194,7 +228,8 @@
#define PCI_CHIP_MACH64LP 0x4C50
#define PCI_CHIP_MACH64LR 0x4C52
#define PCI_CHIP_MACH64LS 0x4C53
-#define PCI_CHIP_RAGE128PF 0x5046
+#define PCI_CHIP_RAGE128PF 0x5046
+#define PCI_CHIP_RAGE128PR 0x5052
#define PCI_CHIP_RAGE128RE 0x5245
#define PCI_CHIP_RAGE128RF 0x5246
#define PCI_CHIP_RAGE128RK 0x524B
@@ -279,6 +314,7 @@
#define PCI_CHIP_8400 0x8400
#define PCI_CHIP_8420 0x8420
#define PCI_CHIP_8500 0x8500
+#define PCI_CHIP_8520 0x8520
#define PCI_CHIP_9320 0x9320
#define PCI_CHIP_9388 0x9388
#define PCI_CHIP_9397 0x9397
@@ -445,6 +481,7 @@
#define PCI_CHIP_VOODOO2 0x0002
#define PCI_CHIP_BANSHEE 0x0003
#define PCI_CHIP_VOODOO3 0x0005
+#define PCI_CHIP_VOODOO5 0x0009
/* Rendition */
#define PCI_CHIP_V1000 0x0001
@@ -459,6 +496,7 @@
#define PCI_CHIP_PERMEDIA2 0x0007
#define PCI_CHIP_GAMMA 0x0008
#define PCI_CHIP_PERMEDIA2V 0x0009
+#define PCI_CHIP_PERMEDIA3 0x000A
/* S3 */
#define PCI_CHIP_PLATO 0x0551
@@ -504,9 +542,19 @@
#define PCI_CHIP_NM2097 0x0083
#define PCI_CHIP_NM2160 0x0004
#define PCI_CHIP_NM2200 0x0005
+#define PCI_CHIP_NM2360 0x0006
+#define PCI_CHIP_NM2380 0x0016
/* Intel */
-#define PCI_CHIP_I740_AGP 0x7800
+#define PCI_CHIP_I815_BRIDGE 0x1130
+#define PCI_CHIP_I815 0x1132
+#define PCI_CHIP_I810_BRIDGE 0x7120
+#define PCI_CHIP_I810 0x7121
+#define PCI_CHIP_I810_DC100_BRIDGE 0x7122
+#define PCI_CHIP_I810_DC100 0x7123
+#define PCI_CHIP_I810_E_BRIDGE 0x7124
+#define PCI_CHIP_I810_E 0x7125
+#define PCI_CHIP_I740_AGP 0x7800
/*
* first the VendorId - VendorName mapping
@@ -524,6 +572,7 @@ static SymTabRec xf86PCIVendorNameInfoData[] = {
{PCI_VENDOR_NS, "NS"},
{PCI_VENDOR_TSENG, "Tseng Labs"},
{PCI_VENDOR_WEITEK, "Weitek"},
+ {PCI_VENDOR_VIDEOLOGIC, "Video Logic"},
{PCI_VENDOR_DIGITAL, "Digital"},
{PCI_VENDOR_CIRRUS, "Cirrus Logic"},
{PCI_VENDOR_IBM, "IBM"},
@@ -544,6 +593,7 @@ static SymTabRec xf86PCIVendorNameInfoData[] = {
{PCI_VENDOR_SGS, "SGS-Thomson"},
{PCI_VENDOR_BUSLOGIC, "BusLogic"},
{PCI_VENDOR_TI, "Texas Instruments"},
+ {PCI_VENDOR_SONY, "Sony"},
{PCI_VENDOR_OAK, "Oak"},
{PCI_VENDOR_WINBOND,"Winbond"},
{PCI_VENDOR_MOTOROLA, "Motorola"},
@@ -562,6 +612,7 @@ static SymTabRec xf86PCIVendorNameInfoData[] = {
{PCI_VENDOR_FOREX, "FOREX"},
{PCI_VENDOR_OLICOM, "Olicom"},
{PCI_VENDOR_SUN, "Sun"},
+ {PCI_VENDOR_DIAMOND, "Diamond"},
{PCI_VENDOR_CMD, "CMD"},
{PCI_VENDOR_VISION, "Vision"},
{PCI_VENDOR_BROOKTREE, "BrookTree"},
@@ -587,6 +638,7 @@ static SymTabRec xf86PCIVendorNameInfoData[] = {
{PCI_VENDOR_TRUEVISION, "Truevision"},
{PCI_VENDOR_INITIO, "Initio Corp"},
{PCI_VENDOR_CREATIVE_2, "Creative Labs"},
+ {PCI_VENDOR_SIGMADESIGNS_2, "Sigma Designs"},
{PCI_VENDOR_VIA, "VIA"},
{PCI_VENDOR_VORTEX, "Vortex"},
{PCI_VENDOR_EF, "EF"},
@@ -594,17 +646,22 @@ static SymTabRec xf86PCIVendorNameInfoData[] = {
{PCI_VENDOR_IMAGTEC, "Imaging Technology"},
{PCI_VENDOR_PLX, "PLX"},
{PCI_VENDOR_NVIDIA_SGS, "NVidia/SGS-Thomson"},
+ {PCI_VENDOR_NETGEAR, "Netgear"},
{PCI_VENDOR_ALLIANCE, "Alliance Semiconductor"},
{PCI_VENDOR_VMIC, "VMIC"},
{PCI_VENDOR_DIGI, "DIGI*"},
{PCI_VENDOR_MUTECH, "Mutech"},
{PCI_VENDOR_RENDITION, "Rendition"},
+ {PCI_VENDOR_TOSHIBA, "Toshiba"},
+ {PCI_VENDOR_RICOH, "Ricoh"},
+ {PCI_VENDOR_ZEINET, "Zeinet"},
+ {PCI_VENDOR_LITEON, "Lite-On"},
{PCI_VENDOR_3DFX, "3Dfx Interactive"},
{PCI_VENDOR_SIGMADESIGNS, "Sigma Designs"},
{PCI_VENDOR_ENSONIQ, "Ensoniq"},
+ {PCI_VENDOR_ROCKWELL, "Rockwell"},
{PCI_VENDOR_YOKOGAWA, "YOKOGAWA"},
{PCI_VENDOR_TRITECH, "Tritech Microelectronics"},
- {PCI_VENDOR_NVIDIA_SGS, "NVidia/SGS-Thomson"},
{PCI_VENDOR_SYMPHONY, "Symphony"},
{PCI_VENDOR_TEKRAM_2, "Tekram"},
{PCI_VENDOR_3DLABS, "3Dlabs"},
@@ -702,6 +759,7 @@ static pciVendorDeviceInfo xf86PCIVendorInfoData[] = {
{PCI_CHIP_MACH64LR, "Mach64 LR",0},
{PCI_CHIP_MACH64LS, "Mach64 LS",0},
{PCI_CHIP_RAGE128PF, "Rage 128 Pro PF",0},
+ {PCI_CHIP_RAGE128PR, "Rage 128 Pro PR",0},
{PCI_CHIP_RAGE128RE, "Rage 128 RE",0},
{PCI_CHIP_RAGE128RF, "Rage 128 RF",0},
{PCI_CHIP_RAGE128RK, "Rage 128 RK",0},
@@ -775,14 +833,14 @@ static pciVendorDeviceInfo xf86PCIVendorInfoData[] = {
{0x6001, "CS4236B/CS4611 Audio" ,0},
#endif
{0x0000, NULL,0}}},
-#ifdef VENDOR_INCLUDE_NONVIDEO
{PCI_VENDOR_IBM, {
{0x000A, "Fire Coral",0 },
{0x0018, "Token Ring",0 },
{0x001D, "82G2675",0 },
{0x0022, "82351 pci-pci bridge",0 },
+ {0x00B7, "256-bit Graphics Rasterizer",0 },
+ {0x0170, "RC1000 / GT 1000",0},
{0x0000, NULL,0}}},
-#endif
#ifdef INCLUDE_EMPTY_LISTS
{PCI_VENDOR_NCR_2, {
{0x0000, NULL,0}}},
@@ -813,6 +871,7 @@ static pciVendorDeviceInfo xf86PCIVendorInfoData[] = {
{PCI_CHIP_8400, "CyberBlade/i7",0},
{PCI_CHIP_8420, "CyberBlade/DSTN/i7",0},
{PCI_CHIP_8500, "CyberBlade/i1",0},
+ {PCI_CHIP_8520, "CyberBlade/DSTN/i1",0},
{0x0000, NULL,0}}},
#ifdef VENDOR_INCLUDE_NONVIDEO
{PCI_VENDOR_ALI, {
@@ -895,6 +954,11 @@ static pciVendorDeviceInfo xf86PCIVendorInfoData[] = {
{PCI_CHIP_PCI_1130, "PCI 1130",0},
{PCI_CHIP_PCI_1131, "PCI 1131",0},
{0x0000, NULL,0}}},
+#ifdef VENDOR_INCLUDE_NONVIDEO
+ {PCI_VENDOR_SONY, {
+ {0x8009, "CXD1947A IEEE1394/Firewire",0},
+ {0x0000, NULL,0}}},
+#endif
{PCI_VENDOR_OAK, {
{PCI_CHIP_OTI107, "OTI107",0},
{0x0000, NULL,0}}},
@@ -1063,6 +1127,11 @@ static pciVendorDeviceInfo xf86PCIVendorInfoData[] = {
{PCI_CHIP_NM2093, "NM2093",0},
{PCI_CHIP_NM2160, "NM2160",0},
{PCI_CHIP_NM2200, "NM2200",0},
+ {PCI_CHIP_NM2360, "NM2360",0},
+ {PCI_CHIP_NM2380, "NM2380",0},
+#ifdef VENDOR_INCLUDE_NONVIDEO
+ {0x8005, "NM2360 MagicMedia 256ZX Audio",0},
+#endif
{0x0000, NULL,0}}},
#ifdef VENDOR_INCLUDE_NONVIDEO
{PCI_VENDOR_ASP, {
@@ -1111,7 +1180,7 @@ static pciVendorDeviceInfo xf86PCIVendorInfoData[] = {
{PCI_VENDOR_REALTEC, {
{0x8029, "8029",0 },
{0x8129, "8129",0 },
- {0x8139, "RTL8139 Ethernet Controller",0 },
+ {0x8139, "RTL8139 10/100 Ethernet",0 },
{0x0000, NULL,0}}},
{PCI_VENDOR_TRUEVISION, {
{0x000C, "Targa 1000",0 },
@@ -1119,6 +1188,9 @@ static pciVendorDeviceInfo xf86PCIVendorInfoData[] = {
{PCI_VENDOR_INITIO, {
{0x9100, "320 P",0 },
{0x0000, NULL,0}}},
+ {PCI_VENDOR_SIGMADESIGNS_2, {
+ {0x8300, "EM8300 MPEG2 decoder", 0 },
+ {0x0000, NULL,0}}},
{PCI_VENDOR_VIA, {
{0x0501, "VT 8501 MVP4 Host Bridge",0 },
{0x0505, "VT 82C505",0 },
@@ -1177,9 +1249,16 @@ static pciVendorDeviceInfo xf86PCIVendorInfoData[] = {
#ifdef VENDOR_INCLUDE_NONVIDEO
{PCI_VENDOR_TOSHIBA, {
{0x0000, NULL,0}}},
+ { PCI_VENDOR_RICOH, {
+ { 0x0475, "RL5C475 PCI-CardBus bridge/PCMCIA",0 },
+ { 0x0000, NULL,0}}},
{PCI_VENDOR_ZEINET, {
{0x0001, "1221",0 },
{0x0000, NULL,0}}},
+ {PCI_VENDOR_LITEON, {
+ {0x0002, "82C168/9 PNIC 10/100BaseTX",0 },
+ {0xC115, "LC82C115 PNIC II 10/100BaseTX",0 },
+ {0x0000, NULL,0}}},
#ifdef INCLUDE_EMPTY_LISTS
{PCI_VENDOR_SPECIALIX, {
{0x0000, NULL,0}}},
@@ -1194,6 +1273,7 @@ static pciVendorDeviceInfo xf86PCIVendorInfoData[] = {
{PCI_CHIP_VOODOO2, "Voodoo2",0},
{PCI_CHIP_BANSHEE, "Banshee",0},
{PCI_CHIP_VOODOO3, "Voodoo3",0},
+ {PCI_CHIP_VOODOO5, "Voodoo5",0},
{0x0000, NULL,0}}},
{PCI_VENDOR_SIGMADESIGNS, {
{0x6401, "REALmagic64/GX (SD 6425)",0 },
@@ -1203,6 +1283,9 @@ static pciVendorDeviceInfo xf86PCIVendorInfoData[] = {
{0x1371, "es1371",0 },
{0x0000, NULL,0}}},
#ifdef VENDOR_INCLUDE_NONVIDEO
+ {PCI_VENDOR_ROCKWELL, {
+ {0x2005, "RS56/SP-PCI11P1 56K V90 modem/spkrphone",0 },
+ {0x0000, NULL,0}}},
#ifdef INCLUDE_EMPTY_LISTS
{PCI_VENDOR_YOKOGAWA, {
{0x0000, NULL,0}}},
@@ -1231,6 +1314,7 @@ static pciVendorDeviceInfo xf86PCIVendorInfoData[] = {
{PCI_CHIP_PERMEDIA2, "GLINT Permedia 2",0},
{PCI_CHIP_GAMMA, "GLINT Gamma",0},
{PCI_CHIP_PERMEDIA2V, "GLINT Permedia 2v",0},
+ {PCI_CHIP_PERMEDIA3, "GLINT Permedia 3",0},
{0x0000, NULL,0}}},
{PCI_VENDOR_AVANCE_2, {
{0x0000, NULL,0}}},
@@ -1303,6 +1387,14 @@ static pciVendorDeviceInfo xf86PCIVendorInfoData[] = {
{0x84C4, "P6",0},
{0x84C5, "82450GX20",0},
{PCI_CHIP_I740_AGP, "i740 (AGP)",0},
+ {PCI_CHIP_I815_BRIDGE, "i815 Bridge",0},
+ {PCI_CHIP_I815, "i815",0},
+ {PCI_CHIP_I810_BRIDGE, "i810 Bridge",0},
+ {PCI_CHIP_I810, "i810",0},
+ {PCI_CHIP_I810_DC100_BRIDGE, "i810-dc100 Bridge",0},
+ {PCI_CHIP_I810_DC100, "i810-dc100",0},
+ {PCI_CHIP_I810_E_BRIDGE,"i810e Bridge",0},
+ {PCI_CHIP_I810_E, "i810e",0},
{0x0000, NULL,0}}},
{PCI_VENDOR_ADAPTEC, {
{0x0010, "2940U2",0 },
@@ -1380,18 +1472,15 @@ static pciVendorCardInfo xf86PCICardInfoData[] = {
#endif
/* ATI card info deleted; unmaintainable */
#ifdef VENDOR_INCLUDE_NONVIDEO
-#ifdef INCLUDE_EMPTY_LISTS
{ PCI_VENDOR_COMPAQ, {
+ { 0xC001, "NC3121",0, NF },
{ 0x0000, (char *)NULL,0, NF } } },
-#endif
-#ifdef VENDOR_INCLUDE_NONVIDEO
{ PCI_VENDOR_NCR_1, {
{ 0x1000, "SCSI HBA",0, NF },
{ 0x0000, (char *)NULL,0, NF } } },
{ PCI_VENDOR_REALTEC, {
{ 0x8139, "Generic",0, NF },
{ 0x0000, (char *)NULL,0, NF } } },
-#endif
{ PCI_VENDOR_CREATIVE_2, {
{ 0x1017, "3D Blaster Banshee",0, NF },
{ 0x0000, (char *)NULL,0, NF } } },
@@ -1399,18 +1488,32 @@ static pciVendorCardInfo xf86PCICardInfoData[] = {
{ 0x500A, "EtherWORKS 10/100",0, NF},
{ 0x0000, (char *)NULL,0, NF } } },
#endif
+ { PCI_VENDOR_SONY, {
+ { 0x8051, "Vaio Video",0,NF },
+#ifdef VENDOR_INCLUDE_NONVIDEO
+ { 0x8052, "Vaio Audio",0,NF },
+ { 0x8054, "Vaio Firewire",0,NF },
+ { 0x8056, "Vaio Modem",0,NF },
+ { 0x8057, "Vaio Ethernet",0,NF },
+#endif
+ { 0x0000, (char *)NULL,0, NF } } },
{ PCI_VENDOR_DIAMOND, {
- { 0x8000, "C&T 69000",0, NF },
- { 0x1103, "Fire GL 1000",0, NF },
- { 0x0154, "Fire GL 1000 PRO",0, NF },
{ 0x0003, "Monster Fusion",0, NF },
- { 0x8a10, "Stealth 3D 4000",0, NF },
+ { 0x00b8, "Fire GL1",0, NF },
{ 0x0100, "Stealth II G460",0, NF },
- { 0x2000, "Stealth II S220",0, NF },
- { 0x1092, "Viper 330",0, NF },
+ { 0x0154, "Fire GL 1000 PRO",0, NF },
+ { 0x0172, "Fire GL2",0, NF },
+ { 0x0173, "Fire GL2",0, NF },
{ 0x0550, "Viper 550",0, NF },
- { 0x8760, "Fireport 40 Dual",0, NF },
+ { 0x1092, "Viper 330",0, NF },
+ { 0x1103, "Fire GL 1000",0, NF },
+ { 0x2000, "Stealth II S220",0, NF },
{ 0x2110, "Sonic Impact S70",0, NF },
+ { 0x4803, "Monster Fusion",0, NF },
+ { 0x6820, "Viper 770",0, NF },
+ { 0x8000, "C&T 69000",0, NF },
+ { 0x8760, "Fireport 40 Dual",0, NF },
+ { 0x8a10, "Stealth 3D 4000",0, NF },
{ 0x0000, (char *)NULL,0, NF } } },
{ PCI_VENDOR_ELSA, {
{ 0x0914, "Winner 1000",0, NF },
@@ -1513,7 +1616,7 @@ static pciVendorCardInfo xf86PCICardInfoData[] = {
#endif
{ PCI_VENDOR_S3, {
{ 0x8904, "Trio3D",0, NF },
- { 0x8a10, "ViRGE/GX2",0, NF },
+ { 0x8a10, "Generic",0, NF },
{ 0x0000, (char *)NULL,0, NF } } },
{ PCI_VENDOR_NUMNINE, {
{ 0x8a10, "Reality 334",0, NF },
@@ -1522,9 +1625,15 @@ static pciVendorCardInfo xf86PCICardInfoData[] = {
{ 0x0001, "4010CDT CT65555",0, NF },
{ 0x0000, (char *)NULL,0, NF } } },
#ifdef VENDOR_INCLUDE_NONVIDEO
+ { PCI_VENDOR_LITEON, {
+ { 0xc001, "LNE100TX Version 2.0",0, NF },
+ { 0x0000, (char *)NULL,0, NF } } },
{ PCI_VENDOR_BUSLOGIC, {
{ 0x1040, "BT958",0, NF },
{ 0x0000, (char *)NULL,0, NF } } },
+ { PCI_VENDOR_NETGEAR, {
+ { 0xf004, "FA310-TX Rev. D2",0, NF },
+ { 0x0000, (char *)NULL,0, NF } } },
#endif
{0x0000, {
{0x0000, NULL,0, NF } } },
diff --git a/xc/programs/Xserver/hw/xfree86/common/xf86isaBus.c b/xc/programs/Xserver/hw/xfree86/common/xf86isaBus.c
index 74c76701b..24c37ae00 100644
--- a/xc/programs/Xserver/hw/xfree86/common/xf86isaBus.c
+++ b/xc/programs/Xserver/hw/xfree86/common/xf86isaBus.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86isaBus.c,v 3.3 2000/02/08 13:13:06 eich Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86isaBus.c,v 3.4 2000/06/20 05:08:45 dawes Exp $ */
/*
* Copyright (c) 1997-1999 by The XFree86 Project, Inc.
@@ -43,9 +43,9 @@ xf86ClaimIsaSlot(DriverPtr drvp, int chipset, GDevPtr dev, Bool active)
p->driver = drvp;
p->chipset = chipset;
p->busType = BUS_ISA;
- p->device = dev;
p->active = active;
p->inUse = FALSE;
+ xf86AddDevToEntity(num, dev);
p->access = xnfcalloc(1,sizeof(EntityAccessRec));
p->access->fallback = &AccessNULL;
p->access->pAccess = &AccessNULL;
diff --git a/xc/programs/Xserver/hw/xfree86/common/xf86pciBus.c b/xc/programs/Xserver/hw/xfree86/common/xf86pciBus.c
index 3fb5b6ba4..e4e5b45ed 100644
--- a/xc/programs/Xserver/hw/xfree86/common/xf86pciBus.c
+++ b/xc/programs/Xserver/hw/xfree86/common/xf86pciBus.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86pciBus.c,v 3.13 2000/03/05 23:47:48 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86pciBus.c,v 3.18 2000/06/20 05:08:45 dawes Exp $ */
/*
* Copyright (c) 1997-1999 by The XFree86 Project, Inc.
@@ -37,6 +37,8 @@ pciConfigPtr *xf86PciInfo = NULL; /* Full PCI probe info */
pciVideoPtr *xf86PciVideoInfo = NULL; /* PCI probe for video hw */
pciAccPtr * xf86PciAccInfo = NULL; /* PCI access related */
+static resPtr pciAvoidRes = NULL;
+
/* PCI buses */
static PciBusPtr xf86PciBus = NULL;
/* Bus-specific probe/sorting functions */
@@ -470,10 +472,6 @@ pciIoAccessEnable(void* arg)
ErrorF("pciIoAccessEnable: 0x%05lx\n", *(PCITAG *)arg);
#endif
((pciArg*)arg)->ctrl |= SETBITS;
-#ifdef notanymore
- ((pciArg*)arg)->func(((pciArg*)arg)->tag, PCI_CMD_STAT_REG,
- SETBITS, SETBITS);
-#endif
((pciArg*)arg)->func(((pciArg*)arg)->tag, PCI_CMD_STAT_REG,
((pciArg*)arg)->ctrl);
}
@@ -485,9 +483,6 @@ pciIoAccessDisable(void* arg)
ErrorF("pciIoAccessDisable: 0x%05lx\n", *(PCITAG *)arg);
#endif
((pciArg*)arg)->ctrl &= ~SETBITS;
-#ifdef notanymore
- ((pciArg*)arg)->func(((pciArg*)arg)->tag, PCI_CMD_STAT_REG, SETBITS, 0);
-#endif
((pciArg*)arg)->func(((pciArg*)arg)->tag, PCI_CMD_STAT_REG,
((pciArg*)arg)->ctrl);
}
@@ -501,10 +496,6 @@ pciIo_MemAccessEnable(void* arg)
ErrorF("pciIo_MemAccessEnable: 0x%05lx\n", *(PCITAG *)arg);
#endif
((pciArg*)arg)->ctrl |= SETBITS;
-#ifdef notanymore
- ((pciArg*)arg)->func(((pciArg*)arg)->tag, PCI_CMD_STAT_REG,
- SETBITS, SETBITS);
-#endif
((pciArg*)arg)->func(((pciArg*)arg)->tag, PCI_CMD_STAT_REG,
((pciArg*)arg)->ctrl);
}
@@ -516,9 +507,6 @@ pciIo_MemAccessDisable(void* arg)
ErrorF("pciIo_MemAccessDisable: 0x%05lx\n", *(PCITAG *)arg);
#endif
((pciArg*)arg)->ctrl &= ~SETBITS;
-#ifdef notanymore
- ((pciArg*)arg)->func(((pciArg*)arg)->tag, PCI_CMD_STAT_REG, SETBITS, 0);
-#endif
((pciArg*)arg)->func(((pciArg*)arg)->tag, PCI_CMD_STAT_REG,
((pciArg*)arg)->ctrl);
}
@@ -532,10 +520,6 @@ pciMemAccessEnable(void* arg)
ErrorF("pciMemAccessEnable: 0x%05lx\n", *(PCITAG *)arg);
#endif
((pciArg*)arg)->ctrl |= SETBITS;
-#ifdef notanymore
- ((pciArg*)arg)->func(((pciArg*)arg)->tag, PCI_CMD_STAT_REG,
- SETBITS, SETBITS);
-#endif
((pciArg*)arg)->func(((pciArg*)arg)->tag, PCI_CMD_STAT_REG,
((pciArg*)arg)->ctrl);
}
@@ -547,9 +531,6 @@ pciMemAccessDisable(void* arg)
ErrorF("pciMemAccessDisable: 0x%05lx\n", *(PCITAG *)arg);
#endif
((pciArg*)arg)->ctrl &= ~SETBITS;
-#ifdef notanymore
- ((pciArg*)arg)->func(((pciArg*)arg)->tag, PCI_CMD_STAT_REG,SETBITS, 0);
-#endif
((pciArg*)arg)->func(((pciArg*)arg)->tag, PCI_CMD_STAT_REG,
((pciArg*)arg)->ctrl);
}
@@ -599,17 +580,19 @@ pciSetBusAccess(BusAccPtr ptr)
}
}
+/* move to OS layer */
static void
savePciState(PCITAG tag, pciSavePtr ptr)
{
int i;
-
+
ptr->command = pciReadLong(tag,PCI_CMD_STAT_REG);
for (i=0; i < 6; i++)
ptr->base[i] = pciReadLong(tag,PCI_CMD_BASE_REG + i*4 );
ptr->biosBase = pciReadLong(tag,PCI_CMD_BIOS_REG);
}
+/* move to OS layer */
static void
restorePciState(PCITAG tag, pciSavePtr ptr)
{
@@ -624,6 +607,7 @@ restorePciState(PCITAG tag, pciSavePtr ptr)
pciWriteLong(tag,PCI_CMD_STAT_REG,ptr->command);
}
+/* move to OS layer */
static void
savePciBusState(BusAccPtr ptr)
{
@@ -637,6 +621,7 @@ savePciBusState(BusAccPtr ptr)
pciReadByte(ptr->busdep.pci.acc,PCI_PCI_BRIDGE_CONTROL_REG);
}
+/* move to OS layer */
static void
restorePciBusState(BusAccPtr ptr)
{
@@ -657,6 +642,7 @@ disablePciBios(PCITAG tag)
pciSetBitsLong(tag, PCI_CMD_BIOS_REG, PCI_CMD_BIOS_ENABLE, 0);
}
+/* ????? */
static void
correctPciSize(memType base, int oldsize, int newsize, long type)
{
@@ -717,6 +703,7 @@ correctPciSize(memType base, int oldsize, int newsize, long type)
}
}
+/* ????? */
static void
removeOverlapsWithBridges(int busIndex, resPtr target)
{
@@ -747,6 +734,7 @@ removeOverlapsWithBridges(int busIndex, resPtr target)
xf86FreeResList(bridgeRes);
}
+/* ????? */
static void
xf86GetPciRes(resPtr *activeRes, resPtr *inactiveRes)
{
@@ -949,7 +937,7 @@ ResourceBrokerInitPci(resPtr *osRes)
* Adjust OS-reported resource ranges based on the assumption that there
* are no overlaps with the PCI base allocations. This should be a good
* assumption because writes to PCI address space won't be routed directly
- * host memory.
+ * to host memory.
*/
for (tmp = *osRes; tmp; tmp = tmp->next)
@@ -959,6 +947,12 @@ ResourceBrokerInitPci(resPtr *osRes)
" overlaps with PCI:\n");
xf86PrintResList(3, *osRes);
+ pciAvoidRes = xf86AddRangesToList(pciAvoidRes,PciAvoid,-1);
+ for (tmp = pciAvoidRes; tmp; tmp = tmp->next)
+ RemoveOverlaps(tmp, activeRes, FALSE);
+ tmp = xf86DupResList(*osRes);
+ pciAvoidRes = xf86JoinResLists(pciAvoidRes,tmp);
+
return (xf86JoinResLists(activeRes,inactiveRes));
}
@@ -1022,7 +1016,7 @@ fixPciResource(int prt, memType alignment, pciVideoPtr pvp, long type)
type |= ResBlock;
/* setup avoid: PciAvoid is bus range: convert later */
- avoid = xf86AddRangesToList(avoid,PciAvoid,-1);
+ avoid = xf86DupResList(pciAvoidRes);
while (pbp) {
if (pbp->secondary == pvp->bus) {
@@ -1064,7 +1058,8 @@ fixPciResource(int prt, memType alignment, pciVideoPtr pvp, long type)
}
/* convert bus based entries in avoid list to host base */
- xf86ConvertListToHost(xf86GetEntityForPciInfo(pvp),avoid);
+ xf86ConvertListToHost(
+ xf86GetPciEntity(pvp->bus,pvp->device,pvp->func), avoid);
if (!w)
w = xf86DupResList(ResRange);
@@ -1323,7 +1318,7 @@ getValidBIOSBase(PCITAG tag, int num)
alignment = (1 << biosSize) - 1;
if (biosSize > 24)
biosSize = 24;
- avoid = NULL;
+ avoid = xf86DupResList(pciAvoidRes);
pbp = pbp1 = xf86PciBus;
while (pbp) {
@@ -1349,6 +1344,8 @@ getValidBIOSBase(PCITAG tag, int num)
}
pbp = pbp->next;
}
+ xf86ConvertListToHost(
+ xf86GetPciEntity(pvp->bus,pvp->device,pvp->func), avoid);
if (pvp->biosBase) { /* try biosBase first */
P_M_RANGE(range, TAG(pvp),pvp->biosBase,biosSize,ResExcMemBlock);
@@ -1426,6 +1423,7 @@ xf86GetPciBridgeInfo(const pciConfigPtr *pciInfo)
PciBusPtr *pnPciBus = &PciBusBase;
int MaxBus = 0;
int i;
+ memType base, limit;
if (pciInfo == NULL) return NULL;
@@ -1457,38 +1455,50 @@ xf86GetPciBridgeInfo(const pciConfigPtr *pciInfo)
PciBus->brfunc = pcrp->funcnum;
PciBus->subclass = sub_class;
PciBus->brcontrol = pcrp->pci_bridge_control;
- if (pcrp->pci_io_base <= pcrp->pci_io_limit
- && (pcrp->pci_command & PCI_CMD_IO_ENABLE)) {
- PCI_I_RANGE(range,pcrp->tag,pcrp->pci_io_base << 8
- | (pcrp->pci_upper_io_base << 16),
- (pcrp->pci_io_limit << 8)
- | (pcrp->pci_upper_io_limit << 16) | 0xfff,
+ if (pcrp->pci_command & PCI_CMD_IO_ENABLE) {
+ base = (pcrp->pci_upper_io_base << 16) |
+ ((pcrp->pci_io_base & 0xf0u) << 8);
+ limit = (pcrp->pci_upper_io_limit << 16) |
+ ((pcrp->pci_io_limit & 0xf0u) << 8) | 0x0fff;
+ /*
+ * Deal with bridge ISA mode (256 wide ranges spaced 1K
+ * apart, but only in the first 64K).
+ */
+ if (pcrp->pci_bridge_control & PCI_PCI_BRIDGE_ISA_EN) {
+ while ((base <= (CARD16)(-1)) && (base <= limit)) {
+ PCI_I_RANGE(range, pcrp->tag,
+ base, base + (CARD8)(-1),
ResIo | ResBlock | ResExclusive);
- PciBus->io = xf86AddResToList(NULL, &range, -1);
+ PciBus->io = xf86AddResToList(PciBus->io,
+ &range, -1);
+ base += 0x0400;
+ }
+ }
+ if (base <= limit) {
+ PCI_I_RANGE(range, pcrp->tag, base, limit,
+ ResIo | ResBlock | ResExclusive);
+ PciBus->io = xf86AddResToList(PciBus->io, &range, -1);
+ }
}
if (pcrp->pci_command & PCI_CMD_MEM_ENABLE) {
- if (pcrp->pci_mem_base <= pcrp->pci_mem_limit) {
- PCI_M_RANGE(range,pcrp->tag,pcrp->pci_mem_base << 16,
- (pcrp->pci_mem_limit << 16) | 0xfffff,
+ base = pcrp->pci_mem_base & 0xfff0u;
+ limit = pcrp->pci_mem_limit & 0xfff0u;
+ if (base <= limit) {
+ PCI_M_RANGE(range, pcrp->tag,
+ base << 16, (limit << 16) | 0x0fffff,
ResMem | ResBlock | ResExclusive);
PciBus->mem = xf86AddResToList(NULL, &range, -1);
}
- if (pcrp->pci_prefetch_mem_base
- <= pcrp->pci_prefetch_mem_limit) {
-#if !defined(LONG64) && !defined(WORD64)
- PCI_M_RANGE(range,pcrp->tag,
- pcrp->pci_prefetch_mem_base << 16,
- (pcrp->pci_prefetch_mem_limit << 16)
- | 0xfffff,
- ResMem | ResBlock | ResExclusive);
-#else
+ base = pcrp->pci_prefetch_mem_base & 0xfff0u;
+ limit = pcrp->pci_prefetch_mem_limit & 0xfff0u;
+#if defined(LONG64) || defined(WORD64)
+ base |= (memType)pcrp->pci_prefetch_upper_mem_base << 16;
+ limit |= (memType)pcrp->pci_prefetch_upper_mem_limit << 16;
+#endif
+ if (base <= limit) {
PCI_M_RANGE(range, pcrp->tag,
- pcrp->pci_prefetch_mem_base << 16
- | ((memType)pcrp->pci_prefetch_upper_mem_base << 32),
- (pcrp->pci_prefetch_mem_limit << 16) | 0xfffff
- | ((memType)pcrp->pci_prefetch_upper_mem_limit << 32),
+ base << 16, (limit << 16) | 0xfffff,
ResMem | ResBlock | ResExclusive);
-#endif
PciBus->pmem = xf86AddResToList(NULL, &range, -1);
}
}
@@ -1712,8 +1722,9 @@ ValidatePci(void)
resPtr res_mp = NULL, res_m_io = NULL;
resPtr NonSys = NULL;
resPtr tmp, avoid = NULL;
-
+
if (!pvp->validate) continue;
+ avoid = xf86DupResList(pciAvoidRes);
NonSys = xf86DupResList(Sys);
m = n;
while ((pvp1 = xf86PciVideoInfo[m++])) {
@@ -1762,6 +1773,10 @@ ValidatePci(void)
}
if (res_m_io == NULL)
res_m_io = xf86DupResList(ResRange);
+
+ xf86ConvertListToHost(
+ xf86GetPciEntity(pvp->bus,pvp->device,pvp->func), avoid);
+
#ifdef DEBUG
xf86MsgVerb(X_INFO, 3,"avoid:\n");
xf86PrintResList(3,avoid);
@@ -1904,9 +1919,6 @@ initPciState(void)
pcaccp->funcnum = pvp->func;
pcaccp->arg.tag = pciTag(pvp->bus, pvp->device, pvp->func);
pcaccp->arg.func =
-#ifdef notanymore
- (SetBitsProcPtr)pciLongFunc(pcaccp->arg.tag,SET_BITS);
-#endif
(WriteProcPtr)pciLongFunc(pcaccp->arg.tag,WRITE);
pcaccp->ioAccess.AccessDisable = pciIoAccessDisable;
pcaccp->ioAccess.AccessEnable = pciIoAccessEnable;
@@ -2146,12 +2158,12 @@ xf86ClaimPciSlot(int bus, int device, int func, DriverPtr drvp,
p->driver = drvp;
p->chipset = chipset;
p->busType = BUS_PCI;
- p->device = dev;
p->pciBusId.bus = bus;
p->pciBusId.device = device;
p->pciBusId.func = func;
p->active = active;
p->inUse = FALSE;
+ xf86AddDevToEntity(num, dev);
/* Here we initialize the access structure */
p->access = xnfcalloc(1,sizeof(EntityAccessRec));
while (ppaccp && *ppaccp) {
@@ -2462,7 +2474,7 @@ xf86GetPciInfoForEntity(int entityIndex)
}
int
-xf86GetEntityForPciInfo(pciVideoPtr pvp)
+xf86GetPciEntity(int bus, int dev, int func)
{
int i;
@@ -2470,9 +2482,9 @@ xf86GetEntityForPciInfo(pciVideoPtr pvp)
EntityPtr p = xf86Entities[i];
if (p->busType != BUS_PCI) continue;
- if (p->pciBusId.bus == pvp->bus &&
- p->pciBusId.device == pvp->device &&
- p->pciBusId.func == pvp->func)
+ if (p->pciBusId.bus == bus &&
+ p->pciBusId.device == dev &&
+ p->pciBusId.func == func)
return i;
}
return -1;
@@ -2601,13 +2613,13 @@ xf86FindPciClass(CARD8 intf, CARD8 subClass, CARD16 class,
}
/*
- * This attempts to detect a multi-device card and set up a list
+ * This attempts to detect a multi-device card and sets up a list
* of pci tags of the devices of this card. On some of these
* cards the BIOS is not visible from all chipsets. We therefore
- * need to us the bios from a chipset where it is visible.
+ * need to use the BIOS from a chipset where it is visible.
* We do the following heuristics:
* If we detect only identical pci devices on a bus we assume it's
- * a multi-device card. This assumption isn't true alwaus, however.
+ * a multi-device card. This assumption isn't true always, however.
* One might just use identical cards on a bus. We therefore don't
* detect this situation when we set up the PCI video info. Instead
* we wait until an attempt to read the BIOS fails.
@@ -2641,23 +2653,23 @@ pciTestMultiDeviceCard(int bus, int dev, int func, PCITAG** pTag)
}
if (!pcrp) return 0;
+
/*
* we check all functions here: since multifunc devices need
* to implement func 0 we catch all devices on the bus when
* i = 0
*/
- if (pcrp->pci_header_type &0x80)
- multifunc = TRUE;
-
- ppcrp = xf86PciInfo;
-
+ if (pcrp->pci_header_type &0x80)
+ multifunc = TRUE;
+
+ j = 0;
+
while (ppcrp[j]) {
if (ppcrp[j]->busnum == bus && ppcrp[j]->funcnum == i
&& ppcrp[j]->devnum != pcrp->devnum) {
/* don't test subsys ID here. It might be set by POST
- - however some cars might not have been POSTed */
+ - however some cards might not have been POSTed */
if (ppcrp[j]->pci_device_vendor != pcrp->pci_device_vendor
- || ppcrp[j]->pci_class_revision != pcrp->pci_class_revision
|| ppcrp[j]->pci_header_type != pcrp->pci_header_type )
return 0;
else
diff --git a/xc/programs/Xserver/hw/xfree86/ddc/edid2.h b/xc/programs/Xserver/hw/xfree86/ddc/edid2.h
deleted file mode 100644
index 8ca85c2f2..000000000
--- a/xc/programs/Xserver/hw/xfree86/ddc/edid2.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/ddc/edid2.h,v 1.2 1999/08/21 13:48:26 dawes Exp $ */
-
-#ifdef _PARSE_EDID_
-
-#define EDID2_len 256
-
-#define VERSION_SECTION 0
-#define VERSION_LEN 1
-#define VENDOR_SECTION (VERSION_SECTION + VERSION_LEN)
-#define V_MANUFACURER VENDOR_SECTION
-#define V_PROD_ID (V_MANUFACURER + 2)
-#define V_WEEK (V_PROD_ID + 2)
-#define V_YEAR (V_WEEK + 1)
-#define VENDOR_LEN 7
-#define MANUFACTURER_SECTION (VENDOR_SECTION + VENDOR_LEN)
-#define MANUFACTURER_LEN 32
-#define SERIAL_NO_SECTION (MANUFACTURER_SECTION + MANUFACTURER_LEN)
-#define SERIAL_NO_LEN 16
-#define UNUSED (SERIAL_NO_SECTION + SERIAL_NO_LEN)
-#define UNUSED_LEN 8
-#define DISPLAY_INTERFACE (UNUSED + UNUSED_LEN)
-#define PHYS_INTERFACE DISPLAY_INTERFACE
-#define VIDEO_INTERFACE (PHYS_INTERFACE + 1)
-#define INTERFACE_DATA_FORMAT (VIDEO_INTERFACE + 1)
-#define INTERFACE_COLOR_ENCODING (INTERFACE_DATA_FORMAT + 8)
-#define DISPLAY_INTERFACE_LEN 15
-#define DISPLAY_DEVICE (DISPLAY_INTERFACE + DISPLAY_INTERFACE_LEN)
-#define DISPLAY_TECHNOLOGY DISPLAY_DEVICE
-#define DISPLAY_CHARACTER (DISPLAY_TECHNOLOGY + 1)
-#define FEATURE_SUPPORT (DISPLAY_CHARACTER + 1)
-#define DISPLAY_DEVICE_LEN 5
-#define DISPLAY_RESPONSE_TIME (DISPLAY_INTERFACE + DISPLAY_INTERFACE_LEN)
-#define DISPLAY_RESPONSE_TIME_LEN 2
-#define COLOR_DESCRIPTION (DISPLAY_RESPONSE_TIME + DISPLAY_RESONSE_TIME_LEN)
-#define GAMMA COLOR_DESCRIPTION
-#define MAX_LUM (GAMMA + 4)
-#define WHITE_POINT (MAX_LUM + 4)
-#define COLOR_DESCRIPTION_LEN 28
-#define DISPLAY_DIMENSION (COLOR_DESCRIPTION + COLOR_DESCRIPTION_LEN)
-#define DISPLAY_SIZE DISPLAY_DIMENSION
-#define DISPLAY_ADDRESSABILITY (DISPLAY_SIZE + 4)
-#define DISPLAY_PITCH (DISPLAY_ADDRESSABILITY + 4)
-#define DISPLAY_DIMENION_LEN 10
-#define UNUSED1 (DISPLAY_DIMENSION + DISPLAY_DIMENSION_LEN)
-#define UNUSED1_LEN
-#define GFT_SUPPORT (UNUSED1 + UNUSED1_LEN)
-#define GFT_SUPPORT_LEN
-#define TIMING_INFO_MAP (GFT_SUPPORT + GFT_SUPPORT_LEN)
-#define TIMING_INFO_LEN 2
-#define LUM_TAB_TIMING (TIMING_INFO_MAP + TIMING_INFO_LEN)
-#define LUM_TAB_TIMING_LEN 127
-#define CHECKSUM (LUM_TAB_TIMING + LUM_TAB_TIMING_LEN)
-
-
-#define GET(y) *(CARD8 *)(y)
-/* Version / Revision */
-#define VERSION (GET(VERSION_SECTION) >> 4)
-#define REVISION (GET(VERSION_SECTION) & 0xf)
-/* Vendor / Product ID */
diff --git a/xc/programs/Xserver/hw/xfree86/doc/Install b/xc/programs/Xserver/hw/xfree86/doc/Install
index 9cbed305e..3580a61b6 100644
--- a/xc/programs/Xserver/hw/xfree86/doc/Install
+++ b/xc/programs/Xserver/hw/xfree86/doc/Install
@@ -1,126 +1,126 @@
- Installation Details for XFree86[tm] 4.0
+ Installation Details for XFree86[tm] 4.0.1
The XFree86 Project, Inc
- 29 February 2000
+ 30 June 2000
Abstract
- This document contains information about installing XFree86 4.0.
+ How to install XFree86.
1. Introduction
-This document contains information about installing XFree86 4.0 binary dis-
-tributions as provided by The XFree86 Project. The installation procedures
-for binary distributions provided by others may be different.
-
-The XFree86 binary distributions that we provide for UNIX-like OSs are pack-
-aged in the platform-independent gzipped tar format (referred to as "tar-
-balls"). Our tarballs can be identified by the ".tgz" suffix. We do not
-provide binaries in RPM format or any other platform specific package format.
-If you need them in such a format, you should contact your OS vendor.
-Together with the binary distributions, we provide a customised version of
-GNU tar called "extract", and an installation script. We recommend that
-these be used to install the binary distributions.
-
-2. How to get the XFree86 4.0 binary distributions
-
-We, The XFree86 Project, provide XFree86 4.0 binaries for a range of operat-
-ing systems at our ftp site <URL:ftp://ftp.xfree86.org/pub/XFree86/4.0/bina-
-ries/>. Our ftp site is also mirrored by many sites around the world. There
-is a sub-directory for each OS/platform that we have binaries for. The first
-thing you need to do is to decide which of these suits you. In most cases,
-the choice is straightforward. In some cases (e.g., Linux) there may be a
-number of choices depending on what architecture or libc version you are
-using. We recommend that you first download the Xinstall.sh script, and run
-it as follows to find out which binary distribution you should download.
+This document contains information about installing the XFree86 binaries as
+provided by The XFree86 Project.
+
+The XFree86 binaries that we provide for UNIX-like OS's (Linux, the BSDs and
+Solaris) are packaged in a platform-independent gzipped format (aka "tar-
+balls" identified by the .tgz suffix). Along with the binaries we provide a
+customized version of the GNU tar utility called "extract" and an installa-
+tion script. We recommend that these be used to install the binaries.
+
+2. Downloading the XFree86 4.0.1 binaries
+
+We, The XFree86 Project, provide XFree86 4.0.1 binaries for a range of oper-
+ating systems at our ftp site
+<URL:ftp://ftp.xfree86.org/pub/XFree86/4.0.1/binaries/>. Often during
+releases, our ftp site is heavily loaded. Instead of downloading directly
+from us we recommend that instead you use one of our mirror sites. Another
+advantage of using our mirror sites is that some of them support http access
+(ours does not).
+
+Our binaries are organized by sub-directories which correspond to each of the
+OS/platforms for which we provide binaries. First go to the sub-directory
+that represents your OS Platform. In some cases (e.g., Linux) there may be a
+number of choices depending on the architecture or libc version your platform
+uses. In all case we recommend that you first download the Xinstall.sh
+script, and run it as in the following example to find out which binary dis-
+tribution you should download.
sh Xinstall.sh -check
-This should tell you which binary distribution is the correct one for your
-system. Getting this right may save from wasting time downloading the wrong
-distribution.
-
-The next step is to download the necessary files. The mandatory files for
-all installations are listed below. All of them must be downloaded to do the
-installation. The installer script will complain if they are not all pre-
-sent.
-
- Xinstall.sh The installer script
- extract The utility for extracting tarballs
- Xbin.tgz X clients/utilities and run-time libraries
- Xlib.tgz Some data files required at run-time
- Xman.tgz Manual pages
- Xdoc.tgz XFree86 documentation
- Xfnts.tgz Base set of fonts
- Xfenc.tgz Base set of font encoding data
- Xetc.tgz Run-time configuration files
- Xvar.tgz Run-time data
- Xxserv.tgz XFree86 X server
- Xmod.tgz XFree86 X server modules
+The output of this utility tells you which is the correct set of binaries
+for you to download. If you are careful with this step you will save your-
+self a lot time and trouble from NOT downloading an incompatible distribu-
+tion.
+
+Once that is done download the necessary files. The twelve (12) mandatory
+files for all installations are listed below. If you have not downloaded all
+of the files, the installer script will complain.
+
+ 1. Xinstall.sh The installer script
+ 2. extract The utility for extracting tarballs
+ 3. Xbin.tgz X clients/utilities and run-time libraries
+ 4. Xlib.tgz Some data files required at run-time
+ 5. Xman.tgz Manual pages
+ 6. Xdoc.tgz XFree86 documentation
+ 7. Xfnts.tgz Base set of fonts
+ 8. Xfenc.tgz Base set of font encoding data
+ 9. Xetc.tgz Run-time configuration files
+ 10. Xvar.tgz Run-time data
+ 11. Xxserv.tgz XFree86 X server
+ 12. Xmod.tgz XFree86 X server modules
NOTES:
o Some web browsers have a problem downloading the extract utility cor-
rectly. If you encounter this problem, download the version called
- extract.exe instead. The ".exe" suffix is only there to make the trou-
- blesome web browsers do the right thing. It is not a DOS/Windows exe-
- cutable.
+ extract.exe instead. This should fix the problem. (This is not a
+ DOS/Windows executable.)
o A few distributions don't have or require the Xvar.tgz tarball. If it
is present in the binaries sub-directory for your platform, then it is
required.
- o Some distributions may have additional mandatory tarballs. This is
- rare. In these cases, the installer script will tell you if any are
- missing.
-
-The following tarballs are optional. You should download the ones you want
-to install.
-
- Xfsrv.tgz Font server
- Xnest.tgz Nested X server
- Xprog.tgz X header files, config files and compile-time libs
- Xprt.tgz X Print server
- Xvfb.tgz Virtual framebuffer X server
- Xf100.tgz 100dpi fonts
- Xfcyr.tgz Cyrillic fonts
- Xflat2.tgz Latin-2 fonts
- Xfnon.tgz Some large bitmap fonts
- Xfscl.tgz Scalable fonts (Speedo and Type1)
- Xhtml.tgz HTML version of the documentation
- Xps.tgz PostScript version of the documentation
- Xjdoc.tgz Documentation in Japanese
+ o Some distributions may have additional mandatory tarballs. While rare,
+ the installer script will tell you if any are missing.
+
+The following thirteen (13) tarballs are optional. You should download the
+ones you want to install.
+
+ 1. Xfsrv.tgz Font server
+ 2. Xnest.tgz Nested X server
+ 3. Xprog.tgz X header files, config files and compile-time libs
+ 4. Xprt.tgz X Print server
+ 5. Xvfb.tgz Virtual framebuffer X server
+ 6. Xf100.tgz 100dpi fonts
+ 7. Xfcyr.tgz Cyrillic fonts
+ 8. Xflat2.tgz Latin-2 fonts
+ 9. Xfnon.tgz Some large bitmap fonts
+ 10. Xfscl.tgz Scalable fonts (Speedo and Type1)
+ 11. Xhtml.tgz HTML version of the documentation
+ 12. Xps.tgz PostScript version of the documentation
+ 13. Xjdoc.tgz Documentation in Japanese
NOTES:
o Some distributions may have some additional optional tarballs.
-If you miss some and want to install them later, you can do so by following
-the appropriate part of the section that describes manual installation.
+If you miss some and want to install them later, go to the Manual Installa-
+tion (section 4., page 1) section.
-3. Installing XFree86 4.0 using the Xinstall.sh script
+3. Installing XFree86 4.0.1 using the Xinstall.sh script
-We strongly recommend that our XFree86 4.0 binary distributions be installed
-using the Xinstall.sh script that we provide. The main reason that we make
-this recommendation is that there are a lot of steps in the manual installa-
-tion process, and those steps can vary according to the situation. There is,
-however, a description of the manual installation process for the most common
-cases below for those who might need it.
+We strongly recommend that our XFree86 4.0.1 binaries be installed using the
+Xinstall.sh script that we provide. There are a lot of steps in the manual
+installation process, and those steps can vary according to the platform and
+hardware setup. There is a description of the manual installation process
+for the most common cases below (section 4., page 1).
-Put all of the downloaded files into a single directory (choose some tempo-
-rary location with enough space). Become the super user (root), cd to that
-directory, then run the installer script as follows:
+You must login as the super user (root) to run the installer script. Place
+all of the downloaded files into a single directory (choose a temporary loca-
+tion with enough space). Use the cd command to change to that directory and
+then run the installer script as follows:
sh Xinstall.sh
-Answer the prompts that come up. If you are missing something that is
-required to run this version of XFree86, the installer may tell you to
-install it before trying again. If you don't have all of the mandatory files
-listed above, then the installer will tell you which ones are missing and ask
-you to download them before trying again.
+Answer the prompts as they come up. If you are missing something that is
+required, the installer may tell you to install it before trying again. If
+the problem is that you did not download all of mandatory files aforemen-
+tioned, then the installer will tell you which ones are missing and ask you
+to download them before proceeding.
-3.1 Answering the questions that the installer may ask
+3.1 Questions the installer may ask
The installer asks some questions that may not have obvious answers. The
information here should help you answer them. In most cases, apart from the
@@ -158,12 +158,14 @@ ration files are installed by default under /etc/X11 instead of under
create the necessary symbolic links. If you don't want to have these config-
uration files under /etc/X11, then you should answer "no" when asked about
it. Answering "no" here also means that the new configuration files will be
-installed in the old /usr/X11R6/lib/X11 location. Note: for the rare systems
-that don't have symbolic links, this question will not be asked. The default
-answer is "yes" because that is best for most situations. It is our new
-default. It makes it easier to share the /usr/X11R6 directory between multi-
-ple hosts, and allows it to be mounted read-only. If you don't need these
-features, then you can safely answer "no" if you don't want them moved.
+installed in the old /usr/X11R6/lib/X11 location.
+
+Note: for the rare systems that don't have symbolic links, this question will
+not be asked. The default answer is "yes" because that is best for most sit-
+uations. It is our new default. It makes it easier to share the /usr/X11R6
+directory between multiple hosts, and allows it to be mounted read-only. If
+you don't need these features, then you can safely answer "no" if you don't
+want them moved.
When installing over an existing version, you will be prompted before each
set of configuration files is installed. If you haven't made any customisa-
@@ -172,8 +174,8 @@ for each of these. If you have made customisations, you can try answering
"no". If you run into problems later, you may need to manually merge your
customisations into the the new version of the configuration files. The con-
figuration files can all be found in the Xetc.tgz tarball. See the section
-below about manual installation for information about extracting them sepa-
-rately.
+below (section 4., page 1) about manual installation for information about
+extracting them separately.
After the configuration files have been dealt with, the other mandatory com-
ponents of the binary distribution will be installed. This should proceed
@@ -190,12 +192,22 @@ to run "ldconfig" on systems that require it, so that the newly installed
shared libraries are accessible. Then the fonts.dir files in some directo-
ries are updated so that the fonts can be accessed correctly. Next, the
installer checks to see if your system has a termcap file or terminfo files.
-If it finds the former, it tells you how my may update the entries in that
+If it finds the former, it tells you how you may update the entries in that
file. If it finds the latter, it asks you if you want it to update them for
you.
+You may be asked if you want to create links for the GL libraries and header
+files. The OpenGL standard on some platforms (Linux in particular) says that
+these should be installed in the standard system locations (/usr/lib and
+/usr/include), so the installer offers to create the appropriate links. If
+you're running Linux, you should probably answer yes. For other platforms it
+is your choice. If you already have another version of libGL in /usr/lib,
+answering "yes" will remove it and replace it with a link to the version we
+supply. The installer will show you a listing of any existing versions
+before asking if they should be replaced.
+
Finally, the installer asks you if you want a link created for the rstart
-utility. On most modern systems, the link isn't essential, so the default
+utility. On most modern systems the link isn't essential, so the default
answer is "no". Answer "yes" if you know that you need it. If you find
later that you need it, you can create it easily by running:
@@ -206,7 +218,7 @@ later that you need it, you can create it easily by running:
The next step is to configure the X server. That is covered in detail in an
as-yet unwritten document :-(. In the meantime, there are two ways to create
-a basic X server configuration file for XFree86 4.0. One is to run the
+a basic X server configuration file for XFree86 4.0.1. One is to run the
xf86config utility. Another is to use the new -configure X server option:
XFree86 -configure
@@ -220,11 +232,11 @@ old XF86_* and/or XF98_* X server binaries from /usr/X11R6/bin.
After the X server configuration is done, it may be advisable to reboot,
especially if you run xdm (or equivalent) or the font server (xfs).
-4. Installing XFree86 4.0 manually
+4. Installing XFree86 4.0.1 manually
-This section describes how to manually install the XFree86 4.0 binary distri-
-butions. You should only use this method if you know what you're doing. The
-information here covers some common cases, but not every possible case.
+This section describes how to manually install the XFree86 4.0.1 binary dis-
+tributions. You should only use this method if you know what you're doing.
+The information here covers some common cases, but not every possible case.
Put all of the downloaded files into a single directory (choose some tempo-
rary location with enough space). Become the super user (root). All of the
@@ -323,7 +335,7 @@ Once that's done, the main part of the installation can be done:
/sbin/ldconfig -m /usr/X11R6/lib # For FreeBSD, NetBSD, OpenBSD
/usr/X11R6/bin/mkfontdir /usr/X11R6/lib/X11/fonts/misc
- Generated from XFree86: xc/programs/Xserver/hw/xfree86/doc/sgml/Install.sgml,v 1.4 2000/02/29 18:01:17 dawes Exp $
+ Generated from XFree86: xc/programs/Xserver/hw/xfree86/doc/sgml/Install.sgml,v 1.6 2000/07/02 02:35:27 dawes Exp $
-$XFree86: xc/programs/Xserver/hw/xfree86/doc/Install,v 1.3 2000/03/01 01:48:01 dawes Exp $
+$XFree86: xc/programs/Xserver/hw/xfree86/doc/Install,v 1.5 2000/07/02 02:46:26 dawes Exp $
diff --git a/xc/programs/Xserver/hw/xfree86/doc/README.i810 b/xc/programs/Xserver/hw/xfree86/doc/README.i810
index 05b5759a8..b02c18bf9 100644
--- a/xc/programs/Xserver/hw/xfree86/doc/README.i810
+++ b/xc/programs/Xserver/hw/xfree86/doc/README.i810
@@ -107,4 +107,4 @@ http://www.precisioninsight.com
Generated from XFree86: xc/programs/Xserver/hw/xfree86/doc/sgml/i810.sgml,v 1.2 2000/03/04 00:00:30 dawes Exp $
-$XFree86: xc/programs/Xserver/hw/xfree86/doc/README.i810,v 1.3 2000/03/04 00:51:32 dawes Exp $
+$XFree86: xc/programs/Xserver/hw/xfree86/doc/README.i810,v 1.4 2000/06/17 17:44:22 dawes Exp $
diff --git a/xc/programs/Xserver/hw/xfree86/doc/sgml/DRI.sgml b/xc/programs/Xserver/hw/xfree86/doc/sgml/DRI.sgml
index 457dd3dbc..9a5d2a8dc 100644
--- a/xc/programs/Xserver/hw/xfree86/doc/sgml/DRI.sgml
+++ b/xc/programs/Xserver/hw/xfree86/doc/sgml/DRI.sgml
@@ -13,7 +13,7 @@
<date>18 May 2000
<ident>
- $XFree86: xc/programs/Xserver/hw/xfree86/doc/sgml/DRI.sgml,v 1.3 2000/04/05 05:38:41 brianp Exp $
+ $XFree86: xc/programs/Xserver/hw/xfree86/doc/sgml/DRI.sgml,v 1.5 2000/06/17 00:03:17 martin Exp $
</ident>
<toc>
diff --git a/xc/programs/Xserver/hw/xfree86/doc/sgml/Install.sgml b/xc/programs/Xserver/hw/xfree86/doc/sgml/Install.sgml
index 8aebef382..726e481b4 100644
--- a/xc/programs/Xserver/hw/xfree86/doc/sgml/Install.sgml
+++ b/xc/programs/Xserver/hw/xfree86/doc/sgml/Install.sgml
@@ -6,16 +6,15 @@
<title>Installation Details for XFree86&trade; &relvers;
<author>The XFree86 Project, Inc
-<date>29 February 2000
+<date>30 June 2000
<ident>
-$XFree86: xc/programs/Xserver/hw/xfree86/doc/sgml/Install.sgml,v 1.4 2000/02/29 18:01:17 dawes Exp $
+$XFree86: xc/programs/Xserver/hw/xfree86/doc/sgml/Install.sgml,v 1.6 2000/07/02 02:35:27 dawes Exp $
</ident>
<abstract>
-This document contains information about installing
-XFree86 &relvers;.
+How to install XFree86.
</abstract>
@@ -23,21 +22,19 @@ XFree86 &relvers;.
<sect>Introduction
<p>
-This document contains information about installing XFree86 &relvers;
-binary distributions as provided by The XFree86 Project. The installation
-procedures for binary distributions provided by others may be different.
-
-The XFree86 binary distributions that we provide for UNIX-like OSs are
-packaged in the platform-independent gzipped tar format (referred to as
-"tarballs"). Our tarballs can be identified by the "<tt>.tgz</tt>"
-suffix. We do not provide binaries in RPM format or any other platform
-specific package format. If you need them in such a format, you should
-contact your OS vendor. Together with the binary distributions, we
-provide a customised version of GNU tar called "extract", and an
-installation script. We recommend that these be used to install the
-binary distributions.
-
-<sect>How to get the XFree86 &relvers; binary distributions
+This document contains information about installing the XFree86 binaries
+as provided by The XFree86 Project.
+
+<p>
+The XFree86 binaries that we provide for UNIX-like OS's (Linux, the BSDs
+and Solaris) are packaged in a platform-independent gzipped format (aka
+"tarballs" identified by the <tt>.tgz</tt> suffix). Along with the
+binaries we provide a customized version of the GNU tar utility called
+"extract" and an installation script. We recommend that these be
+used to install the binaries.
+
+
+<sect>Downloading the XFree86 &relvers; binaries
<p>
We, The XFree86 Project, provide XFree86 &relvers; binaries for a range
of operating systems at our
@@ -49,78 +46,82 @@ url="ftp://ftp.xfree86.org/pub/XFree86/snapshots/&relvers/binaries/">.
<url name="ftp site"
url="ftp://ftp.xfree86.org/pub/XFree86/&relvers/binaries/">.
]]>
-Our ftp site is also mirrored by many sites around the world. There is
-a sub-directory for each OS/platform that we have binaries for. The
-first thing you need to do is to decide which of these suits you. In
-most cases, the choice is straightforward. In some cases (e.g., Linux)
-there may be a number of choices depending on what architecture or libc
-version you are using. We recommend that you first download the
-<tt>Xinstall.sh</tt> script, and run it as follows to find out which
-binary distribution you should download.
+Often during releases, our ftp site is heavily loaded. Instead of
+downloading directly from us we recommend that instead you use one of
+our mirror sites. Another advantage of using our mirror sites is that
+some of them support http access (ours does not).
+
+<p>
+Our binaries are organized by sub-directories which correspond to each
+of the OS/platforms for which we provide binaries. First go to the
+sub-directory that represents your OS Platform. In some cases (e.g.,
+Linux) there may be a number of choices depending on the architecture
+or libc version your platform uses. In all case we recommend that you
+first download the <tt>Xinstall.sh</tt> script, and run it as in the
+following example to find out which binary distribution you should
+download.
<tscreen><verb>
sh Xinstall.sh -check
</verb></tscreen>
-This should tell you which binary distribution is the correct one for
-your system. Getting this right may save from wasting time downloading
-the wrong distribution.
+The output of this utility tells you which is the correct set of binaries
+for you to download. If you are careful with this step you will save
+yourself a lot time and trouble from NOT downloading an incompatible
+distribution.
-The next step is to download the necessary files. The mandatory files
-for all installations are listed below. All of them must be downloaded
-to do the installation. The installer script will complain if they are not
-all present.
+Once that is done download the necessary files. The twelve (12)
+mandatory files for all installations are listed below. If you have
+not downloaded all of the files, the installer script will complain.
<quote><verb>
-Xinstall.sh The installer script
-extract The utility for extracting tarballs
-Xbin.tgz X clients/utilities and run-time libraries
-Xlib.tgz Some data files required at run-time
-Xman.tgz Manual pages
-Xdoc.tgz XFree86 documentation
-Xfnts.tgz Base set of fonts
-Xfenc.tgz Base set of font encoding data
-Xetc.tgz Run-time configuration files
-Xvar.tgz Run-time data
-Xxserv.tgz XFree86 X server
-Xmod.tgz XFree86 X server modules
+1. Xinstall.sh The installer script
+2. extract The utility for extracting tarballs
+3. Xbin.tgz X clients/utilities and run-time libraries
+4. Xlib.tgz Some data files required at run-time
+5. Xman.tgz Manual pages
+6. Xdoc.tgz XFree86 documentation
+7. Xfnts.tgz Base set of fonts
+8. Xfenc.tgz Base set of font encoding data
+9. Xetc.tgz Run-time configuration files
+10. Xvar.tgz Run-time data
+11. Xxserv.tgz XFree86 X server
+12. Xmod.tgz XFree86 X server modules
</verb></quote>
NOTES:
<itemize>
<item>Some web browsers have a problem downloading the <tt>extract</tt>
utility correctly. If you encounter this problem, download the
- version called <tt>extract.exe</tt> instead. The "<tt>.exe</tt>"
- suffix is only there to make the troublesome web browsers do
- the right thing. It is not a DOS/Windows executable.
+ version called <tt>extract.exe</tt> instead. This should fix the
+ problem. (This is not a DOS/Windows executable.)
<item>A few distributions don't have or require the <tt>Xvar.tgz</tt>
tarball. If it is present in the <tt>binaries</tt> sub-directory
for your platform, then it is required.
- <item>Some distributions may have additional mandatory tarballs. This
- is rare. In these cases, the installer script will tell you
- if any are missing.
+ <item>Some distributions may have additional mandatory tarballs.
+ While rare, the installer script will tell you if any are missing.
</itemize>
-The following tarballs are optional. You should download the ones you
-want to install.
+The following thirteen (13) tarballs are optional. You should download
+the ones you want to install.
<quote><verb>
-Xfsrv.tgz Font server
-Xnest.tgz Nested X server
-Xprog.tgz X header files, config files and compile-time libs
-Xprt.tgz X Print server
-Xvfb.tgz Virtual framebuffer X server
-Xf100.tgz 100dpi fonts
-Xfcyr.tgz Cyrillic fonts
-Xflat2.tgz Latin-2 fonts
-Xfnon.tgz Some large bitmap fonts
-Xfscl.tgz Scalable fonts (Speedo and Type1)
-Xhtml.tgz HTML version of the documentation
-Xps.tgz PostScript version of the documentation
-Xjdoc.tgz Documentation in Japanese
+1. Xfsrv.tgz Font server
+2. Xnest.tgz Nested X server
+3. Xprog.tgz X header files, config files and compile-time libs
+4. Xprt.tgz X Print server
+5. Xvfb.tgz Virtual framebuffer X server
+6. Xf100.tgz 100dpi fonts
+7. Xfcyr.tgz Cyrillic fonts
+8. Xflat2.tgz Latin-2 fonts
+9. Xfnon.tgz Some large bitmap fonts
+10. Xfscl.tgz Scalable fonts (Speedo and Type1)
+11. Xhtml.tgz HTML version of the documentation
+12. Xps.tgz PostScript version of the documentation
+13. Xjdoc.tgz Documentation in Japanese
</verb></quote>
NOTES:
@@ -129,34 +130,34 @@ NOTES:
</itemize>
-If you miss some and want to install them later, you can do so by following
-the appropriate part of the section that describes manual installation.
+If you miss some and want to install them later, go to the
+<ref id="manual-install" name="Manual Installation"> section.
<sect>Installing XFree86 &relvers; using the <tt>Xinstall.sh</tt> script
<p>
-We strongly recommend that our XFree86 &relvers; binary distributions
-be installed using the <tt>Xinstall.sh</tt> script that we provide.
-The main reason that we make this recommendation is that there are a lot
-of steps in the manual installation process, and those steps can vary
-according to the situation. There is, however, a description of the
-manual installation process for the most common cases below for those who
-might need it.
-
-Put all of the downloaded files into a single directory (choose some
-temporary location with enough space). Become the super user (root),
-cd to that directory, then run the installer script as follows:
+We strongly recommend that our XFree86 &relvers; binaries be installed
+using the <tt>Xinstall.sh</tt> script that we provide. There are a lot of
+steps in the manual installation process, and those steps can vary
+according to the platform and hardware setup. There is a description of
+the manual installation process for the most common cases <ref
+id="manual-install" name="below">.
+
+You must login as the super user (root) to run the installer script.
+Place all of the downloaded files into a single directory (choose a
+temporary location with enough space). Use the cd command to change to
+that directory and then run the installer script as follows:
<tscreen><verb>
sh Xinstall.sh
</verb></tscreen>
-Answer the prompts that come up. If you are missing something that is
-required to run this version of XFree86, the installer may tell you to
-install it before trying again. If you don't have all of the mandatory
-files listed above, then the installer will tell you which ones are
-missing and ask you to download them before trying again.
+Answer the prompts as they come up. If you are missing something that
+is required, the installer may tell you to install it before trying
+again. If the problem is that you did not download all of mandatory
+files aforementioned, then the installer will tell you which ones are
+missing and ask you to download them before proceeding.
-<sect1>Answering the questions that the installer may ask
+<sect1>Questions the installer may ask
<p>
The installer asks some questions that may not have obvious answers. The
information here should help you answer them. In most cases, apart from
@@ -196,13 +197,14 @@ the existing ones for you and create the necessary symbolic links. If
you don't want to have these configuration files under <tt>/etc/X11</tt>,
then you should answer "no" when asked about it. Answering "no" here
also means that the new configuration files will be installed in the
-old <tt>/usr/X11R6/lib/X11</tt> location. Note: for the rare systems
-that don't have symbolic links, this question will not be asked.
-The default answer is "yes" because that is best for most situations.
-It is our new default. It makes it easier to share the <tt>/usr/X11R6</tt>
-directory between multiple hosts, and allows it to be mounted read-only.
-If you don't need these features, then you can safely answer "no" if you
-don't want them moved.
+old <tt>/usr/X11R6/lib/X11</tt> location.
+
+Note: for the rare systems that don't have symbolic links, this question
+will not be asked. The default answer is "yes" because that is best
+for most situations. It is our new default. It makes it easier to
+share the <tt>/usr/X11R6</tt> directory between multiple hosts, and
+allows it to be mounted read-only. If you don't need these features,
+then you can safely answer "no" if you don't want them moved.
When installing over an existing version, you will be prompted before
each set of configuration files is installed. If you haven't made any
@@ -210,9 +212,10 @@ customisations to your existing configuration files, then you can safely
answer "yes" for each of these. If you have made customisations, you
can try answering "no". If you run into problems later, you may need
to manually merge your customisations into the the new version of the
-configuration files. The configuration files can all be found in
-the <tt>Xetc.tgz</tt> tarball. See the section below about manual
-installation for information about extracting them separately.
+configuration files. The configuration files can all be found in the
+<tt>Xetc.tgz</tt> tarball. See the <ref id="manual-install" name="section
+below"> about manual installation for information about extracting them
+separately.
After the configuration files have been dealt with, the other mandatory
components of the binary distribution will be installed. This should
@@ -230,12 +233,23 @@ that the newly installed shared libraries are accessible. Then
the <tt>fonts.dir</tt> files in some directories are updated so that
the fonts can be accessed correctly. Next, the installer checks to
see if your system has a termcap file or terminfo files. If it finds
-the former, it tells you how my may update the entries in that file.
+the former, it tells you how you may update the entries in that file.
If it finds the latter, it asks you if you want it to update them
for you.
+You may be asked if you want to create links for the GL libraries and
+header files. The OpenGL standard on some platforms (Linux in particular)
+says that these should be installed in the standard system locations
+(<tt>/usr/lib</tt> and <tt>/usr/include</tt>), so the installer offers
+to create the appropriate links. If you're running Linux, you should
+probably answer yes. For other platforms it is your choice. If you
+already have another version of libGL in /usr/lib, answering "yes" will
+remove it and replace it with a link to the version we supply. The
+installer will show you a listing of any existing versions before asking
+if they should be replaced.
+
Finally, the installer asks you if you want a link created for the
-<tt>rstart</tt> utility. On most modern systems, the link isn't essential,
+<tt>rstart</tt> utility. On most modern systems the link isn't essential,
so the default answer is "no". Answer "yes" if you know that you need
it. If you find later that you need it, you can create it easily by
running:
@@ -268,7 +282,7 @@ operation of the new X server, you can safely remove the old
After the X server configuration is done, it may be advisable to reboot,
especially if you run xdm (or equivalent) or the font server (xfs).
-<sect>Installing XFree86 &relvers; manually
+<sect>Installing XFree86 &relvers; manually<label id="manual-install">
<p>
This section describes how to manually install the XFree86 &relvers; binary
distributions. You should only use this method if you know what you're
diff --git a/xc/programs/Xserver/hw/xfree86/doc/sgml/r128.sgml b/xc/programs/Xserver/hw/xfree86/doc/sgml/r128.sgml
index 18fdb4a5e..db1ef8af4 100644
--- a/xc/programs/Xserver/hw/xfree86/doc/sgml/r128.sgml
+++ b/xc/programs/Xserver/hw/xfree86/doc/sgml/r128.sgml
@@ -5,10 +5,10 @@
<article>
<title>Information for ATI Rage 128 Users
<author>Precision Insight, Inc., SuSE GmbH
-<date>12 November 1999
+<date>13 June 2000
<ident>
-$XFree86: xc/programs/Xserver/hw/xfree86/doc/sgml/r128.sgml,v 1.7 2000/03/08 15:14:48 dawes Exp $
+$XFree86: xc/programs/Xserver/hw/xfree86/doc/sgml/r128.sgml,v 1.8 2000/06/14 00:16:09 dawes Exp $
</ident>
<toc>
@@ -86,7 +86,7 @@ However, if you have problems with auto-detection, you can specify:
<sect>Known Limitations
<p>
<itemize>
- <item>DGA is not supported yet
+ <item>None
</itemize>
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/apm/apm.cpp b/xc/programs/Xserver/hw/xfree86/drivers/apm/apm.cpp
index ee527418f..d105ba52f 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/apm/apm.cpp
+++ b/xc/programs/Xserver/hw/xfree86/drivers/apm/apm.cpp
@@ -1,17 +1,17 @@
-.\" $XFree86: xc/programs/Xserver/hw/xfree86/drivers/apm/apm.cpp,v 1.1 2000/03/03 01:05:33 dawes Exp $
-.TH APM __drivermansuffix__ "Version 4.0" "XFree86"
+.\" $XFree86: xc/programs/Xserver/hw/xfree86/drivers/apm/apm.cpp,v 1.4 2000/06/14 02:13:07 dawes Exp $
+.\" shorthand for double quote that works everywhere.
+.ds q \N'34'
+.TH APM __drivermansuffix__ "Version 4.0.1" "XFree86"
.SH NAME
apm \- Alliance ProMotion video driver
.SH SYNOPSIS
-.B "Section ""Device"""
-.br
-.BI " Identifier """ devname """"
-.br
-.B " Driver ""apm"""
-.br
+.nf
+.B "Section \*qDevice\*q"
+.BI " Identifier \*q" devname \*q
+.B " Driver \*qapm\*q"
\ \ ...
-.br
.B EndSection
+.fi
.SH DESCRIPTION
.B apm
is an XFree86 driver for Alliance ProMotion video cards.
@@ -25,6 +25,6 @@ Please refer to XF86Config(__filemansuffix__) for general configuration
details. This section only covers configuration details specific to this
driver.
.SH "SEE ALSO"
-XFree86(1), XF86Config(__filemansuffix__), xf86config(1), Xserver(1), X(1)
+XFree86(1), XF86Config(__filemansuffix__), xf86config(1), Xserver(1), X(__miscmansuffix__)
.SH AUTHORS
Authors include: ...
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/ati/ati.cpp b/xc/programs/Xserver/hw/xfree86/drivers/ati/ati.cpp
index 28ba4ed72..22d90daab 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/ati/ati.cpp
+++ b/xc/programs/Xserver/hw/xfree86/drivers/ati/ati.cpp
@@ -1,19 +1,19 @@
-.\" $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/ati.cpp,v 1.1 2000/03/03 01:05:34 dawes Exp $
-.TH ATI __drivermansuffix__ "Version 4.0" "XFree86"
+.\" $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/ati.cpp,v 1.5 2000/06/19 15:00:55 tsi Exp $
+.\" shorthand for double quote that works everywhere.
+.ds q \N'34'
+.TH ATI __drivermansuffix__ "Version 4.0.1" "XFree86"
.SH NAME
ati \- ATI video driver
.SH SYNOPSIS
-.B "Section ""Device"""
-.br
-.BI " Identifier """ devname """"
-.br
-.B " Driver ""ati"""
-.br
+.nf
+.B "Section \*qDevice\*q"
+.BI " Identifier \*q" devname \*q
+.B " Driver \*qati\*q"
\ \ ...
-.br
.B EndSection
+.fi
.SH DESCRIPTION
-.B ati
+.B ati
is an XFree86 driver for ATI video cards.
THIS MAN PAGE NEEDS TO BE FILLED IN.
.SH SUPPORTED HARDWARE
@@ -25,6 +25,6 @@ Please refer to XF86Config(__filemansuffix__) for general configuration
details. This section only covers configuration details specific to this
driver.
.SH "SEE ALSO"
-XFree86(1), XF86Config(__filemansuffix__), xf86config(1), Xserver(1), X(1)
+XFree86(1), XF86Config(__filemansuffix__), xf86config(1), Xserver(1), X(__miscmansuffix__)
.SH AUTHORS
Authors include: ...
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/chips/chips.cpp b/xc/programs/Xserver/hw/xfree86/drivers/chips/chips.cpp
index 3c9842327..142a546e8 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/chips/chips.cpp
+++ b/xc/programs/Xserver/hw/xfree86/drivers/chips/chips.cpp
@@ -1,17 +1,17 @@
-.\" $XFree86: xc/programs/Xserver/hw/xfree86/drivers/chips/chips.cpp,v 1.3 2000/03/03 01:05:34 dawes Exp $
-.TH CHIPS __drivermansuffix__ "Version 4.0" "XFree86"
+.\" $XFree86: xc/programs/Xserver/hw/xfree86/drivers/chips/chips.cpp,v 1.7 2000/06/14 02:13:08 dawes Exp $
+.\" shorthand for double quote that works everywhere.
+.ds q \N'34'
+.TH CHIPS __drivermansuffix__ "Version 4.0.1" "XFree86"
.SH NAME
chips \- Chips and Technologies video driver
.SH SYNOPSIS
-.B "Section ""Device"""
-.br
-.BI " Identifier """ devname """"
-.br
-.B " Driver ""chips"""
-.br
+.nf
+.B "Section \*qDevice\*q"
+.BI " Identifier \*q" devname \*q
+.B " Driver \*qchips\*q"
\ \ ...
-.br
.B EndSection
+.fi
.SH DESCRIPTION
.B chips
is an XFree86 driver for Chips and Technologies video processors. The majority
@@ -84,7 +84,7 @@ driver.
The driver auto-detects the chipset type, but the following
.B ChipSet
names may optionally be specified in the config file
-.B """Device"""
+.B \*qDevice\*q
section, and will override the auto-detection:
.PP
.RS 4
@@ -97,97 +97,101 @@ The driver will auto-detect the amount of video memory present for all
chipsets. But maybe overridden with the
.B VideoRam
entry in the config file
-.B """Device"""
+.B \*qDevice\*q
section.
.PP
The following driver
.B Options
are supported, on one or more of the supported chipsets:
.TP
-.BI "Option ""NoAccel"" """ boolean """
+.BI "Option \*qNoAccel\*q \*q" boolean \*q
Disable or enable acceleration. Default: acceleration is enabled.
.TP
-.BI "Option ""NoLinear"" """ boolean """
+.BI "Option \*qNoLinear\*q \*q" boolean \*q
Disables linear addressing in cases where it is enabled by default.
Default: off
.TP
-.BI "Option ""Linear"" """ boolean """
+.BI "Option \*qLinear\*q \*q" boolean \*q
Enables linear addressing in cases where it isdisabled by default.
Default: off
.TP
-.BI "Option ""HWCursor"" """ boolean """
+.BI "Option \*qHWCursor\*q \*q" boolean \*q
Enable or disable the HW cursor. Default: on.
.TP
-.BI "Option ""SWCursor"" """ boolean """
+.BI "Option \*qSWCursor\*q \*q" boolean \*q
Enable or disable the HW cursor. Default: off.
.TP
-.BI "Option ""STN"" """ boolean """
+.BI "Option \*qSTN\*q \*q" boolean \*q
Force detection of STN screen type. Default: off.
.TP
-.BI "Option ""UseModeline"" """ boolean """
+.BI "Option \*qUseModeline\*q \*q" boolean \*q
Reprogram flat panel timings with values from the modeline. Default: off
.TP
-.BI "Option ""FixPanelSize"" """ boolean """
+.BI "Option \*qFixPanelSize\*q \*q" boolean \*q
Reprogram flat panel size with values from the modeline. Default: off
.TP
-.BI "Option ""NoStretch"" """ boolean """
+.BI "Option \*qNoStretch\*q \*q" boolean \*q
This option disables the stretching on a mode on a flat panel to fill the
screen. Default: off
.TP
-.BI "Option ""LcdCenter"" """ boolean """
+.BI "Option \*qLcdCenter\*q \*q" boolean \*q
Center the mode displayed on the flat panel on the screen. Default: off
.TP
-.BI "Option ""HWclocks"" """ boolean """
+.BI "Option \*qHWclocks\*q \*q" boolean \*q
Force the use of fixed hardware clocks on chips that support both fixed
and programmable clocks. Default: off
.TP
-.BI "Option ""UseVclk1"" """ boolean """
+.BI "Option \*qUseVclk1\*q \*q" boolean \*q
Use the Vclk1 programable clock on
.B HiQV
chipsets instead of Vclk2. Default: off
.TP
-.BI "Option ""FPClock8"" """ float """
+.BI "Option \*qFPClock8\*q \*q" float \*q
.TP
-.BI "Option ""FPClock16"" """ float """
+.BI "Option \*qFPClock16\*q \*q" float \*q
.TP
-.BI "Option ""FPClock24"" """ float """
+.BI "Option \*qFPClock24\*q \*q" float \*q
.TP
-.BI "Option ""FPClock32"" """ float """
+.BI "Option \*qFPClock32\*q \*q" float \*q
Force the use of a particular video clock speed for use with the
flat panel at a specified depth
.TP
-.BI "Option ""MMIO"" """ boolean """
+.BI "Option \*qMMIO\*q \*q" boolean \*q
Force the use of memory mapped IO where it can be used. Default: off
.TP
-.BI "Option ""SuspendHack"" """ boolean """
+.BI "Option \*qSuspendHack\*q \*q" boolean \*q
Force driver to leave centering and stretching resgisters alone. This
can fix some laptop suspend/resume problems. Default: off
.TP
-.BI "Option ""Overlay""
+.BI "Option \*qOverlay\*q"
Enable 8+24 overlay mode. Only appropriate for depth 24. Default: off.
.TP
-.BI "Option ""ColorKey"" """ integer """
+.BI "Option \*qColorKey\*q \*q" integer \*q
Set the colormap index used for the transparency key for the depth 8 plane
when operating in 8+16 overlay mode. The value must be in the range
2\-255. Default: 255.
.TP
-.BI "Option ""ShadowFB"" """ boolean """
+.BI "Option \*qVideoKey\*q \*q" integer \*q
+This sets the default pixel value for the YUV video overlay key.
+Default: undefined.
+.TP
+.BI "Option \*qShadowFB\*q \*q" boolean \*q
Enable or disable use of the shadow framebuffer layer. See
shadowfb(__drivermansuffix__) for further information. Default: off.
.TP
-.BI "Option ""SyncOnGreen"" """ boolean """
+.BI "Option \*qSyncOnGreen\*q \*q" boolean \*q
Enable or disable combining the sync signals with the green signal.
Default: off.
.TP
-.BI "Option ""ShowCache"" """ boolean """
+.BI "Option \*qShowCache\*q \*q" boolean \*q
Enable or disable viewing offscreen memory. Used for debugging only
Default: off.
.TP
-.BI "Option ""18bitBus"" """ boolean """
+.BI "Option \*q18bitBus\*q \*q" boolean \*q
Force the driver to assume that the flat panel has an 18bit data bus.
Default: off.
.SH "SEE ALSO"
-XFree86(1), XF86Config(__filemansuffix__), xf86config(1), Xserver(1), X(1)
+XFree86(1), XF86Config(__filemansuffix__), xf86config(1), Xserver(1), X(__miscmansuffix__)
.PP
You are also recommended to read the README.chips file that comes with all
XFree86 distributions, which discusses the
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/cirrus/alp_driver.c b/xc/programs/Xserver/hw/xfree86/drivers/cirrus/alp_driver.c
index 4513adfa8..2a53879e4 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/cirrus/alp_driver.c
+++ b/xc/programs/Xserver/hw/xfree86/drivers/cirrus/alp_driver.c
@@ -9,10 +9,7 @@
* Guy DESBIEF
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/cirrus/alp_driver.c,v 1.8 2000/02/27 02:45:26 alanh Exp $ */
-
-/* Everything using inb/outb, etc needs "compiler.h" */
-#include "compiler.h"
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/cirrus/alp_driver.c,v 1.11 2000/06/21 17:28:05 dawes Exp $ */
/* All drivers should typically include these */
#include "xf86.h"
@@ -21,6 +18,9 @@
/* All drivers need this */
#include "xf86_ansic.h"
+/* Everything using inb/outb, etc needs "compiler.h" */
+#include "compiler.h"
+
/* Drivers for PCI hardware need this */
#include "xf86PciInfo.h"
@@ -87,7 +87,7 @@ static void AlpProbeI2C(int scrnIndex);
* Forward definitions for the functions that make up the driver.
*/
-Bool AlpProbe(int entity, ScrnInfoPtr pScrn);
+ScrnInfoPtr AlpProbe(int entity);
/* Mandatory functions */
@@ -288,9 +288,13 @@ AlpAvailableOptions(int chipid)
return CirOptions;
}
-Bool
-AlpProbe(int entity, ScrnInfoPtr pScrn)
+ScrnInfoPtr
+AlpProbe(int entity)
{
+ ScrnInfoPtr pScrn = NULL;
+
+ if ((pScrn = xf86ConfigPciEntity(pScrn, 0, entity, CIRPciChipsets,
+ NULL,NULL, NULL, NULL, NULL))) {
pScrn->PreInit = AlpPreInit;
pScrn->ScreenInit = AlpScreenInit;
pScrn->SwitchMode = AlpSwitchMode;
@@ -299,11 +303,9 @@ AlpProbe(int entity, ScrnInfoPtr pScrn)
pScrn->LeaveVT = AlpLeaveVT;
pScrn->FreeScreen = AlpFreeScreen;
pScrn->ValidMode = AlpValidMode;
+ }
- xf86ConfigActivePciEntity(pScrn, entity, CIRPciChipsets, NULL,
- NULL, NULL, NULL, NULL);
-
- return TRUE;
+ return pScrn;
}
@@ -939,7 +941,7 @@ AlpPreInit(ScrnInfoPtr pScrn, int flags)
* Setup the ClockRanges, which describe what clock ranges are available,
* and what sort of modes they can be used for.
*/
- clockRanges = xnfalloc(sizeof(ClockRange));
+ clockRanges = xnfcalloc(sizeof(ClockRange), 1);
clockRanges->next = NULL;
clockRanges->minClock = pCir->MinClock;
clockRanges->maxClock = pCir->MaxClock;
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/cirrus/cirrus.cpp b/xc/programs/Xserver/hw/xfree86/drivers/cirrus/cirrus.cpp
index a5c29e047..d6cf0dea1 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/cirrus/cirrus.cpp
+++ b/xc/programs/Xserver/hw/xfree86/drivers/cirrus/cirrus.cpp
@@ -1,17 +1,17 @@
-.\" $XFree86: xc/programs/Xserver/hw/xfree86/drivers/cirrus/cirrus.cpp,v 1.1 2000/03/03 01:05:35 dawes Exp $
-.TH CIRRUS __drivermansuffix__ "Version 4.0" "XFree86"
+.\" $XFree86: xc/programs/Xserver/hw/xfree86/drivers/cirrus/cirrus.cpp,v 1.4 2000/06/14 02:13:08 dawes Exp $
+.\" shorthand for double quote that works everywhere.
+.ds q \N'34'
+.TH CIRRUS __drivermansuffix__ "Version 4.0.1" "XFree86"
.SH NAME
cirrus \- Cirrus Logic video driver
.SH SYNOPSIS
-.B "Section ""Device"""
-.br
-.BI " Identifier """ devname """"
-.br
-.B " Driver ""cirrus"""
-.br
+.nf
+.B "Section \*qDevice\*q"
+.BI " Identifier \*q" devname \*q
+.B " Driver \*qcirrus\*q"
\ \ ...
-.br
.B EndSection
+.fi
.SH DESCRIPTION
.B cirrus
is an XFree86 driver for Cirrus Logic video chips.
@@ -25,6 +25,6 @@ Please refer to XF86Config(__filemansuffix__) for general configuration
details. This section only covers configuration details specific to this
driver.
.SH "SEE ALSO"
-XFree86(1), XF86Config(__filemansuffix__), xf86config(1), Xserver(1), X(1)
+XFree86(1), XF86Config(__filemansuffix__), xf86config(1), Xserver(1), X(__miscmansuffix__)
.SH AUTHORS
Authors include: ...
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/cyrix/cyrix.cpp b/xc/programs/Xserver/hw/xfree86/drivers/cyrix/cyrix.cpp
index b88b832ac..e9c6ecb70 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/cyrix/cyrix.cpp
+++ b/xc/programs/Xserver/hw/xfree86/drivers/cyrix/cyrix.cpp
@@ -1,17 +1,17 @@
-.\" $XFree86: xc/programs/Xserver/hw/xfree86/drivers/cyrix/cyrix.cpp,v 1.1 2000/03/03 01:05:36 dawes Exp $
-.TH CYRIX __drivermansuffix__ "Version 4.0" "XFree86"
+.\" $XFree86: xc/programs/Xserver/hw/xfree86/drivers/cyrix/cyrix.cpp,v 1.4 2000/06/14 02:13:08 dawes Exp $
+.\" shorthand for double quote that works everywhere.
+.ds q \N'34'
+.TH CYRIX __drivermansuffix__ "Version 4.0.1" "XFree86"
.SH NAME
cyrix \- Cyrix video driver
.SH SYNOPSIS
-.B "Section ""Device"""
-.br
-.BI " Identifier """ devname """"
-.br
-.B " Driver ""cyrix"""
-.br
+.nf
+.B "Section \*qDevice\*q"
+.BI " Identifier \*q" devname \*q
+.B " Driver \*qcyrix\*q"
\ \ ...
-.br
.B EndSection
+.fi
.SH DESCRIPTION
.B cyrix
is an XFree86 driver for Cyrix video chips.
@@ -25,6 +25,6 @@ Please refer to XF86Config(__filemansuffix__) for general configuration
details. This section only covers configuration details specific to this
driver.
.SH "SEE ALSO"
-XFree86(1), XF86Config(__filemansuffix__), xf86config(1), Xserver(1), X(1)
+XFree86(1), XF86Config(__filemansuffix__), xf86config(1), Xserver(1), X(__miscmansuffix__)
.SH AUTHORS
Authors include: ...
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/glint/Imakefile b/xc/programs/Xserver/hw/xfree86/drivers/glint/Imakefile
index 4e4bee837..14f884abd 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/glint/Imakefile
+++ b/xc/programs/Xserver/hw/xfree86/drivers/glint/Imakefile
@@ -1,4 +1,4 @@
-XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/drivers/glint/Imakefile,v 1.22 2000/03/03 01:05:37 dawes Exp $
+XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/drivers/glint/Imakefile,v 1.28 2000/06/12 10:11:37 alanh Exp $
XCOMM
XCOMM This is an Imakefile for the GLINT driver.
XCOMM
@@ -14,12 +14,12 @@ DRIINCLUDES=-I$(SERVERSRC)/GL/dri -I$(LIBSRC)/GL/dri -I$(TOP)/include
SRCS = glint_driver.c pm2_dac.c pm2ramdac.c pm2_accel.c pm_dac.c IBMramdac.c \
pm_accel.c tx_dac.c tx_accel.c pm2v_dac.c pm2vramdac.c pm2_video.c \
- TIramdac.c dualmx_dac.c dualmx_accel.c glint_shadow.c $(DRISRC) \
- glint_dga.c
+ pm3_dac.c pm3_accel.c TIramdac.c dualmx_dac.c dualmx_accel.c \
+ glint_shadow.c $(DRISRC) sx_accel.c TIdualramdac.c glint_dga.c
OBJS = glint_driver.o pm2_dac.o pm2ramdac.o pm2_accel.o pm_dac.o IBMramdac.o \
pm_accel.o tx_dac.o tx_accel.o pm2v_dac.o pm2vramdac.o pm2_video.o \
- TIramdac.o dualmx_dac.o dualmx_accel.o glint_shadow.o $(DRIOBJ) \
- glint_dga.o
+ pm3_dac.o pm3_accel.o TIramdac.o dualmx_dac.o dualmx_accel.o \
+ glint_shadow.o $(DRIOBJ) sx_accel.o TIdualramdac.o glint_dga.o
#if defined(XF86DriverSDK)
INCLUDES = -I. -I../../include
@@ -35,10 +35,10 @@ INCLUDES = -I. -I$(XF86COMSRC) -I$(XF86OSSRC) -I$(SERVERSRC)/Xext \
-I$(XF86SRC)/xf4bpp -I$(SERVERSRC)/include -I$(XINCLUDESRC) \
-I$(XF86SRC)/ddc -I$(XF86SRC)/i2c -I$(EXTINCSRC) $(DRIINCLUDES) \
-I$(XF86SRC)/shadowfb -I$(XF86SRC)/fbdevhw \
- -I$(XTOP)/include
+ -I$(XTOP)/include -I$(XF86OSSRC)/vbe
#endif
-DEFINES = $(GLX_DEFINES)
+DEFINES = $(GLX_DEFINES) -DPPC_MMIO_IS_BE
#if MakeHasPosixVariableSubstitutions
SubdirLibraryRule($(OBJS))
@@ -60,6 +60,7 @@ DependTarget()
InstallDriverSDKNonExecFile(IBMramdac.c,$(DRIVERSDKDIR)/drivers/glint)
InstallDriverSDKNonExecFile(Imakefile,$(DRIVERSDKDIR)/drivers/glint)
InstallDriverSDKNonExecFile(TIramdac.c,$(DRIVERSDKDIR)/drivers/glint)
+InstallDriverSDKNonExecFile(TIdualramdac.c,$(DRIVERSDKDIR)/drivers/glint)
InstallDriverSDKNonExecFile(dualmx_accel.c,$(DRIVERSDKDIR)/drivers/glint)
InstallDriverSDKNonExecFile(dualmx_dac.c,$(DRIVERSDKDIR)/drivers/glint)
InstallDriverSDKNonExecFile(glint.h,$(DRIVERSDKDIR)/drivers/glint)
@@ -67,6 +68,7 @@ InstallDriverSDKNonExecFile(glint_dri.c,$(DRIVERSDKDIR)/drivers/glint)
InstallDriverSDKNonExecFile(glint_dri.h,$(DRIVERSDKDIR)/drivers/glint)
InstallDriverSDKNonExecFile(glint_dripriv.h,$(DRIVERSDKDIR)/drivers/glint)
InstallDriverSDKNonExecFile(glint_driver.c,$(DRIVERSDKDIR)/drivers/glint)
+InstallDriverSDKNonExecFile(glint_dga.c,$(DRIVERSDKDIR)/drivers/glint)
InstallDriverSDKNonExecFile(glint_regs.h,$(DRIVERSDKDIR)/drivers/glint)
InstallDriverSDKNonExecFile(glint_shadow.c,$(DRIVERSDKDIR)/drivers/glint)
InstallDriverSDKNonExecFile(pm2_accel.c,$(DRIVERSDKDIR)/drivers/glint)
@@ -75,9 +77,12 @@ InstallDriverSDKNonExecFile(pm2_video.c,$(DRIVERSDKDIR)/drivers/glint)
InstallDriverSDKNonExecFile(pm2ramdac.c,$(DRIVERSDKDIR)/drivers/glint)
InstallDriverSDKNonExecFile(pm2v_dac.c,$(DRIVERSDKDIR)/drivers/glint)
InstallDriverSDKNonExecFile(pm2vramdac.c,$(DRIVERSDKDIR)/drivers/glint)
+InstallDriverSDKNonExecFile(pm3_dac.c,$(DRIVERSDKDIR)/drivers/glint)
+InstallDriverSDKNonExecFile(pm3_accel.c,$(DRIVERSDKDIR)/drivers/glint)
InstallDriverSDKNonExecFile(pm_accel.c,$(DRIVERSDKDIR)/drivers/glint)
InstallDriverSDKNonExecFile(pm_dac.c,$(DRIVERSDKDIR)/drivers/glint)
InstallDriverSDKNonExecFile(tx_accel.c,$(DRIVERSDKDIR)/drivers/glint)
InstallDriverSDKNonExecFile(tx_dac.c,$(DRIVERSDKDIR)/drivers/glint)
+InstallDriverSDKNonExecFile(sx_accel.c,$(DRIVERSDKDIR)/drivers/glint)
InstallDriverSDKObjectModule(glint,$(DRIVERSDKMODULEDIR),drivers)
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/glint/dualmx_accel.c b/xc/programs/Xserver/hw/xfree86/drivers/glint/dualmx_accel.c
index c8ec93434..1d276f7bb 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/glint/dualmx_accel.c
+++ b/xc/programs/Xserver/hw/xfree86/drivers/glint/dualmx_accel.c
@@ -28,7 +28,7 @@
* Modified version of tx_accel.c to support dual MX chips by
* Jens Owen, <jens@precisioninsight.com>
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/glint/dualmx_accel.c,v 1.6 2000/02/23 04:47:06 martin Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/glint/dualmx_accel.c,v 1.9 2000/06/21 13:35:51 alanh Exp $ */
#include "xf86.h"
#include "xf86_OSproc.h"
@@ -932,6 +932,7 @@ DualMXPolySegmentThinSolidWrapper(
XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC);
GLINTPtr pGlint = GLINTPTR(infoRec->pScrn);
pGlint->CurrentGC = pGC;
+ pGlint->CurrentDrawable = pDraw;
if(infoRec->NeedToSync) (*infoRec->Sync)(infoRec->pScrn);
XAAPolySegment(pDraw, pGC, nseg, pSeg);
}
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/glint/dualmx_dac.c b/xc/programs/Xserver/hw/xfree86/drivers/glint/dualmx_dac.c
index 0a7728ded..d042bfa47 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/glint/dualmx_dac.c
+++ b/xc/programs/Xserver/hw/xfree86/drivers/glint/dualmx_dac.c
@@ -27,7 +27,7 @@
* Modified version of tx_dac.c to support Dual MX rasterizers by
* Jens Owen <jens@precisioninsight.com>
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/glint/dualmx_dac.c,v 1.3 2000/02/23 04:47:07 martin Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/glint/dualmx_dac.c,v 1.4 2000/05/10 18:55:28 alanh Exp $ */
#include "xf86.h"
#include "xf86_OSproc.h"
@@ -36,10 +36,12 @@
#include "xf86PciInfo.h"
#include "xf86Pci.h"
+#include "IBM.h"
#include "TI.h"
#include "glint_regs.h"
#include "glint.h"
+#define DEBUG
#ifdef DEBUG
#define DUMP(name,field) do { \
value = GLINT_READ_REG(field); \
@@ -389,7 +391,11 @@ Shiftbpp(ScrnInfoPtr pScrn, int value)
GLINTPtr pGlint = GLINTPTR(pScrn);
int logbytesperaccess;
- logbytesperaccess = 4;
+ if ( (pGlint->RamDac->RamDacType == (IBM640_RAMDAC)) ||
+ (pGlint->RamDac->RamDacType == (TI3030_RAMDAC)) )
+ logbytesperaccess = 4;
+ else
+ logbytesperaccess = 3;
switch (pScrn->bitsPerPixel) {
case 8:
@@ -431,11 +437,14 @@ DualMXInit(ScrnInfoPtr pScrn, DisplayModePtr mode)
pReg->glintRegs[Aperture1 >> 3] = 0;
if (pGlint->UsePCIRetry) {
- pReg->glintRegs[DFIFODis >> 3] = 1;
- pReg->glintRegs[FIFODis >> 3] = 3;
+ pReg->glintRegs[DFIFODis >> 3] = GLINT_READ_REG(DFIFODis) | 0x01;
+ if (pGlint->Chipset == PCI_VENDOR_3DLABS_CHIP_GAMMA)
+ pReg->glintRegs[FIFODis >> 3] = GLINT_READ_REG(FIFODis) | 0x01;
+ else
+ pReg->glintRegs[FIFODis >> 3] = GLINT_READ_REG(FIFODis) | 0x03;
} else {
- pReg->glintRegs[DFIFODis >> 3] = 0;
- pReg->glintRegs[FIFODis >> 3] = 1;
+ pReg->glintRegs[DFIFODis >> 3] = GLINT_READ_REG(DFIFODis) & 0xFFFFFFFE;
+ pReg->glintRegs[FIFODis >> 3] = GLINT_READ_REG(FIFODis) | 0x01;
}
temp1 = mode->CrtcHSyncStart - mode->CrtcHDisplay;
@@ -454,20 +463,25 @@ DualMXInit(ScrnInfoPtr pScrn, DisplayModePtr mode)
pReg->glintRegs[VTGVSyncStart >> 3] = temp2;
pReg->glintRegs[VTGVBlankEnd >> 3] = mode->CrtcVTotal - mode->CrtcVDisplay;
- pReg->glintRegs[VTGPolarity >> 3] = 0xba;
+#if 1 /* We force them high */
+ pReg->glintRegs[VTGPolarity >> 3] = 0xBA;
+#else
+ pReg->glintRegs[VTGPolarity >> 3] = (((mode->Flags & V_PHSYNC) ? 0:2)<<2) |
+ ((mode->Flags & V_PVSYNC) ? 0 : 2) | (0xb0);
+#endif
- pReg->glintRegs[VClkCtl >> 3] = 0;
+ pReg->glintRegs[VClkCtl >> 3] = 0;
pReg->glintRegs[VTGVGateStart >> 3] = pReg->glintRegs[VTGVBlankEnd>>3] - 1;
pReg->glintRegs[VTGVGateEnd >> 3] = pReg->glintRegs[VTGVBlankEnd>>3];
/*
* tell DAC to use the ICD chip clock 0 as ref clock
- * and set up some more video timining generator registers
+ * and set up some more video timing generator registers
*/
pReg->glintRegs[VTGHGateStart >> 3] = pReg->glintRegs[VTGHBlankEnd>>3] - 1;
pReg->glintRegs[VTGHGateEnd >> 3] = pReg->glintRegs[VTGHLimit>>3] - 1;
- pReg->glintRegs[VTGSerialClk >> 3] = 0x0002;
- pReg->glintRegs[FBModeSel >> 3] = 0x0907;
- pReg->glintRegs[VTGModeCtl >> 3] = 0x00;
+ pReg->glintRegs[VTGSerialClk >> 3] = 0x0002;
+ pReg->glintRegs[FBModeSel >> 3] = 0x907;
+ pReg->glintRegs[VTGModeCtl >> 3] = 0x04;
/*
* Setup memory control registers for FB and LB
@@ -497,9 +511,27 @@ DualMXInit(ScrnInfoPtr pScrn, DisplayModePtr mode)
(0x20 << LBRefreshCountShift));
pReg->glintRegs[GCSRAperture >> 3] = GCSRSecondaryGLINTMapEn;
+ /*
+ * Setup HW
+ *
+ * Note: The order of discovery for the MX devices is dependent
+ * on which way the resource allocation code decides to scan the
+ * bus. This setup assumes the first MX found owns the even
+ * scanlines. Should the implementation change an scan the bus
+ * in the opposite direction, then simple invert the indices for
+ * MXPciInfo below. If this is setup wrong, the bug will appear
+ * as incorrect scanline interleaving when software rendering.
+ */
+ pReg->glintRegs[GMultGLINTAperture >> 3] = pGlint->realMXWidth;
+ pReg->glintRegs[GMultGLINT1 >> 3] =
+ pGlint->MXPciInfo[0]->memBase[2] & 0xFF800000;
+ pReg->glintRegs[GMultGLINT2 >> 3] =
+ pGlint->MXPciInfo[1]->memBase[2] & 0xFF800000;
+
/* Copy info to secondary regs */
pReg->glintSecondRegs[Aperture0>>3] = pReg->glintRegs[Aperture0>>3];
pReg->glintSecondRegs[Aperture1>>3] = pReg->glintRegs[Aperture1>>3];
+
pReg->glintSecondRegs[DFIFODis>>3] = pReg->glintRegs[DFIFODis>>3];
pReg->glintSecondRegs[FIFODis>>3] = pReg->glintRegs[FIFODis>>3];
pReg->glintSecondRegs[VTGHLimit>>3] = pReg->glintRegs[VTGHLimit>>3];
@@ -523,9 +555,14 @@ DualMXInit(ScrnInfoPtr pScrn, DisplayModePtr mode)
pReg->glintSecondRegs[LBMemoryEDO>>3] = pReg->glintRegs[LBMemoryEDO>>3];
pReg->glintSecondRegs[LBMemoryCtl>>3] = pReg->glintRegs[LBMemoryCtl>>3];
pReg->glintSecondRegs[GCSRAperture>>3] = pReg->glintRegs[GCSRAperture>>3];
+ pReg->glintSecondRegs[GMultGLINTAperture>>3] =
+ pReg->glintRegs[GMultGLINTAperture>>3];
+ pReg->glintSecondRegs[GMultGLINT1>>3] = pReg->glintRegs[GMultGLINT1>>3];
+ pReg->glintSecondRegs[GMultGLINT2>>3] = pReg->glintRegs[GMultGLINT2>>3];
switch (pGlint->RamDac->RamDacType) {
case TI3030_RAMDAC:
+ case TI3026_RAMDAC:
{
/* Get the programmable clock values */
unsigned long m=0,n=0,p=0;
@@ -541,7 +578,10 @@ DualMXInit(ScrnInfoPtr pScrn, DisplayModePtr mode)
ramdacReg->DacRegs[TIDAC_PIXEL_P] = ((p & 0x03) | 0xb0);
ramdacReg->DacRegs[TIDAC_PIXEL_VALID] = TRUE;
- n = 65 - ((128 << 2) / pScrn->bitsPerPixel);
+ if (pGlint->RamDac->RamDacType == (TI3026_RAMDAC))
+ n = 65 - ((64 << 2) / pScrn->bitsPerPixel);
+ else
+ n = 65 - ((128 << 2) / pScrn->bitsPerPixel);
m = 61;
p = 0;
for (q = 0; q < 8; q++) {
@@ -600,6 +640,10 @@ DualMXSave(ScrnInfoPtr pScrn, GLINTRegPtr glintReg)
glintReg->glintRegs[LBMemoryEDO >> 3] = GLINT_READ_REG(LBMemoryEDO);
glintReg->glintRegs[LBMemoryCtl >> 3] = GLINT_READ_REG(LBMemoryCtl);
glintReg->glintRegs[GCSRAperture >> 3] = GLINT_READ_REG(GCSRAperture);
+ glintReg->glintRegs[GMultGLINTAperture>>3] =
+ GLINT_READ_REG(GMultGLINTAperture);
+ glintReg->glintRegs[GMultGLINT1>>3] = GLINT_READ_REG(GMultGLINT1);
+ glintReg->glintRegs[GMultGLINT2>>3] = GLINT_READ_REG(GMultGLINT2);
glintReg->glintSecondRegs[Aperture0 >> 3] =
GLINT_SECONDARY_READ_REG(Aperture0);
@@ -653,6 +697,12 @@ DualMXSave(ScrnInfoPtr pScrn, GLINTRegPtr glintReg)
GLINT_SECONDARY_READ_REG(LBMemoryCtl);
glintReg->glintSecondRegs[GCSRAperture >> 3] =
GLINT_SECONDARY_READ_REG(GCSRAperture);
+ glintReg->glintSecondRegs[GMultGLINTAperture>>3] =
+ GLINT_SECONDARY_READ_REG(GMultGLINTAperture);
+ glintReg->glintSecondRegs[GMultGLINT1>>3] =
+ GLINT_SECONDARY_READ_REG(GMultGLINT1);
+ glintReg->glintSecondRegs[GMultGLINT2>>3] =
+ GLINT_SECONDARY_READ_REG(GMultGLINT2);
}
void
@@ -693,6 +743,10 @@ DualMXRestore(ScrnInfoPtr pScrn, GLINTRegPtr glintReg)
GLINT_SLOW_WRITE_REG(glintReg->glintRegs[LBMemoryEDO >> 3], LBMemoryEDO);
GLINT_SLOW_WRITE_REG(glintReg->glintRegs[LBMemoryCtl >> 3], LBMemoryCtl);
GLINT_SLOW_WRITE_REG(glintReg->glintRegs[GCSRAperture >> 3], GCSRAperture);
+ GLINT_SLOW_WRITE_REG(glintReg->glintRegs[GMultGLINTAperture >> 3],
+ GMultGLINTAperture);
+ GLINT_SLOW_WRITE_REG(glintReg->glintRegs[GMultGLINT1 >> 3], GMultGLINT1);
+ GLINT_SLOW_WRITE_REG(glintReg->glintRegs[GMultGLINT2 >> 3], GMultGLINT2);
GLINT_SECONDARY_SLOW_WRITE_REG(
glintReg->glintSecondRegs[Aperture0 >> 3], Aperture0);
@@ -743,5 +797,11 @@ DualMXRestore(ScrnInfoPtr pScrn, GLINTRegPtr glintReg)
GLINT_SECONDARY_SLOW_WRITE_REG(
glintReg->glintSecondRegs[LBMemoryCtl >> 3], LBMemoryCtl);
GLINT_SECONDARY_SLOW_WRITE_REG(
- glintReg->glintRegs[GCSRAperture >> 3], GCSRAperture);
+ glintReg->glintSecondRegs[GCSRAperture >> 3], GCSRAperture);
+ GLINT_SECONDARY_SLOW_WRITE_REG(
+ glintReg->glintSecondRegs[GMultGLINTAperture >>3], GMultGLINTAperture);
+ GLINT_SECONDARY_SLOW_WRITE_REG(
+ glintReg->glintSecondRegs[GMultGLINT1 >> 3], GMultGLINT1);
+ GLINT_SECONDARY_SLOW_WRITE_REG(
+ glintReg->glintSecondRegs[GMultGLINT2 >> 3], GMultGLINT2);
}
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/glint/glint.cpp b/xc/programs/Xserver/hw/xfree86/drivers/glint/glint.cpp
index 63baa3b28..ed908577c 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/glint/glint.cpp
+++ b/xc/programs/Xserver/hw/xfree86/drivers/glint/glint.cpp
@@ -1,28 +1,32 @@
-.\" $XFree86: xc/programs/Xserver/hw/xfree86/drivers/glint/glint.cpp,v 1.2 2000/03/07 01:37:46 dawes Exp $
-.TH GLINT __drivermansuffix__ "Version 4.0" "XFree86"
+.\" $XFree86: xc/programs/Xserver/hw/xfree86/drivers/glint/glint.cpp,v 1.7 2000/06/14 02:13:09 dawes Exp $
+.\" shorthand for double quote that works everywhere.
+.ds q \N'34'
+.TH GLINT __drivermansuffix__ "Version 4.0.1" "XFree86"
.SH NAME
glint \- GLINT/Permedia video driver
.SH SYNOPSIS
-.B "Section ""Device"""
-.br
-.BI " Identifier """ devname """"
-.br
-.B " Driver ""glint"""
-.br
+.nf
+.B "Section \*qDevice\*q"
+.BI " Identifier \*q" devname \*q
+.B " Driver \*qglint\*q"
\ \ ...
-.br
.B EndSection
+.fi
.SH DESCRIPTION
.B glint
is an XFree86 driver for 3Dlabs & Texas Instruments GLINT/Permedia based video
cards. The driver is rather fully accelerated, and provides support for the
following framebuffer depths: 8, 15 (may give bad results with FBDev support),
16, 24 (32 bpp recommended, 24 bpp has problems), 30, and an 8+24 overlay mode.
+.B Glint permedia 3
+only support depth 8 (tested upto 1280x1024) and 15/16
+(ok upto 1024x768, partial screen overlap on the right at 1280x1024) and acceleration is not yet fully supported.
.SH SUPPORTED HARDWARE
The
.B glint
driver supports 3Dlabs (GLINT MX, GLINT 500TX, GLINT GAMMA, Permedia,
-Permedia 2, Permedia 2v) and Texas Instruments (Permedia, Permedia 2) chips.
+Permedia 2, Permedia 2v, Permedia 3) and Texas Instruments (Permedia,
+Permedia 2) chips.
.SH CONFIGURATION DETAILS
Please refer to XF86Config(__filemansuffix__) for general configuration
details. This section only covers configuration details specific to this
@@ -31,11 +35,11 @@ driver.
The driver auto-detects the chipset type, but the following
.B ChipSet
names may optionally be specified in the config file
-.B """Device"""
+.B \*qDevice\*q
section, and will override the auto-detection:
.PP
.RS 4
-"ti_pm2", "ti_pm", "pm2v", "pm2", "pm", "500tx", "mx", "gamma".
+"ti_pm2", "ti_pm", "pm3", "pm2v", "pm2", "pm", "500tx", "mx", "gamma".
.RE
.PP
The driver will try to auto-detect the amount of video memory present for all
@@ -43,70 +47,81 @@ chips. If it's not detected correctly, the actual amount of video memory should
be specified with a
.B VideoRam
entry in the config file
-.B """Device"""
+.B \*qDevice\*q
section.
.PP
Additionally, you may need to specify the bus ID of your card with a
.B BusID
entry in the config file
-.B """Device"""
+.B \*qDevice\*q
section, especially with FBDev support.
.PP
The following driver
.B Options
are supported:
.TP
-.BI "Option ""HWCursor"" """ boolean """
+.BI "Option \*qHWCursor\*q \*q" boolean \*q
Enable or disable the HW cursor. Default: on.
.TP
-.BI "Option ""SWCursor"" """ boolean """
+.BI "Option \*qSWCursor\*q \*q" boolean \*q
Enable or disable the SW cursor. Default: off.
This option disables the
.B HWCursor
option and vice versa.
.TP
-.BI "Option ""NoAccel"" """ boolean """
+.BI "Option \*qNoAccel\*q \*q" boolean \*q
Disable or enable acceleration. Default: acceleration is enabled.
.TP
-.BI "Option ""Overlay""
+.BI "Option \*qOverlay\*q"
Enable 8+24 overlay mode. Only appropriate for depth 24, 32 bpp.
.RB ( Note:
This hasn't been tested with FBDev support and probably won't work.)
Recognized values are: "8,24", "24,8". Default: off.
.TP
-.BI "Option ""PciRetry"" """ boolean """
+.BI "Option \*qPciRetry\*q \*q" boolean \*q
Enable or disable PCI retries.
.RB ( Note:
This doesn't work with Permedia2 based cards for Amigas.) Default: off.
.TP
-.BI "Option ""ShadowFB"" """ boolean """
+.BI "Option \*qShadowFB\*q \*q" boolean \*q
Enable or disable use of the shadow framebuffer layer. See
shadowfb(__drivermansuffix__) for further information.
.RB ( Note:
This disables hardware acceleration.) Default: off.
.TP
-.BI "Option ""UseFBDev"" """ boolean """
+.BI "Option \*qUseFBDev\*q \*q" boolean \*q
Enable or disable use of an OS-specific fb interface (which is not supported
on all OSs). See fbdevhw(__drivermansuffix__) for further information.
Default: off.
.ig
.TP
-.BI "Option ""RGBbits"" """ integer """
+.BI "Option \*qRGBbits\*q \*q" integer \*q
Each gun of the RGB triple can have either 8 or 10 bits. Default: 8
..
.TP
-.BI "Option ""BlockWrite"" """ boolean """
+.BI "Option \*qBlockWrite\*q \*q" boolean \*q
Enable or disable block writes for the various Permedia 2 chips. This improves
acceleration in general, but disables it for some special cases. Default: off.
.TP
-.BI "Option ""FireGL3000"" """ boolean """
+.BI "Option \*qFireGL3000\*q \*q" boolean \*q
If you have a card of the same name, turn this on. Default: off.
.TP
-.BI "Option ""SetMClk"" """ freq """
+.BI "Option \*qSetMClk\*q \*q" freq \*q
The driver will try to auto-detect the memory clock for all chips. If it's not
detected correctly, the actual value (in MHz) should be specified with this
option.
+.SH Known problems with the Glint Permedia 3 chip
+The
+.B Glint Permedia 3
+chip is newly supported since the 4.0.1 release but is still work in progress.
+The driver supports already unaccelerated modes at depth 8 (tested upto
+1280x1024) and depth 15 and 16 (ok upto 1024x768)
+Depth 24 and Depth 15 and 16 with modes higher than 1024x768 are showing a
+partial overlap of the right part of the screen.
+Acceleration only support clipping pseudo acceleration.
+Dual head for the Appian J2000 board was working but got broken since 4.0b,
+since now the driver claims all chip of the board.
.SH "SEE ALSO"
-XFree86(1), XF86Config(__filemansuffix__), xf86config(1), Xserver(1), X(1)
+XFree86(1), XF86Config(__filemansuffix__), xf86config(1), Xserver(1), X(__miscmansuffix__)
.SH AUTHORS
Authors include: Alan Hourihane, Dirk Hohndel, Stefan Dirsch, Michel Dänzer
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/glint/glint.h b/xc/programs/Xserver/hw/xfree86/drivers/glint/glint.h
index a4e4af758..ee73ac6b6 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/glint/glint.h
+++ b/xc/programs/Xserver/hw/xfree86/drivers/glint/glint.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/glint/glint.h,v 1.25 2000/02/26 03:33:43 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/glint/glint.h,v 1.31 2000/06/17 16:32:50 alanh Exp $ */
/*
* Copyright 1997,1998 by Alan Hourihane <alanh@fairlite.demon.co.uk>
*
@@ -45,6 +45,9 @@
#include "glint_dripriv.h"
#endif
+#define GLINT_MAX_MX_DEVICES 2
+#define GLINT_VGA_MMIO_OFF 0x6000
+
#define GLINT_VERSION 4000
#define GLINT_NAME "GLINT"
#define GLINT_DRIVER_NAME "glint"
@@ -52,9 +55,6 @@
#define GLINT_MINOR_VERSION 0
#define GLINT_PATCHLEVEL 0
-#define GLINT_MAX_MX_DEVICES 2
-#define GLINT_VGA_MMIO_OFF 0x6000
-
typedef struct {
CARD32 glintRegs[0x2000];
CARD32 glintSecondRegs[0x2000];
@@ -66,14 +66,10 @@ typedef struct {
typedef struct {
pciVideoPtr PciInfo;
- pciVideoPtr PciInfoGeometry;
pciVideoPtr MXPciInfo[GLINT_MAX_MX_DEVICES];
int numMXDevices;
PCITAG PciTag;
- PCITAG PciTagGeometry;
EntityInfoPtr pEnt;
- EntityInfoPtr pEntGeometry;
- EntityInfoPtr pEntMX[GLINT_MAX_MX_DEVICES];
RamDacHelperRecPtr RamDac;
int MemClock;
int Chipset;
@@ -98,6 +94,7 @@ typedef struct {
int cpuheight;
int cpucount;
int planemask;
+ int realMXWidth;
CARD32 IOAddress;
CARD32 FbAddress;
int irq;
@@ -123,12 +120,8 @@ typedef struct {
Bool UseBlockWrite;
Bool UseFireGL3000;
Bool VGAcore;
- int MultiGLINTApSize;
int MXFbSize;
- int realMXWidth;
- CARD32 SecondaryAddress;
CARD32 rasterizerMode;
- unsigned char * SecondaryBase;
int MinClock;
int MaxClock;
int RefClock;
@@ -173,18 +166,18 @@ typedef struct {
((PCI_VENDOR_3DLABS << 16) | PCI_CHIP_PERMEDIA2)
#define PCI_VENDOR_3DLABS_CHIP_PERMEDIA2V \
((PCI_VENDOR_3DLABS << 16) | PCI_CHIP_PERMEDIA2V)
+#define PCI_VENDOR_3DLABS_CHIP_PERMEDIA3 \
+ ((PCI_VENDOR_3DLABS << 16) | PCI_CHIP_PERMEDIA3)
+#define PCI_VENDOR_3DLABS_CHIP_300SX \
+ ((PCI_VENDOR_3DLABS << 16) | PCI_CHIP_300SX)
#define PCI_VENDOR_3DLABS_CHIP_500TX \
((PCI_VENDOR_3DLABS << 16) | PCI_CHIP_500TX)
#define PCI_VENDOR_3DLABS_CHIP_MX \
((PCI_VENDOR_3DLABS << 16) | PCI_CHIP_MX)
#define PCI_VENDOR_3DLABS_CHIP_GAMMA \
((PCI_VENDOR_3DLABS << 16) | PCI_CHIP_GAMMA)
-
-/* Prototypes */
-/* Required if the driver supports mode switching */
-Bool GLINTSwitchMode(int scrnIndex, DisplayModePtr mode, int flags);
-/* Required if the driver supports moving the viewport */
-void GLINTAdjustFrame(int scrnIndex, int x, int y, int flags);
+#define PCI_VENDOR_3DLABS_CHIP_DELTA \
+ ((PCI_VENDOR_3DLABS << 16) | PCI_CHIP_DELTA)
void Permedia2StoreColors(ColormapPtr pmap, int ndef, xColorItem *pdefs);
void Permedia2InstallColormap(ColormapPtr pmap);
@@ -210,17 +203,32 @@ void Permedia2VSave(ScrnInfoPtr pScrn, GLINTRegPtr glintReg);
Bool Permedia2VInit(ScrnInfoPtr pScrn, DisplayModePtr mode);
Bool Permedia2vHWCursorInit(ScreenPtr pScreen);
-void TXInitializeEngine(ScrnInfoPtr pScrn);
+/* pm3_dac.c */
+void Permedia3PreInit(ScrnInfoPtr pScrn, GLINTPtr pGlint);
+int Permedia3MemorySizeDetect(ScrnInfoPtr pScrn);
+void Permedia3Restore(ScrnInfoPtr pScrn, GLINTRegPtr glintReg);
+void Permedia3Save(ScrnInfoPtr pScrn, GLINTRegPtr glintReg);
+Bool Permedia3Init(ScrnInfoPtr pScrn, DisplayModePtr mode);
+Bool Permedia3HWCursorInit(ScreenPtr pScreen);
+/* pm3_accel.c */
+Bool Permedia3AccelInit(ScreenPtr pScreen);
+void Permedia3Sync(ScrnInfoPtr pScrn);
+void Permedia3InitializeEngine(ScrnInfoPtr pScrn);
+/* End of pm3 stuff */
+
void TXRestore(ScrnInfoPtr pScrn, GLINTRegPtr glintReg);
void TXSave(ScrnInfoPtr pScrn, GLINTRegPtr glintReg);
Bool TXInit(ScrnInfoPtr pScrn, DisplayModePtr mode);
Bool TXAccelInit(ScreenPtr pScreen);
+void TXInitializeEngine(ScrnInfoPtr pScrn);
+
+Bool SXAccelInit(ScreenPtr pScreen);
-void DualMXInitializeEngine(ScrnInfoPtr pScrn);
void DualMXRestore(ScrnInfoPtr pScrn, GLINTRegPtr glintReg);
void DualMXSave(ScrnInfoPtr pScrn, GLINTRegPtr glintReg);
Bool DualMXInit(ScrnInfoPtr pScrn, DisplayModePtr mode);
Bool DualMXAccelInit(ScreenPtr pScreen);
+void DualMXInitializeEngine(ScrnInfoPtr pScrn);
void glintOutIBMRGBIndReg(ScrnInfoPtr pScrn,
CARD32 reg, unsigned char mask, unsigned char data);
@@ -236,10 +244,17 @@ Bool glintIBM640HWCursorInit(ScreenPtr pScreen);
void glintOutTIIndReg(ScrnInfoPtr pScrn,
CARD32 reg, unsigned char mask, unsigned char data);
unsigned char glintInTIIndReg(ScrnInfoPtr pScrn, CARD32 reg);
+void DUALglintOutTIIndReg(ScrnInfoPtr pScrn,
+ CARD32 reg, unsigned char mask, unsigned char data);
+unsigned char DUALglintInTIIndReg(ScrnInfoPtr pScrn, CARD32 reg);
void glintTIWriteAddress(ScrnInfoPtr pScrn, CARD32 index);
void glintTIReadAddress(ScrnInfoPtr pScrn, CARD32 index);
void glintTIWriteData(ScrnInfoPtr pScrn, unsigned char data);
unsigned char glintTIReadData(ScrnInfoPtr pScrn);
+void DUALglintTIWriteAddress(ScrnInfoPtr pScrn, CARD32 index);
+void DUALglintTIReadAddress(ScrnInfoPtr pScrn, CARD32 index);
+void DUALglintTIWriteData(ScrnInfoPtr pScrn, unsigned char data);
+unsigned char DUALglintTIReadData(ScrnInfoPtr pScrn);
Bool glintTIHWCursorInit(ScreenPtr pScreen);
void Permedia2OutIndReg(ScrnInfoPtr pScrn,
@@ -249,6 +264,8 @@ void Permedia2WriteAddress(ScrnInfoPtr pScrn, CARD32 index);
void Permedia2ReadAddress(ScrnInfoPtr pScrn, CARD32 index);
void Permedia2WriteData(ScrnInfoPtr pScrn, unsigned char data);
unsigned char Permedia2ReadData(ScrnInfoPtr pScrn);
+void TIramdacLoadPalette(ScrnInfoPtr pScrn, int numColors, int *indices,
+ LOCO *colors, VisualPtr pVisual);
void Permedia2LoadPalette(ScrnInfoPtr pScrn, int numColors, int *indices,
LOCO *colors, VisualPtr pVisual);
void Permedia2LoadPalette16(ScrnInfoPtr pScrn, int numColors, int *indices,
@@ -257,14 +274,18 @@ void Permedia2I2CUDelay(I2CBusPtr b, int usec);
void Permedia2I2CPutBits(I2CBusPtr b, int scl, int sda);
void Permedia2I2CGetBits(I2CBusPtr b, int *scl, int *sda);
-void Permedia2VideoUninit(ScrnInfoPtr pScrn);
-void Permedia2VideoReset(ScrnInfoPtr pScrn);
void Permedia2VideoInit(ScreenPtr pScreen);
+void Permedia2VideoUninit(ScrnInfoPtr pScrn);
+void Permedia2VideoEnterVT(ScrnInfoPtr pScrn);
+void Permedia2VideoLeaveVT(ScrnInfoPtr pScrn);
void Permedia2vOutIndReg(ScrnInfoPtr pScrn,
CARD32, unsigned char mask, unsigned char data);
unsigned char Permedia2vInIndReg(ScrnInfoPtr pScrn, CARD32);
+Bool GLINTSwitchMode(int scrnIndex, DisplayModePtr mode, int flags);
+void GLINTAdjustFrame(int scrnIndex, int x, int y, int flags);
+
extern int partprodPermedia[];
Bool GLINTDRIScreenInit(ScreenPtr pScreen);
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/glint/glint_dga.c b/xc/programs/Xserver/hw/xfree86/drivers/glint/glint_dga.c
index f3aa7ebe5..b40e884d6 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/glint/glint_dga.c
+++ b/xc/programs/Xserver/hw/xfree86/drivers/glint/glint_dga.c
@@ -98,7 +98,7 @@ SECOND_PASS:
num++;
currentMode->mode = pMode;
- currentMode->flags = DGA_CONCURRENT_ACCESS /*| DGA_PIXMAP_AVAILABLE*/;
+ currentMode->flags = DGA_CONCURRENT_ACCESS | DGA_PIXMAP_AVAILABLE;
if(!pGlint->NoAccel)
currentMode->flags |= DGA_FILL_RECT /*| DGA_BLIT_RECT*/;
if(pMode->Flags & V_DBLSCAN)
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/glint/glint_dri.c b/xc/programs/Xserver/hw/xfree86/drivers/glint/glint_dri.c
index 9aa55de42..9d9cb31d7 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/glint/glint_dri.c
+++ b/xc/programs/Xserver/hw/xfree86/drivers/glint/glint_dri.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/glint/glint_dri.c,v 1.12 2000/03/02 16:07:47 martin Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/glint/glint_dri.c,v 1.18 2000/06/23 23:43:43 alanh Exp $ */
/**************************************************************************
Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
@@ -338,13 +338,16 @@ GLINTDRIScreenInit(ScreenPtr pScreen)
GLINTDRIPtr pGlintDRI;
int dmabufs = 0;
-#if XFree86LOADER
/* Check that the GLX, DRI, and DRM modules have been loaded by testing
for canonical symbols in each module. */
- if (!LoaderSymbol("GlxSetVisualConfigs")) return FALSE;
- if (!LoaderSymbol("DRIScreenInit")) return FALSE;
- if (!LoaderSymbol("drmAvailable")) return FALSE;
-#endif
+ if (!xf86LoaderCheckSymbol("GlxSetVisualConfigs")) return FALSE;
+ if (!xf86LoaderCheckSymbol("DRIScreenInit")) return FALSE;
+ if (!xf86LoaderCheckSymbol("drmAvailable")) return FALSE;
+ if (!xf86LoaderCheckSymbol("DRIQueryVersion")) {
+ xf86DrvMsg(pScreen->myNum, X_ERROR,
+ "GLINTDRIScreenInit failed (libdri.a too old)\n");
+ return FALSE;
+ }
/* Check the DRI version */
{
@@ -430,7 +433,7 @@ GLINTDRIScreenInit(ScreenPtr pScreen)
return FALSE;
}
- /* Check the MGA DRM version */
+ /* Check the GLINT DRM version */
{
drmVersionPtr version = drmGetVersion(pGlint->drmSubFD);
if (version) {
@@ -662,7 +665,7 @@ GLINTCreateContext(ScreenPtr pScreen,
if (!pGlintConfig)
return TRUE; /* no GLX driver private support, yet */
-#if 1
+#if 0
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"[GLINTCreateContext] context priv index = %d\n",
pGlintConfig->index);
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/glint/glint_dri.h b/xc/programs/Xserver/hw/xfree86/drivers/glint/glint_dri.h
index 9e11edda8..9fe9f02de 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/glint/glint_dri.h
+++ b/xc/programs/Xserver/hw/xfree86/drivers/glint/glint_dri.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/glint/glint_dri.h,v 1.3 2000/02/23 04:47:10 martin Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/glint/glint_dri.h,v 1.4 2000/05/10 18:55:29 alanh Exp $ */
/**************************************************************************
Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/glint/glint_dripriv.h b/xc/programs/Xserver/hw/xfree86/drivers/glint/glint_dripriv.h
index e026f8b18..83045b727 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/glint/glint_dripriv.h
+++ b/xc/programs/Xserver/hw/xfree86/drivers/glint/glint_dripriv.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/glint/glint_dripriv.h,v 1.2 2000/02/23 04:47:10 martin Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/glint/glint_dripriv.h,v 1.5 2000/06/17 10:00:13 alanh Exp $ */
/**************************************************************************
Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/glint/glint_driver.c b/xc/programs/Xserver/hw/xfree86/drivers/glint/glint_driver.c
index e40c37659..993738ebd 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/glint/glint_driver.c
+++ b/xc/programs/Xserver/hw/xfree86/drivers/glint/glint_driver.c
@@ -23,22 +23,15 @@
* Dirk Hohndel, <hohndel@suse.de>
* Stefan Dirsch, <sndirsch@suse.de>
* Michel Dänzer, <michdaen@iiic.ethz.ch>
+ * Sven Luther, <luther@dpt-info.u-strasbg.fr>
*
- * this work is sponsored by S.u.S.E. GmbH, Fuerth, Elsa GmbH, Aachen and
- * Siemens Nixdorf Informationssysteme
+ * this work is sponsored by S.u.S.E. GmbH, Fuerth, Elsa GmbH, Aachen,
+ * Siemens Nixdorf Informationssysteme and Appian Graphics.
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/glint/glint_driver.c,v 1.71 2000/03/07 01:37:47 dawes Exp $ */
-
-#define PSZ 8
-#include "cfb.h"
-#undef PSZ
-#include "cfb16.h"
-#include "cfb24.h"
-#include "cfb32.h"
-#include "cfb24_32.h"
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/glint/glint_driver.c,v 1.89 2000/06/22 10:40:48 alanh Exp $ */
+
+#include "fb.h"
#include "cfb8_32.h"
-#include "xf1bpp.h"
-#include "xf4bpp.h"
#include "micmap.h"
#include "xf86.h"
#include "xf86_OSproc.h"
@@ -53,6 +46,7 @@
#include "xf86RAC.h"
#include "xf86Resources.h"
#include "xf86int10.h"
+#include "vbe.h"
#include "compiler.h"
#include "mipointer.h"
@@ -94,7 +88,6 @@ static Bool GLINTPreInit(ScrnInfoPtr pScrn, int flags);
static Bool GLINTScreenInit(int Index, ScreenPtr pScreen, int argc,
char **argv);
static Bool GLINTEnterVT(int scrnIndex, int flags);
-static Bool GLINTEnterVTFBDev(int scrnIndex, int flags);
static void GLINTLeaveVT(int scrnIndex, int flags);
static Bool GLINTCloseScreen(int scrnIndex, ScreenPtr pScreen);
static Bool GLINTSaveScreen(ScreenPtr pScreen, int mode);
@@ -140,26 +133,36 @@ DriverRec GLINT = {
};
static SymTabRec GLINTChipsets[] = {
+ { PCI_VENDOR_3DLABS_CHIP_GAMMA, "gamma" },
{ PCI_VENDOR_TI_CHIP_PERMEDIA2, "ti_pm2" },
{ PCI_VENDOR_TI_CHIP_PERMEDIA, "ti_pm" },
+ { PCI_VENDOR_3DLABS_CHIP_PERMEDIA3, "pm3" },
{ PCI_VENDOR_3DLABS_CHIP_PERMEDIA2V, "pm2v" },
{ PCI_VENDOR_3DLABS_CHIP_PERMEDIA2, "pm2" },
{ PCI_VENDOR_3DLABS_CHIP_PERMEDIA, "pm" },
+ { PCI_VENDOR_3DLABS_CHIP_300SX, "300sx" },
{ PCI_VENDOR_3DLABS_CHIP_500TX, "500tx" },
{ PCI_VENDOR_3DLABS_CHIP_MX, "mx" },
- { PCI_VENDOR_3DLABS_CHIP_GAMMA, "gamma" },
+/*
+ { PCI_VENDOR_3DLABS_CHIP_DELTA, "delta" },
+*/
{ -1, NULL }
};
static PciChipsets GLINTPciChipsets[] = {
+ { PCI_VENDOR_3DLABS_CHIP_GAMMA, PCI_VENDOR_3DLABS_CHIP_GAMMA, NULL },
{ PCI_VENDOR_TI_CHIP_PERMEDIA2, PCI_VENDOR_TI_CHIP_PERMEDIA2, RES_SHARED_VGA },
{ PCI_VENDOR_TI_CHIP_PERMEDIA, PCI_VENDOR_TI_CHIP_PERMEDIA, NULL },
+ { PCI_VENDOR_3DLABS_CHIP_PERMEDIA3, PCI_VENDOR_3DLABS_CHIP_PERMEDIA3, RES_SHARED_VGA },
{ PCI_VENDOR_3DLABS_CHIP_PERMEDIA2V, PCI_VENDOR_3DLABS_CHIP_PERMEDIA2V, RES_SHARED_VGA },
{ PCI_VENDOR_3DLABS_CHIP_PERMEDIA2, PCI_VENDOR_3DLABS_CHIP_PERMEDIA2, RES_SHARED_VGA },
{ PCI_VENDOR_3DLABS_CHIP_PERMEDIA, PCI_VENDOR_3DLABS_CHIP_PERMEDIA, NULL },
+ { PCI_VENDOR_3DLABS_CHIP_300SX, PCI_VENDOR_3DLABS_CHIP_300SX, NULL },
{ PCI_VENDOR_3DLABS_CHIP_500TX, PCI_VENDOR_3DLABS_CHIP_500TX, NULL },
{ PCI_VENDOR_3DLABS_CHIP_MX, PCI_VENDOR_3DLABS_CHIP_MX, NULL },
- { PCI_VENDOR_3DLABS_CHIP_GAMMA, PCI_VENDOR_3DLABS_CHIP_GAMMA, NULL },
+/*
+ { PCI_VENDOR_3DLABS_CHIP_DELTA, PCI_VENDOR_3DLABS_CHIP_DELTA, NULL },
+*/
{ -1, -1, RES_UNDEFINED }
};
@@ -194,7 +197,7 @@ static OptionInfoRec GLINTOptions[] = {
{ -1, NULL, OPTV_NONE, {0}, FALSE }
};
-static RamDacSupportedInfoRec PermediaRamdacs[] = {
+static RamDacSupportedInfoRec IBMRamdacs[] = {
{ IBM526DB_RAMDAC },
{ IBM526_RAMDAC },
{ -1 }
@@ -207,8 +210,9 @@ static RamDacSupportedInfoRec TXMXRamdacs[] = {
{ -1 }
};
-static RamDacSupportedInfoRec GMX2000Ramdacs[] = {
+static RamDacSupportedInfoRec TIRamdacs[] = {
{ TI3030_RAMDAC },
+ { TI3026_RAMDAC },
{ -1 }
};
@@ -250,20 +254,9 @@ static const char *xaaSymbols[] = {
};
static const char *fbSymbols[] = {
- "xf1bppScreenInit",
- "xf4bppScreenInit",
- "cfbScreenInit",
- "cfb16ScreenInit",
- "cfb24ScreenInit",
- "cfb24_32ScreenInit",
- "cfb32ScreenInit",
"cfb8_32ScreenInit",
- "cfbGCPrivateIndex",
- "cfb16GCPrivateIndex",
- "cfb32GCPrivateIndex",
- "cfbBresS",
- "cfb16BresS",
- "cfb32BresS",
+ "fbScreenInit",
+ "fbBres",
NULL
};
@@ -290,9 +283,17 @@ static const char *shadowSymbols[] = {
NULL
};
+static const char *vbeSymbols[] = {
+ "VBEInit",
+ "vbeDoEDID",
+ NULL
+};
+
static const char *fbdevHWSymbols[] = {
"fbdevHWInit",
+ "fbdevHWFreeRec",
"fbdevHWProbe",
+ "fbdevHWFreeRec",
"fbdevHWGetName",
"fbdevHWUseBuildinMode",
@@ -335,6 +336,8 @@ static const char *drmSymbols[] = {
"drmMapBufs",
"drmMarkBufs",
"drmUnmapBufs",
+ "drmFreeVersion",
+ "drmGetVersion",
NULL
};
@@ -347,6 +350,7 @@ static const char *driSymbols[] = {
"DRIScreenInit",
"DRIDestroyInfoRec",
"DRICreateInfoRec",
+ "DRIQueryVersion",
"GlxSetVisualConfigs",
NULL
};
@@ -383,6 +387,7 @@ glintSetup(pointer module, pointer opts, int *errmaj, int *errmin)
LoaderRefSymLists(vgahwSymbols, fbSymbols, ddcSymbols, i2cSymbols,
xaaSymbols, xf8_32bppSymbols,
shadowSymbols, fbdevHWSymbols, int10Symbols,
+ vbeSymbols,
#ifdef XF86DRI
drmSymbols, driSymbols,
#endif
@@ -442,7 +447,7 @@ static int partprod500TX[] = {
int partprodPermedia[] = {
-1,
PARTPROD(0,0,1), PARTPROD(0,1,1), PARTPROD(1,1,1), PARTPROD(1,1,2),
- PARTPROD(1,2,2), PARTPROD(1,2,2), PARTPROD(1,2,3), PARTPROD(2,2,3),
+ PARTPROD(1,2,2), PARTPROD(2,2,2), PARTPROD(1,2,3), PARTPROD(2,2,3),
PARTPROD(1,3,3), PARTPROD(2,3,3), PARTPROD(1,2,4), PARTPROD(3,3,3),
PARTPROD(1,3,4), PARTPROD(2,3,4), -1, PARTPROD(3,3,4),
PARTPROD(1,4,4), PARTPROD(2,4,4), -1, PARTPROD(3,4,4),
@@ -484,6 +489,7 @@ GLINTDisplayPowerManagementSet(ScrnInfoPtr pScrn, int PowerManagementMode,
int videocontrol = 0, vtgpolarity = 0;
if((pGlint->Chipset == PCI_VENDOR_3DLABS_CHIP_500TX) ||
+ (pGlint->Chipset == PCI_VENDOR_3DLABS_CHIP_300SX) ||
(pGlint->Chipset == PCI_VENDOR_3DLABS_CHIP_MX) ||
(pGlint->Chipset == PCI_VENDOR_3DLABS_CHIP_GAMMA)) {
vtgpolarity = GLINT_READ_REG(VTGPolarity) & 0xFFFFFFF0;
@@ -517,6 +523,7 @@ GLINTDisplayPowerManagementSet(ScrnInfoPtr pScrn, int PowerManagementMode,
}
if((pGlint->Chipset == PCI_VENDOR_3DLABS_CHIP_500TX) ||
+ (pGlint->Chipset == PCI_VENDOR_3DLABS_CHIP_300SX) ||
(pGlint->Chipset == PCI_VENDOR_3DLABS_CHIP_MX) ||
(pGlint->Chipset == PCI_VENDOR_3DLABS_CHIP_GAMMA)) {
GLINT_SLOW_WRITE_REG(vtgpolarity, VTGPolarity);
@@ -571,144 +578,115 @@ GLINTAvailableOptions(int chipid, int busid)
return GLINTOptions;
}
+void
+GLINTProbeDDC(ScrnInfoPtr pScrn, int index)
+{
+ vbeInfoPtr pVbe;
+#ifdef XFree86LOADER
+ if (xf86LoadSubModule(pScrn, "vbe"))
+#endif
+ {
+ pVbe = VBEInit(NULL,index);
+ vbeDoEDID(pVbe, NULL);
+ }
+}
+
/* Mandatory */
static Bool
GLINTProbe(DriverPtr drv, int flags)
{
int i;
- ScrnInfoPtr pScrn0;
pciVideoPtr pPci, *checkusedPci;
- PCITAG deltatag = 0, chiptag = 0;
GDevPtr *devSections = NULL;
int numDevSections;
int numUsed,bus,device,func;
char *dev;
int *usedChips = NULL;
Bool foundScreen = FALSE;
- unsigned long glintbase = 0, glintbase3 = 0, deltabase = 0;
- unsigned long *delta_pci_base = 0 ;
+ char *name;
+ /*
TRACE_ENTER("GLINTProbe");
+ */
+ TRACE_EXIT("GLINTProbe (Enter)");
- /*
- * The aim here is to find all cards that this driver can handle,
- * and for the ones not already claimed by another driver, claim the
- * slot, and allocate a ScrnInfoRec.
- *
- * This should be a minimal probe, and it should under no circumstances
- * change the state of the hardware. Because a device is found, don't
- * assume that it will be used. Don't do any initialisations other than
- * the required ScrnInfoRec initialisations. Don't allocate any new
- * data structures.
- */
-
- /*
- * Next we check, if there has been a chipset override in the config file.
- * For this we must find out if there is an active device section which
- * is relevant, i.e., which has no driver specified or has THIS driver
- * specified.
- */
-
+
if ((numDevSections = xf86MatchDevice(GLINT_DRIVER_NAME,
- &devSections)) <= 0) {
- /*
- * There's no matching device section in the config file, so quit
- * now.
- */
- return FALSE;
+ &devSections)) <= 0) {
+ return FALSE;
}
-
- /*
- * We need to probe the hardware first. We then need to see how this
- * fits in with what is given in the config file, and allow the config
- * file info to override any contradictions.
- */
-
- /*
- * All of the cards this driver supports are PCI, so the "probing" just
- * amounts to checking the PCI data that the server has already collected.
- */
+
checkusedPci = xf86GetPciVideoInfo();
-
+
if (checkusedPci == NULL) {
- /*
- * Changed the behaviour to try probing using the FBDev support when no PCI cards have
- * been found. This is for systems without (proper) PCI support. (Michel)
- */
-
- pScrn0 = xf86AllocateScreen(drv, 0);
-
- pScrn0->name = GLINT_NAME;
-
- if (xf86LoadSubModule(pScrn0, "fbdevhw")) {
- xf86LoaderReqSymLists(fbdevHWSymbols, NULL);
+ /*
+ * Changed the behaviour to try probing using the FBDev support
+ * when no PCI cards have been found. This is for systems without
+ * (proper) PCI support. (Michel)
+ */
+ if (!xf86LoadDrvSubModule(drv, "fbdevhw"))
+ return FALSE;
- for (i = 0; i < numDevSections; i++) {
- dev = xf86FindOptionValue(devSections[i]->options,"fbdev");
- if (devSections[i]->busID) {
- xf86ParsePciBusString(devSections[i]->busID,&bus,&device,&func);
- if (!xf86CheckPciSlot(bus,device,func))
- continue;
- }
- if (fbdevHWProbe(NULL,dev)) {
- ScrnInfoPtr pScrn;
- fbdevHWInit(pScrn0, NULL, dev);
-
- /* Check for pm2fb */
- if (strcmp(fbdevHWGetName(pScrn0),"Permedia2")) continue;
-
- if (flags & PROBE_DETECT) {
- xf86AddDeviceToConfigure(GLINT_NAME, NULL, -1);
- return TRUE;
- }
-
- foundScreen = FBDevProbed = TRUE;
- pScrn = xf86AllocateScreen(drv, 0);
- xf86LoadSubModule(pScrn, "fbdevhw");
- xf86LoaderReqSymLists(fbdevHWSymbols, NULL);
-
- xf86DrvMsg(pScrn0->scrnIndex, X_INFO,
- "%s successfully probed\n", dev ? dev : "default framebuffer device");
- if (devSections[i]->busID) {
- /* XXX what about when there's no busID set? */
- int entity;
-
- xf86DrvMsg(pScrn->scrnIndex, X_CONFIG,
- "claimed PCI slot %d:%d:%d\n",bus,device,func);
- entity = xf86ClaimPciSlot(bus,device,func,drv,
- 0,devSections[i],
- TRUE);
- xf86ConfigActivePciEntity(pScrn,entity,
- NULL,RES_SHARED_VGA,
- NULL,NULL,NULL,NULL);
- } else {
- /* XXX This is a quick hack */
- int entity;
-
- entity = xf86ClaimIsaSlot(drv, 0,
- devSections[i], TRUE);
- xf86ConfigActiveIsaEntity(pScrn,entity,
- NULL,RES_SHARED_VGA,
- NULL,NULL,NULL,NULL);
- }
- /* Fill in what we can of the ScrnInfoRec */
- pScrn->driverVersion = GLINT_VERSION;
- pScrn->driverName = GLINT_DRIVER_NAME;
+ xf86LoaderReqSymLists(fbdevHWSymbols, NULL);
+
+ for (i = 0; i < numDevSections; i++) {
+ dev = xf86FindOptionValue(devSections[i]->options,"fbdev");
+ if (devSections[i]->busID) {
+ xf86ParsePciBusString(devSections[i]->busID,&bus,&device,&func);
+ if (!xf86CheckPciSlot(bus,device,func))
+ continue;
+ }
+ if (fbdevHWProbe(NULL,dev,&name)) {
+ ScrnInfoPtr pScrn;
+
+ /* Check for pm2fb */
+ if (strcmp(name,"Permedia2")) continue;
+ foundScreen = TRUE;
+ pScrn = NULL;
+
+ if (devSections[i]->busID) {
+ /* XXX what about when there's no busID set? */
+ int entity;
+ entity = xf86ClaimPciSlot(bus,device,func,drv,
+ 0,devSections[i],
+ TRUE);
+ pScrn = xf86ConfigPciEntity(pScrn,0,entity,
+ NULL,RES_SHARED_VGA,
+ NULL,NULL,NULL,NULL);
+ if (pScrn)
+ xf86DrvMsg(pScrn->scrnIndex, X_CONFIG,
+ "claimed PCI slot %d:%d:%d\n",bus,device,func);
+ } else {
+ /* XXX This is a quick hack */
+ int entity;
+
+ entity = xf86ClaimIsaSlot(drv, 0,
+ devSections[i], TRUE);
+ pScrn = xf86ConfigIsaEntity(pScrn,0,entity,
+ NULL,RES_SHARED_VGA,
+ NULL,NULL,NULL,NULL);
+ }
+ if (pScrn) {
+ /* Fill in what we can of the ScrnInfoRec */
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "%s successfully probed\n", dev ? dev : "default framebuffer device");
+ pScrn->driverVersion = GLINT_VERSION;
+ pScrn->driverName = GLINT_DRIVER_NAME;
pScrn->name = GLINT_NAME;
pScrn->Probe = GLINTProbe;
pScrn->PreInit = GLINTPreInit;
pScrn->ScreenInit = GLINTScreenInit;
pScrn->SwitchMode = GLINTSwitchMode;
pScrn->FreeScreen = GLINTFreeScreen;
+ pScrn->EnterVT = GLINTEnterVT;
}
}
- }
+ }
- xf86DeleteScreen(pScrn0->scrnIndex,0);
xfree(devSections);
} else {
-
+
numUsed = xf86MatchPciInstances(GLINT_NAME, 0,
GLINTChipsets, GLINTPciChipsets, devSections,
numDevSections, drv, &usedChips);
@@ -720,168 +698,54 @@ GLINTProbe(DriverPtr drv, int flags)
foundScreen = TRUE;
if (!(flags & PROBE_DETECT))
- for (i = 0; i < numUsed; i++) {
- ScrnInfoPtr pScrn;
+ for (i = 0; i < numUsed; i++) {
+ ScrnInfoPtr pScrn = NULL;
- /* Allocate a ScrnInfoRec and claim the slot */
- pScrn = xf86AllocateScreen(drv, 0);
- ErrorF("used chips: %i\n",usedChips[i]);
-
- xf86ConfigActivePciEntity(pScrn, usedChips[i], GLINTPciChipsets, NULL,
- NULL, NULL, NULL, NULL);
-
- pPci = xf86GetPciInfoForEntity(usedChips[i]);
- glintbase = pPci->memBase[0];
- chiptag = pciTag(pPci->bus, pPci->device, pPci->func);
-
- /* Need to claim Glint Delta for PERMEDIA & 500TX */
- /* and for the moment we claim all other chips on the same */
- /* bus/device number */
- if ( (pPci->chipType == PCI_CHIP_500TX) ||
- (pPci->chipType == PCI_CHIP_MX) ||
- (pPci->chipType == PCI_CHIP_GAMMA) ||
- (pPci->chipType == PCI_CHIP_PERMEDIA) ) {
-
- while (*checkusedPci != NULL) {
- int gIndex;
- /* make sure we claim all but our source device */
- if ((pPci->bus == (*checkusedPci)->bus &&
- pPci->device == (*checkusedPci)->device) &&
- pPci->func != (*checkusedPci)->func) {
+ /* Allocate a ScrnInfoRec and claim the slot */
+ if ((pScrn = xf86ConfigPciEntity(pScrn, 0, usedChips[i],
+ GLINTPciChipsets, NULL,
+ NULL, NULL, NULL, NULL))) {
+
+ pPci = xf86GetPciInfoForEntity(usedChips[i]);
+
+
+ /* Only claim other chips when GAMMA is used */
+ if (pPci->chipType == PCI_CHIP_GAMMA) {
+ while (*checkusedPci != NULL) {
+ int eIndex;
+ /* make sure we claim all but our source device */
+ if ((pPci->bus == (*checkusedPci)->bus &&
+ pPci->device == (*checkusedPci)->device) &&
+ pPci->func != (*checkusedPci)->func) {
- /* Find that Delta chip, and give us the tag value */
- if ( (((*checkusedPci)->vendor == PCI_VENDOR_TI) ||
- ((*checkusedPci)->vendor == PCI_VENDOR_3DLABS)) &&
- (((*checkusedPci)->chipType == PCI_CHIP_DELTA) ||
- ((*checkusedPci)->chipType == PCI_CHIP_MX)) ) {
- if ((*checkusedPci)->chipType == PCI_CHIP_DELTA) {
- deltabase = (*checkusedPci)->memBase[0];
- delta_pci_base = &((*checkusedPci)->memBase[0]);
- deltatag = pciTag((*checkusedPci)->bus,
- (*checkusedPci)->device,
- (*checkusedPci)->func);
- }
-
- gIndex = xf86ClaimPciSlot((*checkusedPci)->bus,
- (*checkusedPci)->device,
- (*checkusedPci)->func, drv,
- (*checkusedPci)->chipType,
- NULL, TRUE);
-
- if (gIndex == -1) {
- /* This can't happen */
- FatalError("someone claimed the free slot!\n");
- }
- xf86ConfigActivePciEntity(pScrn, gIndex,
- NULL, NULL, NULL, NULL,
- NULL, NULL);
- } else {
- int eIndex;
-
/* Claim other entities on the same card */
eIndex = xf86ClaimPciSlot((*checkusedPci)->bus,
- (*checkusedPci)->device,
- (*checkusedPci)->func,
- drv, -1 /* XXX */,
- NULL, FALSE);
-
+ (*checkusedPci)->device,
+ (*checkusedPci)->func,
+ drv, -1 /* XXX */,
+ NULL, FALSE);
if (eIndex == -1) {
- /* This can't happen */
- FatalError("someone claimed the free slot!\n");
+ /* This can't happen */
+ FatalError("someone claimed the free slot!\n");
}
- }
- }
- checkusedPci++;
- }
- }
- /* Fill in what we can of the ScrnInfoRec */
- pScrn->driverVersion = GLINT_VERSION;
- pScrn->driverName = GLINT_DRIVER_NAME;
- pScrn->name = GLINT_NAME;
- pScrn->Probe = GLINTProbe;
- pScrn->PreInit = GLINTPreInit;
- pScrn->ScreenInit = GLINTScreenInit;
- pScrn->SwitchMode = GLINTSwitchMode;
- pScrn->FreeScreen = GLINTFreeScreen;
-
-/* XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX */
-/* NEED TO MOVE THIS OUT OF THE PROBE CODE */
-/* XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX */
- {
- int temp;
- int bugbase = 0;
- /*
- * due to a few bugs in the GLINT Delta we might have to
- * relocate the base address of config region of the Delta, if
- * bit 17 of the base addresses of config region of the Delta
- * and the 500TX or 300SX are different
- * We only handle config type 1 at this point
- */
- if (deltatag && chiptag) {
- if ((deltabase & 0x20000) ^ (glintbase & 0x20000)) {
- /*
- * if the base addresses are different at bit 17,
- * we have to remap the base0 for the delta;
- * as wrong as this looks, we can use the base3 of the
- * 300SX/500TX for this. The delta is working as a bridge
- * here and gives its own addresses preference. And we
- * don't need to access base3, as this one is the bytw
- * swapped local buffer which we don't need.
- * Using base3 we know that the space is
- * a) large enough
- * b) free (well, almost)
- *
- * to be able to do that we need to enable IO
- */
- if (pPci->chipType == PCI_CHIP_PERMEDIA) {
- glintbase3 = pciReadLong(chiptag, 0x20); /* base4 */
- } else {
- glintbase3 = pciReadLong(chiptag, 0x1c); /* base3 */
- }
- if ((glintbase & 0x20000) ^ (glintbase3 & 0x20000)) {
- /*
- * oops, still different; we know that base3 is at least
- * 16 MB, so we just take 128k offset into it
- */
- glintbase3 += 0x20000;
+ xf86AddEntityToScreen(pScrn,eIndex);
+ }
+ checkusedPci++;
+ }
}
- /*
- * and now for the magic.
- * read old value
- * write fffffffff
- * read value
- * write new value
- */
- bugbase = pciReadLong(deltatag, 0x10);
- pciWriteLong(deltatag, 0x10, 0xffffffff);
- temp = pciReadLong(deltatag, 0x10);
- pciWriteLong(deltatag, 0x10, glintbase3);
-
- /* Update PCI tables */
- *delta_pci_base = glintbase3;
-
- /*
- * additionally, sometimes we see the baserom which might
- * confuse the chip, so let's make sure that is disabled
- */
- temp = pciReadLong(chiptag, 0x30);
- pciWriteLong(chiptag, 0x30, 0xffffffff);
- temp = pciReadLong(chiptag, 0x30);
- pciWriteLong(chiptag, 0x30, 0);
+
+ /* Fill in what we can of the ScrnInfoRec */
+ pScrn->driverVersion = GLINT_VERSION;
+ pScrn->driverName = GLINT_DRIVER_NAME;
+ pScrn->name = GLINT_NAME;
+ pScrn->Probe = GLINTProbe;
+ pScrn->PreInit = GLINTPreInit;
+ pScrn->ScreenInit = GLINTScreenInit;
+ pScrn->SwitchMode = GLINTSwitchMode;
+ pScrn->FreeScreen = GLINTFreeScreen;
+ pScrn->EnterVT = GLINTEnterVT;
}
}
- if (bugbase)
- xf86DrvMsg(-1, X_INFO,
- "Glint Delta BUG, fixing.....old = 0x%x, new = 0x%x\n",
- bugbase, glintbase3);
- }
-
- /*
- * ok, now let's forget about the Delta, in case we found one
- */
- deltatag = deltabase = 0;
- }
-
}
if (usedChips) xfree(usedChips);
@@ -907,12 +771,14 @@ GetAccelPitchValues(ScrnInfoPtr pScrn)
switch (pGlint->Chipset) {
case PCI_VENDOR_TI_CHIP_PERMEDIA2:
case PCI_VENDOR_TI_CHIP_PERMEDIA:
+ case PCI_VENDOR_3DLABS_CHIP_PERMEDIA3:
case PCI_VENDOR_3DLABS_CHIP_PERMEDIA2V:
case PCI_VENDOR_3DLABS_CHIP_PERMEDIA2:
case PCI_VENDOR_3DLABS_CHIP_PERMEDIA:
linep = &partprodPermedia[0];
break;
case PCI_VENDOR_3DLABS_CHIP_500TX:
+ case PCI_VENDOR_3DLABS_CHIP_300SX:
case PCI_VENDOR_3DLABS_CHIP_MX:
case PCI_VENDOR_3DLABS_CHIP_GAMMA:
linep = &partprod500TX[0];
@@ -936,6 +802,69 @@ GetAccelPitchValues(ScrnInfoPtr pScrn)
return linePitches;
}
+static void
+GLINTProbeTIramdac(ScrnInfoPtr pScrn)
+{
+ GLINTPtr pGlint;
+ CARD32 temp = 0;
+ pGlint = GLINTPTR(pScrn);
+ if (pGlint->numMXDevices == 2) {
+ pGlint->RamDacRec = RamDacCreateInfoRec();
+ pGlint->RamDacRec->ReadDAC = DUALglintInTIIndReg;
+ pGlint->RamDacRec->WriteDAC = DUALglintOutTIIndReg;
+ pGlint->RamDacRec->ReadAddress = DUALglintTIReadAddress;
+ pGlint->RamDacRec->WriteAddress = DUALglintTIWriteAddress;
+ pGlint->RamDacRec->ReadData = DUALglintTIReadData;
+ pGlint->RamDacRec->WriteData = DUALglintTIWriteData;
+ pGlint->RamDacRec->LoadPalette = TIramdacLoadPalette;
+ } else {
+ pGlint->RamDacRec = RamDacCreateInfoRec();
+ pGlint->RamDacRec->ReadDAC = glintInTIIndReg;
+ pGlint->RamDacRec->WriteDAC = glintOutTIIndReg;
+ pGlint->RamDacRec->ReadAddress = glintTIReadAddress;
+ pGlint->RamDacRec->WriteAddress = glintTIWriteAddress;
+ pGlint->RamDacRec->ReadData = glintTIReadData;
+ pGlint->RamDacRec->WriteData = glintTIWriteData;
+ pGlint->RamDacRec->LoadPalette = TIramdacLoadPalette;
+ }
+ if(!RamDacInit(pScrn, pGlint->RamDacRec)) {
+ RamDacDestroyInfoRec(pGlint->RamDacRec);
+ return;
+ }
+ GLINTMapMem(pScrn);
+ if (pGlint->numMXDevices == 2) {
+ temp = GLINT_READ_REG(GCSRAperture);
+ GLINT_SLOW_WRITE_REG(GCSRSecondaryGLINTMapEn, GCSRAperture);
+ }
+ pGlint->RamDac = TIramdacProbe(pScrn, TIRamdacs);
+ if (pGlint->numMXDevices == 2) {
+ GLINT_SLOW_WRITE_REG(temp, GCSRAperture);
+ }
+ GLINTUnmapMem(pScrn);
+}
+
+static void
+GLINTProbeIBMramdac(ScrnInfoPtr pScrn)
+{
+ GLINTPtr pGlint;
+ pGlint = GLINTPTR(pScrn);
+ pGlint->RamDacRec = RamDacCreateInfoRec();
+ pGlint->RamDacRec->ReadDAC = glintInIBMRGBIndReg;
+ pGlint->RamDacRec->WriteDAC = glintOutIBMRGBIndReg;
+ pGlint->RamDacRec->ReadAddress = glintIBMReadAddress;
+ pGlint->RamDacRec->WriteAddress = glintIBMWriteAddress;
+ pGlint->RamDacRec->ReadData = glintIBMReadData;
+ pGlint->RamDacRec->WriteData = glintIBMWriteData;
+ pGlint->RamDacRec->LoadPalette = NULL;
+ if(!RamDacInit(pScrn, pGlint->RamDacRec)) {
+ RamDacDestroyInfoRec(pGlint->RamDacRec);
+ return;
+ }
+ GLINTMapMem(pScrn);
+ pGlint->RamDac = IBMramdacProbe(pScrn, IBMRamdacs);
+ GLINTUnmapMem(pScrn);
+}
+
/* Mandatory */
static Bool
GLINTPreInit(ScrnInfoPtr pScrn, int flags)
@@ -951,8 +880,6 @@ GLINTPreInit(ScrnInfoPtr pScrn, int flags)
char *mod = NULL;
const char *s;
- if (flags & PROBE_DETECT) return FALSE;
-
TRACE_ENTER("GLINTPreInit");
/*
@@ -972,13 +899,6 @@ GLINTPreInit(ScrnInfoPtr pScrn, int flags)
if (pScrn->numEntities < 1)
return FALSE;
- /* The ramdac module should be loaded here when needed */
- if (!xf86LoadSubModule(pScrn, "ramdac"))
- return FALSE;
-
- /* Set pScrn->monitor */
- pScrn->monitor = pScrn->confScreen->monitor;
-
/* Allocate the GLINTRec driverPrivate */
if (!GLINTGetRec(pScrn)) {
return FALSE;
@@ -987,21 +907,26 @@ GLINTPreInit(ScrnInfoPtr pScrn, int flags)
/* Get the entities, and make sure they are PCI. */
pGlint->pEnt = xf86GetEntityInfo(pScrn->entityList[0]);
- if (pGlint->pEnt->location.type == BUS_PCI)
- {
- /* Initialize the card through int10 interface if needed */
- if ( xf86LoadSubModule(pScrn, "int10")){
- xf86Int10InfoPtr pInt;
-
- xf86LoaderReqSymLists(int10Symbols, NULL);
- xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Initializing int10\n");
- pInt = xf86InitInt10(pGlint->pEnt->index);
- xf86FreeInt10(pInt);
+ if (flags & PROBE_DETECT) {
+ GLINTProbeDDC(pScrn, pGlint->pEnt->index);
+ return TRUE;
}
+
+ if (pGlint->pEnt->location.type == BUS_PCI)
+ {
+ /* Initialize the card through int10 interface if needed */
+ if ( xf86LoadSubModule(pScrn, "int10")){
+ xf86Int10InfoPtr pInt;
+
+ xf86LoaderReqSymLists(int10Symbols, NULL);
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Initializing int10\n");
+ pInt = xf86InitInt10(pGlint->pEnt->index);
+ xf86FreeInt10(pInt);
+ }
- pGlint->PciInfo = xf86GetPciInfoForEntity(pGlint->pEnt->index);
- pGlint->PciTag = pciTag(pGlint->PciInfo->bus, pGlint->PciInfo->device,
+ pGlint->PciInfo = xf86GetPciInfoForEntity(pGlint->pEnt->index);
+ pGlint->PciTag = pciTag(pGlint->PciInfo->bus, pGlint->PciInfo->device,
pGlint->PciInfo->func);
}
@@ -1012,20 +937,14 @@ GLINTPreInit(ScrnInfoPtr pScrn, int flags)
for (i = 1; i < pScrn->numEntities; i++) {
pEnt = xf86GetEntityInfo(pScrn->entityList[i]);
pPci = xf86GetPciInfoForEntity(pEnt->index);
- if (pPci->chipType == PCI_CHIP_DELTA
- ) {
- pGlint->pEntGeometry = pEnt;
- pGlint->PciInfoGeometry = pPci;
- pGlint->PciTagGeometry = pciTag(pPci->bus, pPci->device,
- pPci->func);
- } else if (pPci->chipType == PCI_CHIP_MX) {
+ if (pPci->chipType == PCI_CHIP_MX) {
if (pGlint->numMXDevices >= GLINT_MAX_MX_DEVICES) {
xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
- "%d MX chips supported, additional MX device ignored\n",
- GLINT_MAX_MX_DEVICES);
+ "%d MX chips unsupported, aborting. (Max - 2)\n",
+ pGlint->numMXDevices);
+ return FALSE;
} else {
LinearFramebuffer = pPci->memBase[2];
- pGlint->pEntMX[pGlint->numMXDevices] = pEnt;
pGlint->MXPciInfo[pGlint->numMXDevices] = pPci;
pGlint->numMXDevices++;
}
@@ -1046,6 +965,8 @@ GLINTPreInit(ScrnInfoPtr pScrn, int flags)
pScrn->racMemFlags = RAC_FB | RAC_COLORMAP | RAC_CURSOR | RAC_VIEWPORT;
pScrn->racIoFlags = RAC_FB | RAC_COLORMAP | RAC_CURSOR | RAC_VIEWPORT;
+ /* Set pScrn->monitor */
+ pScrn->monitor = pScrn->confScreen->monitor;
/*
* The first thing we should figure out is the depth, bpp, etc.
* Our default depth is 8, so pass it to the helper function.
@@ -1069,8 +990,6 @@ GLINTPreInit(ScrnInfoPtr pScrn, int flags)
}
/* Check that the returned depth is one we support */
switch (pScrn->depth) {
- case 1:
- case 4:
case 8:
case 15:
case 16:
@@ -1196,7 +1115,6 @@ GLINTPreInit(ScrnInfoPtr pScrn, int flags)
from = X_CONFIG;
pScrn->AdjustFrame = fbdevHWAdjustFrame;
- pScrn->EnterVT = GLINTEnterVTFBDev;
pScrn->LeaveVT = fbdevHWLeaveVT;
pScrn->ValidMode = fbdevHWValidMode;
@@ -1206,7 +1124,6 @@ GLINTPreInit(ScrnInfoPtr pScrn, int flags)
from = X_PROBED;
pScrn->AdjustFrame = GLINTAdjustFrame;
- pScrn->EnterVT = GLINTEnterVT;
pScrn->LeaveVT = GLINTLeaveVT;
pScrn->ValidMode = GLINTValidMode;
@@ -1296,6 +1213,7 @@ GLINTPreInit(ScrnInfoPtr pScrn, int flags)
xf86DrvMsg(pScrn->scrnIndex, from, "Chipset: \"%s\"\n", pScrn->chipset);
if ((pGlint->Chipset == PCI_VENDOR_TI_CHIP_PERMEDIA2) ||
+ (pGlint->Chipset == PCI_VENDOR_3DLABS_CHIP_PERMEDIA3) ||
(pGlint->Chipset == PCI_VENDOR_3DLABS_CHIP_PERMEDIA2V) ||
(pGlint->Chipset == PCI_VENDOR_3DLABS_CHIP_PERMEDIA2)) {
if (xf86ReturnOptValBool(GLINTOptions, OPTION_BLOCK_WRITE, FALSE)) {
@@ -1329,12 +1247,12 @@ GLINTPreInit(ScrnInfoPtr pScrn, int flags)
(unsigned long)pGlint->FbAddress);
/* Trap GAMMA & DELTA specification, with no linear address */
- /* Find the first TX/MX chip and use that address */
+ /* Find the first SX/TX/MX chip and use that address */
if (pGlint->FbAddress == 0) {
if (LinearFramebuffer) {
pGlint->FbAddress = LinearFramebuffer;
xf86DrvMsg(pScrn->scrnIndex, X_PROBED,
- "FrameBuffer used from first TX/MX chip at 0x%x\n",
+ "FrameBuffer used from first SX/TX/MX chip at 0x%x\n",
LinearFramebuffer);
} else {
xf86DrvMsg(pScrn->scrnIndex, X_PROBED,
@@ -1351,10 +1269,7 @@ GLINTPreInit(ScrnInfoPtr pScrn, int flags)
pGlint->IOAddress = pGlint->pEnt->device->IOBase;
from = X_CONFIG;
} else {
- if (pGlint->PciTagGeometry)
- pGlint->IOAddress = pGlint->PciInfoGeometry->memBase[0] &0xFFFFC000;
- else
- pGlint->IOAddress = pGlint->PciInfo->memBase[0] & 0xFFFFC000;
+ pGlint->IOAddress = pGlint->PciInfo->memBase[0] & 0xFFFFC000;
}
#if X_BYTE_ORDER == X_BIG_ENDIAN
pGlint->IOAddress += 0x10000;
@@ -1363,35 +1278,17 @@ GLINTPreInit(ScrnInfoPtr pScrn, int flags)
xf86DrvMsg(pScrn->scrnIndex, from, "MMIO registers at 0x%lX\n",
(unsigned long)pGlint->IOAddress);
- if (pGlint->SecondaryAddress)
- xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "Secondary MMIO registers at 0x%lX\n", pGlint->SecondaryAddress);
-
pGlint->irq = pGlint->pEnt->device->irq;
- /* Register the PCI-assigned resources. */
- if (pGlint->numMXDevices == 0) {
- if (xf86RegisterResources(pGlint->pEnt->index, NULL, ResExclusive)) {
+ /* Register all entities */
+ for (i = 1; i < pScrn->numEntities; i++) {
+ EntityInfoPtr pEnt;
+ pEnt = xf86GetEntityInfo(pScrn->entityList[i]);
+ if (xf86RegisterResources(pEnt->index, NULL, ResExclusive)) {
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
"xf86RegisterResources() found resource conflicts\n");
return FALSE;
}
- } else {
- for (i = 0; i < pGlint->numMXDevices; i++) {
- if (xf86RegisterResources(pGlint->pEntMX[i]->index, NULL,
- ResExclusive)) {
- xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
- "xf86RegisterResources() found resource conflicts\n");
- return FALSE;
- }
- }
- }
- if (pGlint->pEntGeometry) {
- if (xf86RegisterResources(pGlint->pEntGeometry->index, NULL, ResExclusive)) {
- xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
- "xf86RegisterResources() found resource conflicts\n");
- return FALSE;
- }
}
}
@@ -1403,11 +1300,22 @@ GLINTPreInit(ScrnInfoPtr pScrn, int flags)
if (pGlint->pEnt->device->videoRam != 0) {
pScrn->videoRam = pGlint->pEnt->device->videoRam;
from = X_CONFIG;
+ } else if (pGlint->Chipset == PCI_VENDOR_3DLABS_CHIP_PERMEDIA3) {
+ /* Need to initialize the memory timings of the second head
+ * of the Appian Jeronimo 2000 board here.
+ * Check this routine in pm3_dac.c if you have another board
+ * than a J2000, as memory timings will surely change.
+ */
+ GLINTMapMem(pScrn);
+ Permedia3PreInit(pScrn, pGlint);
+ GLINTUnmapMem(pScrn);
+ pScrn->videoRam = Permedia3MemorySizeDetect(pScrn);
} else {
pGlint->FbMapSize = 0; /* Need to set FbMapSize for MMIO access */
/* Need to access MMIO to determine videoRam */
GLINTMapMem(pScrn);
if( (pGlint->Chipset == PCI_VENDOR_3DLABS_CHIP_500TX) ||
+ (pGlint->Chipset == PCI_VENDOR_3DLABS_CHIP_300SX) ||
(pGlint->Chipset == PCI_VENDOR_3DLABS_CHIP_MX) ||
(pGlint->Chipset == PCI_VENDOR_3DLABS_CHIP_GAMMA) )
pScrn->videoRam = 1024 * (1 << ((GLINT_READ_REG(FBMemoryCtl) &
@@ -1421,11 +1329,21 @@ GLINTPreInit(ScrnInfoPtr pScrn, int flags)
pScrn->videoRam = fbdevHWGetVidmem(pScrn)/1024;
}
+ pGlint->FbMapSize = pScrn->videoRam * 1024;
+
+ /* We should move this out somewhere ! */
if ( (pGlint->Chipset == PCI_VENDOR_3DLABS_CHIP_GAMMA) &&
(pGlint->numMXDevices == 2) ) {
- unsigned int chipconfig;
+ CARD32 chipconfig;
+ CARD32 temp;
+
GLINTMapMem(pScrn);
+#if 0
+ /* We shouldn't really do this yet, we haven't saved the
+ * state of the chip.
+ * Best of all put a timer in to reset the engine if it
+ * doesn't respond - but later */
/*
* This is needed before the first GLINT_SLOW_WRITE_REG --
* otherwise the server will hang if it was left in a bad state.
@@ -1434,9 +1352,12 @@ GLINTPreInit(ScrnInfoPtr pScrn, int flags)
while (GLINT_READ_REG(ResetStatus) & 0x80000000) {
xf86DrvMsg(pScrn->scrnIndex, from, "Resetting Core\n");
}
+#endif
+ temp = GLINT_READ_REG(GCSRAperture);
GLINT_SLOW_WRITE_REG(GCSRSecondaryGLINTMapEn, GCSRAperture);
+#if 0
xf86DrvMsg(pScrn->scrnIndex, from,
"InFIFOSpace = %d, %d (after reset)\n",
GLINT_READ_REG(InFIFOSpace),
@@ -1463,37 +1384,37 @@ GLINTPreInit(ScrnInfoPtr pScrn, int flags)
"OutFIFOSWords = %d, %d (after drain)\n",
GLINT_READ_REG(OutFIFOWords),
GLINT_SECONDARY_READ_REG(OutFIFOWords));
+#endif
chipconfig = GLINT_READ_REG(GChipConfig);
+
+ GLINT_SLOW_WRITE_REG(GCSRSecondaryGLINTMapEn, GCSRAperture);
+
GLINTUnmapMem(pScrn);
switch (chipconfig & GChipMultiGLINTApMask) {
case GChipMultiGLINTAp_0M:
- pGlint->MultiGLINTApSize = 0;
+ pGlint->FbMapSize = 0;
break;
case GChipMultiGLINTAp_16M:
- pGlint->MultiGLINTApSize = 16 * 1024 * 1024;
+ pGlint->FbMapSize = 16 * 1024 * 1024;
break;
case GChipMultiGLINTAp_32M:
- pGlint->MultiGLINTApSize = 32 * 1024 * 1024;
+ pGlint->FbMapSize = 32 * 1024 * 1024;
break;
case GChipMultiGLINTAp_64M:
- pGlint->MultiGLINTApSize = 64 * 1024 * 1024;
+ pGlint->FbMapSize = 64 * 1024 * 1024;
break;
}
-
- pGlint->FbMapSize = pGlint->MultiGLINTApSize;
- pGlint->MXFbSize = pScrn->videoRam * 1024;
- /* we have twice the memory w/ two MX chips */
- xf86DrvMsg(pScrn->scrnIndex, from, "VideoRAM: %d kByte\n",
- pScrn->videoRam * 2);
- }
- else {
- pGlint->FbMapSize = pScrn->videoRam * 1024;
- xf86DrvMsg(pScrn->scrnIndex, from, "VideoRAM: %d kByte\n",
- pScrn->videoRam);
}
+ xf86DrvMsg(pScrn->scrnIndex, from, "VideoRAM: %d kByte\n",
+ pGlint->FbMapSize / 1024);
+
+ /* The ramdac module should be loaded here when needed */
+ if (!xf86LoadSubModule(pScrn, "ramdac"))
+ return FALSE;
+
/* Let's check what type of DAC we have and reject if necessary */
switch (pGlint->Chipset) {
case PCI_VENDOR_TI_CHIP_PERMEDIA2:
@@ -1514,6 +1435,7 @@ GLINTPreInit(ScrnInfoPtr pScrn, int flags)
return FALSE;
}
break;
+ case PCI_VENDOR_3DLABS_CHIP_PERMEDIA3:
case PCI_VENDOR_3DLABS_CHIP_PERMEDIA2V:
maxheight = 2048;
maxwidth = 2048;
@@ -1535,115 +1457,58 @@ GLINTPreInit(ScrnInfoPtr pScrn, int flags)
case PCI_VENDOR_3DLABS_CHIP_PERMEDIA:
maxheight = 1024;
maxwidth = 1536;
- pGlint->RefClock = 14318;
pGlint->VGAcore = TRUE; /* chip has a vga core */
- pGlint->RamDacRec = RamDacCreateInfoRec();
- pGlint->RamDacRec->ReadDAC = glintInIBMRGBIndReg;
- pGlint->RamDacRec->WriteDAC = glintOutIBMRGBIndReg;
- pGlint->RamDacRec->ReadAddress = glintIBMReadAddress;
- pGlint->RamDacRec->WriteAddress = glintIBMWriteAddress;
- pGlint->RamDacRec->ReadData = glintIBMReadData;
- pGlint->RamDacRec->WriteData = glintIBMWriteData;
- if(!RamDacInit(pScrn, pGlint->RamDacRec)) {
- RamDacDestroyInfoRec(pGlint->RamDacRec);
- return FALSE;
- }
- GLINTMapMem(pScrn);
- pGlint->RamDac = IBMramdacProbe(pScrn, PermediaRamdacs);
- GLINTUnmapMem(pScrn);
- if (pGlint->RamDac == NULL)
+ GLINTProbeIBMramdac(pScrn);
+ if (pGlint->RamDac == NULL) return FALSE;
+ if (pGlint->RamDac->RamDacType != (IBM526DB_RAMDAC) ||
+ pGlint->RamDac->RamDacType != (IBM526_RAMDAC))
return FALSE;
+ pGlint->RefClock = 14318;
break;
case PCI_VENDOR_3DLABS_CHIP_500TX:
+ case PCI_VENDOR_3DLABS_CHIP_300SX:
case PCI_VENDOR_3DLABS_CHIP_MX:
- if (pScrn->bitsPerPixel == 24) {
+ case PCI_VENDOR_3DLABS_CHIP_GAMMA:
+ if ((pGlint->Chipset == PCI_VENDOR_3DLABS_CHIP_GAMMA) &&
+ pGlint->UsePCIRetry) {
xf86DrvMsg(pScrn->scrnIndex, from,
- "-depth 24 -pixmap24 not supported by this chip.\n");
- return FALSE;
- }
- maxheight = 4096;
- maxwidth = 4096;
- pGlint->RamDacRec = RamDacCreateInfoRec();
- pGlint->RamDacRec->ReadDAC = glintInIBMRGBIndReg;
- pGlint->RamDacRec->WriteDAC = glintOutIBMRGBIndReg;
- pGlint->RamDacRec->ReadAddress = glintIBMReadAddress;
- pGlint->RamDacRec->WriteAddress = glintIBMWriteAddress;
- pGlint->RamDacRec->ReadData = glintIBMReadData;
- pGlint->RamDacRec->WriteData = glintIBMWriteData;
- if(!RamDacInit(pScrn, pGlint->RamDacRec)) {
- RamDacDestroyInfoRec(pGlint->RamDacRec);
- return FALSE;
- }
- GLINTMapMem(pScrn);
- pGlint->RamDac = IBMramdacProbe(pScrn, TXMXRamdacs);
- GLINTUnmapMem(pScrn);
- if (pGlint->RamDac->RamDacType == (IBM640_RAMDAC))
- pGlint->RefClock = 28322;
- else
- if (pGlint->RamDac->RamDacType == (IBM526DB_RAMDAC) ||
- pGlint->RamDac->RamDacType == (IBM526_RAMDAC))
- pGlint->RefClock = 40000;
- else {
- xf86DrvMsg(pScrn->scrnIndex, X_DEFAULT, "Undefined RefClock\n");
- return FALSE;
+ "GAMMA in use - PCI retries disabled\n");
+ pGlint->UsePCIRetry = FALSE;
}
- if (pGlint->RamDac == NULL)
- return FALSE;
- break;
- case PCI_VENDOR_3DLABS_CHIP_GAMMA:
if (pScrn->bitsPerPixel == 24) {
xf86DrvMsg(pScrn->scrnIndex, from,
"-depth 24 -pixmap24 not supported by this chip.\n");
return FALSE;
}
- if (pGlint->UsePCIRetry) {
- xf86DrvMsg(pScrn->scrnIndex, from,
- "GAMMA in use - PCI retries disabled\n");
- pGlint->UsePCIRetry = FALSE;
- }
maxheight = 4096;
maxwidth = 4096;
- pGlint->RefClock = 14318;
- pGlint->RamDacRec = RamDacCreateInfoRec();
- pGlint->RamDacRec->ReadDAC = glintInTIIndReg;
- pGlint->RamDacRec->WriteDAC = glintOutTIIndReg;
- pGlint->RamDacRec->ReadAddress = glintTIReadAddress;
- pGlint->RamDacRec->WriteAddress = glintTIWriteAddress;
- pGlint->RamDacRec->ReadData = glintTIReadData;
- pGlint->RamDacRec->WriteData = glintTIWriteData;
- if(!RamDacInit(pScrn, pGlint->RamDacRec)) {
- RamDacDestroyInfoRec(pGlint->RamDacRec);
- return FALSE;
+ /* Test for an TI ramdac */
+ if (!pGlint->RamDac) {
+ GLINTProbeTIramdac(pScrn);
+ if (pGlint->RamDac)
+ if ( (pGlint->RamDac->RamDacType == (TI3026_RAMDAC)) ||
+ (pGlint->RamDac->RamDacType == (TI3030_RAMDAC)) )
+ pGlint->RefClock = 14318;
}
- GLINTMapMem(pScrn);
- pGlint->RamDac = TIramdacProbe(pScrn, GMX2000Ramdacs);
- GLINTUnmapMem(pScrn);
+ /* Test for an IBM ramdac */
if (!pGlint->RamDac) {
- pGlint->RamDacRec = RamDacCreateInfoRec();
- pGlint->RamDacRec->ReadDAC = glintInIBMRGBIndReg;
- pGlint->RamDacRec->WriteDAC = glintOutIBMRGBIndReg;
- pGlint->RamDacRec->ReadAddress = glintIBMReadAddress;
- pGlint->RamDacRec->WriteAddress = glintIBMWriteAddress;
- pGlint->RamDacRec->ReadData = glintIBMReadData;
- pGlint->RamDacRec->WriteData = glintIBMWriteData;
- if(!RamDacInit(pScrn, pGlint->RamDacRec)) {
- RamDacDestroyInfoRec(pGlint->RamDacRec);
- return FALSE;
+ GLINTProbeIBMramdac(pScrn);
+ if (pGlint->RamDac) {
+ if (pGlint->RamDac->RamDacType == (IBM640_RAMDAC))
+ pGlint->RefClock = 28322;
+ else
+ if (pGlint->RamDac->RamDacType == (IBM526DB_RAMDAC) ||
+ pGlint->RamDac->RamDacType == (IBM526_RAMDAC))
+ pGlint->RefClock = 40000;
+ else {
+ xf86DrvMsg(pScrn->scrnIndex, X_DEFAULT,
+ "Undefined RefClock\n");
+ return FALSE;
+ }
+ }
}
- GLINTMapMem(pScrn);
- pGlint->RamDac = IBMramdacProbe(pScrn, TXMXRamdacs);
- GLINTUnmapMem(pScrn);
- if (pGlint->RamDac->RamDacType == (IBM640_RAMDAC))
- pGlint->RefClock = 28322;
- else
- if (pGlint->RamDac->RamDacType == (IBM526DB_RAMDAC) ||
- pGlint->RamDac->RamDacType == (IBM526_RAMDAC))
- pGlint->RefClock = 40000;
- else {
- xf86DrvMsg(pScrn->scrnIndex, X_DEFAULT, "Undefined RefClock\n");
+ if (!pGlint->RamDac)
return FALSE;
- }
- }
break;
}
@@ -1696,14 +1561,13 @@ GLINTPreInit(ScrnInfoPtr pScrn, int flags)
from = X_CONFIG;
} else {
if((pGlint->Chipset == PCI_VENDOR_3DLABS_CHIP_500TX)||
+ (pGlint->Chipset == PCI_VENDOR_3DLABS_CHIP_300SX) ||
(pGlint->Chipset == PCI_VENDOR_3DLABS_CHIP_MX) ||
(pGlint->Chipset == PCI_VENDOR_3DLABS_CHIP_GAMMA) )
pGlint->MaxClock = 220000;
if ( (pGlint->Chipset == PCI_VENDOR_TI_CHIP_PERMEDIA) ||
(pGlint->Chipset == PCI_VENDOR_3DLABS_CHIP_PERMEDIA) ) {
switch (pScrn->bitsPerPixel) {
- case 1:
- case 4:
case 8:
pGlint->MaxClock = 200000;
break;
@@ -1722,8 +1586,6 @@ GLINTPreInit(ScrnInfoPtr pScrn, int flags)
(pGlint->Chipset == PCI_VENDOR_3DLABS_CHIP_PERMEDIA2) ||
(pGlint->Chipset == PCI_VENDOR_3DLABS_CHIP_PERMEDIA2V) ) {
switch (pScrn->bitsPerPixel) {
- case 1:
- case 4:
case 8:
pGlint->MaxClock = 230000;
break;
@@ -1738,6 +1600,24 @@ GLINTPreInit(ScrnInfoPtr pScrn, int flags)
break;
}
}
+ if ( (pGlint->Chipset == PCI_VENDOR_3DLABS_CHIP_PERMEDIA3) ) {
+ switch (pScrn->bitsPerPixel) {
+ case 8:
+ pGlint->MaxClock = 300000;
+ break;
+ case 16:
+ pGlint->MaxClock = 300000;
+ break;
+ case 24:
+ /* Not sure about the 24 & 32 bpp clocks, ... */
+ pGlint->MaxClock = 150000;
+ break;
+ case 32:
+ /* Not sure about the 24 & 32 bpp clocks, ... */
+ pGlint->MaxClock = 150000;
+ break;
+ }
+ }
}
xf86DrvMsg(pScrn->scrnIndex, from, "Max pixel clock is %d MHz\n",
pGlint->MaxClock / 1000);
@@ -1746,7 +1626,7 @@ GLINTPreInit(ScrnInfoPtr pScrn, int flags)
* Setup the ClockRanges, which describe what clock ranges are available,
* and what sort of modes they can be used for.
*/
- clockRanges = xnfalloc(sizeof(ClockRange));
+ clockRanges = xnfcalloc(sizeof(ClockRange), 1);
clockRanges->next = NULL;
clockRanges->minClock = pGlint->MinClock;
clockRanges->maxClock = pGlint->MaxClock;
@@ -1808,34 +1688,29 @@ GLINTPreInit(ScrnInfoPtr pScrn, int flags)
if (pGlint->FBDev) {
/* shift horizontal timings for 64bit VRAM's or 32bit SGRAMs */
- int logbytesperaccess = 2;
-
switch (pScrn->bitsPerPixel) {
case 8:
- pGlint->BppShift = logbytesperaccess;
+ pGlint->BppShift = 2;
break;
case 16:
if (pGlint->DoubleBuffer) {
- pGlint->BppShift = logbytesperaccess-2;
+ pGlint->BppShift = 0;
} else {
- pGlint->BppShift = logbytesperaccess-1;
+ pGlint->BppShift = 1;
}
break;
case 24:
- pGlint->BppShift = logbytesperaccess;
+ pGlint->BppShift = 2;
break;
case 32:
- pGlint->BppShift = logbytesperaccess-2;
+ pGlint->BppShift = 0;
break;
}
pScrn->displayWidth = pScrn->virtualX;
-
/* Ensure vsync and hsync are high when using HW cursor */
-
if (pGlint->HWCursor) {
-
DisplayModePtr mode, first = mode = pScrn->modes;
do { /* We know there is at least the built-in mode */
@@ -1851,10 +1726,11 @@ GLINTPreInit(ScrnInfoPtr pScrn, int flags)
/* Only allow a single mode for MX and TX chipsets */
if ((pGlint->Chipset == PCI_VENDOR_3DLABS_CHIP_500TX) ||
+ (pGlint->Chipset == PCI_VENDOR_3DLABS_CHIP_300SX) ||
(pGlint->Chipset == PCI_VENDOR_3DLABS_CHIP_MX) ||
(pGlint->Chipset == PCI_VENDOR_3DLABS_CHIP_GAMMA)) {
xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
- "GLINT TX/MX chipsets only support one modeline, using first.\n");
+ "GLINT SX/TX/MX chipsets only support one modeline, using first\n");
pScrn->modes->next = NULL;
pScrn->virtualX = pScrn->modes->HDisplay;
pScrn->virtualY = pScrn->modes->VDisplay;
@@ -1866,7 +1742,6 @@ GLINTPreInit(ScrnInfoPtr pScrn, int flags)
i = partprod500TX[pScrn->displayWidth >> 5];
} while (i == -1);
}
- pGlint->realMXWidth = pScrn->displayWidth;
}
switch (pGlint->Chipset)
@@ -1874,6 +1749,7 @@ GLINTPreInit(ScrnInfoPtr pScrn, int flags)
case PCI_VENDOR_TI_CHIP_PERMEDIA2:
case PCI_VENDOR_3DLABS_CHIP_PERMEDIA2:
case PCI_VENDOR_3DLABS_CHIP_PERMEDIA2V:
+ case PCI_VENDOR_3DLABS_CHIP_PERMEDIA3:
case PCI_VENDOR_TI_CHIP_PERMEDIA:
case PCI_VENDOR_3DLABS_CHIP_PERMEDIA:
pGlint->pprod = partprodPermedia[pScrn->displayWidth >> 5];
@@ -1881,12 +1757,98 @@ GLINTPreInit(ScrnInfoPtr pScrn, int flags)
break;
case PCI_VENDOR_3DLABS_CHIP_500TX:
case PCI_VENDOR_3DLABS_CHIP_MX:
+ case PCI_VENDOR_3DLABS_CHIP_300SX:
case PCI_VENDOR_3DLABS_CHIP_GAMMA:
pGlint->pprod = partprod500TX[pScrn->displayWidth >> 5];
pGlint->bppalign = 0;
break;
}
+ if ( (pGlint->Chipset == PCI_VENDOR_3DLABS_CHIP_GAMMA) &&
+ (pGlint->numMXDevices == 2) ) {
+ int bytesPerPixel, realMXWidthBytes, inputXSpanBytes;
+ CARD32 postMultiply, productEnable, use16xProduct, inputXSpan;
+ CARD32 binaryEval, glintApSize;
+
+ /* setup multi glint framebuffer aperture */
+ bytesPerPixel = (pScrn->bitsPerPixel >> 3);
+ realMXWidthBytes = pScrn->displayWidth * bytesPerPixel;
+
+ /* compute Input X Span field */
+ binaryEval = ((realMXWidthBytes << 1) - 1);
+ if (binaryEval & (8 << 10)) { /* 8K */
+ inputXSpan = 3;
+ inputXSpanBytes = 8 * 1024;
+ }
+ else if (binaryEval & (4 << 10)) { /* 4K */
+ inputXSpan = 2;
+ inputXSpanBytes = 4 * 1024;
+ }
+ else if (binaryEval & (2 << 10)) { /* 2K */
+ inputXSpan = 1;
+ inputXSpanBytes = 2 * 1024;
+ }
+ else { /* 1K */
+ inputXSpan = 0;
+ inputXSpanBytes = 1024;
+ }
+
+ /* compute post multiply */
+ binaryEval = realMXWidthBytes >> 3;
+ postMultiply = 0;
+ while ((postMultiply < 5) && !(binaryEval & 1)) {
+ postMultiply++;
+ binaryEval >>= 1;
+ }
+ postMultiply <<= 7;
+
+ /* compute product enable fields */
+ if (binaryEval & ~0x1f) { /* too big */
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+ "GLINTModeInit: width (%d) too big\n",
+ pScrn->displayWidth);
+ return FALSE;
+ }
+ if ((binaryEval & 0x12) == 0x12) { /* clash between x2 and x16 */
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+ "GLINTModeInit: width (%d) is mult 18, not supported\n",
+ pScrn->displayWidth);
+ return FALSE;
+ }
+ if (binaryEval & 0x10) {
+ productEnable = (((binaryEval & 0xf) | 0x2) << 3);
+ use16xProduct = (1 << 2);
+ }
+ else {
+ productEnable = ((binaryEval & 0xf) << 3);
+ use16xProduct = 0;
+ }
+
+ /* compute GLINT Aperture Size field */
+ binaryEval = ((pScrn->videoRam << 11) - 1);
+ if (binaryEval & (32 << 20)) { /* 32M */
+ glintApSize = 3 << 10;
+ }
+ else if (binaryEval & (16 << 20)) { /* 16M */
+ glintApSize = 2 << 10;
+ }
+ else if (binaryEval & (8 << 20)) { /* 8M */
+ glintApSize = 1 << 10;
+ }
+ else { /* 4M */
+ glintApSize = 0 << 10;
+ }
+
+ pGlint->realMXWidth = ( glintApSize |
+ postMultiply |
+ productEnable |
+ use16xProduct |
+ inputXSpan );
+
+ /* set the MULTI width for software rendering */
+ pScrn->displayWidth = inputXSpanBytes / bytesPerPixel;
+ }
+
/* Set the current mode to the first in the list */
pScrn->currentMode = pScrn->modes;
@@ -1900,24 +1862,20 @@ GLINTPreInit(ScrnInfoPtr pScrn, int flags)
/* Load bpp-specific modules */
switch (pScrn->bitsPerPixel) {
- case 1:
- case 4:
case 8:
case 16:
- mod = "fb";
- break;
case 24:
- if (pix24bpp == 24)
- mod = "fb";
- else
- mod = "xf24_32bpp";
+ mod = "fb";
break;
case 32:
if (pScrn->overlayFlags & OVERLAY_8_32_PLANAR) {
- mod = "xf8_32bpp";
- } else {
+ if (xf86LoadSubModule(pScrn, "xf8_32bpp") == NULL) {
+ GLINTFreeRec(pScrn);
+ return FALSE;
+ } else
+ xf86LoaderReqSymLists(xf8_32bppSymbols,NULL);
+ } else
mod = "fb";
- }
break;
}
if (mod && xf86LoadSubModule(pScrn, mod) == NULL) {
@@ -1951,6 +1909,7 @@ GLINTPreInit(ScrnInfoPtr pScrn, int flags)
/* Load I2C if needed */
if ((pGlint->Chipset == PCI_VENDOR_3DLABS_CHIP_PERMEDIA2) ||
(pGlint->Chipset == PCI_VENDOR_3DLABS_CHIP_PERMEDIA2V) ||
+ (pGlint->Chipset == PCI_VENDOR_3DLABS_CHIP_PERMEDIA3) ||
(pGlint->Chipset == PCI_VENDOR_TI_CHIP_PERMEDIA2)) {
if (xf86LoadSubModule(pScrn, "i2c")) {
I2CBusPtr pBus;
@@ -2023,27 +1982,10 @@ GLINTMapMem(ScrnInfoPtr pScrn)
* Map IO registers to virtual address space
* We always map VGA IO registers - even if we don't need them
*/
- if (pGlint->PciTagGeometry) {
- pGlint->IOBase = xf86MapPciMem(pScrn->scrnIndex, VIDMEM_MMIO_32BIT,
- pGlint->PciTagGeometry, pGlint->IOAddress, 0x20000);
- pGlint->IOBaseVGA = xf86MapPciMem(pScrn->scrnIndex, VIDMEM_MMIO,
- pGlint->PciTagGeometry, pGlint->IOAddress + GLINT_VGA_MMIO_OFF,
- 0x2000);
- } else {
- pGlint->IOBase = xf86MapPciMem(pScrn->scrnIndex, VIDMEM_MMIO_32BIT,
+ pGlint->IOBase = xf86MapPciMem(pScrn->scrnIndex, VIDMEM_MMIO_32BIT,
pGlint->PciTag, pGlint->IOAddress, 0x20000);
- pGlint->IOBaseVGA = xf86MapPciMem(pScrn->scrnIndex, VIDMEM_MMIO,
+ pGlint->IOBaseVGA = xf86MapPciMem(pScrn->scrnIndex, VIDMEM_MMIO,
pGlint->PciTag, pGlint->IOAddress + GLINT_VGA_MMIO_OFF, 0x2000);
- }
- if ( (pGlint->Chipset == PCI_VENDOR_3DLABS_CHIP_GAMMA) &&
- (pGlint->numMXDevices == 2) ) {
- pGlint->SecondaryAddress = pGlint->IOAddress;
- pGlint->SecondaryBase = pGlint->IOBase+0x10000;
- }
- else {
- pGlint->SecondaryAddress = pGlint->IOAddress;
- pGlint->SecondaryBase = pGlint->IOBase;
- }
if (pGlint->IOBase == NULL)
return FALSE;
@@ -2057,55 +1999,8 @@ GLINTMapMem(ScrnInfoPtr pScrn)
return FALSE;
}
- /* Due to bugs in the Glint Delta/Permedia/500TX chips we need to do this */
- /* Bizarre, but it works. */
- if ((pGlint->Chipset != PCI_VENDOR_TI_CHIP_PERMEDIA2) &&
- (pGlint->Chipset != PCI_VENDOR_3DLABS_CHIP_PERMEDIA2) &&
- (pGlint->Chipset != PCI_VENDOR_3DLABS_CHIP_PERMEDIA2V)) {
- if (pGlint->PciTag) {
- unsigned long temp, temp2;
-
- /*
- * and now for the magic.
- * read old value
- * write fffffffff
- * read value
- * write old value
- */
- if (pGlint->PciTagGeometry) {
- temp = pciReadLong(pGlint->PciTagGeometry, 0x10);
- pciWriteLong(pGlint->PciTagGeometry, 0x10, 0xffffffff);
- temp2 = pciReadLong(pGlint->PciTagGeometry, 0x10);
- pciWriteLong(pGlint->PciTagGeometry, 0x10, temp & 0xfffffff0);
- }
-
- temp = pciReadLong(pGlint->PciTag, 0x10);
- pciWriteLong(pGlint->PciTag, 0x10, 0xffffffff);
- temp2 = pciReadLong(pGlint->PciTag, 0x10);
- pciWriteLong(pGlint->PciTag, 0x10, temp);
-
- temp = pciReadLong(pGlint->PciTag, 0x14);
- pciWriteLong(pGlint->PciTag, 0x14, 0xffffffff);
- temp2 = pciReadLong(pGlint->PciTag, 0x14);
- pciWriteLong(pGlint->PciTag, 0x14, temp);
-
- temp = pciReadLong(pGlint->PciTag, 0x18);
- pciWriteLong(pGlint->PciTag, 0x18, 0xffffffff);
- temp2 = pciReadLong(pGlint->PciTag, 0x18);
- pciWriteLong(pGlint->PciTag, 0x18, temp);
-
- temp = pciReadLong(pGlint->PciTag, 0x1c);
- pciWriteLong(pGlint->PciTag, 0x1c, 0xffffffff);
- temp2 = pciReadLong(pGlint->PciTag, 0x1c);
- pciWriteLong(pGlint->PciTag, 0x1c, temp);
-
- temp = pciReadLong(pGlint->PciTag, 0x20);
- pciWriteLong(pGlint->PciTag, 0x20, 0xffffffff);
- temp2 = pciReadLong(pGlint->PciTag, 0x20);
- pciWriteLong(pGlint->PciTag, 0x20, temp);
- }
- }
- return TRUE;
+ TRACE_EXIT("GLINTMapMem");
+ return TRUE;
}
@@ -2184,12 +2079,16 @@ GLINTSave(ScrnInfoPtr pScrn)
case PCI_VENDOR_3DLABS_CHIP_PERMEDIA2V:
Permedia2VSave(pScrn, glintReg);
break;
+ case PCI_VENDOR_3DLABS_CHIP_PERMEDIA3:
+ Permedia3Save(pScrn, glintReg);
+ break;
case PCI_VENDOR_TI_CHIP_PERMEDIA:
case PCI_VENDOR_3DLABS_CHIP_PERMEDIA:
PermediaSave(pScrn, glintReg);
(*pGlint->RamDac->Save)(pScrn, pGlint->RamDacRec, RAMDACreg);
break;
case PCI_VENDOR_3DLABS_CHIP_500TX:
+ case PCI_VENDOR_3DLABS_CHIP_300SX:
case PCI_VENDOR_3DLABS_CHIP_MX:
case PCI_VENDOR_3DLABS_CHIP_GAMMA:
if ( (pGlint->Chipset == PCI_VENDOR_3DLABS_CHIP_GAMMA) &&
@@ -2220,9 +2119,6 @@ GLINTModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode)
GLINTRegPtr glintReg;
RamDacHWRecPtr pRAMDAC = RAMDACHWPTR(pScrn);
RamDacRegRecPtr RAMDACreg;
- int bytesPerPixel, realMXWidthBytes, inputXSpanBytes;
- CARD32 glintApSize, postMultiply, productEnable, use16xProduct, inputXSpan;
- CARD32 binaryEval, value;
if (pGlint->VGAcore) {
vgaHWPtr hwp = VGAHWPTR(pScrn);
@@ -2243,11 +2139,15 @@ GLINTModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode)
case PCI_VENDOR_3DLABS_CHIP_PERMEDIA2V:
ret = Permedia2VInit(pScrn, mode);
break;
+ case PCI_VENDOR_3DLABS_CHIP_PERMEDIA3:
+ ret = Permedia3Init(pScrn, mode);
+ break;
case PCI_VENDOR_TI_CHIP_PERMEDIA:
case PCI_VENDOR_3DLABS_CHIP_PERMEDIA:
ret = PermediaInit(pScrn, mode);
break;
case PCI_VENDOR_3DLABS_CHIP_500TX:
+ case PCI_VENDOR_3DLABS_CHIP_300SX:
case PCI_VENDOR_3DLABS_CHIP_MX:
case PCI_VENDOR_3DLABS_CHIP_GAMMA:
if ( (pGlint->Chipset == PCI_VENDOR_3DLABS_CHIP_GAMMA) &&
@@ -2282,12 +2182,16 @@ GLINTModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode)
case PCI_VENDOR_3DLABS_CHIP_PERMEDIA2V:
Permedia2VRestore(pScrn, glintReg);
break;
+ case PCI_VENDOR_3DLABS_CHIP_PERMEDIA3:
+ Permedia3Restore(pScrn, glintReg);
+ break;
case PCI_VENDOR_TI_CHIP_PERMEDIA:
case PCI_VENDOR_3DLABS_CHIP_PERMEDIA:
PermediaRestore(pScrn, glintReg);
(*pGlint->RamDac->Restore)(pScrn, pGlint->RamDacRec, RAMDACreg);
break;
case PCI_VENDOR_3DLABS_CHIP_500TX:
+ case PCI_VENDOR_3DLABS_CHIP_300SX:
case PCI_VENDOR_3DLABS_CHIP_MX:
case PCI_VENDOR_3DLABS_CHIP_GAMMA:
if ( (pGlint->Chipset == PCI_VENDOR_3DLABS_CHIP_GAMMA) &&
@@ -2301,105 +2205,6 @@ GLINTModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode)
break;
}
- if ( (pGlint->Chipset == PCI_VENDOR_3DLABS_CHIP_GAMMA) &&
- (pGlint->numMXDevices == 2) ) {
-
- /* setup multi glint framebuffer aperture */
-
- bytesPerPixel = (pScrn->bitsPerPixel >> 3);
- realMXWidthBytes = pGlint->realMXWidth * bytesPerPixel;
-
- /* compute Input X Span field */
- binaryEval = ((realMXWidthBytes << 1) - 1);
- if (binaryEval & (8 << 10)) { /* 8K */
- inputXSpan = 3;
- inputXSpanBytes = 8 * 1024;
- }
- else if (binaryEval & (4 << 10)) { /* 4K */
- inputXSpan = 2;
- inputXSpanBytes = 4 * 1024;
- }
- else if (binaryEval & (2 << 10)) { /* 2K */
- inputXSpan = 1;
- inputXSpanBytes = 2 * 1024;
- }
- else { /* 1K */
- inputXSpan = 0;
- inputXSpanBytes = 1024;
- }
-
- /* set the MULTI width for software rendering */
- pScrn->displayWidth = inputXSpanBytes / bytesPerPixel;
-
- /* compute post multiply */
- binaryEval = (realMXWidthBytes >> 3);
- postMultiply = 0;
- while ((postMultiply < 5) && !(binaryEval & 1)) {
- postMultiply++;
- binaryEval >>= 1;
- }
- postMultiply <<= 7;
-
- /* compute product enable fields */
- if (binaryEval & ~0x1f) { /* too big */
- xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
- "GLINTModeInit: width (%d) too big\n",
- pScrn->displayWidth);
- return FALSE;
- }
- if ((binaryEval & 0x12) == 0x12) { /* clash between x2 and x16 */
- xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
- "GLINTModeInit: width (%d) is mult 18, not supported\n",
- pScrn->displayWidth);
- return FALSE;
- }
- if (binaryEval & 0x10) {
- productEnable = (((binaryEval & 0xf) | 0x2) << 3);
- use16xProduct = (1 << 2);
- }
- else {
- productEnable = ((binaryEval & 0xf) << 3);
- use16xProduct = 0;
- }
-
- /* compute GLINT Aperture Size field */
- binaryEval = ((pGlint->MXFbSize << 1) - 1);
- if (binaryEval & (32 << 20)) { /* 32M */
- glintApSize = 3 << 10;
- }
- else if (binaryEval & (16 << 20)) { /* 16M */
- glintApSize = 2 << 10;
- }
- else if (binaryEval & (8 << 20)) { /* 8M */
- glintApSize = 1 << 10;
- }
- else { /* 4M */
- glintApSize = 0 << 10;
- }
-
- /*
- * Setup HW
- *
- * Note: The order of discovery for the MX devices is dependent
- * on which way the resource allocation code decides to scan the
- * bus. This setup assumes the first MX found owns the even
- * scanlines. Should the implementation change an scan the bus
- * in the opposite direction, then simple invert the indices for
- * MXPciInfo below. If this is setup wrong, the bug will appear
- * as incorrect scanline interleaving when software rendering.
- */
- value = ( glintApSize |
- postMultiply |
- productEnable |
- use16xProduct |
- inputXSpan );
- GLINT_SLOW_WRITE_REG(value, GMultGLINTAperture);
- value = pGlint->MXPciInfo[0]->memBase[2] & 0xFF800000;
- GLINT_SLOW_WRITE_REG(value, GMultGLINT1);
- value = pGlint->MXPciInfo[1]->memBase[2] & 0xFF800000;
- GLINT_SLOW_WRITE_REG(value, GMultGLINT2);
- }
-
if (pGlint->VGAcore) {
vgaHWProtect(pScrn, FALSE);
}
@@ -2434,19 +2239,23 @@ GLINTRestore(ScrnInfoPtr pScrn)
switch (pGlint->Chipset) {
case PCI_VENDOR_TI_CHIP_PERMEDIA2:
case PCI_VENDOR_3DLABS_CHIP_PERMEDIA2:
- Permedia2VideoReset(pScrn);
+ Permedia2VideoLeaveVT(pScrn);
Permedia2Restore(pScrn, glintReg);
break;
case PCI_VENDOR_3DLABS_CHIP_PERMEDIA2V:
- Permedia2VideoReset(pScrn);
+ Permedia2VideoLeaveVT(pScrn);
Permedia2VRestore(pScrn, glintReg);
break;
+ case PCI_VENDOR_3DLABS_CHIP_PERMEDIA3:
+ Permedia3Restore(pScrn, glintReg);
+ break;
case PCI_VENDOR_TI_CHIP_PERMEDIA:
case PCI_VENDOR_3DLABS_CHIP_PERMEDIA:
PermediaRestore(pScrn, glintReg);
(*pGlint->RamDac->Restore)(pScrn, pGlint->RamDacRec, RAMDACreg);
break;
case PCI_VENDOR_3DLABS_CHIP_500TX:
+ case PCI_VENDOR_3DLABS_CHIP_300SX:
case PCI_VENDOR_3DLABS_CHIP_MX:
case PCI_VENDOR_3DLABS_CHIP_GAMMA:
if ( (pGlint->Chipset == PCI_VENDOR_3DLABS_CHIP_GAMMA) &&
@@ -2501,7 +2310,10 @@ GLINTScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
if (!vgaHWMapMem(pScrn))
return FALSE;
}
- vgaHWSetMmioFuncs(hwp, pGlint->IOBaseVGA, 0);
+ /* Timing problem with PM3 & PM2V chips dont like being blasted */
+ if ((pGlint->Chipset != PCI_VENDOR_3DLABS_CHIP_PERMEDIA3) &&
+ (pGlint->Chipset != PCI_VENDOR_3DLABS_CHIP_PERMEDIA2V))
+ vgaHWSetMmioFuncs(hwp, pGlint->IOBaseVGA, 0);
vgaHWGetIOBase(hwp);
}
@@ -2580,8 +2392,8 @@ GLINTScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
#ifdef XF86DRI
/*
- * Setup DRI after visuals have been established, but before cfbScreenInit
- * is called. cfbScreenInit will eventually call into the drivers
+ * Setup DRI after visuals have been established, but before fbScreenInit
+ * is called. fbScreenInit will eventually call into the drivers
* InitGLXVisuals call back.
*/
if (!pGlint->NoAccel && pGlint->HWCursor) {
@@ -2608,26 +2420,13 @@ GLINTScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
}
switch (pScrn->bitsPerPixel) {
- case 1:
- case 4:
case 8:
case 16:
- ret = fbScreenInit(pScreen, FBStart,
- pScrn->virtualX, pScrn->virtualY,
- pScrn->xDpi, pScrn->yDpi,
- displayWidth, pScrn->bitsPerPixel);
- break;
case 24:
- if (pix24bpp == 24)
- ret = fbScreenInit(pScreen, FBStart,
+ ret = fbScreenInit(pScreen, FBStart,
pScrn->virtualX, pScrn->virtualY,
pScrn->xDpi, pScrn->yDpi,
displayWidth, pScrn->bitsPerPixel);
- else
- ret = cfb24_32ScreenInit(pScreen, FBStart,
- pScrn->virtualX, pScrn->virtualY,
- pScrn->xDpi, pScrn->yDpi,
- displayWidth);
break;
case 32:
if(pScrn->overlayFlags & OVERLAY_8_32_PLANAR)
@@ -2679,6 +2478,9 @@ GLINTScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
case PCI_VENDOR_3DLABS_CHIP_PERMEDIA2V:
Permedia2AccelInit(pScreen);
break;
+ case PCI_VENDOR_3DLABS_CHIP_PERMEDIA3:
+ Permedia3AccelInit(pScreen);
+ break;
case PCI_VENDOR_TI_CHIP_PERMEDIA:
case PCI_VENDOR_3DLABS_CHIP_PERMEDIA:
PermediaAccelInit(pScreen);
@@ -2694,6 +2496,9 @@ GLINTScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
TXAccelInit(pScreen);
}
break;
+ case PCI_VENDOR_3DLABS_CHIP_300SX:
+ SXAccelInit(pScreen);
+ break;
}
}
@@ -2705,6 +2510,7 @@ GLINTScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
/* Initialise cursor functions */
if (pGlint->HWCursor) {
+ /* Handle VGA chipsets first */
if ((pGlint->Chipset == PCI_VENDOR_3DLABS_CHIP_PERMEDIA2) ||
(pGlint->Chipset == PCI_VENDOR_TI_CHIP_PERMEDIA2))
Permedia2HWCursorInit(pScreen);
@@ -2712,15 +2518,17 @@ GLINTScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
if (pGlint->Chipset == PCI_VENDOR_3DLABS_CHIP_PERMEDIA2V)
Permedia2vHWCursorInit(pScreen);
else
- if ( ((pGlint->Chipset != PCI_VENDOR_3DLABS_CHIP_PERMEDIA2) &&
- (pGlint->Chipset != PCI_VENDOR_3DLABS_CHIP_PERMEDIA2V) &&
- (pGlint->Chipset != PCI_VENDOR_TI_CHIP_PERMEDIA2)) &&
- ((pGlint->RamDac->RamDacType == (IBM526DB_RAMDAC)) ||
+ if (pGlint->Chipset == PCI_VENDOR_3DLABS_CHIP_PERMEDIA3)
+ Permedia3HWCursorInit(pScreen);
+ else
+ /* If we get here pGlint->Ramdac should have been set */
+ if ( ((pGlint->RamDac->RamDacType == (IBM526DB_RAMDAC)) ||
(pGlint->RamDac->RamDacType == (IBM526_RAMDAC)) ||
(pGlint->RamDac->RamDacType == (IBM640_RAMDAC))) )
glintIBMHWCursorInit(pScreen);
else
- if (pGlint->RamDac->RamDacType == (TI3030_RAMDAC))
+ if ( (pGlint->RamDac->RamDacType == (TI3030_RAMDAC)) ||
+ (pGlint->RamDac->RamDacType == (TI3026_RAMDAC)) )
glintTIHWCursorInit(pScreen);
}
@@ -2729,6 +2537,7 @@ GLINTScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
return FALSE;
if ((pGlint->Chipset == PCI_VENDOR_3DLABS_CHIP_PERMEDIA2V) ||
+ (pGlint->Chipset == PCI_VENDOR_3DLABS_CHIP_PERMEDIA3) ||
(pGlint->Chipset == PCI_VENDOR_3DLABS_CHIP_PERMEDIA2) ||
(pGlint->Chipset == PCI_VENDOR_TI_CHIP_PERMEDIA2)) {
if (!xf86HandleColormaps(pScreen, 256, pScrn->rgbBits,
@@ -2822,27 +2631,31 @@ GLINTSwitchMode(int scrnIndex, DisplayModePtr mode, int flags)
Bool ret = fbdevHWSwitchMode(scrnIndex, mode, flags);
if (!pGlint->NoAccel) {
- switch (pGlint->Chipset) {
- case PCI_VENDOR_TI_CHIP_PERMEDIA2:
- case PCI_VENDOR_3DLABS_CHIP_PERMEDIA2:
- case PCI_VENDOR_3DLABS_CHIP_PERMEDIA2V:
- Permedia2InitializeEngine(pScrn);
- break;
- case PCI_VENDOR_TI_CHIP_PERMEDIA:
- case PCI_VENDOR_3DLABS_CHIP_PERMEDIA:
- PermediaInitializeEngine(pScrn);
- break;
- case PCI_VENDOR_3DLABS_CHIP_500TX:
- case PCI_VENDOR_3DLABS_CHIP_MX:
- case PCI_VENDOR_3DLABS_CHIP_GAMMA:
- if ( (pGlint->Chipset == PCI_VENDOR_3DLABS_CHIP_GAMMA) &&
- (pGlint->numMXDevices == 2) ) {
- DualMXInitializeEngine(pScrn);
- } else {
- TXInitializeEngine(pScrn);
- }
- break;
- }
+ switch (pGlint->Chipset) {
+ case PCI_VENDOR_TI_CHIP_PERMEDIA2:
+ case PCI_VENDOR_3DLABS_CHIP_PERMEDIA2:
+ case PCI_VENDOR_3DLABS_CHIP_PERMEDIA2V:
+ Permedia2InitializeEngine(pScrn);
+ break;
+ case PCI_VENDOR_3DLABS_CHIP_PERMEDIA3:
+ Permedia3InitializeEngine(pScrn);
+ break;
+ case PCI_VENDOR_TI_CHIP_PERMEDIA:
+ case PCI_VENDOR_3DLABS_CHIP_PERMEDIA:
+ PermediaInitializeEngine(pScrn);
+ break;
+ case PCI_VENDOR_3DLABS_CHIP_500TX:
+ case PCI_VENDOR_3DLABS_CHIP_300SX:
+ case PCI_VENDOR_3DLABS_CHIP_MX:
+ case PCI_VENDOR_3DLABS_CHIP_GAMMA:
+ if ((pGlint->Chipset == PCI_VENDOR_3DLABS_CHIP_GAMMA) &&
+ (pGlint->numMXDevices == 2)) {
+ DualMXInitializeEngine(pScrn);
+ } else {
+ TXInitializeEngine(pScrn);
+ }
+ break;
+ }
}
return ret;
@@ -2887,6 +2700,7 @@ GLINTAdjustFrame(int scrnIndex, int x, int y, int flags)
case PCI_VENDOR_TI_CHIP_PERMEDIA2:
case PCI_VENDOR_3DLABS_CHIP_PERMEDIA2:
case PCI_VENDOR_3DLABS_CHIP_PERMEDIA2V:
+ case PCI_VENDOR_3DLABS_CHIP_PERMEDIA3:
GLINT_SLOW_WRITE_REG(base, PMScreenBase);
break;
}
@@ -2905,22 +2719,23 @@ static Bool
GLINTEnterVT(int scrnIndex, int flags)
{
ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
+ GLINTPtr pGlint = GLINTPTR(pScrn);
- /* Should we re-save the text mode on each VT enter? */
- if (!GLINTModeInit(pScrn, pScrn->currentMode))
- return FALSE;
+ TRACE_ENTER("GLINTEnterVT");
- return TRUE;
-}
-
-static Bool
-GLINTEnterVTFBDev(int scrnIndex, int flags)
-{
- ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
- GLINTPtr pGlint = GLINTPTR(pScrn);
+ if (pGlint->FBDev)
+ fbdevHWEnterVT(scrnIndex, flags);
+ else
+ /* Should we re-save the text mode on each VT enter? */
+ if (!GLINTModeInit(pScrn, pScrn->currentMode))
+ return FALSE;
- TRACE_ENTER("GLINTEnterVTFBDev");
- fbdevHWEnterVT(scrnIndex, flags);
+ switch (pGlint->Chipset) {
+ case PCI_VENDOR_TI_CHIP_PERMEDIA2:
+ case PCI_VENDOR_3DLABS_CHIP_PERMEDIA2:
+ case PCI_VENDOR_3DLABS_CHIP_PERMEDIA2V:
+ Permedia2VideoEnterVT(pScrn);
+ }
if (!pGlint->NoAccel) {
switch (pGlint->Chipset) {
@@ -2929,11 +2744,15 @@ GLINTEnterVTFBDev(int scrnIndex, int flags)
case PCI_VENDOR_3DLABS_CHIP_PERMEDIA2V:
Permedia2InitializeEngine(pScrn);
break;
+ case PCI_VENDOR_3DLABS_CHIP_PERMEDIA3:
+ Permedia3InitializeEngine(pScrn);
+ break;
case PCI_VENDOR_TI_CHIP_PERMEDIA:
case PCI_VENDOR_3DLABS_CHIP_PERMEDIA:
PermediaInitializeEngine(pScrn);
break;
case PCI_VENDOR_3DLABS_CHIP_500TX:
+ case PCI_VENDOR_3DLABS_CHIP_300SX:
case PCI_VENDOR_3DLABS_CHIP_MX:
case PCI_VENDOR_3DLABS_CHIP_GAMMA:
if ( (pGlint->Chipset == PCI_VENDOR_3DLABS_CHIP_GAMMA) &&
@@ -3000,7 +2819,7 @@ GLINTCloseScreen(int scrnIndex, ScreenPtr pScreen)
case PCI_VENDOR_TI_CHIP_PERMEDIA2:
case PCI_VENDOR_3DLABS_CHIP_PERMEDIA2:
case PCI_VENDOR_3DLABS_CHIP_PERMEDIA2V:
- Permedia2VideoUninit(xf86Screens[scrnIndex]);
+ Permedia2VideoUninit(pScrn);
}
if (pScrn->vtSema) {
@@ -3021,6 +2840,8 @@ GLINTCloseScreen(int scrnIndex, ScreenPtr pScreen)
xf86DestroyCursorInfoRec(pGlint->CursorInfoRec);
if (pGlint->ShadowPtr)
xfree(pGlint->ShadowPtr);
+ if (pGlint->DGAModes)
+ xfree(pGlint->DGAModes);
pScrn->vtSema = FALSE;
if (xf86IsPc98())
@@ -3042,7 +2863,7 @@ GLINTFreeScreen(int scrnIndex, int flags)
GLINTPtr pGlint = GLINTPTR(pScrn);
TRACE_ENTER("GLINTFreeScreen");
- if (pGlint->FBDev && xf86LoaderCheckSymbol("fbdevHWFreeRec"))
+ if ((pGlint->FBDev || FBDevProbed) && xf86LoaderCheckSymbol("fbdevHWFreeRec"))
fbdevHWFreeRec(xf86Screens[scrnIndex]);
if (pGlint->VGAcore && xf86LoaderCheckSymbol("vgaHWFreeHWRec"))
vgaHWFreeHWRec(xf86Screens[scrnIndex]);
@@ -3070,6 +2891,7 @@ GLINTValidMode(int scrnIndex, DisplayModePtr mode, Bool verbose, int flags)
* side appears if not aligned properly */
switch (pGlint->Chipset) {
case PCI_VENDOR_TI_CHIP_PERMEDIA2:
+ case PCI_VENDOR_3DLABS_CHIP_PERMEDIA3:
case PCI_VENDOR_3DLABS_CHIP_PERMEDIA2V:
case PCI_VENDOR_3DLABS_CHIP_PERMEDIA2:
if (mode->HDisplay % 8) {
@@ -3124,15 +2946,17 @@ GLINTSaveScreen(ScreenPtr pScreen, int mode)
switch (pGlint->Chipset) {
case PCI_VENDOR_TI_CHIP_PERMEDIA2:
case PCI_VENDOR_TI_CHIP_PERMEDIA:
+ case PCI_VENDOR_3DLABS_CHIP_PERMEDIA3:
case PCI_VENDOR_3DLABS_CHIP_PERMEDIA2V:
case PCI_VENDOR_3DLABS_CHIP_PERMEDIA2:
case PCI_VENDOR_3DLABS_CHIP_PERMEDIA:
temp = GLINT_READ_REG(PMVideoControl);
if (unblank) temp |= 1;
else temp &= 0xFFFFFFFE;
- GLINT_WRITE_REG(temp, PMVideoControl);
+ GLINT_SLOW_WRITE_REG(temp, PMVideoControl);
break;
case PCI_VENDOR_3DLABS_CHIP_500TX:
+ case PCI_VENDOR_3DLABS_CHIP_300SX:
case PCI_VENDOR_3DLABS_CHIP_MX:
break;
}
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/glint/glint_regs.h b/xc/programs/Xserver/hw/xfree86/drivers/glint/glint_regs.h
index 489bf8eed..a1c5e5914 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/glint/glint_regs.h
+++ b/xc/programs/Xserver/hw/xfree86/drivers/glint/glint_regs.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/glint/glint_regs.h,v 1.15 2000/03/07 01:37:47 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/glint/glint_regs.h,v 1.19 2000/05/10 20:01:31 alanh Exp $ */
/*
* glint register file
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/glint/pm2_accel.c b/xc/programs/Xserver/hw/xfree86/drivers/glint/pm2_accel.c
index b728093d7..ad4277b03 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/glint/pm2_accel.c
+++ b/xc/programs/Xserver/hw/xfree86/drivers/glint/pm2_accel.c
@@ -30,7 +30,7 @@
*
* Permedia 2 accelerated options.
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/glint/pm2_accel.c,v 1.23 2000/02/25 21:02:50 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/glint/pm2_accel.c,v 1.24 2000/03/31 22:55:43 dawes Exp $ */
#include "Xarch.h"
#include "xf86.h"
@@ -288,8 +288,11 @@ Permedia2AccelInit(ScreenPtr pScreen)
infoPtr->PolylinesThinSolidFlags = 0;
infoPtr->SetupForSolidLine = Permedia2SetupForSolidLine;
infoPtr->SubsequentSolidHorVertLine = Permedia2SubsequentHorVertLine;
- infoPtr->SubsequentSolidBresenhamLine =
+ if (!(pScrn->overlayFlags & OVERLAY_8_32_PLANAR))
+ {
+ infoPtr->SubsequentSolidBresenhamLine =
Permedia2SubsequentSolidBresenhamLine;
+ }
infoPtr->PolySegmentThinSolid = Permedia2PolySegmentThinSolidWrapper;
infoPtr->PolylinesThinSolid = Permedia2PolylinesThinSolidWrapper;
infoPtr->SetupForSolidFill = Permedia2SetupForFillRectSolid;
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/glint/tx_accel.c b/xc/programs/Xserver/hw/xfree86/drivers/glint/tx_accel.c
index 0604fa045..3260c7bda 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/glint/tx_accel.c
+++ b/xc/programs/Xserver/hw/xfree86/drivers/glint/tx_accel.c
@@ -28,7 +28,7 @@
*
* GLINT 500TX / MX accelerated options.
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/glint/tx_accel.c,v 1.19 2000/01/21 01:12:18 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/glint/tx_accel.c,v 1.22 2000/05/10 20:01:32 alanh Exp $ */
#include "xf86.h"
#include "xf86_OSproc.h"
@@ -209,8 +209,11 @@ TXAccelInit(ScreenPtr pScreen)
infoPtr->PolylinesThinSolidFlags = 0;
infoPtr->SetupForSolidLine = TXSetupForSolidLine;
infoPtr->SubsequentSolidHorVertLine = TXSubsequentHorVertLine;
- infoPtr->SubsequentSolidBresenhamLine =
+ if (!(pScrn->overlayFlags & OVERLAY_8_32_PLANAR))
+ {
+ infoPtr->SubsequentSolidBresenhamLine =
TXSubsequentSolidBresenhamLine;
+ }
infoPtr->PolySegmentThinSolid = TXPolySegmentThinSolidWrapper;
infoPtr->PolylinesThinSolid = TXPolylinesThinSolidWrapper;
@@ -282,6 +285,7 @@ static void TXLoadCoord(
){
GLINTPtr pGlint = GLINTPTR(pScrn);
+#ifndef XF86DRI
if (w != pGlint->startxsub) {
GLINT_WRITE_REG(w<<16, StartXSub);
pGlint->startxsub = w;
@@ -306,6 +310,20 @@ static void TXLoadCoord(
GLINT_WRITE_REG(d<<16,dY);
pGlint->dy = d;
}
+#else
+ GLINT_WRITE_REG(w<<16, StartXSub);
+ pGlint->startxsub = w;
+ GLINT_WRITE_REG(x<<16,StartXDom);
+ pGlint->startxdom = x;
+ GLINT_WRITE_REG(y<<16,StartY);
+ pGlint->starty = y;
+ GLINT_WRITE_REG(h,GLINTCount);
+ pGlint->count = h;
+ GLINT_WRITE_REG(a<<16,dXDom);
+ pGlint->dxdom = a;
+ GLINT_WRITE_REG(d<<16,dY);
+ pGlint->dy = d;
+#endif
}
static void MoveDWORDS(
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/i740/i740.cpp b/xc/programs/Xserver/hw/xfree86/drivers/i740/i740.cpp
index 41150123e..9cced26d4 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/i740/i740.cpp
+++ b/xc/programs/Xserver/hw/xfree86/drivers/i740/i740.cpp
@@ -1,17 +1,17 @@
-.\" $XFree86: xc/programs/Xserver/hw/xfree86/drivers/i740/i740.cpp,v 1.1 2000/03/03 01:05:38 dawes Exp $
-.TH I740 __drivermansuffix__ "Version 4.0" "XFree86"
+.\" $XFree86: xc/programs/Xserver/hw/xfree86/drivers/i740/i740.cpp,v 1.4 2000/06/14 02:13:10 dawes Exp $
+.\" shorthand for double quote that works everywhere.
+.ds q \N'34'
+.TH I740 __drivermansuffix__ "Version 4.0.1" "XFree86"
.SH NAME
i740 \- Intel i740 video driver
.SH SYNOPSIS
-.B "Section ""Device"""
-.br
-.BI " Identifier """ devname """"
-.br
-.B " Driver ""i740"""
-.br
+.nf
+.B "Section \*qDevice\*q"
+.BI " Identifier \*q" devname \*q
+.B " Driver \*qi740\*q"
\ \ ...
-.br
.B EndSection
+.fi
.SH DESCRIPTION
.B i740
is an XFree86 driver for Intel i740 video cards.
@@ -25,6 +25,6 @@ Please refer to XF86Config(__filemansuffix__) for general configuration
details. This section only covers configuration details specific to this
driver.
.SH "SEE ALSO"
-XFree86(1), XF86Config(__filemansuffix__), xf86config(1), Xserver(1), X(1)
+XFree86(1), XF86Config(__filemansuffix__), xf86config(1), Xserver(1), X(__miscmansuffix__)
.SH AUTHORS
Authors include: ...
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/i810/Imakefile b/xc/programs/Xserver/hw/xfree86/drivers/i810/Imakefile
index 472f4d52a..c40e94225 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/i810/Imakefile
+++ b/xc/programs/Xserver/hw/xfree86/drivers/i810/Imakefile
@@ -1,4 +1,4 @@
-XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/drivers/i810/Imakefile,v 1.4 2000/03/03 01:05:38 dawes Exp $
+XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/drivers/i810/Imakefile,v 1.9 2000/06/30 17:15:11 dawes Exp $
XCOMM
XCOMM This is the Imakefile for the i810 driver.
XCOMM
@@ -15,10 +15,10 @@ DRIDEFINES = $(GLX_DEFINES)
#endif
SRCS = i810_driver.c i810_cursor.c i810_accel.c i810_io.c \
- i810_memory.c i810_wmark.c $(DRISRCS)
+ i810_memory.c i810_wmark.c i810_dga.c $(DRISRCS)
OBJS = i810_driver.o i810_cursor.o i810_accel.o i810_io.o \
- i810_memory.o i810_wmark.o $(DRIOBJS)
+ i810_memory.o i810_wmark.o i810_dga.o $(DRIOBJS)
#if defined(XF86DriverSDK)
INCLUDES = -I. -I../../include
@@ -28,7 +28,7 @@ INCLUDES = -I. -I$(XF86COMSRC) -I$(XF86OSSRC) \
-I$(XF86SRC)/xaa -I$(XF86SRC)/rac \
-I$(SERVERSRC)/cfb -I$(XF86SRC)/xaa -I$(XF86SRC)/ramdac \
-I$(XF86SRC)/vgahw -I$(XF86SRC)/ddc -I$(XF86SRC)/i2c \
- -I$(SERVERSRC)/Xext \
+ -I$(SERVERSRC)/Xext -I$(XF86SRC)/xf24_32bpp \
-I$(FONTINCSRC) -I$(SERVERSRC)/include -I$(XINCLUDESRC) \
-I$(EXTINCSRC) \
$(DRIINCLUDES)
@@ -57,12 +57,12 @@ InstallDriverSDKNonExecFile(i810.h,$(DRIVERSDKDIR)/drivers/i810)
InstallDriverSDKNonExecFile(i810_accel.c,$(DRIVERSDKDIR)/drivers/i810)
InstallDriverSDKNonExecFile(i810_cursor.c,$(DRIVERSDKDIR)/drivers/i810)
InstallDriverSDKNonExecFile(i810_driver.c,$(DRIVERSDKDIR)/drivers/i810)
+InstallDriverSDKNonExecFile(i810_dga.c,$(DRIVERSDKDIR)/drivers/i810)
InstallDriverSDKNonExecFile(i810_dri.c,$(DRIVERSDKDIR)/drivers/i810)
InstallDriverSDKNonExecFile(i810_dri.h,$(DRIVERSDKDIR)/drivers/i810)
InstallDriverSDKNonExecFile(i810_io.c,$(DRIVERSDKDIR)/drivers/i810)
InstallDriverSDKNonExecFile(i810_memory.c,$(DRIVERSDKDIR)/drivers/i810)
InstallDriverSDKNonExecFile(i810_wmark.c,$(DRIVERSDKDIR)/drivers/i810)
-InstallDriverSDKNonExecFile(i810_macros.h,$(DRIVERSDKDIR)/drivers/i810)
InstallDriverSDKNonExecFile(i810_reg.h,$(DRIVERSDKDIR)/drivers/i810)
InstallDriverSDKObjectModule(i810,$(DRIVERSDKMODULEDIR),drivers)
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/i810/i810.cpp b/xc/programs/Xserver/hw/xfree86/drivers/i810/i810.cpp
index 2587db57d..88a1c572b 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/i810/i810.cpp
+++ b/xc/programs/Xserver/hw/xfree86/drivers/i810/i810.cpp
@@ -1,17 +1,17 @@
-.\" $XFree86: xc/programs/Xserver/hw/xfree86/drivers/i810/i810.cpp,v 1.1 2000/03/03 01:05:39 dawes Exp $
-.TH I810 __drivermansuffix__ "Version 4.0" "XFree86"
+.\" $XFree86: xc/programs/Xserver/hw/xfree86/drivers/i810/i810.cpp,v 1.4 2000/06/14 02:13:10 dawes Exp $
+.\" shorthand for double quote that works everywhere.
+.ds q \N'34'
+.TH I810 __drivermansuffix__ "Version 4.0.1" "XFree86"
.SH NAME
i810 \- Intel i810 video driver
.SH SYNOPSIS
-.B "Section ""Device"""
-.br
-.BI " Identifier """ devname """"
-.br
-.B " Driver ""i810"""
-.br
+.nf
+.B "Section \*qDevice\*q"
+.BI " Identifier \*q" devname \*q
+.B " Driver \*qi810\*q"
\ \ ...
-.br
.B EndSection
+.fi
.SH DESCRIPTION
.B i810
is an XFree86 driver for Intel i810 video cards.
@@ -25,6 +25,6 @@ Please refer to XF86Config(__filemansuffix__) for general configuration
details. This section only covers configuration details specific to this
driver.
.SH "SEE ALSO"
-XFree86(1), XF86Config(__filemansuffix__), xf86config(1), Xserver(1), X(1)
+XFree86(1), XF86Config(__filemansuffix__), xf86config(1), Xserver(1), X(__miscmansuffix__)
.SH AUTHORS
Authors include: ...
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/i810/i810.h b/xc/programs/Xserver/hw/xfree86/drivers/i810/i810.h
index 030b66a91..6b6a13f94 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/i810/i810.h
+++ b/xc/programs/Xserver/hw/xfree86/drivers/i810/i810.h
@@ -25,7 +25,7 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
**************************************************************************/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/i810/i810.h,v 1.4 2000/03/02 16:07:48 martin Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/i810/i810.h,v 1.9 2000/06/22 17:44:03 alanh Exp $ */
/*
* Authors:
@@ -61,16 +61,15 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define I810_MINOR_VERSION 0
#define I810_PATCHLEVEL 0
-
/* Globals */
typedef struct _I810Rec *I810Ptr;
-typedef void (*I810WriteIndexedByteFunc)(I810Ptr pI810, int addr,
- char index, char value);
-typedef char (*I810ReadIndexedByteFunc)(I810Ptr pI810, int addr, char index);
-typedef void (*I810WriteByteFunc)(I810Ptr pI810, int addr, char value);
-typedef char (*I810ReadByteFunc)(I810Ptr pI810, int addr);
+typedef void (*I810WriteIndexedByteFunc)(I810Ptr pI810, int addr,
+ CARD8 index, CARD8 value);
+typedef CARD8 (*I810ReadIndexedByteFunc)(I810Ptr pI810, int addr, CARD8 index);
+typedef void (*I810WriteByteFunc)(I810Ptr pI810, int addr, CARD8 value);
+typedef CARD8 (*I810ReadByteFunc)(I810Ptr pI810, int addr);
extern void I810SetTiledMemory(ScrnInfoPtr pScrn,
@@ -91,7 +90,7 @@ typedef struct {
typedef struct {
int tail_mask;
I810MemRange mem;
- char *virtual_start;
+ unsigned char *virtual_start;
int head;
int tail;
int space;
@@ -152,6 +151,11 @@ typedef struct _I810Rec {
int CursorPhysical;
int CursorStart;
+ DGAModePtr DGAModes;
+ int numDGAModes;
+ Bool DGAactive;
+ int DGAViewportStatus;
+
int Chipset;
int LinearAddr;
int MMIOAddr;
@@ -242,7 +246,8 @@ extern void I810SetCursorPosition(ScrnInfoPtr pScrn, int x, int y);
extern int I810AllocateGARTMemory( ScrnInfoPtr pScrn );
extern void I810FreeGARTMemory( ScrnInfoPtr pScrn );
-
+extern Bool I810SwitchMode(int scrnIndex, DisplayModePtr mode, int flags);
+extern void I810AdjustFrame(int scrnIndex, int x, int y, int flags);
extern void I810SetupForScreenToScreenCopy(ScrnInfoPtr pScrn, int xdir,
int ydir, int rop,
@@ -281,7 +286,7 @@ extern void I810EmitInvarientState(ScrnInfoPtr pScrn);
#define BEGIN_LP_RING(n) \
unsigned int outring, ringmask; \
- volatile char *virt; \
+ volatile unsigned char *virt; \
if (n>2 && (I810_DEBUG&DEBUG_ALWAYS_SYNC)) I810Sync( pScrn ); \
if (pI810->LpRing.space < n*4) I810WaitLpRing( pScrn, n*4, 0); \
pI810->LpRing.space -= n*4; \
@@ -338,6 +343,25 @@ extern int I810_DEBUG;
*/
#define I810_REG_SIZE 0x80000
+
+#ifndef PCI_CHIP_I810
+#define PCI_CHIP_I810 0x7121
+#define PCI_CHIP_I810_DC100 0x7123
+#define PCI_CHIP_I810_E 0x7125
+#define PCI_CHIP_I815 0x1132
+#define PCI_CHIP_I810_BRIDGE 0x7120
+#define PCI_CHIP_I810_DC100_BRIDGE 0x7122
+#define PCI_CHIP_I810_E_BRIDGE 0x7124
+#define PCI_CHIP_I815_BRIDGE 0x1130
+#endif
+
+
+#define IS_I810(pI810) (pI810->PciInfo->chipType == PCI_CHIP_I810 || \
+ pI810->PciInfo->chipType == PCI_CHIP_I810_DC100 || \
+ pI810->PciInfo->chipType == PCI_CHIP_I810_E)
+#define IS_I815(pI810) (pI810->PciInfo->chipType == PCI_CHIP_I815)
+
+
#endif
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_accel.c b/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_accel.c
index 1a410bcd1..c1980187b 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_accel.c
+++ b/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_accel.c
@@ -25,6 +25,7 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
**************************************************************************/
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/i810/i810_accel.c,v 1.5 2000/06/17 18:23:23 dawes Exp $ */
/*
* Authors:
@@ -271,7 +272,7 @@ I810WaitLpRing( ScrnInfoPtr pScrn, int n, int timeout_millis )
DRICloseScreen(screenInfo.screens[pScrn->scrnIndex]);
}
#endif
- pI810->AccelInfoRec = NULL; /* Stops recursive behavior */
+ pI810->AccelInfoRec = NULL; /* Stops recursive behavior */
FatalError("lockup\n");
}
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_dri.c b/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_dri.c
index 971765569..ebaeba30d 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_dri.c
+++ b/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_dri.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/i810/i810_dri.c,v 1.3 1999/09/27 06:29:57 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/i810/i810_dri.c,v 1.6 2000/06/23 23:43:44 alanh Exp $ */
#include "xf86.h"
#include "xf86_OSproc.h"
@@ -229,13 +229,16 @@ Bool I810DRIScreenInit(ScreenPtr pScreen)
if (pScrn->bitsPerPixel != 16)
return FALSE;
-#if XFree86LOADER
/* Check that the GLX, DRI, and DRM modules have been loaded by testing
* for known symbols in each module. */
- if (!LoaderSymbol("GlxSetVisualConfigs")) return FALSE;
- if (!LoaderSymbol("DRIScreenInit")) return FALSE;
- if (!LoaderSymbol("drmAvailable")) return FALSE;
-#endif
+ if (!xf86LoaderCheckSymbol("GlxSetVisualConfigs")) return FALSE;
+ if (!xf86LoaderCheckSymbol("DRIScreenInit")) return FALSE;
+ if (!xf86LoaderCheckSymbol("drmAvailable")) return FALSE;
+ if (!xf86LoaderCheckSymbol("DRIQueryVersion")) {
+ xf86DrvMsg(pScreen->myNum, X_ERROR,
+ "TDFXDRIScreenInit failed (libdri.a too old)\n");
+ return FALSE;
+ }
/* Check the DRI version */
{
@@ -377,9 +380,9 @@ Bool I810DRIScreenInit(ScreenPtr pScreen)
return FALSE;
}
- xf86memset (&pI810->DcacheMem, 0, sizeof(I810MemRange));
- xf86memset (&pI810->BackBuffer, 0, sizeof(I810MemRange));
- xf86memset (&pI810->DepthBuffer, 0, sizeof(I810MemRange));
+ memset (&pI810->DcacheMem, 0, sizeof(I810MemRange));
+ memset (&pI810->BackBuffer, 0, sizeof(I810MemRange));
+ memset (&pI810->DepthBuffer, 0, sizeof(I810MemRange));
pI810->CursorPhysical = 0;
/* Dcache - half the speed of normal ram, but has use as a Z buffer
@@ -443,7 +446,7 @@ Bool I810DRIScreenInit(ScreenPtr pScreen)
if (dcacheHandle != 0) {
/* The Z buffer is always aligned to the 48 mb mark in the aperture */
if(drmAgpBind(pI810->drmSubFD, dcacheHandle, 48*1024*1024) == 0) {
- xf86memset (&pI810->DcacheMem, 0, sizeof(I810MemRange));
+ memset (&pI810->DcacheMem, 0, sizeof(I810MemRange));
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"GART: Found 4096K Z buffer memory\n");
pI810->DcacheMem.Start = 48*1024*1024;
@@ -790,7 +793,7 @@ Bool
I810DRIFinishScreenInit(ScreenPtr pScreen)
{
I810SAREARec *sPriv = (I810SAREARec *)DRIGetSAREAPrivate(pScreen);
- xf86memset( sPriv, 0, sizeof(sPriv) );
+ memset( sPriv, 0, sizeof(sPriv) );
return DRIFinishScreenInit(pScreen);
}
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_dri.h b/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_dri.h
index 506227222..00530f3a1 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_dri.h
+++ b/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_dri.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/i810/i810_dri.h,v 1.2 2000/03/02 16:07:49 martin Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/i810/i810_dri.h,v 1.3 2000/06/17 00:03:18 martin Exp $ */
#ifndef _I810_DRI_
#define _I810_DRI_
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_driver.c b/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_driver.c
index 6d4c8aafb..79d1301cb 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_driver.c
+++ b/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_driver.c
@@ -25,7 +25,7 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
**************************************************************************/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/i810/i810_driver.c,v 1.7 2000/03/02 16:07:50 martin Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/i810/i810_driver.c,v 1.15 2000/06/22 17:44:04 alanh Exp $ */
/*
* Authors:
@@ -64,11 +64,13 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "cfb16.h"
#include "cfb24.h"
#include "cfb32.h"
-#include "i810.h"
+#include "cfb24_32.h"
#include "miscstruct.h"
#include "xf86xv.h"
#include "Xv.h"
+#include "i810.h"
+
#ifdef XF86DRI
#include "dri.h"
#endif
@@ -83,8 +85,6 @@ static Bool I810EnterVT(int scrnIndex, int flags);
static void I810LeaveVT(int scrnIndex, int flags);
static Bool I810CloseScreen(int scrnIndex, ScreenPtr pScreen);
static Bool I810SaveScreen(ScreenPtr pScreen, Bool unblank);
-static Bool I810SwitchMode(int scrnIndex, DisplayModePtr mode, int flags);
-static void I810AdjustFrame(int scrnIndex, int x, int y, int flags);
static void I810FreeScreen(int scrnIndex, int flags);
static int I810ValidMode(int scrnIndex, DisplayModePtr mode, Bool
verbose, int flags);
@@ -104,20 +104,12 @@ DriverRec I810 = {
0
};
-#ifndef PCI_CHIP_I810
-#define PCI_CHIP_I810 0x7121
-#define PCI_CHIP_I810_DC100 0x7123
-#define PCI_CHIP_I810_E 0x7125
-#define PCI_CHIP_I810_BRIDGE 0x7120
-#define PCI_CHIP_I810_DC100_BRIDGE 0x7122
-#define PCI_CHIP_I810_E_BRIDGE 0x7124
-#endif
-
/* Chipsets */
static SymTabRec I810Chipsets[] = {
{ PCI_CHIP_I810, "i810"},
{ PCI_CHIP_I810_DC100, "i810-dc100"},
{ PCI_CHIP_I810_E, "i810e"},
+ { PCI_CHIP_I815, "i815"},
{ -1, NULL }
};
@@ -125,6 +117,7 @@ static PciChipsets I810PciChipsets[] = {
{ PCI_CHIP_I810, PCI_CHIP_I810, RES_SHARED_VGA },
{ PCI_CHIP_I810_DC100, PCI_CHIP_I810_DC100, RES_SHARED_VGA },
{ PCI_CHIP_I810_E, PCI_CHIP_I810_E, RES_SHARED_VGA },
+ { PCI_CHIP_I815, PCI_CHIP_I815, RES_SHARED_VGA },
{ -1, -1, RES_UNDEFINED }
};
@@ -197,6 +190,11 @@ static const char *ramdacSymbols[] = {
NULL
};
+/*
+ * This is intentionally screen-independent. It indicates the binding
+ * choice made in the first PreInit.
+ */
+static int pix24bpp = 0;
#ifdef XF86DRI
static const char *drmSymbols[] = {
@@ -213,6 +211,8 @@ static const char *drmSymbols[] = {
"drmAgpBind",
"drmI810CleanupDma",
"drmI810InitDma",
+ "drmFreeVersion",
+ "drmGetVersion",
NULL
};
@@ -229,6 +229,7 @@ static const char *driSymbols[] = {
"DRIUnlock",
"DRIGetSAREAPrivate",
"DRIGetContext",
+ "DRIQueryVersion",
"GlxSetVisualConfigs",
NULL
};
@@ -369,7 +370,6 @@ I810Probe(DriverPtr drv, int flags) {
int i, numUsed, numDevSections, *usedChips;
GDevPtr *devSections;
Bool foundScreen = 0;
- EntityInfoPtr pEnt;
/*
Find the config file Device sections that match this
@@ -392,32 +392,24 @@ I810Probe(DriverPtr drv, int flags) {
drv, &usedChips);
for (i=0; i<numUsed; i++) {
- pEnt = xf86GetEntityInfo(usedChips[i]);
-
- if (pEnt->active) {
- ScrnInfoPtr pScrn;
-
- /* Allocate new ScrnInfoRec and claim the slot */
- pScrn = xf86AllocateScreen(drv, 0);
-
- pScrn->driverVersion = I810_VERSION;
- pScrn->driverName = I810_DRIVER_NAME;
- pScrn->name = I810_NAME;
- pScrn->Probe = I810Probe;
- pScrn->PreInit = I810PreInit;
- pScrn->ScreenInit = I810ScreenInit;
- pScrn->SwitchMode = I810SwitchMode;
- pScrn->AdjustFrame = I810AdjustFrame;
- pScrn->EnterVT = I810EnterVT;
- pScrn->LeaveVT = I810LeaveVT;
- pScrn->FreeScreen = I810FreeScreen;
- pScrn->ValidMode = I810ValidMode;
- foundScreen = TRUE;
-
- xf86ConfigActivePciEntity(pScrn, usedChips[i], I810PciChipsets,
- 0, 0, 0, 0, 0);
+ ScrnInfoPtr pScrn = NULL;
+ /* Allocate new ScrnInfoRec and claim the slot */
+ if ((pScrn = xf86ConfigPciEntity(pScrn, 0, usedChips[i],
+ I810PciChipsets, 0, 0, 0, 0, 0))){
+ pScrn->driverVersion = I810_VERSION;
+ pScrn->driverName = I810_DRIVER_NAME;
+ pScrn->name = I810_NAME;
+ pScrn->Probe = I810Probe;
+ pScrn->PreInit = I810PreInit;
+ pScrn->ScreenInit = I810ScreenInit;
+ pScrn->SwitchMode = I810SwitchMode;
+ pScrn->AdjustFrame = I810AdjustFrame;
+ pScrn->EnterVT = I810EnterVT;
+ pScrn->LeaveVT = I810LeaveVT;
+ pScrn->FreeScreen = I810FreeScreen;
+ pScrn->ValidMode = I810ValidMode;
+ foundScreen = TRUE;
}
- xfree(pEnt);
}
if (numUsed) xfree(usedChips);
@@ -475,7 +467,7 @@ I810PreInit(ScrnInfoPtr pScrn, int flags) {
/* No support for 32bpp.
*/
- flags24=Support24bppFb | PreferConvert32to24;
+ flags24=Support24bppFb | PreferConvert32to24 | SupportConvert32to24;
if (!xf86SetDepthBpp(pScrn, 8, 8, 8, flags24)) {
return FALSE;
} else {
@@ -493,6 +485,9 @@ I810PreInit(ScrnInfoPtr pScrn, int flags) {
}
xf86PrintDepthBpp(pScrn);
+ /* Get the depth24 pixmap format */
+ if (pScrn->depth == 24 && pix24bpp == 0)
+ pix24bpp = xf86GetBppFromDepth(pScrn, 24);
pScrn->rgbBits=8;
if (xf86ReturnOptValBool(I810Options, OPTION_DAC_6BIT, FALSE))
@@ -674,7 +669,7 @@ I810PreInit(ScrnInfoPtr pScrn, int flags) {
pI810->MaxClock = 86000;
}
}
- clockRanges = xnfalloc(sizeof(ClockRange));
+ clockRanges = xnfcalloc(sizeof(ClockRange), 1);
clockRanges->next=NULL;
clockRanges->minClock= 12000; /* !!! What's the min clock? !!! */
clockRanges->maxClock=pI810->MaxClock;
@@ -724,8 +719,13 @@ I810PreInit(ScrnInfoPtr pScrn, int flags) {
reqSym = "cfb16ScreenInit";
break;
case 24:
- mod = "cfb24";
- reqSym = "cfb24ScreenInit";
+ if (pix24bpp == 24) {
+ mod = "cfb24";
+ reqSym = "cfb24ScreenInit";
+ } else {
+ mod = "xf24_32bpp";
+ reqSym = "cfb24_32ScreenInit";
+ }
break;
case 32:
mod = "cfb32";
@@ -1508,7 +1508,7 @@ I810AllocateFront(ScrnInfoPtr pScrn) {
if(pI810->DoneFrontAlloc)
return TRUE;
- xf86memset(&(pI810->FbMemBox), 0, sizeof(BoxRec));
+ memset(&(pI810->FbMemBox), 0, sizeof(BoxRec));
/* Alloc FrontBuffer/Ring/Accel memory */
pI810->FbMemBox.x1=0;
pI810->FbMemBox.x2=pScrn->displayWidth;
@@ -1531,7 +1531,7 @@ I810AllocateFront(ScrnInfoPtr pScrn) {
pI810->FbMemBox.y2 *
pI810->cpp) + 4095) & ~4095);
- xf86memset( &(pI810->LpRing), 0, sizeof( I810RingBuffer ) );
+ memset( &(pI810->LpRing), 0, sizeof( I810RingBuffer ) );
if(I810AllocLow( &(pI810->LpRing.mem), &(pI810->SysMem), 16*4096 )) {
if (I810_DEBUG & DEBUG_VERBOSE_MEMORY)
ErrorF( "ring buffer at local %lx\n",
@@ -1637,11 +1637,19 @@ I810ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) {
return FALSE;
break;
case 24:
- if (!cfb24ScreenInit(pScreen, pI810->FbBase + pScrn->fbOffset,
- pScrn->virtualX, pScrn->virtualY,
- pScrn->xDpi, pScrn->yDpi,
- pScrn->displayWidth))
- return FALSE;
+ if (pix24bpp == 24) {
+ if (!cfb24ScreenInit(pScreen, pI810->FbBase + pScrn->fbOffset,
+ pScrn->virtualX, pScrn->virtualY,
+ pScrn->xDpi, pScrn->yDpi,
+ pScrn->displayWidth))
+ return FALSE;
+ } else {
+ if (!cfb24_32ScreenInit(pScreen, pI810->FbBase + pScrn->fbOffset,
+ pScrn->virtualX, pScrn->virtualY,
+ pScrn->xDpi, pScrn->yDpi,
+ pScrn->displayWidth))
+ return FALSE;
+ }
break;
case 32:
if (!cfb32ScreenInit(pScreen, pI810->FbBase + pScrn->fbOffset,
@@ -1659,6 +1667,8 @@ I810ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) {
xf86SetBlackWhitePixels(pScreen);
+ I810DGAInit(pScreen);
+
if (pScrn->bitsPerPixel>8) {
visual = pScreen->visuals + pScreen->numVisuals;
while (--visual >= pScreen->visuals) {
@@ -1709,7 +1719,7 @@ I810ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) {
}
}
#endif
-
+
#ifdef XF86DRI
if (!pI810->directRenderingEnabled) {
pI810->DoneFrontAlloc = FALSE;
@@ -1718,8 +1728,8 @@ I810ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) {
I810AllocateFront(pScrn);
}
#endif
-
+
if (!xf86InitFBManager(pScreen, &(pI810->FbMemBox))) {
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
"Failed to init memory manager\n");
@@ -1780,7 +1790,7 @@ I810ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) {
return TRUE;
}
-static Bool
+Bool
I810SwitchMode(int scrnIndex, DisplayModePtr mode, int flags) {
ScrnInfoPtr pScrn =xf86Screens[scrnIndex];
@@ -1790,7 +1800,7 @@ I810SwitchMode(int scrnIndex, DisplayModePtr mode, int flags) {
return I810ModeInit(pScrn, mode);
}
-static void
+void
I810AdjustFrame(int scrnIndex, int x, int y, int flags) {
ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
I810Ptr pI810 = I810PTR(pScrn);
@@ -1834,11 +1844,12 @@ I810AdjustFrame(int scrnIndex, int x, int y, int flags) {
static Bool
I810EnterVT(int scrnIndex, int flags) {
ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
+#ifdef XF86DRI
I810Ptr pI810 = I810PTR(pScrn);
-
+#endif
if (I810_DEBUG & DEBUG_VERBOSE_DRI)
- ErrorF("\n\n\ENTER VT\n");
+ ErrorF("\n\nENTER VT\n");
#ifdef XF86DRI
if (pI810->directRenderingEnabled) {
@@ -1858,10 +1869,7 @@ static void
I810LeaveVT(int scrnIndex, int flags) {
ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
vgaHWPtr hwp = VGAHWPTR(pScrn);
-#ifdef XF86DRI
I810Ptr pI810 = I810PTR(pScrn);
-#endif
-
if (I810_DEBUG & DEBUG_VERBOSE_DRI)
ErrorF("\n\n\nLeave VT\n");
@@ -1874,6 +1882,7 @@ I810LeaveVT(int scrnIndex, int flags) {
pI810->LockHeld = 1;
}
#endif
+
if(pI810->AccelInfoRec != NULL) {
I810RefreshRing( pScrn );
I810Sync( pScrn );
@@ -1933,7 +1942,8 @@ I810CloseScreen(int scrnIndex, ScreenPtr pScreen)
static void
I810FreeScreen(int scrnIndex, int flags) {
I810FreeRec(xf86Screens[scrnIndex]);
- vgaHWFreeHWRec(xf86Screens[scrnIndex]);
+ if (vgaHWFreeHWRec)
+ vgaHWFreeHWRec(xf86Screens[scrnIndex]);
}
static int
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_io.c b/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_io.c
index 4378e060d..972f3f5a8 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_io.c
+++ b/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_io.c
@@ -24,7 +24,7 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
**************************************************************************/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/i810/i810_io.c,v 1.2 2000/02/23 04:47:16 martin Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/i810/i810_io.c,v 1.3 2000/05/11 18:14:34 tsi Exp $ */
/*
* Authors:
@@ -39,21 +39,25 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "i810.h"
-static void I810WriteControlPIO(I810Ptr pI810, int addr, char index, char val) {
+static void
+I810WriteControlPIO(I810Ptr pI810, int addr, CARD8 index, CARD8 val) {
outb(addr, index);
outb(addr+1, val);
}
-static char I810ReadControlPIO(I810Ptr pI810, int addr, char index) {
+static CARD8
+I810ReadControlPIO(I810Ptr pI810, int addr, CARD8 index) {
outb(addr, index);
return inb(addr+1);
}
-static void I810WriteStandardPIO(I810Ptr pI810, int addr, char val) {
+static void
+I810WriteStandardPIO(I810Ptr pI810, int addr, CARD8 val) {
outb(addr, val);
}
-static char I810ReadStandardPIO(I810Ptr pI810, int addr) {
+static CARD8
+I810ReadStandardPIO(I810Ptr pI810, int addr) {
return inb(addr);
}
@@ -64,21 +68,25 @@ void I810SetPIOAccess(I810Ptr pI810) {
pI810->readStandard=I810ReadStandardPIO;
}
-static void I810WriteControlMMIO(I810Ptr pI810, int addr, char index, char val) {
+static void
+I810WriteControlMMIO(I810Ptr pI810, int addr, CARD8 index, CARD8 val) {
moutb(addr, index);
moutb(addr+1, val);
}
-static char I810ReadControlMMIO(I810Ptr pI810, int addr, char index) {
+static CARD8
+I810ReadControlMMIO(I810Ptr pI810, int addr, CARD8 index) {
moutb(addr, index);
return minb(addr+1);
}
-static void I810WriteStandardMMIO(I810Ptr pI810, int addr, char val) {
+static void
+I810WriteStandardMMIO(I810Ptr pI810, int addr, CARD8 val) {
moutb(addr, val);
}
-static char I810ReadStandardMMIO(I810Ptr pI810, int addr) {
+static CARD8
+I810ReadStandardMMIO(I810Ptr pI810, int addr) {
return minb(addr);
}
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_memory.c b/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_memory.c
index f499ffa2d..b5c07798d 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_memory.c
+++ b/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_memory.c
@@ -1,4 +1,4 @@
-
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/i810/i810_memory.c,v 1.9 2000/06/20 05:08:46 dawes Exp $ */
/**************************************************************************
Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
@@ -32,24 +32,24 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*/
-
-#include "X.h"
-#include "input.h"
-#include "screenint.h"
-#include "compiler.h"
+#ifndef XFree86LOADER
#include "xf86.h"
-#include "xf86Priv.h"
-#include "xf86_OSlib.h"
-
-/* #include "xf86_ansic.h" */
-
-#include "i810.h"
-#include "i810_reg.h"
+#include "xf86_ansic.h"
+#endif
#ifdef linux
+#include <asm/ioctl.h>
#include <linux/agpgart.h>
#endif
+#ifdef XFree86LOADER
+#include "xf86.h"
+#include "xf86_ansic.h"
+#endif
+
+#include "i810.h"
+#include "i810_reg.h"
+
int I810AllocLow( I810MemRange *result, I810MemRange *pool, int size )
{
if (size > pool->Size) return 0;
@@ -74,15 +74,6 @@ int I810AllocHigh( I810MemRange *result, I810MemRange *pool, int size )
}
-#define XCONFIG_PROBED "()"
-#define NAME "i810"
-
-extern int xf86open(const char *path, int flags, ...);
-extern int xf86close(int fd );
-extern int xf86ioctl(int fd, unsigned long request, pointer argp);
-extern int xf86errno;
-
-
int I810AllocateGARTMemory( ScrnInfoPtr pScrn )
{
#ifdef linux
@@ -94,16 +85,16 @@ int I810AllocateGARTMemory( ScrnInfoPtr pScrn )
long tom = 0;
int gartfd = -1;
- gartfd = xf86open("/dev/agpgart", O_RDWR, 0);
+ gartfd = open("/dev/agpgart", O_RDWR, 0);
if (gartfd == -1) {
xf86DrvMsg(pScrn->scrnIndex, X_INFO, "unable to open /dev/agpgart\n");
return FALSE;
}
- if (xf86ioctl(gartfd, AGPIOC_ACQUIRE, 0) != 0) {
+ if (ioctl(gartfd, AGPIOC_ACQUIRE, 0) != 0) {
if(pI810->agpAcquired2d == TRUE) {
- xf86close(gartfd);
+ close(gartfd);
return TRUE;
}
xf86DrvMsg(pScrn->scrnIndex, X_INFO, "AGPIOC_ACQUIRE failed\n");
@@ -114,9 +105,9 @@ int I810AllocateGARTMemory( ScrnInfoPtr pScrn )
pI810->agpAcquired2d = TRUE;
pI810->gartfd = gartfd;
- if (xf86ioctl(pI810->gartfd, AGPIOC_INFO, &agpinf) != 0) {
+ if (ioctl(pI810->gartfd, AGPIOC_INFO, &agpinf) != 0) {
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "error doing xf86ioctl(AGPIOC_INFO)\n");
+ "error doing ioctl(AGPIOC_INFO)\n");
return FALSE;
}
@@ -135,7 +126,7 @@ int I810AllocateGARTMemory( ScrnInfoPtr pScrn )
alloc.pg_count = pages;
alloc.type = 0;
- if (xf86ioctl(pI810->gartfd, AGPIOC_ALLOCATE, &alloc) != 0) {
+ if (ioctl(pI810->gartfd, AGPIOC_ALLOCATE, &alloc) != 0) {
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"AGPGART: allocation of %d pages failed\n", pages);
return FALSE;
@@ -144,7 +135,7 @@ int I810AllocateGARTMemory( ScrnInfoPtr pScrn )
bind.pg_start = 0;
bind.key = alloc.key;
- if (xf86ioctl(pI810->gartfd, AGPIOC_BIND, &bind) != 0) {
+ if (ioctl(pI810->gartfd, AGPIOC_BIND, &bind) != 0) {
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"GART: allocation of %d pages failed\n", pages);
return FALSE;
@@ -175,11 +166,11 @@ int I810AllocateGARTMemory( ScrnInfoPtr pScrn )
tom += 0x7ffff;
tom &= ~0x7ffff;
- if (xf86ioctl(pI810->gartfd, AGPIOC_ALLOCATE, &alloc) == 0) {
+ if (ioctl(pI810->gartfd, AGPIOC_ALLOCATE, &alloc) == 0) {
bind.pg_start = tom / 4096;
bind.key = alloc.key;
- if (xf86ioctl(pI810->gartfd, AGPIOC_BIND, &bind) != 0) {
+ if (ioctl(pI810->gartfd, AGPIOC_BIND, &bind) != 0) {
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"GART: allocation of %d DCACHE pages failed\n",
alloc.pg_count);
@@ -200,7 +191,7 @@ int I810AllocateGARTMemory( ScrnInfoPtr pScrn )
alloc.type = 2;
- if (xf86ioctl(pI810->gartfd, AGPIOC_ALLOCATE, &alloc) != 0) {
+ if (ioctl(pI810->gartfd, AGPIOC_ALLOCATE, &alloc) != 0) {
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"GART: No physical memory available for mouse\n",
alloc.pg_count);
@@ -208,7 +199,7 @@ int I810AllocateGARTMemory( ScrnInfoPtr pScrn )
bind.pg_start = tom / 4096;
bind.key = alloc.key;
- if (xf86ioctl(pI810->gartfd, AGPIOC_BIND, &bind) != 0) {
+ if (ioctl(pI810->gartfd, AGPIOC_BIND, &bind) != 0) {
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"GART: allocation of %d physical pages failed\n",
alloc.pg_count);
@@ -236,7 +227,7 @@ void I810FreeGARTMemory( ScrnInfoPtr pScrn )
I810Ptr pI810 = I810PTR(pScrn);
if (pI810->gartfd != -1) {
- xf86close( pI810->gartfd );
+ close( pI810->gartfd );
pI810->gartfd = -1;
}
#endif
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/mga/Imakefile b/xc/programs/Xserver/hw/xfree86/drivers/mga/Imakefile
index d7127469c..48a7cca7a 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/mga/Imakefile
+++ b/xc/programs/Xserver/hw/xfree86/drivers/mga/Imakefile
@@ -1,4 +1,4 @@
-XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/drivers/mga/Imakefile,v 1.32 2000/02/28 19:53:12 alanh Exp $
+XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/drivers/mga/Imakefile,v 1.33 2000/06/17 00:03:19 martin Exp $
XCOMM
XCOMM This is an Imakefile for the MGA driver.
XCOMM
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/mga/mga.h b/xc/programs/Xserver/hw/xfree86/drivers/mga/mga.h
index 931e4a19d..06e87d2bd 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/mga/mga.h
+++ b/xc/programs/Xserver/hw/xfree86/drivers/mga/mga.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/mga/mga.h,v 1.57 2000/02/27 02:50:47 mvojkovi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/mga/mga.h,v 1.59 2000/06/17 00:03:19 martin Exp $ */
/*
* MGA Millennium (MGA2064W) functions
*
@@ -63,6 +63,13 @@ void dbg_outreg32(ScrnInfoPtr,int,int);
#define PORT_OFFSET (0x1F00 - 0x300)
+#define MGA_VERSION 4000
+#define MGA_NAME "MGA"
+#define MGA_DRIVER_NAME "mga"
+#define MGA_MAJOR_VERSION 1
+#define MGA_MINOR_VERSION 0
+#define MGA_PATCHLEVEL 0
+
typedef struct {
unsigned char ExtVga[6];
unsigned char DacClk[6];
@@ -72,6 +79,17 @@ typedef struct {
CARD32 Option3;
} MGARegRec, *MGARegPtr;
+typedef struct {
+ unsigned char brightness;
+ unsigned char contrast;
+ FBAreaPtr area;
+ RegionRec clip;
+ CARD32 colorKey;
+ CARD32 videoStatus;
+ Time offTime;
+ Time freeTime;
+ int lastPort;
+} MGAPortPrivRec, *MGAPortPrivPtr;
typedef struct {
Bool isHwCursor;
@@ -107,7 +125,6 @@ typedef struct {
DisplayModePtr mode;
} MGAFBLayout;
-
/* Card-specific driver information */
#define MGAPTR(p) ((MGAPtr)((p)->driverPrivate))
@@ -210,30 +227,29 @@ typedef struct {
MGAFBLayout CurrentLayout;
Bool DrawTransparent;
int MaxBlitDWORDS;
-
+ Bool TexturedVideo;
+ MGAPortPrivPtr portPrivate;
+ int numXAALines;
#ifdef XF86DRI
- Bool directRenderingEnabled;
- DRIInfoPtr pDRIInfo;
- int drmSubFD;
- int numVisualConfigs;
- __GLXvisualConfig* pVisualConfigs;
- MGAConfigPrivPtr pVisualConfigsPriv;
- MGARegRec DRContextRegs;
- MGADRIServerPrivatePtr DRIServerInfo;
- Bool have_quiescense;
+ Bool have_quiescense;
+ Bool directRenderingEnabled;
+ DRIInfoPtr pDRIInfo;
+ int drmSubFD;
+ int numVisualConfigs;
+ __GLXvisualConfig* pVisualConfigs;
+ MGAConfigPrivPtr pVisualConfigsPriv;
+ MGARegRec DRContextRegs;
+ MGADRIServerPrivatePtr DRIServerInfo;
#endif
-
XF86VideoAdaptorPtr adaptor;
} MGARec, *MGAPtr;
#ifdef XF86DRI
-extern void GlxSetVisualConfigs(
- int nconfigs,
- __GLXvisualConfig *configs,
- void **configprivs
-);
+extern void GlxSetVisualConfigs(int nconfigs, __GLXvisualConfig *configs,
+ void **configprivs);
#endif
+
extern CARD32 MGAAtype[16];
extern CARD32 MGAAtypeNoBLK[16];
@@ -284,14 +300,15 @@ Bool MGADRIScreenInit(ScreenPtr pScreen);
void MGADRICloseScreen(ScreenPtr pScreen);
Bool MGADRIFinishScreenInit(ScreenPtr pScreen);
void MGASwapContext(ScreenPtr pScreen);
-void MGASelectBuffer(ScrnInfoPtr pScrn, int which);
Bool mgaConfigureWarp(ScrnInfoPtr pScrn);
unsigned int mgaInstallMicrocode(ScreenPtr pScreen, int agp_offset);
unsigned int mgaGetMicrocodeSize(ScreenPtr pScreen);
+void MGASelectBuffer(ScrnInfoPtr pScrn, int which);
Bool MgaCleanupDma(ScrnInfoPtr pScrn);
Bool MgaInitDma(ScrnInfoPtr pScrn, int prim_size);
+#ifdef XF86DRI
Bool MgaLockUpdate(ScrnInfoPtr pScrn, drmLockFlags flags);
-
+#endif
void MGARefreshArea(ScrnInfoPtr pScrn, int num, BoxPtr pbox);
void MGARefreshArea8(ScrnInfoPtr pScrn, int num, BoxPtr pbox);
void MGARefreshArea16(ScrnInfoPtr pScrn, int num, BoxPtr pbox);
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_arc.c b/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_arc.c
index 993d763a8..424989b21 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_arc.c
+++ b/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_arc.c
@@ -19,7 +19,7 @@ used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
********************************************************/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/mga/mga_arc.c,v 1.7 1999/08/22 05:57:33 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/mga/mga_arc.c,v 1.9 2000/06/25 12:46:00 alanh Exp $ */
#include "X.h"
@@ -34,6 +34,8 @@ in this Software without prior written authorization from The Open Group.
#include "scrnintstr.h"
#include "xaa.h"
#include "xaalocal.h"
+#include "xf86.h"
+#include "xf86_OSproc.h"
#include "xf86_ansic.h"
#include "xf86Pci.h"
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_dacG.c b/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_dacG.c
index d81d12b3a..9f37e2e10 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_dacG.c
+++ b/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_dacG.c
@@ -2,7 +2,7 @@
* MGA-1064, MGA-G100, MGA-G200, MGA-G400 RAMDAC driver
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/mga/mga_dacG.c,v 1.33 1999/12/03 04:03:52 mvojkovi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/mga/mga_dacG.c,v 1.36 2000/06/17 00:03:19 martin Exp $ */
/*
* This is a first cut at a non-accelerated version to work with the
@@ -47,6 +47,8 @@
#define OPTION2_MASK 0xFFFFFFFF
#define OPTION3_MASK 0xFFFFFFFF
+#define OPTION1_MASK_PRIMARY 0xFFFC0FF
+
/*
* Read/write to the DAC via MMIO
*/
@@ -364,6 +366,8 @@ MGAGInit(ScrnInfoPtr pScrn, DisplayModePtr mode)
pReg->Option = 0x50044120;
}
}
+ if(pMga->HasSDRAM)
+ pReg->Option &= ~(1 << 14);
pReg->Option2 = 0x01003000;
break;
case PCI_CHIP_MGAG200:
@@ -474,12 +478,6 @@ MGAGInit(ScrnInfoPtr pScrn, DisplayModePtr mode)
else
pReg->ExtVga[3] = ((1 << BppShift) - 1) | 0x80;
-#if 0
- /* Set viddelay (CRTCEXT3 Bits 3-4). */
- pReg->ExtVga[3] |= (pScrn->videoRam == 8192 ? 0x10
- : pScrn->videoRam == 2048 ? 0x08 : 0x00);
-#endif
-
pReg->ExtVga[4] = 0;
pVga->CRTC[0] = ht - 4;
@@ -593,10 +591,10 @@ MGAGRestore(ScrnInfoPtr pScrn, vgaRegPtr vgaReg, MGARegPtr mgaReg,
Bool restoreFonts)
{
int i;
+ CARD32 optionMask;
MGAPtr pMga = MGAPTR(pScrn);
CHECK_DMA_QUIESCENT( pMga, pScrn );
-
/*
* Code is needed to get things back to bank zero.
*/
@@ -617,8 +615,12 @@ MGAGRestore(ScrnInfoPtr pScrn, vgaRegPtr vgaReg, MGARegPtr mgaReg,
outMGAdac(i, mgaReg->DacRegs[i]);
}
+ /* Do not set the memory config for primary cards as it
+ should be correct already */
+ optionMask = (pMga->Primary) ? OPTION1_MASK_PRIMARY : OPTION1_MASK;
+
/* restore pci_option register */
- pciSetBitsLong(pMga->PciTag, PCI_OPTION_REG, OPTION1_MASK,
+ pciSetBitsLong(pMga->PciTag, PCI_OPTION_REG, optionMask,
mgaReg->Option);
if (pMga->Chipset != PCI_CHIP_MGA1064)
pciSetBitsLong(pMga->PciTag, PCI_MGA_OPTION2, OPTION2_MASK,
@@ -673,7 +675,7 @@ MGAGSave(ScrnInfoPtr pScrn, vgaRegPtr vgaReg, MGARegPtr mgaReg,
{
int i;
MGAPtr pMga = MGAPTR(pScrn);
-
+
CHECK_DMA_QUIESCENT( pMga, pScrn );
/* Allocate the DacRegs space if not done already */
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_dri.c b/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_dri.c
index 12c101dee..8c90596f7 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_dri.c
+++ b/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_dri.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/mga/mga_dri.c,v 1.1 2000/02/11 17:25:55 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/mga/mga_dri.c,v 1.5 2000/06/23 23:43:44 alanh Exp $ */
#include "xf86.h"
#include "xf86_OSproc.h"
@@ -258,13 +258,16 @@ Bool MGADRIScreenInit(ScreenPtr pScreen)
int init_offset;
int i;
-#if XFree86LOADER
/* Check that the GLX, DRI, and DRM modules have been loaded by testing
* for canonical symbols in each module. */
- if (!LoaderSymbol("GlxSetVisualConfigs")) return FALSE;
- if (!LoaderSymbol("DRIScreenInit")) return FALSE;
- if (!LoaderSymbol("drmAvailable")) return FALSE;
-#endif
+ if (!xf86LoaderCheckSymbol("GlxSetVisualConfigs")) return FALSE;
+ if (!xf86LoaderCheckSymbol("DRIScreenInit")) return FALSE;
+ if (!xf86LoaderCheckSymbol("drmAvailable")) return FALSE;
+ if (!xf86LoaderCheckSymbol("DRIQueryVersion")) {
+ xf86DrvMsg(pScreen->myNum, X_ERROR,
+ "TDFXDRIScreenInit failed (libdri.a too old)\n");
+ return FALSE;
+ }
/* Check the DRI version */
{
@@ -519,7 +522,8 @@ Bool MGADRIScreenInit(ScreenPtr pScreen)
pMGADRI->frontOffset = 0; /* pMGA->YDstOrg * (pScrn->bitsPerPixel / 8) */
- pMGADRI->backOffset = ((pScrn->virtualY+129) * pScrn->displayWidth *
+ pMGADRI->backOffset = ((pScrn->virtualY + pMGA->numXAALines + 1) *
+ pScrn->displayWidth *
(pScrn->bitsPerPixel / 8) + 4095) & ~0xFFF;
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_dri.h b/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_dri.h
index b8518ee89..28d710353 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_dri.h
+++ b/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_dri.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/mga/mga_dri.h,v 1.1 2000/02/11 17:25:55 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/mga/mga_dri.h,v 1.3 2000/06/22 03:58:25 tsi Exp $ */
#ifndef _MGA_DRI_
#define _MGA_DRI_
@@ -107,8 +107,8 @@ typedef struct {
unsigned int exported_index;
unsigned int exported_stamp;
unsigned int exported_buffers;
- unsigned int exported_nfront;
- unsigned int exported_nback;
+ int exported_nfront;
+ int exported_nback;
int exported_back_x, exported_front_x, exported_w;
int exported_back_y, exported_front_y, exported_h;
XF86DRIClipRectRec exported_boxes[MGA_NR_SAREA_CLIPRECTS];
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_driver.c b/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_driver.c
index b379022af..7d9b247fc 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_driver.c
+++ b/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_driver.c
@@ -43,7 +43,7 @@
* Fixed 32bpp hires 8MB horizontal line glitch at middle right
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/mga/mga_driver.c,v 1.149 2000/03/07 01:37:49 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/mga/mga_driver.c,v 1.163 2000/06/29 21:03:11 mvojkovi Exp $ */
/*
* This is a first cut at a non-accelerated version to work with the
@@ -211,7 +211,9 @@ typedef enum {
OPTION_SET_MCLK,
OPTION_OVERCLOCK_MEM,
OPTION_VIDEO_KEY,
- OPTION_ROTATE
+ OPTION_ROTATE,
+ OPTION_TEXTURED_VIDEO,
+ OPTION_XAALINES
} MGAOpts;
static OptionInfoRec MGAOptions[] = {
@@ -230,6 +232,8 @@ static OptionInfoRec MGAOptions[] = {
{ OPTION_OVERCLOCK_MEM, "OverclockMem", OPTV_BOOLEAN, {0}, FALSE },
{ OPTION_VIDEO_KEY, "VideoKey", OPTV_INTEGER, {0}, FALSE },
{ OPTION_ROTATE, "Rotate", OPTV_ANYSTR, {0}, FALSE },
+ { OPTION_TEXTURED_VIDEO, "TexturedVideo",OPTV_BOOLEAN, {0}, FALSE },
+ { OPTION_XAALINES, "XAALines", OPTV_INTEGER, {0}, FALSE },
{ -1, NULL, OPTV_NONE, {0}, FALSE }
};
@@ -310,6 +314,8 @@ static const char *drmSymbols[] = {
"drmMgaCleanupDma",
"drmMgaLockUpdate",
"drmMgaInitDma",
+ "drmFreeVersion",
+ "drmGetVersion",
NULL
};
@@ -326,6 +332,7 @@ static const char *driSymbols[] = {
"DRIUnlock",
"DRIGetSAREAPrivate",
"DRIGetContext",
+ "DRIQueryVersion",
"GlxSetVisualConfigs",
NULL
};
@@ -515,7 +522,7 @@ MGAProbe(DriverPtr drv, int flags)
{
int i;
GDevPtr *devSections = NULL;
- int *usedChips;
+ int *usedChips = NULL;
int numDevSections;
int numUsed;
Bool foundScreen = FALSE;
@@ -585,34 +592,40 @@ MGAProbe(DriverPtr drv, int flags)
#endif
/* Allocate a ScrnInfoRec and claim the slot */
- pScrn = xf86AllocateScreen(drv, 0);
+ pScrn = NULL;
- /* Fill in what we can of the ScrnInfoRec */
- pScrn->driverVersion = MGA_VERSION;
- pScrn->driverName = MGA_DRIVER_NAME;
- pScrn->name = MGA_NAME;
- pScrn->Probe = MGAProbe;
- pScrn->PreInit = MGAPreInit;
- pScrn->ScreenInit = MGAScreenInit;
- pScrn->SwitchMode = MGASwitchMode;
- pScrn->AdjustFrame = MGAAdjustFrame;
- pScrn->EnterVT = MGAEnterVT;
- pScrn->LeaveVT = MGALeaveVT;
- pScrn->FreeScreen = MGAFreeScreen;
- pScrn->ValidMode = MGAValidMode;
- foundScreen = TRUE;
#ifndef DISABLE_VGA_IO
- xf86ConfigActivePciEntity(pScrn, usedChips[i], MGAPciChipsets, NULL,
- NULL, NULL, NULL, NULL);
+ if ((pScrn = xf86ConfigPciEntity(pScrn, 0,usedChips[i],
+ MGAPciChipsets, NULL, NULL,
+ NULL, NULL, NULL)))
#else
- smga = xnfalloc(sizeof(MgaSave));
- smga->pvp = xf86GetPciInfoForEntity(usedChips[i]);
- xf86ConfigActivePciEntity(pScrn, usedChips[i], MGAPciChipsets, NULL,
- VgaIOSave, VgaIOSave, VgaIORestore,
- smga);
+ smga = xnfalloc(sizeof(MgaSave));
+ smga->pvp = xf86GetPciInfoForEntity(usedChips[i]);
+ if ((pScrn = xf86ConfigPciEntity(pScrn, 0,usedChips[i],
+ MGAPciChipsets, NULL,VgaIOSave,
+ VgaIOSave, VgaIORestore,smga)))
#endif
+ {
+
+ /* Fill in what we can of the ScrnInfoRec */
+ pScrn->driverVersion = MGA_VERSION;
+ pScrn->driverName = MGA_DRIVER_NAME;
+ pScrn->name = MGA_NAME;
+ pScrn->Probe = MGAProbe;
+ pScrn->PreInit = MGAPreInit;
+ pScrn->ScreenInit = MGAScreenInit;
+ pScrn->SwitchMode = MGASwitchMode;
+ pScrn->AdjustFrame = MGAAdjustFrame;
+ pScrn->EnterVT = MGAEnterVT;
+ pScrn->LeaveVT = MGALeaveVT;
+ pScrn->FreeScreen = MGAFreeScreen;
+ pScrn->ValidMode = MGAValidMode;
+ foundScreen = TRUE;
+ }
}
- xfree(usedChips);
+ if (usedChips)
+ xfree(usedChips);
+
return foundScreen;
}
@@ -781,7 +794,6 @@ static void
MGASoftReset(ScrnInfoPtr pScrn)
{
MGAPtr pMga = MGAPTR(pScrn);
-/* int i; */
pMga->FbMapSize = 8192 * 1024;
MGAMapMem(pScrn);
@@ -889,26 +901,27 @@ MGACountRam(ScrnInfoPtr pScrn)
pMga->FbMapSize = ProbeSize * 1024;
MGAMapMem(pScrn);
base = pMga->FbBase;
-
+
/* turn MGA mode on - enable linear frame buffer (CRTCEXT3) */
OUTREG8(0x1FDE, 3);
tmp = INREG8(0x1FDF);
OUTREG8(0x1FDF, tmp | 0x80);
-
+
/* write, read and compare method */
for(i = ProbeSize; i > 2048; i -= 2048) {
base[(i * 1024) - 1] = 0xAA;
OUTREG8(MGAREG_CRTC_INDEX, 0); /* flush the cache */
+ usleep(1); /* twart write combination */
if(base[(i * 1024) - 1] == 0xAA) {
SizeFound = i;
break;
}
}
-
+
/* restore CRTCEXT3 state */
OUTREG8(0x1FDE, 3);
OUTREG8(0x1FDF, tmp);
-
+
MGAUnmapMem(pScrn);
}
return SizeFound;
@@ -1052,13 +1065,13 @@ VgaIOEnable(void *arg)
extern xf86MonPtr ConfiguredMonitor;
-static void
+void
MGAProbeDDC(ScrnInfoPtr pScrn, int index)
{
vbeInfoPtr pVbe;
if (xf86LoadSubModule(pScrn, "vbe")) {
pVbe = VBEInit(NULL,index);
- ConfiguredMonitor = vbeDoEDID(pVbe);
+ ConfiguredMonitor = vbeDoEDID(pVbe, NULL);
}
}
@@ -1291,6 +1304,29 @@ MGAPreInit(ScrnInfoPtr pScrn, int flags)
}
xf86DrvMsg(pScrn->scrnIndex, from, "Chipset: \"%s\"\n", pScrn->chipset);
+
+
+ if(xf86GetOptValInteger(MGAOptions, OPTION_XAALINES,
+ &(pMga->numXAALines))) {
+ xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "Will Use %d lines for "
+ "offscreen memory if the DRI is enabled.\n",
+ pMga->numXAALines);
+ } else {
+ /* The default is to use 512 lines on a G400, 128 on a G200 */
+ switch (pMga->Chipset) {
+ case PCI_CHIP_MGAG200:
+ case PCI_CHIP_MGAG200_PCI:
+ pMga->numXAALines = 128;
+ break;
+ default:
+ pMga->numXAALines = 512;
+ break;
+ }
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Offscreen memory usage "
+ "will be limited to %d lines if the DRI is enabled.\n",
+ pMga->numXAALines);
+ }
+
from = X_DEFAULT;
pMga->HWCursor = TRUE;
/*
@@ -1373,6 +1409,9 @@ MGAPreInit(ScrnInfoPtr pScrn, int flags)
pMga->OverclockMem = TRUE;
xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "Overclocking memory\n");
}
+ if (xf86ReturnOptValBool(MGAOptions, OPTION_TEXTURED_VIDEO, FALSE)) {
+ pMga->TexturedVideo = TRUE;
+ }
if (pMga->FBDev) {
/* check for linux framebuffer device */
if (!xf86LoadSubModule(pScrn, "fbdevhw"))
@@ -1686,14 +1725,16 @@ MGAPreInit(ScrnInfoPtr pScrn, int flags)
* Setup the ClockRanges, which describe what clock ranges are available,
* and what sort of modes they can be used for.
*/
- clockRanges = xnfalloc(sizeof(ClockRange));
+ clockRanges = xnfcalloc(sizeof(ClockRange), 1);
clockRanges->next = NULL;
clockRanges->minClock = pMga->MinClock;
clockRanges->maxClock = pMga->MaxClock;
clockRanges->clockIndex = -1; /* programmable */
clockRanges->interlaceAllowed = TRUE;
clockRanges->doubleScanAllowed = TRUE;
-
+ clockRanges->ClockMulFactor = 1;
+ clockRanges->ClockDivFactor = 1;
+
/* Only set MemClk if appropriate for the ramdac */
if (pMga->Dac.SetMemClk) {
if (pMga->MemClk == 0) {
@@ -2127,13 +2168,12 @@ MGAModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode)
#ifdef XF86DRI
if (pMga->directRenderingEnabled) {
DRILock(screenInfo.screens[pScrn->scrnIndex], 0);
-/* MGADRISwapContext(screenInfo.screens[pScrn->scrnIndex]); */
}
#endif
(*pMga->Restore)(pScrn, vgaReg, mgaReg, FALSE);
-
- MGAStormSync(pScrn); /* JEFF - Check */
+
+ MGAStormSync(pScrn);
MGAStormEngineInit(pScrn);
vgaHWProtect(pScrn, FALSE);
@@ -2165,7 +2205,8 @@ MGARestore(ScrnInfoPtr pScrn)
MGAPtr pMga = MGAPTR(pScrn);
MGARegPtr mgaReg = &pMga->SavedReg;
- MGAStormSync(pScrn);
+ if (pScrn->pScreen != NULL)
+ MGAStormSync(pScrn);
/* Only restore text mode fonts/text for the primary card */
vgaHWProtect(pScrn, TRUE);
@@ -2306,11 +2347,13 @@ MGAScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
* Setup DRI after visuals have been established, but before cfbScreenInit
* is called. cfbScreenInit will eventually call into the drivers
* InitGLXVisuals call back.
+ * The DRI does not work when textured video is enabled at this time.
*/
- if (!pMga->NoAccel)
- pMga->directRenderingEnabled = MGADRIScreenInit(pScreen);
+
+ if (!pMga->NoAccel && pMga->TexturedVideo != TRUE)
+ pMga->directRenderingEnabled = MGADRIScreenInit(pScreen);
else
- pMga->directRenderingEnabled = FALSE;
+ pMga->directRenderingEnabled = FALSE;
#endif
@@ -2443,20 +2486,20 @@ MGAScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
#ifdef XF86DRI
/* Initialize the Warp engine */
- if (pMga->directRenderingEnabled) {
- pMga->directRenderingEnabled = mgaConfigureWarp(pScrn);
- }
- if (pMga->directRenderingEnabled) {
- /* Now that mi, cfb, drm and others have done their thing,
- * complete the DRI setup.
- */
- pMga->directRenderingEnabled = MGADRIFinishScreenInit(pScreen);
- }
- if (pMga->directRenderingEnabled) {
- xf86DrvMsg(pScrn->scrnIndex, X_INFO, "direct rendering enabled\n");
- } else {
- xf86DrvMsg(pScrn->scrnIndex, X_INFO, "direct rendering disabled\n");
- }
+ if (pMga->directRenderingEnabled) {
+ pMga->directRenderingEnabled = mgaConfigureWarp(pScrn);
+ }
+ if (pMga->directRenderingEnabled) {
+ /* Now that mi, cfb, drm and others have done their thing,
+ * complete the DRI setup.
+ */
+ pMga->directRenderingEnabled = MGADRIFinishScreenInit(pScreen);
+ }
+ if (pMga->directRenderingEnabled) {
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "direct rendering enabled\n");
+ } else {
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "direct rendering disabled\n");
+ }
#endif
pScrn->memPhysBase = pMga->FbAddress;
@@ -2660,6 +2703,8 @@ MGACloseScreen(int scrnIndex, ScreenPtr pScreen)
xfree(pMga->DGAModes);
if (pMga->adaptor)
xfree(pMga->adaptor);
+ if (pMga->portPrivate)
+ xfree(pMga->portPrivate);
pScrn->vtSema = FALSE;
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_macros.h b/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_macros.h
index 19b137740..3399bac21 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_macros.h
+++ b/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_macros.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/mga/mga_macros.h,v 1.12 2000/02/11 17:25:57 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/mga/mga_macros.h,v 1.14 2000/06/17 00:03:20 martin Exp $ */
#ifndef _MGA_MACROS_H_
#define _MGA_MACROS_H_
@@ -20,7 +20,6 @@
#define RGBEQUAL(c) (!((((c) >> 8) ^ (c)) & 0xffff))
#ifdef XF86DRI
-#define MGAREG_DWGSYNC 0x2c4c
#define MGA_SYNC_XTAG 0x275f4200
#define MGABUSYWAIT() do { \
@@ -84,7 +83,6 @@ while(INREG(MGAREG_DWGSYNC) != MGA_SYNC_XTAG) ; \
WAITFIFO(1); \
OUTREG(MGAREG_CXBNDRY, 0xFFFF0000); }
-
#ifdef XF86DRI
extern void mgaGetQuiescence( ScrnInfoPtr pScrn );
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_storm.c b/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_storm.c
index 903f6d279..0ddde7d14 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_storm.c
+++ b/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_storm.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/mga/mga_storm.c,v 1.64 2000/02/12 20:45:24 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/mga/mga_storm.c,v 1.69 2000/06/29 20:56:59 mvojkovi Exp $ */
/* All drivers should typically include these */
@@ -140,11 +140,8 @@ MGANAME(AccelInit)(ScreenPtr pScreen)
XAAInfoRecPtr infoPtr;
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
MGAPtr pMga = MGAPTR(pScrn);
- int maxFastBlitMem;
+ int maxFastBlitMem, maxlines;
BoxRec AvailFBArea;
-#ifdef XF86DRI
- RegionRec MemRegion;
-#endif
pMga->AccelInfoRec = infoPtr = XAACreateInfoRec();
if(!infoPtr) return FALSE;
@@ -380,25 +377,31 @@ MGANAME(AccelInit)(ScreenPtr pScreen)
pMga->MaxFastBlitY = maxFastBlitMem / (pScrn->displayWidth * PSZ / 8);
}
+ maxlines = (min(pMga->FbUsableSize, 16*1024*1024)) /
+ (pScrn->displayWidth * PSZ / 8);
+
+#ifdef XF86DRI
+ if (pMga->directRenderingEnabled) {
+ if(maxlines > (pMga->numXAALines + pScrn->virtualY))
+ maxlines = pMga->numXAALines + pScrn->virtualY;
+
+ if(maxlines < (pMga->numXAALines + pScrn->virtualY))
+ pMga->numXAALines = maxlines - pScrn->virtualY;
+
+ /* not like the 3D will even work when there's not
+ even enough memory for a tiny pixmap cache */
+ }
+
+#endif
AvailFBArea.x1 = 0;
AvailFBArea.x2 = pScrn->displayWidth;
-
-#ifndef XF86DRI
AvailFBArea.y1 = 0;
- AvailFBArea.y2 = (min(pMga->FbUsableSize, 16*1024*1024)) /
- (pScrn->displayWidth * PSZ / 8);
-
+ AvailFBArea.y2 = maxlines;
xf86InitFBManager(pScreen, &AvailFBArea);
-#else
- AvailFBArea.y1 = pScrn->virtualY;
- AvailFBArea.y2 = pScrn->virtualY+128;
-
- REGION_INIT(pScreen, &MemRegion, &AvailFBArea, 1);
- xf86InitFBManagerRegion(pScreen, &MemRegion);
- REGION_UNINIT(pScreen, &MemRegion);
-#endif
-
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Using %d lines for offscreen "
+ "memory.\n",
+ maxlines - pScrn->virtualY);
return(XAAInit(pScreen, infoPtr));
}
@@ -456,7 +459,7 @@ MGAStormSync(ScrnInfoPtr pScrn)
MGAPtr pMga = MGAPTR(pScrn);
CHECK_DMA_QUIESCENT(pMga, pScrn);
-
+
while(MGAISBUSY());
/* flush cache before a read (mga-1064g 5.1.6) */
OUTREG8(MGAREG_CRTC_INDEX, 0);
@@ -482,8 +485,9 @@ void MGAStormEngineInit(ScrnInfoPtr pScrn)
case 8:
break;
case 16:
- /* set 16 bpp, turn off dithering, turn on 5:5:5 pixels */
- maccess |= 1 + (1 << 30) + (1 << 31);
+ maccess |= 1;
+ if(pLayout->depth == 15)
+ maccess |= (1 << 31);
break;
case 24:
maccess |= 3;
@@ -589,7 +593,6 @@ MGANAME(SetupForScreenToScreenCopy)(
CHECK_DMA_QUIESCENT(pMga, pScrn);
-
pMga->AccelInfoRec->SubsequentScreenToScreenCopy =
MGANAME(SubsequentScreenToScreenCopy);
@@ -824,7 +827,7 @@ MGANAME(SubsequentSolidFillTrap)(ScrnInfoPtr pScrn, int y, int h,
int ar2 = sdxl? dxL : -dxL;
int sdxr = (dxR < 0);
int ar5 = sdxr? dxR : -dxR;
-
+
WAITFIFO(11);
OUTREG(MGAREG_DWGCTL,
pMga->FilledRectCMD & ~(MGADWG_ARZERO | MGADWG_SGNZERO));
@@ -950,7 +953,7 @@ MGANAME(SubsequentMono8x8PatternFillRect)(
int x, int y, int w, int h )
{
MGAPtr pMga = MGAPTR(pScrn);
-
+
WAITFIFO(3);
OUTREG(MGAREG_SHIFT, (paty << 4) | patx);
OUTREG(MGAREG_FXBNDRY, ((x + w) << 16) | (x & 0xffff));
@@ -966,6 +969,7 @@ MGANAME(SubsequentMono8x8PatternFillRect_Additional)(
int x, int y, int w, int h )
{
MGAPtr pMga = MGAPTR(pScrn);
+
WAITFIFO(2);
OUTREG(MGAREG_FXBNDRY, ((x + w) << 16) | (x & 0xffff));
OUTREG(MGAREG_YDSTLEN + MGAREG_EXEC, (y << 16) | h);
@@ -1016,10 +1020,9 @@ MGANAME(SetupForCPUToScreenColorExpandFill)(
unsigned int planemask )
{
MGAPtr pMga = MGAPTR(pScrn);
-
CARD32 mgaCMD = MGADWG_ILOAD | MGADWG_LINEAR | MGADWG_SGNZERO |
MGADWG_SHIFTZERO | MGADWG_BMONOLEF;
-
+
CHECK_DMA_QUIESCENT(pMga, pScrn);
if(bg == -1) {
@@ -1236,7 +1239,7 @@ MGANAME(SetupForPlanarScreenToScreenColorExpandFill)(
MGAPtr pMga = MGAPTR(pScrn);
CARD32 mgaCMD = pMga->AtypeNoBLK[rop] | MGADWG_BITBLT |
MGADWG_SGNZERO | MGADWG_BPLAN;
-
+
CHECK_DMA_QUIESCENT(pMga, pScrn);
if(bg == -1) {
@@ -1291,7 +1294,7 @@ MGANAME(SetupForScreenToScreenColorExpandFill)(
CARD32 mgaCMD = MGADWG_BITBLT | MGADWG_SGNZERO | MGADWG_SHIFTZERO;
CHECK_DMA_QUIESCENT(pMga, pScrn);
-
+
if(bg == -1) {
#if PSZ == 24
if(!RGBEQUAL(fg))
@@ -1641,7 +1644,6 @@ MGAFillSolidSpansDMA(
CARD32 *base = (CARD32*)pMga->ILOADBase;
CHECK_DMA_QUIESCENT(pMga, pScrn);
-
SET_SYNC_FLAG(infoRec);
if(infoRec->ClipBox) {
@@ -1753,7 +1755,6 @@ void MGANonTEGlyphRenderer(
unsigned char *src;
CHECK_DMA_QUIESCENT(pMga, pScrn);
-
(*infoRec->SetupForCPUToScreenColorExpandFill)(
pScrn, fg, -1, rop, planemask);
WAITFIFO(1);
@@ -2022,7 +2023,7 @@ MGATEGlyphRenderer(
CHECK_DMA_QUIESCENT(pMga, pScrn);
- (*infoRec->SetupForCPUToScreenColorExpandFill)(
+ (*infoRec->SetupForCPUToScreenColorExpandFill)(
pScrn, fg, bg, rop, planemask);
w += skipleft;
@@ -2055,27 +2056,27 @@ MGATEGlyphRenderer(
void
MGANAME(DRIInitBuffers)(WindowPtr pWin, RegionPtr prgn, CARD32 index)
{
- ScreenPtr pScreen = pWin->drawable.pScreen;
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
- MGAPtr pMGA = MGAPTR(pScrn);
- BoxPtr pbox = REGION_RECTS(prgn);
- int nbox = REGION_NUM_RECTS(prgn);
-
- CHECK_DMA_QUIESCENT(MGAPTR(pScrn), pScrn);
-
- MGANAME(SetupForSolidFill)(pScrn, 0, GXcopy, -1);
- while (nbox--) {
- MGASelectBuffer(pScrn, MGA_BACK);
- MGANAME(SubsequentSolidFillRect)(pScrn, pbox->x1, pbox->y1,
- pbox->x2-pbox->x1, pbox->y2-pbox->y1);
- MGASelectBuffer(pScrn, MGA_DEPTH);
- MGANAME(SubsequentSolidFillRect)(pScrn, pbox->x1, pbox->y1,
- pbox->x2-pbox->x1, pbox->y2-pbox->y1);
- pbox++;
- }
- MGASelectBuffer(pScrn, MGA_FRONT);
-
- pMGA->AccelInfoRec->NeedToSync = TRUE;
+ ScreenPtr pScreen = pWin->drawable.pScreen;
+ ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ MGAPtr pMGA = MGAPTR(pScrn);
+ BoxPtr pbox = REGION_RECTS(prgn);
+ int nbox = REGION_NUM_RECTS(prgn);
+
+ CHECK_DMA_QUIESCENT(MGAPTR(pScrn), pScrn);
+
+ MGANAME(SetupForSolidFill)(pScrn, 0, GXcopy, -1);
+ while (nbox--) {
+ MGASelectBuffer(pScrn, MGA_BACK);
+ MGANAME(SubsequentSolidFillRect)(pScrn, pbox->x1, pbox->y1,
+ pbox->x2-pbox->x1, pbox->y2-pbox->y1);
+ MGASelectBuffer(pScrn, MGA_DEPTH);
+ MGANAME(SubsequentSolidFillRect)(pScrn, pbox->x1, pbox->y1,
+ pbox->x2-pbox->x1, pbox->y2-pbox->y1);
+ pbox++;
+ }
+ MGASelectBuffer(pScrn, MGA_FRONT);
+
+ pMGA->AccelInfoRec->NeedToSync = TRUE;
}
/*
@@ -2089,140 +2090,142 @@ void
MGANAME(DRIMoveBuffers)(WindowPtr pParent, DDXPointRec ptOldOrg,
RegionPtr prgnSrc, CARD32 index)
{
- ScreenPtr pScreen = pParent->drawable.pScreen;
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
- MGAPtr pMGA = MGAPTR(pScrn);
- int nbox;
- BoxPtr pbox, pboxTmp, pboxNext, pboxBase, pboxNew1, pboxNew2;
- DDXPointPtr pptTmp, pptNew1, pptNew2;
- int xdir, ydir;
- int dx, dy;
- DDXPointPtr pptSrc;
-
- int screenwidth = pScrn->virtualX;
- int screenheight = pScrn->virtualY;
-
- CHECK_DMA_QUIESCENT(MGAPTR(pScrn), pScrn);
-
- pbox = REGION_RECTS(prgnSrc);
- nbox = REGION_NUM_RECTS(prgnSrc);
- pboxNew1 = 0;
- pptNew1 = 0;
- pboxNew2 = 0;
- pboxNew2 = 0;
- pptSrc = &ptOldOrg;
-
- dx = pParent->drawable.x - ptOldOrg.x;
- dy = pParent->drawable.y - ptOldOrg.y;
-
- /* If the copy will overlap in Y, reverse the order */
- if (dy>0) {
- ydir = -1;
-
- if (nbox>1) {
- /* Keep ordering in each band, reverse order of bands */
- pboxNew1 = (BoxPtr)ALLOCATE_LOCAL(sizeof(BoxRec)*nbox);
- if (!pboxNew1) return;
- pptNew1 = (DDXPointPtr)ALLOCATE_LOCAL(sizeof(DDXPointRec)*nbox);
- if (!pptNew1) {
- DEALLOCATE_LOCAL(pboxNew1);
- return;
- }
- pboxBase = pboxNext = pbox+nbox-1;
- while (pboxBase >= pbox) {
- while ((pboxNext >= pbox) && (pboxBase->y1 == pboxNext->y1))
- pboxNext--;
- pboxTmp = pboxNext+1;
- pptTmp = pptSrc + (pboxTmp - pbox);
- while (pboxTmp <= pboxBase) {
- *pboxNew1++ = *pboxTmp++;
- *pptNew1++ = *pptTmp++;
+ ScreenPtr pScreen = pParent->drawable.pScreen;
+ ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ MGAPtr pMGA = MGAPTR(pScrn);
+ int nbox;
+ BoxPtr pbox, pboxTmp, pboxNext, pboxBase, pboxNew1, pboxNew2;
+ DDXPointPtr pptTmp, pptNew1, pptNew2;
+ int xdir, ydir;
+ int dx, dy;
+ DDXPointPtr pptSrc;
+ int screenwidth = pScrn->virtualX;
+ int screenheight = pScrn->virtualY;
+
+ CHECK_DMA_QUIESCENT(MGAPTR(pScrn), pScrn);
+
+ pbox = REGION_RECTS(prgnSrc);
+ nbox = REGION_NUM_RECTS(prgnSrc);
+ pboxNew1 = 0;
+ pptNew1 = 0;
+ pboxNew2 = 0;
+ pboxNew2 = 0;
+ pptSrc = &ptOldOrg;
+
+ dx = pParent->drawable.x - ptOldOrg.x;
+ dy = pParent->drawable.y - ptOldOrg.y;
+
+ /* If the copy will overlap in Y, reverse the order */
+ if (dy>0) {
+ ydir = -1;
+
+ if (nbox>1) {
+ /* Keep ordering in each band, reverse order of bands */
+ pboxNew1 = (BoxPtr)ALLOCATE_LOCAL(sizeof(BoxRec)*nbox);
+ if (!pboxNew1) return;
+ pptNew1 = (DDXPointPtr)ALLOCATE_LOCAL(sizeof(DDXPointRec)*nbox);
+ if (!pptNew1) {
+ DEALLOCATE_LOCAL(pboxNew1);
+ return;
+ }
+ pboxBase = pboxNext = pbox+nbox-1;
+ while (pboxBase >= pbox) {
+ while ((pboxNext >= pbox) && (pboxBase->y1 == pboxNext->y1))
+ pboxNext--;
+ pboxTmp = pboxNext+1;
+ pptTmp = pptSrc + (pboxTmp - pbox);
+ while (pboxTmp <= pboxBase) {
+ *pboxNew1++ = *pboxTmp++;
+ *pptNew1++ = *pptTmp++;
+ }
+ pboxBase = pboxNext;
+ }
+ pboxNew1 -= nbox;
+ pbox = pboxNew1;
+ pptNew1 -= nbox;
+ pptSrc = pptNew1;
}
- pboxBase = pboxNext;
- }
- pboxNew1 -= nbox;
- pbox = pboxNew1;
- pptNew1 -= nbox;
- pptSrc = pptNew1;
+ } else {
+ /* No changes required */
+ ydir = 1;
}
- } else {
- /* No changes required */
- ydir = 1;
- }
-
- /* If the regions will overlap in X, reverse the order */
- if (dx>0) {
- xdir = -1;
-
- if (nbox > 1) {
- /*reverse orderof rects in each band */
- pboxNew2 = (BoxPtr)ALLOCATE_LOCAL(sizeof(BoxRec)*nbox);
- pptNew2 = (DDXPointPtr)ALLOCATE_LOCAL(sizeof(DDXPointRec)*nbox);
- if (!pboxNew2 || !pptNew2) {
- if (pptNew2) DEALLOCATE_LOCAL(pptNew2);
- if (pboxNew2) DEALLOCATE_LOCAL(pboxNew2);
- if (pboxNew1) {
- DEALLOCATE_LOCAL(pptNew1);
- DEALLOCATE_LOCAL(pboxNew1);
- }
- return;
- }
- pboxBase = pboxNext = pbox;
- while (pboxBase < pbox+nbox) {
- while ((pboxNext < pbox+nbox) && (pboxNext->y1 == pboxBase->y1))
- pboxNext++;
- pboxTmp = pboxNext;
- pptTmp = pptSrc + (pboxTmp - pbox);
- while (pboxTmp != pboxBase) {
- *pboxNew2++ = *--pboxTmp;
- *pptNew2++ = *--pptTmp;
+
+ /* If the regions will overlap in X, reverse the order */
+ if (dx>0) {
+ xdir = -1;
+
+ if (nbox > 1) {
+ /*reverse orderof rects in each band */
+ pboxNew2 = (BoxPtr)ALLOCATE_LOCAL(sizeof(BoxRec)*nbox);
+ pptNew2 = (DDXPointPtr)ALLOCATE_LOCAL(sizeof(DDXPointRec)*nbox);
+ if (!pboxNew2 || !pptNew2) {
+ if (pptNew2) DEALLOCATE_LOCAL(pptNew2);
+ if (pboxNew2) DEALLOCATE_LOCAL(pboxNew2);
+ if (pboxNew1) {
+ DEALLOCATE_LOCAL(pptNew1);
+ DEALLOCATE_LOCAL(pboxNew1);
+ }
+ return;
+ }
+ pboxBase = pboxNext = pbox;
+ while (pboxBase < pbox+nbox) {
+ while ((pboxNext < pbox+nbox) &&
+ (pboxNext->y1 == pboxBase->y1))
+ pboxNext++;
+ pboxTmp = pboxNext;
+ pptTmp = pptSrc + (pboxTmp - pbox);
+ while (pboxTmp != pboxBase) {
+ *pboxNew2++ = *--pboxTmp;
+ *pptNew2++ = *--pptTmp;
+ }
+ pboxBase = pboxNext;
+ }
+ pboxNew2 -= nbox;
+ pbox = pboxNew2;
+ pptNew2 -= nbox;
+ pptSrc = pptNew2;
}
- pboxBase = pboxNext;
- }
- pboxNew2 -= nbox;
- pbox = pboxNew2;
- pptNew2 -= nbox;
- pptSrc = pptNew2;
+ } else {
+ /* No changes are needed */
+ xdir = 1;
}
- } else {
- /* No changes are needed */
- xdir = 1;
- }
- MGANAME(SetupForScreenToScreenCopy)(pScrn, xdir, ydir, GXcopy, -1, -1);
- for ( ; nbox-- ; pbox++)
- {
- int x1 = pbox->x1;
- int y1 = pbox->y1;
- int destx = x1 + dx;
- int desty = y1 + dy;
- int w = pbox->x2 - x1 + 1;
- int h = pbox->y2 - y1 + 1;
-
- if ( destx < 0 ) x1 -= destx, w += destx, destx = 0;
- if ( desty < 0 ) y1 -= desty, h += desty, desty = 0;
- if ( destx + w > screenwidth ) w = screenwidth - destx;
- if ( desty + h > screenheight ) h = screenheight - desty;
- if ( w <= 0 ) continue;
- if ( h <= 0 ) continue;
-
- MGASelectBuffer(pScrn, MGA_BACK);
- MGANAME(SubsequentScreenToScreenCopy)(pScrn, x1,y1, destx,desty, w, h);
- MGASelectBuffer(pScrn, MGA_DEPTH);
- MGANAME(SubsequentScreenToScreenCopy)(pScrn, x1,y1, destx,desty, w, h);
- }
- MGASelectBuffer(pScrn, MGA_FRONT);
-
- if (pboxNew2) {
- DEALLOCATE_LOCAL(pptNew2);
- DEALLOCATE_LOCAL(pboxNew2);
- }
- if (pboxNew1) {
- DEALLOCATE_LOCAL(pptNew1);
- DEALLOCATE_LOCAL(pboxNew1);
- }
-
- pMGA->AccelInfoRec->NeedToSync = TRUE;
+ MGANAME(SetupForScreenToScreenCopy)(pScrn, xdir, ydir, GXcopy, -1, -1);
+ for ( ; nbox-- ; pbox++)
+ {
+ int x1 = pbox->x1;
+ int y1 = pbox->y1;
+ int destx = x1 + dx;
+ int desty = y1 + dy;
+ int w = pbox->x2 - x1 + 1;
+ int h = pbox->y2 - y1 + 1;
+
+ if ( destx < 0 ) x1 -= destx, w += destx, destx = 0;
+ if ( desty < 0 ) y1 -= desty, h += desty, desty = 0;
+ if ( destx + w > screenwidth ) w = screenwidth - destx;
+ if ( desty + h > screenheight ) h = screenheight - desty;
+ if ( w <= 0 ) continue;
+ if ( h <= 0 ) continue;
+
+ MGASelectBuffer(pScrn, MGA_BACK);
+ MGANAME(SubsequentScreenToScreenCopy)(pScrn, x1, y1,
+ destx,desty, w, h);
+ MGASelectBuffer(pScrn, MGA_DEPTH);
+ MGANAME(SubsequentScreenToScreenCopy)(pScrn, x1,y1,
+ destx,desty, w, h);
+ }
+ MGASelectBuffer(pScrn, MGA_FRONT);
+
+ if (pboxNew2) {
+ DEALLOCATE_LOCAL(pptNew2);
+ DEALLOCATE_LOCAL(pboxNew2);
+ }
+ if (pboxNew1) {
+ DEALLOCATE_LOCAL(pptNew1);
+ DEALLOCATE_LOCAL(pboxNew1);
+ }
+
+ pMGA->AccelInfoRec->NeedToSync = TRUE;
}
#endif /* XF86DRI */
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_video.c b/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_video.c
index 26ee6f8dc..444a1fc2b 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_video.c
+++ b/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_video.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/mga/mga_video.c,v 1.12 2000/03/08 01:14:27 mvojkovi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/mga/mga_video.c,v 1.15 2000/06/17 00:03:20 martin Exp $ */
#include "xf86.h"
#include "xf86_OSproc.h"
@@ -19,9 +19,10 @@
#include "xaa.h"
#include "xaalocal.h"
#include "dixstruct.h"
+#include "fourcc.h"
-#define OFF_DELAY 200 /* milliseconds */
-#define FREE_DELAY 60000
+#define OFF_DELAY 250 /* milliseconds */
+#define FREE_DELAY 15000
#define OFF_TIMER 0x01
#define FREE_TIMER 0x02
@@ -29,26 +30,36 @@
#define TIMER_MASK (OFF_TIMER | FREE_TIMER)
+#define MGA_MAX_PORTS 16
+
#ifndef XvExtension
void MGAInitVideo(ScreenPtr pScreen) {}
-void MGAResetVideo(ScrnInfoPtr pScrn) {}
#else
-static XF86VideoAdaptorPtr MGASetupImageVideoG(ScreenPtr);
static void MGAInitOffscreenImages(ScreenPtr);
-static void MGAStopVideoG(ScrnInfoPtr, pointer, Bool);
-static int MGASetPortAttributeG(ScrnInfoPtr, Atom, INT32, pointer);
-static int MGAGetPortAttributeG(ScrnInfoPtr, Atom ,INT32 *, pointer);
-static void MGAQueryBestSizeG(ScrnInfoPtr, Bool,
- short, short, short, short, unsigned int *, unsigned int *, pointer);
-static int MGAPutImageG( ScrnInfoPtr,
- short, short, short, short, short, short, short, short,
- int, unsigned char*, short, short, Bool, RegionPtr, pointer);
-static int MGAQueryImageAttributesG(ScrnInfoPtr,
- int, unsigned short *, unsigned short *, int *, int *);
+
+static XF86VideoAdaptorPtr MGASetupImageVideoOverlay(ScreenPtr);
+static int MGASetPortAttributeOverlay(ScrnInfoPtr, Atom, INT32, pointer);
+static int MGAGetPortAttributeOverlay(ScrnInfoPtr, Atom ,INT32 *, pointer);
+
+static XF86VideoAdaptorPtr MGASetupImageVideoTexture(ScreenPtr);
+static int MGASetPortAttributeTexture(ScrnInfoPtr, Atom, INT32, pointer);
+static int MGAGetPortAttributeTexture(ScrnInfoPtr, Atom ,INT32 *, pointer);
+
+static void MGAStopVideo(ScrnInfoPtr, pointer, Bool);
+static void MGAQueryBestSize(ScrnInfoPtr, Bool, short, short, short, short,
+ unsigned int *, unsigned int *, pointer);
+static int MGAPutImage(ScrnInfoPtr, short, short, short, short, short,
+ short, short, short, int, unsigned char*, short,
+ short, Bool, RegionPtr, pointer);
+static int MGAQueryImageAttributes(ScrnInfoPtr, int, unsigned short *,
+ unsigned short *, int *, int *);
static void MGABlockHandler(int, pointer, pointer, pointer);
+static void MGAResetVideoOverlay(ScrnInfoPtr);
+
+
#define MAKE_ATOM(a) MakeAtom(a, sizeof(a) - 1, TRUE)
static Atom xvBrightness, xvContrast, xvColorKey;
@@ -60,15 +71,32 @@ void MGAInitVideo(ScreenPtr pScreen)
XF86VideoAdaptorPtr newAdaptor = NULL;
MGAPtr pMga = MGAPTR(pScrn);
int num_adaptors;
-
- if((pScrn->bitsPerPixel != 8) && !pMga->Overlay8Plus24 &&
+
+ if((pScrn->bitsPerPixel != 8) && !pMga->NoAccel &&
((pMga->Chipset == PCI_CHIP_MGAG200) ||
(pMga->Chipset == PCI_CHIP_MGAG200_PCI) ||
(pMga->Chipset == PCI_CHIP_MGAG400)))
{
- newAdaptor = MGASetupImageVideoG(pScreen);
- MGAInitOffscreenImages(pScreen);
+
+ if((pMga->Overlay8Plus24 /* || dualhead */ || pMga->TexturedVideo) &&
+ (pScrn->bitsPerPixel != 24))
+ {
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Using texture video\n");
+ newAdaptor = MGASetupImageVideoTexture(pScreen);
+ pMga->TexturedVideo = TRUE;
+ } else {
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Using overlay video\n");
+ newAdaptor = MGASetupImageVideoOverlay(pScreen);
+ pMga->TexturedVideo = FALSE;
+ }
+
+ if(!pMga->Overlay8Plus24 /* && !dualhead */)
+ MGAInitOffscreenImages(pScreen);
+
+ pMga->BlockHandler = pScreen->BlockHandler;
+ pScreen->BlockHandler = MGABlockHandler;
}
+
num_adaptors = xf86XVListGenericAdaptors(pScrn, &adaptors);
@@ -97,113 +125,62 @@ void MGAInitVideo(ScreenPtr pScreen)
}
/* client libraries expect an encoding */
-static XF86VideoEncodingRec DummyEncoding[1] =
+static XF86VideoEncodingRec DummyEncoding[2] =
{
- {
+ { /* overlay limit */
0,
"XV_IMAGE",
1024, 1024,
{1, 1}
+ },
+ { /* texture limit */
+ 0,
+ "XV_IMAGE",
+ 2046, 2046,
+ {1, 1}
}
};
-#define NUM_FORMATS_G 3
+#define NUM_FORMATS_OVERLAY 3
+#define NUM_FORMATS_TEXTURE 6
-static XF86VideoFormatRec FormatsG[NUM_FORMATS_G] =
+static XF86VideoFormatRec Formats[NUM_FORMATS_TEXTURE] =
{
- {15, TrueColor}, {16, TrueColor}, {24, TrueColor}
+ {15, TrueColor}, {16, TrueColor}, {24, TrueColor},
+ {15, DirectColor}, {16, DirectColor}, {24, DirectColor}
};
-#define NUM_ATTRIBUTES_G 3
+#define NUM_ATTRIBUTES_OVERLAY 3
-static XF86AttributeRec AttributesG[NUM_ATTRIBUTES_G] =
+static XF86AttributeRec Attributes[NUM_ATTRIBUTES_OVERLAY] =
{
{XvSettable | XvGettable, 0, (1 << 24) - 1, "XV_COLORKEY"},
{XvSettable | XvGettable, -128, 127, "XV_BRIGHTNESS"},
{XvSettable | XvGettable, 0, 255, "XV_CONTRAST"}
};
-#define NUM_IMAGES_G 3
+#define NUM_IMAGES 4
-static XF86ImageRec ImagesG[NUM_IMAGES_G] =
+static XF86ImageRec Images[NUM_IMAGES] =
{
- {
- 0x32595559,
- XvYUV,
- LSBFirst,
- {'Y','U','Y','2',
- 0x00,0x00,0x00,0x10,0x80,0x00,0x00,0xAA,0x00,0x38,0x9B,0x71},
- 16,
- XvPacked,
- 1,
- 0, 0, 0, 0 ,
- 8, 8, 8,
- 1, 2, 2,
- 1, 1, 1,
- {'Y','U','Y','V',
- 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
- XvTopToBottom
- },
- {
- 0x32315659,
- XvYUV,
- LSBFirst,
- {'Y','V','1','2',
- 0x00,0x00,0x00,0x10,0x80,0x00,0x00,0xAA,0x00,0x38,0x9B,0x71},
- 12,
- XvPlanar,
- 3,
- 0, 0, 0, 0 ,
- 8, 8, 8,
- 1, 2, 2,
- 1, 2, 2,
- {'Y','V','U',
- 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
- XvTopToBottom
- },
- {
- 0x59565955,
- XvYUV,
- LSBFirst,
- {'U','Y','V','Y',
- 0x00,0x00,0x00,0x10,0x80,0x00,0x00,0xAA,0x00,0x38,0x9B,0x71},
- 16,
- XvPacked,
- 1,
- 0, 0, 0, 0 ,
- 8, 8, 8,
- 1, 2, 2,
- 1, 1, 1,
- {'U','Y','V','Y',
- 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
- XvTopToBottom
- }
+ XVIMAGE_YUY2,
+ XVIMAGE_YV12,
+ XVIMAGE_I420,
+ XVIMAGE_UYVY
};
-typedef struct {
- unsigned char brightness;
- unsigned char contrast;
- FBAreaPtr area;
- RegionRec clip;
- CARD32 colorKey;
- CARD32 videoStatus;
- Time offTime;
- Time freeTime;
-} MGAPortPrivRec, *MGAPortPrivPtr;
-
-
-#define GET_PORT_PRIVATE(pScrn) \
- (MGAPortPrivPtr)((MGAPTR(pScrn))->adaptor->pPortPrivates[0].ptr)
-
#define outMGAdreg(reg, val) OUTREG8(RAMDAC_OFFSET + (reg), val)
#define outMGAdac(reg, val) \
(outMGAdreg(MGA1064_INDEX, reg), outMGAdreg(MGA1064_DATA, val))
-void MGAResetVideo(ScrnInfoPtr pScrn)
+static void
+MGAResetVideoOverlay(ScrnInfoPtr pScrn)
{
MGAPtr pMga = MGAPTR(pScrn);
- MGAPortPrivPtr pPriv = pMga->adaptor->pPortPrivates[0].ptr;
+ MGAPortPrivPtr pPriv = pMga->portPrivate;
+ CHECK_DMA_QUIESCENT(pMga, pScrn);
+
outMGAdac(0x51, 0x01); /* keying on */
outMGAdac(0x52, 0xff); /* full mask */
outMGAdac(0x53, 0xff);
@@ -216,79 +193,136 @@ void MGAResetVideo(ScrnInfoPtr pScrn)
outMGAdac(0x57, (pPriv->colorKey & pScrn->mask.blue) >>
pScrn->offset.blue);
-
OUTREG(MGAREG_BESLUMACTL, ((pPriv->brightness & 0xff) << 16) |
(pPriv->contrast & 0xff));
}
+static XF86VideoAdaptorPtr
+MGAAllocAdaptor(ScrnInfoPtr pScrn)
+{
+ XF86VideoAdaptorPtr adapt;
+ MGAPtr pMga = MGAPTR(pScrn);
+ MGAPortPrivPtr pPriv;
+ int i;
+
+ if(!(adapt = xf86XVAllocateVideoAdaptorRec(pScrn)))
+ return NULL;
+
+ if(!(pPriv = xcalloc(1, sizeof(MGAPortPrivRec) +
+ (sizeof(DevUnion) * MGA_MAX_PORTS))))
+ {
+ xfree(adapt);
+ return NULL;
+ }
+
+ adapt->pPortPrivates = (DevUnion*)(&pPriv[1]);
+
+ for(i = 0; i < MGA_MAX_PORTS; i++)
+ adapt->pPortPrivates[i].val = i;
+
+ xvBrightness = MAKE_ATOM("XV_BRIGHTNESS");
+ xvContrast = MAKE_ATOM("XV_CONTRAST");
+ xvColorKey = MAKE_ATOM("XV_COLORKEY");
+
+ pPriv->colorKey = pMga->videoKey;
+ pPriv->videoStatus = 0;
+ pPriv->brightness = 0;
+ pPriv->contrast = 128;
+ pPriv->lastPort = -1;
+
+ pMga->adaptor = adapt;
+ pMga->portPrivate = pPriv;
+
+ return adapt;
+}
+
static XF86VideoAdaptorPtr
-MGASetupImageVideoG(ScreenPtr pScreen)
+MGASetupImageVideoOverlay(ScreenPtr pScreen)
{
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
MGAPtr pMga = MGAPTR(pScrn);
XF86VideoAdaptorPtr adapt;
- MGAPortPrivPtr pPriv;
- if(!(adapt = xcalloc(1, sizeof(XF86VideoAdaptorRec) +
- sizeof(MGAPortPrivRec) +
- sizeof(DevUnion))))
- return NULL;
+ adapt = MGAAllocAdaptor(pScrn);
adapt->type = XvWindowMask | XvInputMask | XvImageMask;
adapt->flags = VIDEO_OVERLAID_IMAGES | VIDEO_CLIP_TO_VIEWPORT;
adapt->name = "Matrox G-Series Backend Scaler";
adapt->nEncodings = 1;
- adapt->pEncodings = DummyEncoding;
- adapt->nFormats = NUM_FORMATS_G;
- adapt->pFormats = FormatsG;
+ adapt->pEncodings = &DummyEncoding[0];
+ adapt->nFormats = NUM_FORMATS_OVERLAY;
+ adapt->pFormats = Formats;
adapt->nPorts = 1;
- adapt->pPortPrivates = (DevUnion*)(&adapt[1]);
- pPriv = (MGAPortPrivPtr)(&adapt->pPortPrivates[1]);
- adapt->pPortPrivates[0].ptr = (pointer)(pPriv);
- adapt->pAttributes = AttributesG;
+ adapt->pAttributes = Attributes;
if (pMga->Chipset == PCI_CHIP_MGAG400) {
- adapt->nImages = 3;
+ adapt->nImages = 4;
adapt->nAttributes = 3;
} else {
- adapt->nImages = 2;
+ adapt->nImages = 3;
adapt->nAttributes = 1;
}
- adapt->pImages = ImagesG;
+ adapt->pImages = Images;
adapt->PutVideo = NULL;
adapt->PutStill = NULL;
adapt->GetVideo = NULL;
adapt->GetStill = NULL;
- adapt->StopVideo = MGAStopVideoG;
- adapt->SetPortAttribute = MGASetPortAttributeG;
- adapt->GetPortAttribute = MGAGetPortAttributeG;
- adapt->QueryBestSize = MGAQueryBestSizeG;
- adapt->PutImage = MGAPutImageG;
- adapt->QueryImageAttributes = MGAQueryImageAttributesG;
+ adapt->StopVideo = MGAStopVideo;
+ adapt->SetPortAttribute = MGASetPortAttributeOverlay;
+ adapt->GetPortAttribute = MGAGetPortAttributeOverlay;
+ adapt->QueryBestSize = MGAQueryBestSize;
+ adapt->PutImage = MGAPutImage;
+ adapt->QueryImageAttributes = MGAQueryImageAttributes;
- pPriv->colorKey = pMga->videoKey;
- pPriv->videoStatus = 0;
- pPriv->brightness = 0;
- pPriv->contrast = 128;
-
/* gotta uninit this someplace */
- REGION_INIT(pScreen, &pPriv->clip, NullBox, 0);
+ REGION_INIT(pScreen, &(pMga->portPrivate->clip), NullBox, 0);
- pMga->adaptor = adapt;
+ MGAResetVideoOverlay(pScrn);
- pMga->BlockHandler = pScreen->BlockHandler;
- pScreen->BlockHandler = MGABlockHandler;
+ return adapt;
+}
- xvBrightness = MAKE_ATOM("XV_BRIGHTNESS");
- xvContrast = MAKE_ATOM("XV_CONTRAST");
- xvColorKey = MAKE_ATOM("XV_COLORKEY");
- MGAResetVideo(pScrn);
+static XF86VideoAdaptorPtr
+MGASetupImageVideoTexture(ScreenPtr pScreen)
+{
+ ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ XF86VideoAdaptorPtr adapt;
+ MGAPtr pMga = MGAPTR(pScrn);
+
+ adapt = MGAAllocAdaptor(pScrn);
+
+ adapt->type = XvWindowMask | XvInputMask | XvImageMask;
+ adapt->flags = 0;
+ adapt->name = "Matrox G-Series Texture Engine";
+ adapt->nEncodings = 1;
+ adapt->pEncodings = &DummyEncoding[1];
+ adapt->nFormats = NUM_FORMATS_TEXTURE;
+ adapt->pFormats = Formats;
+ adapt->nPorts = MGA_MAX_PORTS;
+ adapt->pAttributes = NULL;
+ adapt->nAttributes = 0;
+ adapt->pImages = Images;
+ if (pMga->Chipset == PCI_CHIP_MGAG400)
+ adapt->nImages = 4;
+ else
+ adapt->nImages = 3;
+ adapt->PutVideo = NULL;
+ adapt->PutStill = NULL;
+ adapt->GetVideo = NULL;
+ adapt->GetStill = NULL;
+ adapt->StopVideo = MGAStopVideo;
+ adapt->SetPortAttribute = MGASetPortAttributeTexture;
+ adapt->GetPortAttribute = MGAGetPortAttributeTexture;
+ adapt->QueryBestSize = MGAQueryBestSize;
+ adapt->PutImage = MGAPutImage;
+ adapt->QueryImageAttributes = MGAQueryImageAttributes;
return adapt;
}
+
static Bool
RegionsEqual(RegionPtr A, RegionPtr B)
{
@@ -328,18 +362,21 @@ RegionsEqual(RegionPtr A, RegionPtr B)
boundaries in 16.16 fixed point.
*/
-static void
+#define DummyScreen screenInfo.screens[0]
+
+static Bool
MGAClipVideo(
BoxPtr dst,
INT32 *x1,
INT32 *x2,
INT32 *y1,
INT32 *y2,
- BoxPtr extents, /* extents of the clip region */
+ RegionPtr reg,
INT32 width,
INT32 height
){
INT32 vscale, hscale, delta;
+ BoxPtr extents = REGION_EXTENTS(DummyScreen, reg);
int diff;
hscale = ((*x2 - *x1) << 16) / (dst->x2 - dst->x1);
@@ -380,6 +417,8 @@ MGAClipVideo(
dst->x2 -= diff;
*x2 -= diff * hscale;
}
+ if(*x1 >= *x2) return FALSE;
+
if(*y1 < 0) {
diff = (- *y1 + vscale - 1)/ vscale;
dst->y1 += diff;
@@ -391,13 +430,26 @@ MGAClipVideo(
dst->y2 -= diff;
*y2 -= diff * vscale;
}
+ if(*y1 >= *y2) return FALSE;
+
+ if((dst->x1 != extents->x1) || (dst->x2 != extents->x2) ||
+ (dst->y1 != extents->y1) || (dst->y2 != extents->y2))
+ {
+ RegionRec clipReg;
+ REGION_INIT(DummyScreen, &clipReg, dst, 1);
+ REGION_INTERSECT(DummyScreen, reg, reg, &clipReg);
+ REGION_UNINIT(DummyScreen, &clipReg);
+ }
+ return TRUE;
}
static void
-MGAStopVideoG(ScrnInfoPtr pScrn, pointer data, Bool exit)
+MGAStopVideo(ScrnInfoPtr pScrn, pointer data, Bool exit)
{
- MGAPortPrivPtr pPriv = (MGAPortPrivPtr)data;
MGAPtr pMga = MGAPTR(pScrn);
+ MGAPortPrivPtr pPriv = pMga->portPrivate;
+
+ if(pMga->TexturedVideo) return;
REGION_EMPTY(pScrn->pScreen, &pPriv->clip);
@@ -418,14 +470,16 @@ MGAStopVideoG(ScrnInfoPtr pScrn, pointer data, Bool exit)
}
static int
-MGASetPortAttributeG(
+MGASetPortAttributeOverlay(
ScrnInfoPtr pScrn,
Atom attribute,
INT32 value,
pointer data
){
- MGAPortPrivPtr pPriv = (MGAPortPrivPtr)data;
MGAPtr pMga = MGAPTR(pScrn);
+ MGAPortPrivPtr pPriv = pMga->portPrivate;
+
+ CHECK_DMA_QUIESCENT(pMga, pScrn);
if(attribute == xvBrightness) {
if((value < -128) || (value > 127))
@@ -456,13 +510,14 @@ MGASetPortAttributeG(
}
static int
-MGAGetPortAttributeG(
+MGAGetPortAttributeOverlay(
ScrnInfoPtr pScrn,
Atom attribute,
INT32 *value,
pointer data
){
- MGAPortPrivPtr pPriv = (MGAPortPrivPtr)data;
+ MGAPtr pMga = MGAPTR(pScrn);
+ MGAPortPrivPtr pPriv = pMga->portPrivate;
if(attribute == xvBrightness) {
*value = pPriv->brightness;
@@ -477,8 +532,30 @@ MGAGetPortAttributeG(
return Success;
}
+
+static int
+MGASetPortAttributeTexture(
+ ScrnInfoPtr pScrn,
+ Atom attribute,
+ INT32 value,
+ pointer data
+) {
+ return BadMatch;
+}
+
+
+static int
+MGAGetPortAttributeTexture(
+ ScrnInfoPtr pScrn,
+ Atom attribute,
+ INT32 *value,
+ pointer data
+){
+ return BadMatch;
+}
+
static void
-MGAQueryBestSizeG(
+MGAQueryBestSize(
ScrnInfoPtr pScrn,
Bool motion,
short vid_w, short vid_h,
@@ -488,8 +565,6 @@ MGAQueryBestSizeG(
){
*p_w = drw_w;
*p_h = drw_h;
-
- if(*p_w > 16384) *p_w = 16384;
}
@@ -585,7 +660,7 @@ MGAAllocateMemory(
}
static void
-MGADisplayVideo(
+MGADisplayVideoOverlay(
ScrnInfoPtr pScrn,
int id,
int offset,
@@ -599,16 +674,18 @@ MGADisplayVideo(
MGAPtr pMga = MGAPTR(pScrn);
int tmp;
+ CHECK_DMA_QUIESCENT(pMga, pScrn);
+
/* got 64 scanlines to do it in */
tmp = INREG(MGAREG_VCOUNT) + 64;
if(tmp > pScrn->currentMode->VDisplay)
tmp -= pScrn->currentMode->VDisplay;
switch(id) {
- case 0x59565955:
+ case FOURCC_UYVY:
OUTREG(MGAREG_BESGLOBCTL, 0x000000c3 | (tmp << 16));
break;
- case 0x32595559:
+ case FOURCC_YUY2:
default:
OUTREG(MGAREG_BESGLOBCTL, 0x00000083 | (tmp << 16));
break;
@@ -645,8 +722,95 @@ MGADisplayVideo(
}
+static void
+MGADisplayVideoTexture(
+ ScrnInfoPtr pScrn,
+ int id, int offset,
+ int nbox, BoxPtr pbox,
+ int width, int height, int pitch,
+ short src_x, short src_y,
+ short src_w, short src_h,
+ short drw_x, short drw_y,
+ short drw_w, short drw_h
+){
+ MGAPtr pMga = MGAPTR(pScrn);
+ int log2w, log2h, i, incx, incy, padw, padh;
+
+ pitch >>= 1;
+
+ i = 12;
+ while(--i) {
+ if(width & (1 << i)) {
+ log2w = i;
+ if(width & ((1 << i) - 1))
+ log2w++;
+ break;
+ }
+ }
+
+ i = 12;
+ while(--i) {
+ if(height & (1 << i)) {
+ log2h = i;
+ if(height & ((1 << i) - 1))
+ log2h++;
+ break;
+ }
+ }
+
+ padw = 1 << log2w;
+ padh = 1 << log2h;
+ incx = (src_w << 20)/(drw_w * padw);
+ incy = (src_h << 20)/(drw_h * padh);
+
+ CHECK_DMA_QUIESCENT(pMga, pScrn);
+
+ if(pMga->Overlay8Plus24) {
+ i = 0x00ffffff;
+ WAITFIFO(1);
+ SET_PLANEMASK(i);
+ }
+
+ WAITFIFO(15);
+ OUTREG(MGAREG_TMR0, incx); /* sx inc */
+ OUTREG(MGAREG_TMR1, 0); /* sy inc */
+ OUTREG(MGAREG_TMR2, 0); /* tx inc */
+ OUTREG(MGAREG_TMR3, incy); /* ty inc */
+ OUTREG(MGAREG_TMR4, 0x00000000);
+ OUTREG(MGAREG_TMR5, 0x00000000);
+ OUTREG(MGAREG_TMR8, 0x00010000);
+ OUTREG(MGAREG_TEXORG, offset);
+ OUTREG(MGAREG_TEXWIDTH, log2w | (((8 - log2w) & 63) << 9) |
+ ((width - 1) << 18));
+ OUTREG(MGAREG_TEXHEIGHT, log2h | (((8 - log2h) & 63) << 9) |
+ ((height - 1) << 18));
+ if(id == FOURCC_UYVY)
+ OUTREG(MGAREG_TEXCTL, 0x1A00010b | ((pitch & 0x07FF) << 9));
+ else
+ OUTREG(MGAREG_TEXCTL, 0x1A00010a | ((pitch & 0x07FF) << 9));
+ OUTREG(MGAREG_TEXCTL2, 0x00000014);
+ OUTREG(MGAREG_DWGCTL, 0x000c7076);
+ OUTREG(MGAREG_TEXFILTER, 0x01e00020);
+ OUTREG(MGAREG_ALPHACTRL, 0x00000001);
+
+ padw = (src_x << 20)/padw;
+ padh = (src_y << 20)/padh;
+
+ while(nbox--) {
+ WAITFIFO(4);
+ OUTREG(MGAREG_TMR6, (incx * (pbox->x1 - drw_x)) + padw);
+ OUTREG(MGAREG_TMR7, (incy * (pbox->y1 - drw_y)) + padh);
+ OUTREG(MGAREG_FXBNDRY, (pbox->x2 << 16) | (pbox->x1 & 0xffff));
+ OUTREG(MGAREG_YDSTLEN + MGAREG_EXEC,
+ (pbox->y1 << 16) | (pbox->y2 - pbox->y1));
+ pbox++;
+ }
+
+ pMga->AccelInfoRec->NeedToSync = TRUE;
+}
+
static int
-MGAPutImageG(
+MGAPutImage(
ScrnInfoPtr pScrn,
short src_x, short src_y,
short drw_x, short drw_y,
@@ -657,8 +821,8 @@ MGAPutImageG(
Bool sync,
RegionPtr clipBoxes, pointer data
){
- MGAPortPrivPtr pPriv = (MGAPortPrivPtr)data;
MGAPtr pMga = MGAPTR(pScrn);
+ MGAPortPrivPtr pPriv = pMga->portPrivate;
INT32 x1, x2, y1, y2;
unsigned char *dst_start;
int pitch, new_h, offset, offset2, offset3;
@@ -667,8 +831,6 @@ MGAPutImageG(
BoxRec dstBox;
CARD32 tmp;
- if(drw_w > 16384) drw_w = 16384;
-
/* Clip */
x1 = src_x;
x2 = src_x + src_w;
@@ -680,16 +842,15 @@ MGAPutImageG(
dstBox.y1 = drw_y;
dstBox.y2 = drw_y + drw_h;
- MGAClipVideo(&dstBox, &x1, &x2, &y1, &y2,
- REGION_EXTENTS(pScreen, clipBoxes), width, height);
-
- if((x1 >= x2) || (y1 >= y2))
- return Success;
+ if(!MGAClipVideo(&dstBox, &x1, &x2, &y1, &y2, clipBoxes, width, height))
+ return Success;
- dstBox.x1 -= pScrn->frameX0;
- dstBox.x2 -= pScrn->frameX0;
- dstBox.y1 -= pScrn->frameY0;
- dstBox.y2 -= pScrn->frameY0;
+ if(!pMga->TexturedVideo) {
+ dstBox.x1 -= pScrn->frameX0;
+ dstBox.x2 -= pScrn->frameX0;
+ dstBox.y1 -= pScrn->frameY0;
+ dstBox.y2 -= pScrn->frameY0;
+ }
pitch = pScrn->bitsPerPixel * pScrn->displayWidth >> 3;
@@ -697,20 +858,20 @@ MGAPutImageG(
new_h = ((dstPitch * height) + pitch - 1) / pitch;
switch(id) {
- case 0x32315659:
+ case FOURCC_YV12:
+ case FOURCC_I420:
srcPitch = (width + 3) & ~3;
offset2 = srcPitch * height;
srcPitch2 = ((width >> 1) + 3) & ~3;
offset3 = (srcPitch2 * (height >> 1)) + offset2;
break;
- case 0x59565955:
- case 0x32595559:
+ case FOURCC_UYVY:
+ case FOURCC_YUY2:
default:
srcPitch = (width << 1);
break;
}
-
if(!(pPriv->area = MGAAllocateMemory(pScrn, pPriv->area, new_h)))
return BadAlloc;
@@ -720,22 +881,35 @@ MGAPutImageG(
npixels = ((((x2 + 0xffff) >> 16) + 1) & ~1) - left;
left <<= 1;
- offset = (pPriv->area->box.y1 * pitch) + (top * dstPitch);
- dst_start = pMga->FbStart + offset + left;
+ offset = pPriv->area->box.y1 * pitch;
+ dst_start = pMga->FbStart + offset + left + (top * dstPitch);
+
+ if(pMga->TexturedVideo && pMga->AccelInfoRec->NeedToSync &&
+ ((long)data != pPriv->lastPort))
+ {
+ MGAStormSync(pScrn);
+ pMga->AccelInfoRec->NeedToSync = FALSE;
+ }
switch(id) {
- case 0x32315659:
+ case FOURCC_YV12:
+ case FOURCC_I420:
top &= ~1;
tmp = ((top >> 1) * srcPitch2) + (left >> 2);
offset2 += tmp;
- offset3 += tmp;
+ offset3 += tmp;
+ if(id == FOURCC_I420) {
+ tmp = offset2;
+ offset2 = offset3;
+ offset3 = tmp;
+ }
nlines = ((((y2 + 0xffff) >> 16) + 1) & ~1) - top;
MGACopyMungedData(buf + (top * srcPitch) + (left >> 1),
buf + offset2, buf + offset3, dst_start,
srcPitch, srcPitch2, dstPitch, nlines, npixels);
break;
- case 0x59565955:
- case 0x32595559:
+ case FOURCC_UYVY:
+ case FOURCC_YUY2:
default:
buf += (top * srcPitch) + left;
nlines = ((y2 + 0xffff) >> 16) - top;
@@ -743,42 +917,59 @@ MGAPutImageG(
break;
}
+ if(pMga->TexturedVideo) {
+ pPriv->lastPort = (long)data;
+ MGADisplayVideoTexture(pScrn, id, offset,
+ REGION_NUM_RECTS(clipBoxes), REGION_RECTS(clipBoxes),
+ width, height, dstPitch, src_x, src_y, src_w, src_h,
+ drw_x, drw_y, drw_w, drw_h);
+ pPriv->videoStatus = FREE_TIMER;
+ pPriv->freeTime = currentTime.milliseconds + FREE_DELAY;
+ } else {
/* update cliplist */
- if(!RegionsEqual(&pPriv->clip, clipBoxes)) {
- REGION_COPY(pScreen, &pPriv->clip, clipBoxes);
- /* draw these */
- XAAFillSolidRects(pScrn, pPriv->colorKey, GXcopy, ~0,
+ if(!RegionsEqual(&pPriv->clip, clipBoxes)) {
+ REGION_COPY(pScreen, &pPriv->clip, clipBoxes);
+ /* draw these */
+ XAAFillSolidRects(pScrn, pPriv->colorKey, GXcopy, ~0,
REGION_NUM_RECTS(clipBoxes),
REGION_RECTS(clipBoxes));
- }
-
+ }
- MGADisplayVideo(pScrn, id, offset, width, height, dstPitch,
+ offset += top * dstPitch;
+ MGADisplayVideoOverlay(pScrn, id, offset, width, height, dstPitch,
x1, y1, x2, y2, &dstBox, src_w, src_h, drw_w, drw_h);
- pPriv->videoStatus = CLIENT_VIDEO_ON;
+ pPriv->videoStatus = CLIENT_VIDEO_ON;
+ }
return Success;
}
static int
-MGAQueryImageAttributesG(
- ScrnInfoPtr pScrn,
- int id,
- unsigned short *w, unsigned short *h,
- int *pitches, int *offsets
+MGAQueryImageAttributes(
+ ScrnInfoPtr pScrn,
+ int id,
+ unsigned short *w, unsigned short *h,
+ int *pitches, int *offsets
){
+ MGAPtr pMga = MGAPTR(pScrn);
int size, tmp;
- if(*w > 1024) *w = 1024;
- if(*h > 1024) *h = 1024;
+ if(pMga->TexturedVideo) {
+ if(*w > 2046) *w = 2046;
+ if(*h > 2046) *h = 2046;
+ } else {
+ if(*w > 1024) *w = 1024;
+ if(*h > 1024) *h = 1024;
+ }
*w = (*w + 1) & ~1;
if(offsets) offsets[0] = 0;
switch(id) {
- case 0x32315659:
+ case FOURCC_YV12:
+ case FOURCC_I420:
*h = (*h + 1) & ~1;
size = (*w + 3) & ~3;
if(pitches) pitches[0] = size;
@@ -791,8 +982,8 @@ MGAQueryImageAttributesG(
if(offsets) offsets[2] = size;
size += tmp;
break;
- case 0x59565955:
- case 0x32595559:
+ case FOURCC_UYVY:
+ case FOURCC_YUY2:
default:
size = *w << 1;
if(pitches) pitches[0] = size;
@@ -810,10 +1001,10 @@ MGABlockHandler (
pointer pTimeout,
pointer pReadmask
){
- ScreenPtr pScreen = screenInfo.screens[i];
- ScrnInfoPtr pScrn = xf86Screens[i];
- MGAPtr pMga = MGAPTR(pScrn);
- MGAPortPrivPtr pPriv = GET_PORT_PRIVATE(pScrn);
+ ScreenPtr pScreen = screenInfo.screens[i];
+ ScrnInfoPtr pScrn = xf86Screens[i];
+ MGAPtr pMga = MGAPTR(pScrn);
+ MGAPortPrivPtr pPriv = pMga->portPrivate;
pScreen->BlockHandler = pMga->BlockHandler;
@@ -875,15 +1066,19 @@ MGAAllocateSurface(
surface->width = w;
surface->height = h;
- if(!(surface->pitches = xalloc(sizeof(int))))
+ if(!(surface->pitches = xalloc(sizeof(int)))) {
+ xf86FreeOffscreenArea(area);
return BadAlloc;
+ }
if(!(surface->offsets = xalloc(sizeof(int)))) {
xfree(surface->pitches);
+ xf86FreeOffscreenArea(area);
return BadAlloc;
}
if(!(pPriv = xalloc(sizeof(OffscreenPrivRec)))) {
xfree(surface->pitches);
xfree(surface->offsets);
+ xf86FreeOffscreenArea(area);
return BadAlloc;
}
@@ -933,22 +1128,20 @@ MGAFreeSurface(
static int
MGAGetSurfaceAttribute(
- XF86SurfacePtr surface,
+ ScrnInfoPtr pScrn,
Atom attribute,
INT32 *value
){
- return MGAGetPortAttributeG(surface->pScrn, attribute, value,
- (pointer)(GET_PORT_PRIVATE(surface->pScrn)));
+ return MGAGetPortAttributeOverlay(pScrn, attribute, value, 0);
}
static int
MGASetSurfaceAttribute(
- XF86SurfacePtr surface,
+ ScrnInfoPtr pScrn,
Atom attribute,
INT32 value
){
- return MGASetPortAttributeG(surface->pScrn, attribute, value,
- (pointer)(GET_PORT_PRIVATE(surface->pScrn)));
+ return MGASetPortAttributeOverlay(pScrn, attribute, value, 0);
}
@@ -963,7 +1156,8 @@ MGADisplaySurface(
){
OffscreenPrivPtr pPriv = (OffscreenPrivPtr)surface->devPrivate.ptr;
ScrnInfoPtr pScrn = surface->pScrn;
- MGAPortPrivPtr portPriv = GET_PORT_PRIVATE(pScrn);
+ MGAPtr pMga = MGAPTR(pScrn);
+ MGAPortPrivPtr portPriv = pMga->portPrivate;
INT32 x1, y1, x2, y2;
BoxRec dstBox;
@@ -977,27 +1171,29 @@ MGADisplaySurface(
dstBox.y1 = drw_y;
dstBox.y2 = drw_y + drw_h;
- MGAClipVideo(&dstBox, &x1, &x2, &y1, &y2,
- REGION_EXTENTS(pScreen, clipBoxes),
- surface->width, surface->height);
-
- if((x1 >= x2) || (y1 >= y2))
+ if(!MGAClipVideo(&dstBox, &x1, &x2, &y1, &y2, clipBoxes,
+ surface->width, surface->height))
+ {
return Success;
+ }
dstBox.x1 -= pScrn->frameX0;
dstBox.x2 -= pScrn->frameX0;
dstBox.y1 -= pScrn->frameY0;
dstBox.y2 -= pScrn->frameY0;
- XAAFillSolidRects(pScrn, portPriv->colorKey, GXcopy, ~0,
- REGION_NUM_RECTS(clipBoxes),
- REGION_RECTS(clipBoxes));
+ MGAResetVideoOverlay(pScrn);
- MGADisplayVideo(pScrn, surface->id, surface->offsets[0],
+ MGADisplayVideoOverlay(pScrn, surface->id, surface->offsets[0],
surface->width, surface->height, surface->pitches[0],
x1, y1, x2, y2, &dstBox, src_w, src_h, drw_w, drw_h);
+ XAAFillSolidRects(pScrn, portPriv->colorKey, GXcopy, ~0,
+ REGION_NUM_RECTS(clipBoxes),
+ REGION_RECTS(clipBoxes));
+
pPriv->isOn = TRUE;
+ /* we've prempted the XvImage stream so set its free timer */
if(portPriv->videoStatus & CLIENT_VIDEO_ON) {
REGION_EMPTY(pScrn->pScreen, &portPriv->clip);
UpdateCurrentTime();
@@ -1021,7 +1217,7 @@ MGAInitOffscreenImages(ScreenPtr pScreen)
if(!(offscreenImages = xalloc(num * sizeof(XF86OffscreenImageRec))))
return;
- offscreenImages[0].image = &ImagesG[0];
+ offscreenImages[0].image = &Images[0];
offscreenImages[0].flags = VIDEO_OVERLAID_IMAGES |
VIDEO_CLIP_TO_VIEWPORT;
offscreenImages[0].alloc_surface = MGAAllocateSurface;
@@ -1033,10 +1229,10 @@ MGAInitOffscreenImages(ScreenPtr pScreen)
offscreenImages[0].max_width = 1024;
offscreenImages[0].max_height = 1024;
offscreenImages[0].num_attributes = (num == 1) ? 1 : 3;
- offscreenImages[0].attributes = AttributesG;
+ offscreenImages[0].attributes = Attributes;
if(num == 2) {
- offscreenImages[1].image = &ImagesG[2];
+ offscreenImages[1].image = &Images[3];
offscreenImages[1].flags = VIDEO_OVERLAID_IMAGES |
VIDEO_CLIP_TO_VIEWPORT;
offscreenImages[1].alloc_surface = MGAAllocateSurface;
@@ -1048,7 +1244,7 @@ MGAInitOffscreenImages(ScreenPtr pScreen)
offscreenImages[1].max_width = 1024;
offscreenImages[1].max_height = 1024;
offscreenImages[1].num_attributes = 3;
- offscreenImages[1].attributes = AttributesG;
+ offscreenImages[1].attributes = Attributes;
}
xf86XVRegisterOffscreenImages(pScreen, offscreenImages, num);
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_warp.c b/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_warp.c
index f7c81968c..50b9871b3 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_warp.c
+++ b/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_warp.c
@@ -1,3 +1,5 @@
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/mga/mga_warp.c,v 1.3 2000/06/17 18:23:23 dawes Exp $ */
+
#include "xf86.h"
#include "xf86_OSproc.h"
#include "xf86Resources.h"
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/neomagic/neomagic.cpp b/xc/programs/Xserver/hw/xfree86/drivers/neomagic/neomagic.cpp
index 8e41d5134..fb78c1238 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/neomagic/neomagic.cpp
+++ b/xc/programs/Xserver/hw/xfree86/drivers/neomagic/neomagic.cpp
@@ -1,17 +1,17 @@
-.\" $XFree86: xc/programs/Xserver/hw/xfree86/drivers/neomagic/neomagic.cpp,v 1.1 2000/03/03 01:05:40 dawes Exp $
-.TH NEOMAGIC __drivermansuffix__ "Version 4.0" "XFree86"
+.\" $XFree86: xc/programs/Xserver/hw/xfree86/drivers/neomagic/neomagic.cpp,v 1.4 2000/06/14 02:13:12 dawes Exp $
+.\" shorthand for double quote that works everywhere.
+.ds q \N'34'
+.TH NEOMAGIC __drivermansuffix__ "Version 4.0.1" "XFree86"
.SH NAME
neomagic \- NeoMagic video driver
.SH SYNOPSIS
-.B "Section ""Device"""
-.br
-.BI " Identifier """ devname """"
-.br
-.B " Driver ""neomagic"""
-.br
+.nf
+.B "Section \*qDevice\*q"
+.BI " Identifier \*q" devname \*q
+.B " Driver \*qneomagic\*q"
\ \ ...
-.br
.B EndSection
+.fi
.SH DESCRIPTION
.B neomagic
is an XFree86 driver for NeoMagic video chips.
@@ -25,6 +25,6 @@ Please refer to XF86Config(__filemansuffix__) for general configuration
details. This section only covers configuration details specific to this
driver.
.SH "SEE ALSO"
-XFree86(1), XF86Config(__filemansuffix__), xf86config(1), Xserver(1), X(1)
+XFree86(1), XF86Config(__filemansuffix__), xf86config(1), Xserver(1), X(__miscmansuffix__)
.SH AUTHORS
Authors include: ...
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/nv/nv_shadow.c b/xc/programs/Xserver/hw/xfree86/drivers/nv/nv_shadow.c
index fc6762c4c..be3fa3d0e 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/nv/nv_shadow.c
+++ b/xc/programs/Xserver/hw/xfree86/drivers/nv/nv_shadow.c
@@ -2,7 +2,7 @@
Copyright (c) 1999, The XFree86 Project Inc.
Written by Mark Vojkovich <markv@valinux.com>
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_shadow.c,v 1.4 2000/02/08 17:19:10 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_shadow.c,v 1.5 2000/03/13 18:49:29 mvojkovi Exp $ */
#include "xf86.h"
#include "xf86_OSproc.h"
@@ -154,58 +154,6 @@ NVRefreshArea16(ScrnInfoPtr pScrn, int num, BoxPtr pbox)
}
-/* this one could be faster */
-void
-NVRefreshArea24(ScrnInfoPtr pScrn, int num, BoxPtr pbox)
-{
- NVPtr pNv = NVPTR(pScrn);
- int count, width, height, y1, y2, dstPitch, srcPitch;
- CARD8 *dstPtr, *srcPtr, *src;
- CARD32 *dst;
-
- dstPitch = BitmapBytePad(pScrn->displayWidth * 24);
- srcPitch = -pNv->Rotate * pNv->ShadowPitch;
-
- while(num--) {
- width = pbox->x2 - pbox->x1;
- y1 = pbox->y1 & ~3;
- y2 = (pbox->y2 + 3) & ~3;
- height = (y2 - y1) >> 2; /* blocks of 3 dwords */
-
- if(pNv->Rotate == 1) {
- dstPtr = pNv->FbStart +
- (pbox->x1 * dstPitch) + ((pScrn->virtualX - y2) * 3);
- srcPtr = pNv->ShadowPtr + ((1 - y2) * srcPitch) + (pbox->x1 * 3);
- } else {
- dstPtr = pNv->FbStart +
- ((pScrn->virtualY - pbox->x2) * dstPitch) + (y1 * 3);
- srcPtr = pNv->ShadowPtr + (y1 * srcPitch) + (pbox->x2 * 3) - 3;
- }
-
- while(width--) {
- src = srcPtr;
- dst = (CARD32*)dstPtr;
- count = height;
- while(count--) {
- dst[0] = src[0] | (src[1] << 8) | (src[2] << 16) |
- (src[srcPitch] << 24);
- dst[1] = src[srcPitch + 1] | (src[srcPitch + 2] << 8) |
- (src[srcPitch * 2] << 16) |
- (src[(srcPitch * 2) + 1] << 24);
- dst[2] = src[(srcPitch * 2) + 2] | (src[srcPitch * 3] << 8) |
- (src[(srcPitch * 3) + 1] << 16) |
- (src[(srcPitch * 3) + 2] << 24);
- dst += 3;
- src += srcPitch * 4;
- }
- srcPtr += pNv->Rotate * 3;
- dstPtr += dstPitch;
- }
-
- pbox++;
- }
-}
-
void
NVRefreshArea32(ScrnInfoPtr pScrn, int num, BoxPtr pbox)
{
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/r128/Imakefile b/xc/programs/Xserver/hw/xfree86/drivers/r128/Imakefile
index 0ce2974e2..06dd69865 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/r128/Imakefile
+++ b/xc/programs/Xserver/hw/xfree86/drivers/r128/Imakefile
@@ -1,4 +1,4 @@
-XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/drivers/r128/Imakefile,v 1.6 2000/03/03 01:05:40 dawes Exp $
+XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/drivers/r128/Imakefile,v 1.8 2000/06/17 00:03:21 martin Exp $
XCOMM
XCOMM This is the Imakefile for the ATI Rage 128 (r128) driver.
XCOMM
@@ -13,9 +13,9 @@ DRIINCLUDES = -I$(SERVERSRC)/GL/dri -I$(LIBSRC)/GL/dri -I$(TOP)/include
DRIDEFINES = $(GLX_DEFINES)
#endif
-SRCS = r128_driver.c r128_cursor.c r128_accel.c $(DRISRCS) # r128_i2c.c
+SRCS = r128_driver.c r128_cursor.c r128_accel.c r128_dga.c $(DRISRCS) # r128_i2c.c
-OBJS = r128_driver.o r128_cursor.o r128_accel.o $(DRIOBJS) # r128_i2c.o
+OBJS = r128_driver.o r128_cursor.o r128_accel.o r128_dga.o $(DRIOBJS) # r128_i2c.o
#if defined(XF86DriverSDK)
INCLUDES = -I. -I../../include
@@ -57,6 +57,7 @@ InstallDriverSDKNonExecFile(r128.h,$(DRIVERSDKDIR)/drivers/r128)
InstallDriverSDKNonExecFile(r128_accel.c,$(DRIVERSDKDIR)/drivers/r128)
InstallDriverSDKNonExecFile(r128_cursor.c,$(DRIVERSDKDIR)/drivers/r128)
InstallDriverSDKNonExecFile(r128_driver.c,$(DRIVERSDKDIR)/drivers/r128)
+InstallDriverSDKNonExecFile(r128_dga.c,$(DRIVERSDKDIR)/drivers/r128)
InstallDriverSDKNonExecFile(r128_reg.h,$(DRIVERSDKDIR)/drivers/r128)
InstallDriverSDKNonExecFile(r128_dri.c,$(DRIVERSDKDIR)/drivers/r128)
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/r128/README b/xc/programs/Xserver/hw/xfree86/drivers/r128/README
index 27adcbbbd..95f482c00 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/r128/README
+++ b/xc/programs/Xserver/hw/xfree86/drivers/r128/README
@@ -69,7 +69,7 @@
7. Known Limitations
- * DGA is not supported yet
+ * None
8. Authors
@@ -111,4 +111,4 @@
http://www.suse.com
-$XFree86: xc/programs/Xserver/hw/xfree86/drivers/r128/README,v 1.3 2000/03/08 15:14:50 dawes Exp $
+$XFree86: xc/programs/Xserver/hw/xfree86/drivers/r128/README,v 1.4 2000/06/14 00:16:11 dawes Exp $
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/r128/r128.cpp b/xc/programs/Xserver/hw/xfree86/drivers/r128/r128.cpp
index 6d75efc5e..edc80576d 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/r128/r128.cpp
+++ b/xc/programs/Xserver/hw/xfree86/drivers/r128/r128.cpp
@@ -1,17 +1,17 @@
-.\" $XFree86: xc/programs/Xserver/hw/xfree86/drivers/r128/r128.cpp,v 1.3 2000/03/06 22:59:26 dawes Exp $
-.TH R128 __drivermansuffix__ "Version 4.0" "XFree86"
+.\" $XFree86: xc/programs/Xserver/hw/xfree86/drivers/r128/r128.cpp,v 1.6 2000/06/14 02:13:13 dawes Exp $
+.\" shorthand for double quote that works everywhere.
+.ds q \N'34'
+.TH R128 __drivermansuffix__ "Version 4.0.1" "XFree86"
.SH NAME
r128 \- ATI Rage 128 video driver
.SH SYNOPSIS
-.B "Section ""Device"""
-.br
-.BI " Identifier """ devname """"
-.br
-.B " Driver ""r128"""
-.br
+.nf
+.B "Section \*qDevice\*q"
+.BI " Identifier \*q" devname \*q
+.B " Driver \*qr128\*q"
\ \ ...
-.br
.B EndSection
+.fi
.SH DESCRIPTION
.B r128
is an XFree86 driver for ATI Rage 128 based video cards. It contains
@@ -48,22 +48,22 @@ In addition, the following driver
.B Options
are supported:
.TP
-.BI "Option ""SWcursor"" """ boolean """
+.BI "Option \*qSWcursor\*q \*q" boolean \*q
Selects software cursor. The default is
.B off.
.TP
-.BI "Option ""NoAccel"" """ boolean """
+.BI "Option \*qNoAccel\*q \*q" boolean \*q
Enables or disables all hardware acceleration. The default is to
.B enable
hardware acceleration.
.TP
-.BI "Option ""Dac6Bit"" """ boolean """
+.BI "Option \*qDac6Bit\*q \*q" boolean \*q
Enables or disables the use of 6 bits per color component when in 8 bpp
mode (emulates VGA mode). By default, all 8 bits per color component
are used. The default is
.B off.
.SH "SEE ALSO"
-XFree86(1), XF86Config(__filemansuffix__), xf86config(1), Xserver(1), X(1)
+XFree86(1), XF86Config(__filemansuffix__), xf86config(1), Xserver(1), X(__miscmansuffix__)
.SH AUTHORS
.nf
Rickard E. (Rik) Faith \fIfaith@precisioninsight.com\fP
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/r128/r128.h b/xc/programs/Xserver/hw/xfree86/drivers/r128/r128.h
index e948cb6b9..91676f19f 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/r128/r128.h
+++ b/xc/programs/Xserver/hw/xfree86/drivers/r128/r128.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/r128/r128.h,v 1.8 2000/02/23 04:47:18 martin Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/r128/r128.h,v 1.10 2000/06/17 00:03:22 martin Exp $ */
/**************************************************************************
Copyright 1999, 2000 ATI Technologies Inc. and Precision Insight, Inc.,
@@ -159,6 +159,15 @@ typedef struct {
} R128PLLRec, *R128PLLPtr;
typedef struct {
+ int bitsPerPixel;
+ int depth;
+ int displayWidth;
+ int pixel_code;
+ int pixel_bytes;
+ DisplayModePtr mode;
+} R128FBLayout;
+
+typedef struct {
EntityInfoPtr pEnt;
pciVideoPtr PciInfo;
PCITAG PciTag;
@@ -210,8 +219,6 @@ typedef struct {
int fifo_slots; /* Free slots in the FIFO (64 max) */
int pix24bpp; /* Depth of pixmap for 24bpp framebuffer */
- int pixel_code; /* Unified depth/fbbpp value */
- int pixel_bytes;/* Bytes per framebuffer pixel */
Bool dac6bits; /* Use 6 bit DAC? */
/* Computed values for Rage 128 */
@@ -234,6 +241,12 @@ typedef struct {
int scanline_direct;
int scanline_bpp; /* Only used for ImageWrite */
+ DGAModePtr DGAModes;
+ int numDGAModes;
+ Bool DGAactive;
+ int DGAViewportStatus;
+
+ R128FBLayout CurrentLayout;
#ifdef XF86DRI
Bool directRenderingEnabled;
DRIInfoPtr pDRIInfo;
@@ -241,14 +254,14 @@ typedef struct {
int numVisualConfigs;
__GLXvisualConfig *pVisualConfigs;
R128ConfigPrivPtr pVisualConfigsPriv;
-
+
drmHandle fbHandle;
-
+
drmSize registerSize;
drmHandle registerHandle;
Bool IsPCI; /* Current card is a PCI card */
-
+
drmSize agpSize;
drmHandle agpMemHandle; /* Handle from drmAgpAlloc */
unsigned long agpOffset;
@@ -327,10 +340,13 @@ extern void R128EngineFlush(ScrnInfoPtr pScrn);
extern int INPLL(ScrnInfoPtr pScrn, int addr);
extern void R128WaitForVerticalSync(ScrnInfoPtr pScrn);
+extern void R128AdjustFrame(int scrnIndex, int x, int y, int flags);
+extern Bool R128SwitchMode(int ScrnIndex, DisplayModePtr mode, int flags);
extern Bool R128AccelInit(ScreenPtr pScreen);
extern void R128EngineInit(ScrnInfoPtr pScrn);
extern Bool R128CursorInit(ScreenPtr pScreen);
+extern Bool R128DGAInit(ScreenPtr pScreen);
extern int R128MinBits(int val);
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/r128/r128_accel.c b/xc/programs/Xserver/hw/xfree86/drivers/r128/r128_accel.c
index e8ea10537..7a1ce0ed1 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/r128/r128_accel.c
+++ b/xc/programs/Xserver/hw/xfree86/drivers/r128/r128_accel.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/r128/r128_accel.c,v 1.7 2000/02/23 04:47:18 martin Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/r128/r128_accel.c,v 1.13 2000/06/26 05:41:32 martin Exp $ */
/**************************************************************************
Copyright 1999, 2000 ATI Technologies Inc. and Precision Insight, Inc.,
@@ -198,7 +198,7 @@ void R128WaitForFifoFunction(ScrnInfoPtr pScrn, int entries)
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
"FIFO timed out, resetting engine...\n");
R128EngineReset(pScrn);
-#if XF86DRI
+#ifdef XF86DRI
if (info->CCE2D) R128CCEStart(pScrn);
#endif
}
@@ -229,7 +229,7 @@ void R128WaitForIdle(ScrnInfoPtr pScrn)
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
"Idle timed out, resetting engine...\n");
R128EngineReset(pScrn);
-#if XF86DRI
+#ifdef XF86DRI
if (info->CCE2D) R128CCEStart(pScrn);
#endif
}
@@ -935,12 +935,12 @@ void R128EngineInit(ScrnInfoPtr pScrn)
R128InfoPtr info = R128PTR(pScrn);
R128MMIO_VARS();
- R128TRACE(("EngineInit (%d/%d)\n", info->pixel_code, pScrn->bitsPerPixel));
+ R128TRACE(("EngineInit (%d/%d)\n", info->CurrentLayout.pixel_code, info->CurrentLayout.bitsPerPixel));
OUTREG(R128_SCALE_3D_CNTL, 0);
R128EngineReset(pScrn);
- switch (info->pixel_code) {
+ switch (info->CurrentLayout.pixel_code) {
case 8: info->datatype = 2; break;
case 15: info->datatype = 3; break;
case 16: info->datatype = 4; break;
@@ -948,9 +948,10 @@ void R128EngineInit(ScrnInfoPtr pScrn)
case 32: info->datatype = 6; break;
default:
R128TRACE(("Unknown depth/bpp = %d/%d (code = %d)\n",
- pScrn->depth, pScrn->bitsPerPixel, info->pixel_code));
+ info->CurrentLayout.depth, info->CurrentLayout.bitsPerPixel,
+ info->CurrentLayout.pixel_code));
}
- info->pitch = (pScrn->displayWidth / 8) * (info->pixel_bytes == 3 ? 3 : 1);
+ info->pitch = (info->CurrentLayout.displayWidth / 8) * (info->CurrentLayout.pixel_bytes == 3 ? 3 : 1);
R128TRACE(("Pitch for acceleration = %d\n", info->pitch));
@@ -1080,7 +1081,7 @@ static void R128MMIOAccelInit(ScrnInfoPtr pScrn, XAAInfoRecPtr a)
| LINE_PATTERN_POWER_OF_2_ONLY);
#if R128_CLIPPING
/* Clipping. */
- if (pScrn->depth != 8 && info->pixel_code != 24) {
+ if (info->CurrentLayout.depth != 8 && info->CurrentLayout.pixel_code != 24) {
/* There is one xtest error in 8bpp and
many xtest errors in 24/24 that do not
appear at other depths. */
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/r128/r128_cursor.c b/xc/programs/Xserver/hw/xfree86/drivers/r128/r128_cursor.c
index 2667443d9..586a5c36a 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/r128/r128_cursor.c
+++ b/xc/programs/Xserver/hw/xfree86/drivers/r128/r128_cursor.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/r128/r128_cursor.c,v 1.6 2000/03/06 22:59:26 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/r128/r128_cursor.c,v 1.9 2000/06/17 00:27:32 dawes Exp $ */
/**************************************************************************
Copyright 1999, 2000 ATI Technologies Inc. and Precision Insight, Inc.,
@@ -141,7 +141,7 @@ static void R128LoadCursorImage(ScrnInfoPtr pScrn, unsigned char *image)
OUTREG(R128_CRTC_GEN_CNTL, save & ~R128_CRTC_CUR_EN);
#if X_BYTE_ORDER == X_BIG_ENDIAN
- switch(info->pixel_bytes) {
+ switch(info->CurrentLayout.pixel_bytes) {
case 4:
case 3:
for (y = 0; y < 64; y++) {
@@ -274,7 +274,7 @@ Bool R128CursorInit(ScreenPtr pScreen)
} else {
info->cursor_start = R128_ALIGN((fbarea->box.x1
+ width * fbarea->box.y1)
- * info->pixel_bytes, 16);
+ * info->CurrentLayout.pixel_bytes, 16);
info->cursor_end = info->cursor_start + size;
}
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/r128/r128_dri.c b/xc/programs/Xserver/hw/xfree86/drivers/r128/r128_dri.c
index 170639606..a1f6036c0 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/r128/r128_dri.c
+++ b/xc/programs/Xserver/hw/xfree86/drivers/r128/r128_dri.c
@@ -238,7 +238,7 @@ static Bool R128InitVisualConfigs(ScreenPtr pScreen)
R128ConfigPrivPtr *pR128ConfigPtrs = 0;
int i, accum, stencil;
- switch (pR128->pixel_code) {
+ switch (pR128->CurrentLayout.pixel_code) {
case 8: /* 8bpp mode is not support */
case 15: /* FIXME */
case 24: /* FIXME */
@@ -1007,7 +1007,7 @@ Bool R128DRIScreenInit(ScreenPtr pScreen)
return FALSE;
}
- switch (pR128->pixel_code) {
+ switch (pR128->CurrentLayout.pixel_code) {
case 8:
/* These modes are not supported (yet). */
case 15:
@@ -1039,7 +1039,7 @@ Bool R128DRIScreenInit(ScreenPtr pScreen)
pDRIInfo->frameBufferPhysicalAddress = pR128->LinearAddr;
pDRIInfo->frameBufferSize = pR128->FbMapSize;
pDRIInfo->frameBufferStride = (pScrn->displayWidth
- * pR128->pixel_bytes);
+ * pR128->CurrentLayout.pixel_bytes);
pDRIInfo->ddxDrawableTableEntry = R128_MAX_DRAWABLES;
pDRIInfo->maxDrawableTableEntry = (SAREA_MAX_DRAWABLES
< R128_MAX_DRAWABLES
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/r128/r128_driver.c b/xc/programs/Xserver/hw/xfree86/drivers/r128/r128_driver.c
index 6f83dd4fe..1c6588c89 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/r128/r128_driver.c
+++ b/xc/programs/Xserver/hw/xfree86/drivers/r128/r128_driver.c
@@ -1,8 +1,8 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/r128/r128_driver.c,v 1.26 2000/03/06 23:17:44 martin Exp $ */ /* -*- mode: c; c-basic-offset: 4 -*- */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/r128/r128_driver.c,v 1.38 2000/07/01 01:40:45 martin Exp $ */
/**************************************************************************
Copyright 1999, 2000 ATI Technologies Inc. and Precision Insight, Inc.,
- Cedar Park, Texas.
+ Cedar Park, Texas.
All Rights Reserved.
Permission is hereby granted, free of charge, to any person obtaining a
@@ -70,7 +70,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "mipointer.h"
#include "micmap.h"
-#undef USE_FB /* not until overlays and 24->32 code added */
+#define USE_FB /* not until overlays and 24->32 code added */
#ifdef USE_FB
#include "fb.h"
#else
@@ -139,7 +139,6 @@ static Bool R128ScreenInit(int scrnIndex, ScreenPtr pScreen,
static int R128ValidMode(int scrnIndex, DisplayModePtr mode,
Bool verbose, int flag);
-static void R128AdjustFrame(int scrnIndex, int x, int y, int flags);
static Bool R128EnterVT(int scrnIndex, int flags);
static void R128LeaveVT(int scrnIndex, int flags);
static Bool R128CloseScreen(int scrnIndex, ScreenPtr pScreen);
@@ -148,7 +147,6 @@ static Bool R128SaveScreen(ScreenPtr pScreen, int mode);
static void R128Save(ScrnInfoPtr pScrn);
static void R128Restore(ScrnInfoPtr pScrn);
static Bool R128ModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode);
-static Bool R128SwitchMode(int ScrnIndex, DisplayModePtr mode, int flags);
static void R128DisplayPowerManagementSet(ScrnInfoPtr pScrn,
int PowerManagementMode, int flags);
static Bool R128EnterVTFBDev(int scrnIndex, int flags);
@@ -355,6 +353,8 @@ static const char *drmSymbols[] = {
"drmMapBufs",
"drmMarkBufs",
"drmUnmapBufs",
+ "drmFreeVersion",
+ "drmGetVersion",
NULL
};
@@ -371,6 +371,7 @@ static const char *driSymbols[] = {
"DRIUnlock",
"DRIGetSAREAPrivate",
"DRIGetContext",
+ "DRIQueryVersion",
"GlxSetVisualConfigs",
NULL
};
@@ -795,16 +796,18 @@ static Bool R128PreInitVisual(ScrnInfoPtr pScrn)
info->fifo_slots = 0;
info->pix24bpp = xf86GetBppFromDepth(pScrn, pScrn->depth);
- info->pixel_bytes = pScrn->bitsPerPixel / 8;
- info->pixel_code = (pScrn->bitsPerPixel != 16
- ? pScrn->bitsPerPixel
- : pScrn->depth);
+ info->CurrentLayout.bitsPerPixel = pScrn->bitsPerPixel;
+ info->CurrentLayout.depth = pScrn->depth;
+ info->CurrentLayout.pixel_bytes = pScrn->bitsPerPixel / 8;
+ info->CurrentLayout.pixel_code = (pScrn->bitsPerPixel != 16
+ ? pScrn->bitsPerPixel
+ : pScrn->depth);
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"Pixel depth = %d bits stored in %d byte%s (%d bpp pixmaps)\n",
pScrn->depth,
- info->pixel_bytes,
- info->pixel_bytes > 1 ? "s" : "",
+ info->CurrentLayout.pixel_bytes,
+ info->CurrentLayout.pixel_bytes > 1 ? "s" : "",
info->pix24bpp);
@@ -992,6 +995,7 @@ static Bool R128PreInitConfig(ScrnInfoPtr pScrn)
case PCI_CHIP_RAGE128RL:
default: offset = 1; break; /* 64-bit SDR SGRAM 1:1 */
}
+ break;
case 1: offset = 2; break; /* 64-bit SDR SGRAM 2:1 */
case 2: offset = 3; break; /* 64-bit DDR SGRAM */
default: offset = 1; break; /* 64-bit SDR SGRAM 1:1 */
@@ -1049,7 +1053,8 @@ static Bool R128PreInitConfig(ScrnInfoPtr pScrn)
(crtc_h_sync_strt_wid & R128_CRTC_H_SYNC_STRT_CHAR)
>> R128_CRTC_H_SYNC_STRT_CHAR_SHIFT;
info->PanelHOverPlus -= tmp;
- switch (info->pixel_code) { /* Adjustments are from ATI */
+ switch (info->CurrentLayout.pixel_code) {
+ /* Adjustments are from ATI */
case 8: info->PanelHOverPlus += 2; break;
case 15:
case 16: info->PanelHOverPlus += 1; break;
@@ -1151,7 +1156,7 @@ static Bool R128PreInitModes(ScrnInfoPtr pScrn)
/* Get mode information */
pScrn->progClock = TRUE;
- clockRanges = xnfalloc(sizeof(*clockRanges));
+ clockRanges = xnfcalloc(sizeof(*clockRanges), 1);
clockRanges->next = NULL;
clockRanges->minClock = info->pll.min_pll_freq;
clockRanges->maxClock = info->pll.max_pll_freq * 10;
@@ -1195,7 +1200,8 @@ static Bool R128PreInitModes(ScrnInfoPtr pScrn)
/* Get ScreenInit function */
#ifdef USE_FB
- mod = "fb"; Sym = "fbScreenInit";
+ mod = "fb";
+ Sym = "fbScreenInit";
#else
switch (pScrn->bitsPerPixel) {
case 8: mod = "cfb"; Sym = "cfbScreenInit"; break;
@@ -1213,6 +1219,9 @@ static Bool R128PreInitModes(ScrnInfoPtr pScrn)
if (mod && !xf86LoadSubModule(pScrn, mod)) return FALSE;
xf86LoaderReqSymbols(Sym, NULL);
+ info->CurrentLayout.displayWidth = pScrn->displayWidth;
+ info->CurrentLayout.mode = pScrn->currentMode;
+
return TRUE;
}
@@ -1251,7 +1260,7 @@ static Bool R128PreInitInt10(ScrnInfoPtr pScrn)
#ifdef XF86DRI
static Bool R128PreInitDRI(ScrnInfoPtr pScrn)
{
- R128InfoPtr info = R128PTR(pScrn);
+ R128InfoPtr info = R128PTR(pScrn);
if (info->IsPCI) {
xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "CCE in PIO mode\n");
@@ -1365,38 +1374,17 @@ static Bool R128PreInitDRI(ScrnInfoPtr pScrn)
xf86DrvMsg(pScrn->scrnIndex, X_CONFIG,
"Using %d MB AGP aperture\n", info->agpSize);
xf86DrvMsg(pScrn->scrnIndex, X_CONFIG,
- "Using %d MB for AGP textures\n", info->agpTexSize);
- xf86DrvMsg(pScrn->scrnIndex, X_CONFIG,
"Using %d MB for the ring buffer\n", info->ringSize);
xf86DrvMsg(pScrn->scrnIndex, X_CONFIG,
+ "Using %d MB for vertex buffers\n", info->vbSize);
+ xf86DrvMsg(pScrn->scrnIndex, X_CONFIG,
"Using %d MB for indirect buffers\n", info->indSize);
- } else {
- if (xf86GetOptValInteger(R128Options,
- OPTION_VERT_SIZE, &(info->vbSize))) {
- if (info->vbSize < 1) {
- xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
- "Illegal vertex buffers list size: %d MB\n",
- info->vbSize);
- return FALSE;
- }
- }
-
- if (xf86GetOptValInteger(R128Options,
- OPTION_VBUF_SIZE, &(info->vbBufSize))) {
- if (info->vbBufSize < 1024) { /* FIXME: 1024 is arbitrary */
- xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
- "Illegal individual vertex buffer size: %d bytes\n",
- info->vbBufSize);
- return FALSE;
- }
- }
+ xf86DrvMsg(pScrn->scrnIndex, X_CONFIG,
+ "Using %d MB for AGP textures\n", info->agpTexSize);
+ xf86DrvMsg(pScrn->scrnIndex, X_CONFIG,
+ "Using %d byte vertex buffers\n", info->vbBufSize);
}
- xf86DrvMsg(pScrn->scrnIndex, X_CONFIG,
- "Using %d MB for vertex buffers\n", info->vbSize);
- xf86DrvMsg(pScrn->scrnIndex, X_CONFIG,
- "Using %d byte vertex buffers\n", info->vbBufSize);
-
if (xf86GetOptValInteger(R128Options, OPTION_USEC_TIMEOUT,
&(info->CCEusecTimeout))) {
/* This option checked by the R128 DRM kernel module */
@@ -1406,15 +1394,13 @@ static Bool R128PreInitDRI(ScrnInfoPtr pScrn)
}
#endif
-extern xf86MonPtr ConfiguredMonitor;
-
static void
R128ProbeDDC(ScrnInfoPtr pScrn, int index)
{
vbeInfoPtr pVbe;
if (xf86LoadSubModule(pScrn, "vbe")) {
pVbe = VBEInit(NULL,index);
- ConfiguredMonitor = vbeDoEDID(pVbe);
+ ConfiguredMonitor = vbeDoEDID(pVbe, NULL);
}
}
@@ -1518,62 +1504,53 @@ static Bool R128PreInit(ScrnInfoPtr pScrn, int flags)
return FALSE;
}
-/* Load a palette for 15bpp mode. This sends 32 values. */
-static void R128LoadPalette15(ScrnInfoPtr pScrn, int numColors,
- int *indices, LOCO *colors, VisualPtr pVisual)
+/* Load a palette. */
+static void R128LoadPalette(ScrnInfoPtr pScrn, int numColors,
+ int *indices, LOCO *colors, VisualPtr pVisual)
{
+ R128InfoPtr info = R128PTR(pScrn);
int i;
int idx;
unsigned char r, g, b;
R128MMIO_VARS();
- for (i = 0; i < numColors; i++) {
- idx = indices[i];
- r = colors[idx].red;
- g = colors[idx].green;
- b = colors[idx].blue;
- OUTPAL(idx * 8, r, g, b);
+ /* Select palette 0 (main CRTC) if using FP-enabled chip */
+ if (info->HasPanelRegs) PAL_SELECT(0);
+
+ if (info->CurrentLayout.depth == 15) {
+ /* 15bpp mode. This sends 32 values. */
+ for (i = 0; i < numColors; i++) {
+ idx = indices[i];
+ r = colors[idx].red;
+ g = colors[idx].green;
+ b = colors[idx].blue;
+ OUTPAL(idx * 8, r, g, b);
+ }
}
-}
-
-/* Load a palette for 16bpp mode. This sends 64 values. */
-static void R128LoadPalette16(ScrnInfoPtr pScrn, int numColors,
- int *indices, LOCO *colors, VisualPtr pVisual)
-{
- int i;
- int idx;
- unsigned char r, g, b;
- R128MMIO_VARS();
-
+ else if (info->CurrentLayout.depth == 16) {
+ /* 16bpp mode. This sends 64 values. */
/* There are twice as many green values as
there are values for red and blue. So,
we take each red and blue pair, and
combine it with each of the two green
values. */
- for (i = 0; i < numColors; i++) {
- idx = indices[i];
- r = colors[idx / 2].red;
- g = colors[idx].green;
- b = colors[idx / 2].blue;
- OUTPAL(idx * 4, r, g, b);
+ for (i = 0; i < numColors; i++) {
+ idx = indices[i];
+ r = colors[idx / 2].red;
+ g = colors[idx].green;
+ b = colors[idx / 2].blue;
+ OUTPAL(idx * 4, r, g, b);
+ }
}
-}
-
-/* Load a palette for 8bpp mode. This sends 256 values. */
-static void R128LoadPalette(ScrnInfoPtr pScrn, int numColors,
- int *indices, LOCO *colors, VisualPtr pVisual)
-{
- int i;
- int idx;
- unsigned char r, g, b;
- R128MMIO_VARS();
-
- for (i = 0; i < numColors; i++) {
- idx = indices[i];
- r = colors[idx].red;
- b = colors[idx].blue;
- g = colors[idx].green;
- OUTPAL(idx, r, g, b);
+ else {
+ /* 8bpp mode. This sends 256 values. */
+ for (i = 0; i < numColors; i++) {
+ idx = indices[i];
+ r = colors[idx].red;
+ b = colors[idx].blue;
+ g = colors[idx].green;
+ OUTPAL(idx, r, g, b);
+ }
}
}
@@ -1587,7 +1564,7 @@ static Bool R128ScreenInit(int scrnIndex, ScreenPtr pScreen,
int y2;
R128TRACE(("R128ScreenInit %x %d\n", pScrn->memPhysBase, pScrn->fbOffset));
-
+
#ifdef XF86DRI
/* Turn off the CCE for now. */
info->CCEInUse = FALSE;
@@ -1697,11 +1674,13 @@ static Bool R128ScreenInit(int scrnIndex, ScreenPtr pScreen,
}
}
+ R128DGAInit(pScreen);
+
/* Memory manager setup */
MemBox.x1 = 0;
MemBox.y1 = 0;
MemBox.x2 = pScrn->displayWidth;
- y2 = info->FbMapSize / (pScrn->displayWidth * info->pixel_bytes);
+ y2 = info->FbMapSize / (pScrn->displayWidth * info->CurrentLayout.pixel_bytes);
if (y2 >= 32768) y2 = 32767; /* because MemBox.y2 is signed short */
MemBox.y2 = y2;
@@ -1744,10 +1723,11 @@ static Bool R128ScreenInit(int scrnIndex, ScreenPtr pScreen,
as for local textures. */
if (info->directRenderingEnabled) {
FBAreaPtr fbarea;
- int width_bytes = pScrn->displayWidth * info->pixel_bytes;
+ int width_bytes = (pScrn->displayWidth *
+ info->CurrentLayout.pixel_bytes);
int maxy = info->FbMapSize / width_bytes;
int l;
-
+
/* Allocate the shared back buffer */
if ((fbarea = xf86AllocateOffscreenArea(pScreen,
pScrn->virtualX,
@@ -1786,7 +1766,8 @@ static Bool R128ScreenInit(int scrnIndex, ScreenPtr pScreen,
/* Allocate local texture space */
if (((maxy - MemBox.y2 - 1) * width_bytes) >
- (pScrn->virtualX * pScrn->virtualY * 2 * info->pixel_bytes)) {
+ (pScrn->virtualX * pScrn->virtualY * 2 *
+ info->CurrentLayout.pixel_bytes)) {
info->textureX = 0;
info->textureY = MemBox.y2 + 1;
info->textureSize = (maxy - MemBox.y2 - 1) * width_bytes;
@@ -1811,7 +1792,7 @@ static Bool R128ScreenInit(int scrnIndex, ScreenPtr pScreen,
info->textureY = fbarea->box.y1;
info->textureSize = ((fbarea->box.y2 - fbarea->box.y1) *
(fbarea->box.x2 - fbarea->box.x1) *
- info->pixel_bytes);
+ info->CurrentLayout.pixel_bytes);
l = R128MinBits((info->textureSize-1) / R128_NR_TEX_REGIONS);
if (l < R128_LOG_TEX_GRANULARITY) l = R128_LOG_TEX_GRANULARITY;
@@ -1878,28 +1859,12 @@ static Bool R128ScreenInit(int scrnIndex, ScreenPtr pScreen,
/* Colormap setup */
if (!miCreateDefColormap(pScreen)) return FALSE;
- if (pScrn->depth == 15) {
- if (!xf86HandleColormaps(pScreen, 256, info->dac6bits ? 6 : 8,
- (info->FBDev ? fbdevHWLoadPalette :
- R128LoadPalette15), NULL,
- CMAP_PALETTED_TRUECOLOR
- | CMAP_RELOAD_ON_MODE_SWITCH
- | CMAP_LOAD_EVEN_IF_OFFSCREEN)) return FALSE;
- } else if (pScrn->depth == 16) {
- if (!xf86HandleColormaps(pScreen, 256, info->dac6bits ? 6 : 8,
- (info->FBDev ? fbdevHWLoadPalette :
- R128LoadPalette16), NULL,
- CMAP_PALETTED_TRUECOLOR
- | CMAP_RELOAD_ON_MODE_SWITCH
- | CMAP_LOAD_EVEN_IF_OFFSCREEN)) return FALSE;
- } else {
- if (!xf86HandleColormaps(pScreen, 256, info->dac6bits ? 6 : 8,
- (info->FBDev ? fbdevHWLoadPalette :
- R128LoadPalette), NULL,
- CMAP_PALETTED_TRUECOLOR
- | CMAP_RELOAD_ON_MODE_SWITCH
- | CMAP_LOAD_EVEN_IF_OFFSCREEN)) return FALSE;
- }
+ if (!xf86HandleColormaps(pScreen, 256, info->dac6bits ? 6 : 8,
+ (info->FBDev ? fbdevHWLoadPalette :
+ R128LoadPalette), NULL,
+ CMAP_PALETTED_TRUECOLOR
+ | CMAP_RELOAD_ON_MODE_SWITCH
+ | CMAP_LOAD_EVEN_IF_OFFSCREEN)) return FALSE;
/* DPMS setup */
#ifdef DPMSExtension
@@ -2074,11 +2039,15 @@ static void R128RestoreDDARegisters(ScrnInfoPtr pScrn, R128SavePtr restore)
/* Write palette data. */
static void R128RestorePalette(ScrnInfoPtr pScrn, R128SavePtr restore)
{
- int i;
+ R128InfoPtr info = R128PTR(pScrn);
+ int i;
R128MMIO_VARS();
if (!restore->palette_valid) return;
+ /* Select palette 0 (main CRTC) if using FP-enabled chip */
+ if (info->HasPanelRegs) PAL_SELECT(0);
+
OUTPAL_START(0);
for (i = 0; i < 256; i++) OUTPAL_NEXT_CARD32(restore->palette[i]);
}
@@ -2180,8 +2149,12 @@ static void R128SaveDDARegisters(ScrnInfoPtr pScrn, R128SavePtr save)
/* Read palette data. */
static void R128SavePalette(ScrnInfoPtr pScrn, R128SavePtr save)
{
- int i;
+ R128InfoPtr info = R128PTR(pScrn);
+ int i;
R128MMIO_VARS();
+
+ /* Select palette 0 (main CRTC) if using FP-enabled chip */
+ if (info->HasPanelRegs) PAL_SELECT(0);
INPAL_START(0);
for (i = 0; i < 256; i++) save->palette[i] = INPAL_NEXT();
@@ -2294,8 +2267,8 @@ static Bool R128InitCrtcRegisters(ScrnInfoPtr pScrn, R128SavePtr save,
int hsync_fudge;
int vsync_wid;
int bytpp;
-
- switch (info->pixel_code) {
+
+ switch (info->CurrentLayout.pixel_code) {
case 4: format = 1; bytpp = 0; hsync_fudge = 0; break;
case 8: format = 2; bytpp = 1; hsync_fudge = 18; break;
case 15: format = 3; bytpp = 2; hsync_fudge = 9; break; /* 555 */
@@ -2304,7 +2277,7 @@ static Bool R128InitCrtcRegisters(ScrnInfoPtr pScrn, R128SavePtr save,
case 32: format = 6; bytpp = 4; hsync_fudge = 5; break; /* xRGB */
default:
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
- "Unsupported pixel depth (%d)\n", pScrn->bitsPerPixel);
+ "Unsupported pixel depth (%d)\n", info->CurrentLayout.bitsPerPixel);
return FALSE;
}
R128TRACE(("Format = %d (%d bytes per pixel)\n", format, bytpp));
@@ -2364,10 +2337,10 @@ static Bool R128InitCrtcRegisters(ScrnInfoPtr pScrn, R128SavePtr save,
: 0));
save->crtc_offset = 0;
save->crtc_offset_cntl = 0;
- save->crtc_pitch = pScrn->displayWidth / 8;
+ save->crtc_pitch = info->CurrentLayout.displayWidth / 8;
R128TRACE(("Pitch = %d bytes (virtualX = %d, displayWidth = %d)\n",
- save->crtc_pitch, pScrn->virtualX, pScrn->displayWidth));
+ save->crtc_pitch, pScrn->virtualX, info->CurrentLayout.displayWidth));
return TRUE;
}
@@ -2469,7 +2442,8 @@ static void R128InitFPRegisters(ScrnInfoPtr pScrn, R128SavePtr orig,
R128_CRTC_H_SYNC_WID);
save->crtc_h_sync_strt_wid |=
(disp_end + info->PanelHOverPlus) << R128_CRTC_H_SYNC_STRT_CHAR_SHIFT;
- switch (info->pixel_code) { /* Adjustments are from ATI */
+ switch (info->CurrentLayout.pixel_code) {
+ /* Adjustments are from ATI */
case 8: save->crtc_h_sync_strt_wid |= 2; break;
case 15:
case 16: save->crtc_h_sync_strt_wid |= 1; break;
@@ -2565,14 +2539,14 @@ static Bool R128InitDDARegisters(ScrnInfoPtr pScrn, R128SavePtr save,
pll->reference_div * save->post_div);
XclksPerTransfer = R128Div(XclkFreq * DisplayFifoWidth,
- VclkFreq * (info->pixel_bytes * 8));
-
+ VclkFreq * (info->CurrentLayout.pixel_bytes * 8));
+
UseablePrecision = R128MinBits(XclksPerTransfer) + 1;
XclksPerTransferPrecise = R128Div((XclkFreq * DisplayFifoWidth)
<< (11 - UseablePrecision),
- VclkFreq * (info->pixel_bytes * 8));
-
+ VclkFreq * (info->CurrentLayout.pixel_bytes * 8));
+
Roff = XclksPerTransferPrecise * (DisplayFifoDepth - 4);
Ron = (4 * info->ram->MB
@@ -2694,6 +2668,9 @@ static Bool R128ModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode)
R128Blank(pScrn);
R128RestoreMode(pScrn, &info->ModeReg);
R128Unblank(pScrn);
+
+ info->CurrentLayout.mode = mode;
+
return TRUE;
}
@@ -2708,7 +2685,7 @@ static Bool R128SaveScreen(ScreenPtr pScreen, int mode)
return TRUE;
}
-static Bool R128SwitchMode(int scrnIndex, DisplayModePtr mode, int flags)
+Bool R128SwitchMode(int scrnIndex, DisplayModePtr mode, int flags)
{
return R128ModeInit(xf86Screens[scrnIndex], mode);
}
@@ -2722,16 +2699,16 @@ static int R128ValidMode(int scrnIndex, DisplayModePtr mode,
/* Adjust viewport into virtual desktop such that (0,0) in viewport space
is (x,y) in virtual space. */
-static void R128AdjustFrame(int scrnIndex, int x, int y, int flags)
+void R128AdjustFrame(int scrnIndex, int x, int y, int flags)
{
ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
R128InfoPtr info = R128PTR(pScrn);
int Base;
R128MMIO_VARS();
- Base = y * pScrn->displayWidth + x;
+ Base = y * info->CurrentLayout.displayWidth + x;
- switch (info->pixel_code) {
+ switch (info->CurrentLayout.pixel_code) {
case 15:
case 16: Base *= 2; break;
case 24: Base *= 3; break;
@@ -2740,7 +2717,7 @@ static void R128AdjustFrame(int scrnIndex, int x, int y, int flags)
Base &= ~7; /* 3 lower bits are always 0 */
- if (info->pixel_code == 24)
+ if (info->CurrentLayout.pixel_code == 24)
Base += 8 * (Base % 3); /* Must be multiple of 8 and 3 */
OUTREG(R128_CRTC_OFFSET, Base);
@@ -2825,7 +2802,7 @@ static Bool R128CloseScreen(int scrnIndex, ScreenPtr pScreen)
info->directRenderingEnabled = FALSE;
}
#endif
-
+
if (pScrn->vtSema) {
R128Restore(pScrn);
R128UnmapMem(pScrn);
@@ -2840,6 +2817,9 @@ static Bool R128CloseScreen(int scrnIndex, ScreenPtr pScreen)
if (info->cursor) xf86DestroyCursorInfoRec(info->cursor);
info->cursor = NULL;
+ if (info->DGAModes) xfree(info->DGAModes);
+ info->DGAModes = NULL;
+
pScrn->vtSema = FALSE;
pScreen->CloseScreen = info->CloseScreen;
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/r128/r128_reg.h b/xc/programs/Xserver/hw/xfree86/drivers/r128/r128_reg.h
index 77959492d..9b920eb98 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/r128/r128_reg.h
+++ b/xc/programs/Xserver/hw/xfree86/drivers/r128/r128_reg.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/r128/r128_reg.h,v 1.6 2000/02/23 04:47:19 martin Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/r128/r128_reg.h,v 1.11 2000/07/01 01:40:46 martin Exp $ */
/**************************************************************************
Copyright 1999, 2000 ATI Technologies Inc. and Precision Insight, Inc.,
@@ -46,50 +46,6 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
#define _R128_REG_H_
#include <compiler.h>
-#if defined(__powerpc__)
-
-static inline void regw(volatile unsigned long base_addr, unsigned long regindex, unsigned long regdata)
-{
- asm volatile ("stwbrx %1,%2,%3; eieio"
- : "=m" (*(volatile unsigned *)(base_addr+regindex))
- : "r" (regdata), "b" (regindex), "r" (base_addr));
-}
-
-static inline void regw16(volatile unsigned long base_addr, unsigned long regindex, unsigned short regdata)
-{
- asm volatile ("sthbrx %0,%1,%2; eieio": : "r"(regdata), "b"(regindex), "r"(base_addr));
-}
-
-static inline unsigned long regr(volatile unsigned long base_addr, unsigned long regindex)
-{
- register unsigned long val;
- asm volatile ("lwbrx %0,%1,%2; eieio"
- : "=r"(val)
- : "b"(regindex), "r"(base_addr),
- "m" (*(volatile unsigned *)(base_addr+regindex)));
- return(val);
-}
-
-static inline unsigned short regr16(volatile unsigned long base_addr, unsigned long regindex)
-{
- register unsigned short val;
- asm volatile ("lhbrx %0,%1,%2; eieio": "=r"(val):"b"(regindex), "r"(base_addr));
- return(val);
-}
-
- /* Memory mapped register access macros */
-#define INREG(addr) regr(((unsigned long)R128MMIO),(addr))
-#define INREG8(addr) *(volatile CARD8 *)(R128MMIO + (addr))
-#define INREG16(addr) regr16(((unsigned long)R128MMIO), (addr))
-#define OUTREG(addr, val) regw(((unsigned long)R128MMIO), (addr), (val))
-#define OUTREG8(addr, val) *(volatile CARD8 *)(R128MMIO + (addr)) = (val)
-#define OUTREG16(addr, val) regw16(((unsigned long)R128MMIO), (addr), (val))
-#define ADDRREG(addr) ((volatile CARD32 *)(R128MMIO + (addr)))
-
-#define R128MMIO_VARS() \
- unsigned char *R128MMIO = R128PTR(pScrn)->MMIO
-
-#else
/* Memory mapped register access macros */
#define INREG8(addr) MMIO_IN8(R128MMIO, addr)
#define INREG16(addr) MMIO_IN16(R128MMIO, addr)
@@ -103,7 +59,6 @@ static inline unsigned short regr16(volatile unsigned long base_addr, unsigned l
#define R128MMIO_VARS() \
unsigned char *R128MMIO = R128PTR(pScrn)->MMIO
-#endif
#define OUTREGP(addr, val, mask) \
do { \
@@ -155,6 +110,17 @@ static inline unsigned short regr16(volatile unsigned long base_addr, unsigned l
#define INPAL_NEXT() INREG(R128_PALETTE_DATA)
+#define PAL_SELECT(idx) \
+ do { \
+ if (idx) { \
+ OUTREG(R128_DAC_CNTL, INREG(R128_DAC_CNTL) | \
+ R128_DAC_PALETTE_ACC_CTL); \
+ } else { \
+ OUTREG(R128_DAC_CNTL, INREG(R128_DAC_CNTL) & \
+ ~R128_DAC_PALETTE_ACC_CTL); \
+ } \
+ } while (0)
+
#define R128_ADAPTER_ID 0x0f2c /* PCI */
#define R128_AGP_APER_OFFSET 0x0178
#define R128_AGP_BASE 0x0170
@@ -409,6 +375,7 @@ static inline unsigned short regr16(volatile unsigned long base_addr, unsigned l
# define R128_DAC_RANGE_CNTL (3 << 0)
# define R128_DAC_BLANKING (1 << 2)
# define R128_DAC_CRT_SEL_CRTC2 (1 << 4)
+# define R128_DAC_PALETTE_ACC_CTL (1 << 5)
# define R128_DAC_8BIT_EN (1 << 8)
# define R128_DAC_VGA_ADR_EN (1 << 13)
# define R128_DAC_MASK_ALL (0xff << 24)
@@ -876,7 +843,6 @@ static inline unsigned short regr16(volatile unsigned long base_addr, unsigned l
# define R128_FPU_COLOR_FLAT (1 << 5)
# define R128_FPU_COLOR_GOURAUD (2 << 5)
# define R128_FPU_COLOR_GOURAUD2 (3 << 5)
-# define R128_FPU_COLOR_MASK (3 << 5)
# define R128_FPU_SUB_PIX_2BITS (0 << 7)
# define R128_FPU_SUB_PIX_4BITS (1 << 7)
# define R128_FPU_MODE_2D (0 << 8)
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/rendition/accelX.c b/xc/programs/Xserver/hw/xfree86/drivers/rendition/accelX.c
index 4678c192c..aad4fb8a7 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/rendition/accelX.c
+++ b/xc/programs/Xserver/hw/xfree86/drivers/rendition/accelX.c
@@ -3,7 +3,7 @@
*
* accelerator functions for X
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/rendition/accelX.c,v 1.6 2000/02/25 21:02:59 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/rendition/accelX.c,v 1.8 2000/06/13 02:28:33 dawes Exp $ */
@@ -29,24 +29,19 @@
/*
* defines
*/
-#if 1
-/* Global imported during compile-time */
-char MICROCODE_DIR [PATH_MAX] = MODULEDIR;
-#endif
-
#define waitfifo(size) do { int c=0; \
- while ((c++<0xfffff)&&((v_in8(iob+FIFOINFREE)&0x1f)<size)) /* if(!(c%0xffff))ErrorF("#1# !0x%x! -- ",v_in8(iob+FIFOINFREE)) */; \
+ while ((c++<0xfffff)&&((verite_in8(iob+FIFOINFREE)&0x1f)<size)) /* if(!(c%0xffff))ErrorF("#1# !0x%x! -- ",verite_in8(iob+FIFOINFREE)) */; \
if (c >= 0xfffff) { \
- ErrorF("RENDITION: Input fifo full (1) FIFO in == %d\n",v_in8(iob+FIFOINFREE)&0x1f); \
+ ErrorF("RENDITION: Input fifo full (1) FIFO in == %d\n",verite_in8(iob+FIFOINFREE)&0x1f); \
return; \
} \
} while (0)
#define waitfifo2(size, rv) do { int c=0; \
- while ((c++<0xfffff)&&((v_in8(iob+FIFOINFREE)&0x1f)<size)) /* if(!(c%0xffff))ErrorF("#2# !0x%x! -- ",v_in8(iob+FIFOINFREE)) */; \
+ while ((c++<0xfffff)&&((verite_in8(iob+FIFOINFREE)&0x1f)<size)) /* if(!(c%0xffff))ErrorF("#2# !0x%x! -- ",verite_in8(iob+FIFOINFREE)) */; \
if (c >= 0xfffff) { \
- ErrorF("RENDITION: Input fifo full (2) FIFO in ==%d\n",v_in8(iob+FIFOINFREE)&0x1f); \
+ ErrorF("RENDITION: Input fifo full (2) FIFO in ==%d\n",verite_in8(iob+FIFOINFREE)&0x1f); \
RENDITIONAccelNone(pScreenInfo); \
pRendition->board.accel=0; \
return rv; \
@@ -124,38 +119,13 @@ RENDITIONAccelPreInit(ScrnInfoPtr pScreenInfo)
sleep(1);
#endif
-#ifdef DEBUG
- v1k_stop(pScreenInfo);
- memset (pRendition->board.vmem_base,0,MC_SIZE);
-#endif
-
-#if 0
if (RENDITIONLoadUcode(pScreenInfo)){
ErrorF ("RENDITION: AccelPreInit - Warning. Loading of microcode failed!!\n");
}
-#endif
-
-#if 1 /* Test */
- if (V1000_DEVICE == pRendition->board.chip){
- c=v_load_ucfile(pScreenInfo, strcat ((char *)MICROCODE_DIR,"v10002d.uc"));
- }
- else {
- /* V2x00 chip */
- c=v_load_ucfile(pScreenInfo, strcat ((char *)MICROCODE_DIR,"v20002d.uc"));
- }
-
- if (c == -1) {
- ErrorF( "RENDITION: Microcode loading failed !!!\n");
- return;
- }
-
- pRendition->board.ucode_entry=c;
- ErrorF("UCode_Entry == 0x%x\n",pRendition->board.ucode_entry);
-#endif
+ pRendition->board.fbOffset += MC_SIZE;
#ifdef DEBUG
- pRendition->board.fbOffset += MC_SIZE;
ErrorF("RENDITION: Offset is now %d\n",pRendition->board.fbOffset);
sleep(2);
#endif
@@ -180,7 +150,8 @@ RENDITIONAccelXAAInit(ScreenPtr pScreen)
pRendition->AccelInfoRec = pXAAinfo = XAACreateInfoRec();
if(!pXAAinfo){
- ErrorF("RENDITION; Failed to set up XAA structure!\n");
+ xf86DrvMsg(pScreenInfo->scrnIndex,X_ERROR,
+ ("Failed to set up XAA structure!\n"));
return;
}
@@ -216,28 +187,14 @@ RENDITIONAccelXAAInit(ScreenPtr pScreen)
RENDITIONSubsequentTwoPointLine;
#endif /* #if 0 */
- if (RENDITIONLoadUcode(pScreenInfo)) return;
+ verite_check_csucode(pScreenInfo);
-#if 1 /* Testingcode */
- if (V1000_DEVICE == pRendition->board.chip){
- c=v_load_ucfile(pScreenInfo, MICROCODE_DIR);
- }
- else {
- /* V2x00 chip */
- c=v_load_ucfile(pScreenInfo, MICROCODE_DIR);
- }
-
- if (c == -1) {
- ErrorF( "RENDITION: Microcode loading failed !!!\n");
- return;
- }
-
- pRendition->board.ucode_entry=c;
-#endif
+ if (RENDITIONLoadUcode(pScreenInfo)) return;
if (RENDITIONInitUcode(pScreenInfo)) return;
- v_check_csucode(pScreenInfo);
- /* the remaining code was copied from s3v_accel.c.
+ verite_check_csucode(pScreenInfo);
+
+ /* the remaining code was copied from s3verite_accel.c.
* we need to check it if it is suitable <ml> */
/* make sure offscreen pixmaps aren't bigger than our address space */
@@ -313,7 +270,7 @@ RENDITIONLoadUcode(ScrnInfoPtr pScreenInfo)
/* load or restore ucode */
if (!ucode_loaded) {
- if (0 != v_initboard(pScreenInfo)) {
+ if (0 != verite_initboard(pScreenInfo)) {
RENDITIONAccelNone(pScreenInfo);
pRendition->board.accel=0;
return 1;
@@ -323,8 +280,8 @@ RENDITIONLoadUcode(ScrnInfoPtr pScreenInfo)
else
RENDITIONRestoreUcode(pScreenInfo);
- ErrorF("RENDITION: Ucode successfully %s\n",
- (ucode_loaded ? "restored" : "loaded"));
+ ErrorF ("Rendition: Ucode successfully %s\n",
+ (ucode_loaded ? "restored" : "loaded"));
ucode_loaded=1;
return 0;
@@ -337,25 +294,28 @@ RENDITIONInitUcode(ScrnInfoPtr pScreenInfo)
renditionPtr pRendition = RENDITIONPTR(pScreenInfo);
vu16 iob = pRendition->board.io_base;
- if (0 == v_getstride(pScreenInfo, NULL,
+ if (0 == verite_getstride(pScreenInfo, NULL,
&pRendition->board.mode.stride0,
&pRendition->board.mode.stride1)) {
- ErrorF("RENDITION: Acceleration for this resolution not available\n");
+ xf86DrvMsg(pScreenInfo->scrnIndex,X_ERROR,
+ ("Acceleration for this resolution not available\n"));
RENDITIONAccelNone(pScreenInfo);
pRendition->board.accel=0;
return 1;
}
else
- ErrorF("RENDITION: Stride 0: %d, stride 1: %d\n",
- pRendition->board.mode.stride0,
- pRendition->board.mode.stride1);
+ ErrorF ("Rendition: Stride 0: %d, stride 1: %d\n",
+ pRendition->board.mode.stride0,
+ pRendition->board.mode.stride1);
/* NOTE: for 1152x864 only!
stride0=6;
stride1=1;
*/
- ErrorF("#InitUcode(1)# FIFOIN_FREE 0x%x -- \n",v_in8(iob+FIFOINFREE));
+#ifdef DEBUG
+ ErrorF("#InitUcode(1)# FIFOIN_FREE 0x%x -- \n",verite_in8(iob+FIFOINFREE));
+#endif
/* init the ucode */
@@ -363,36 +323,44 @@ RENDITIONInitUcode(ScrnInfoPtr pScreenInfo)
v1k_flushicache(pScreenInfo);
v1k_start(pScreenInfo, pRendition->board.csucode_base);
- ErrorF("#InitUcode(2)# FIFOIN_FREE 0x%x -- \n",v_in8(iob+FIFOINFREE));
+#ifdef DEBUG
+ ErrorF("#InitUcode(2)# FIFOIN_FREE 0x%x -- \n",verite_in8(iob+FIFOINFREE));
+#endif
- v_out32(iob, 0); /* a0 - ucode init command */
- v_out32(iob, 0); /* a1 - 1024 byte context store area */
- v_out32(iob, 0); /* a2 */
- v_out32(iob, pRendition->board.ucode_entry);
+ verite_out32(iob, 0); /* a0 - ucode init command */
+ verite_out32(iob, 0); /* a1 - 1024 byte context store area */
+ verite_out32(iob, 0); /* a2 */
+ verite_out32(iob, pRendition->board.ucode_entry);
- ErrorF("#InitUcode(3)# FIFOIN_FREE 0x%x -- \n",v_in8(iob+FIFOINFREE));
+#ifdef DEBUG
+ ErrorF("#InitUcode(3)# FIFOIN_FREE 0x%x -- \n",verite_in8(iob+FIFOINFREE));
+#endif
waitfifo2(6, 1);
- ErrorF("#InitUcode(4)# FIFOIN_FREE 0x%x -- \n",v_in8(iob+FIFOINFREE));
+#ifdef DEBUG
+ ErrorF("#InitUcode(4)# FIFOIN_FREE 0x%x -- \n",verite_in8(iob+FIFOINFREE));
+#endif
- v_out32(iob, CMD_SETUP);
- v_out32(iob, P2(pRendition->board.mode.virtualwidth,
+ verite_out32(iob, CMD_SETUP);
+ verite_out32(iob, P2(pRendition->board.mode.virtualwidth,
pRendition->board.mode.virtualheight));
- v_out32(iob, P2(pRendition->board.mode.bitsperpixel,
+ verite_out32(iob, P2(pRendition->board.mode.bitsperpixel,
pRendition->board.mode.pixelformat));
- v_out32(iob, MC_SIZE);
+ verite_out32(iob, MC_SIZE);
- v_out32(iob, (pRendition->board.mode.virtualwidth)*
+ verite_out32(iob, (pRendition->board.mode.virtualwidth)*
(pRendition->board.mode.bitsperpixel>>3));
- v_out32(iob, (pRendition->board.mode.stride1<<12)|
+ verite_out32(iob, (pRendition->board.mode.stride1<<12)|
(pRendition->board.mode.stride0<<8));
- ErrorF("#InitUcode(5)# FIFOIN_FREE 0x%x -- \n",v_in8(iob+FIFOINFREE));
+#ifdef DEBUG
+ ErrorF("#InitUcode(5)# FIFOIN_FREE 0x%x -- \n",verite_in8(iob+FIFOINFREE));
+#endif
#if 0
- v_out32(iob+0x60, 129);
- ErrorF("RENDITION: PC at %x\n", v_in32(iob+0x64));
+ verite_out32(iob+0x60, 129);
+ ErrorF("RENDITION: PC at %x\n", verite_in32(iob+0x64));
#endif
return 0;
@@ -416,26 +384,26 @@ RENDITIONRestoreUcode(ScrnInfoPtr pScreenInfo)
#endif
v1k_stop(pScreenInfo);
- memend=v_in8(iob+MEMENDIAN);
- v_out8(iob+MEMENDIAN, MEMENDIAN_NO);
+ memend=verite_in8(iob+MEMENDIAN);
+ verite_out8(iob+MEMENDIAN, MEMENDIAN_NO);
#if 1
memcpy(pRendition->board.vmem_base, pRendition->board.ucode_buffer, MC_SIZE);
#else
/* SlowBcopy has inverted src and dst */
xf86SlowBcopy(pRendition->board.ucode_buffer,pRendition->board.vmem_base,MC_SIZE);
#endif
- v_out8(iob+MEMENDIAN, memend);
+ verite_out8(iob+MEMENDIAN, memend);
v1k_flushicache(pScreenInfo);
v1k_start(pScreenInfo, pRendition->board.csucode_base);
- v_out32(iob, 0); /* a0 - ucode init command */
- v_out32(iob, 0); /* a1 - 1024 byte context store area */
- v_out32(iob, 0); /* a2 */
- v_out32(iob, pRendition->board.ucode_entry);
+ verite_out32(iob, 0); /* a0 - ucode init command */
+ verite_out32(iob, 0); /* a1 - 1024 byte context store area */
+ verite_out32(iob, 0); /* a2 */
+ verite_out32(iob, pRendition->board.ucode_entry);
#if 0
- v_out32(iob+0x60, 129);
- ErrorF("RENDITION: PC at %x\n", v_in32(iob+0x64));
+ verite_out32(iob+0x60, 129);
+ ErrorF("RENDITION: PC at %x\n", verite_in32(iob+0x64));
#endif
}
@@ -454,8 +422,8 @@ RENDITIONSaveUcode(ScrnInfoPtr pScreenInfo)
#endif
v1k_stop(pScreenInfo);
- memend=v_in8(iob+MEMENDIAN);
- v_out8(iob+MEMENDIAN, MEMENDIAN_NO);
+ memend=verite_in8(iob+MEMENDIAN);
+ verite_out8(iob+MEMENDIAN, MEMENDIAN_NO);
#if 1
memcpy(pRendition->board.ucode_buffer, pRendition->board.vmem_base, MC_SIZE);
@@ -463,7 +431,7 @@ RENDITIONSaveUcode(ScrnInfoPtr pScreenInfo)
/* SlowBcopy has inverted src and dst */
xf86SlowBcopy(pRendition->board.vmem_base,pRendition->board.ucode_buffer,MC_SIZE);
#endif
- v_out8(iob+MEMENDIAN, memend);
+ verite_out8(iob+MEMENDIAN, memend);
v1k_continue(pScreenInfo);
}
@@ -486,80 +454,79 @@ RENDITIONSyncV1000(ScrnInfoPtr pScreenInfo)
#ifdef DEBUG
ErrorF("RENDITION: RENDITIONSyncV1000 called\n");
-#endif
-#ifdef DEBUG
- ErrorF("#Sync (1)# FIFO_INFREE 0x%x -- \n",v_in8(iob+FIFOINFREE));
- ErrorF("#Sync (1)# FIFO_OUTVALID 0x%x -- \n",v_in8(iob+FIFOOUTVALID));
+
+ ErrorF("#Sync (1)# FIFO_INFREE 0x%x -- \n",verite_in8(iob+FIFOINFREE));
+ ErrorF("#Sync (1)# FIFO_OUTVALID 0x%x -- \n",verite_in8(iob+FIFOOUTVALID));
#endif
c=0;
/* empty output fifo,
i.e. if there is any valid data in the output fifo then read it */
- while ((c++<0xfffff) && ((v_in8(iob+FIFOOUTVALID)&0x7)>0))
- (void)v_in32(iob);
+ while ((c++<0xfffff) && ((verite_in8(iob+FIFOOUTVALID)&0x7)>0))
+ (void)verite_in32(iob);
-/* if(!(c%0xffff))ErrorF("#F1# !0x%x! -- ",v_in8(iob+FIFOOUTVALID)); */
+/* if(!(c%0xffff))ErrorF("#F1# !0x%x! -- ",verite_in8(iob+FIFOOUTVALID)); */
if (c >= 0xfffff) {
ErrorF("RENDITION: RISC synchronization failed (1) FIFO out == %d!\n",
- v_in8(iob+FIFOOUTVALID)&0x1f);
+ verite_in8(iob+FIFOOUTVALID)&0x1f);
return;
}
/* sync RISC */
waitfifo(2);
- v_out32(iob, CMD_GET_PIXEL);
- v_out32(iob, 0);
+ verite_out32(iob, CMD_GET_PIXEL);
+ verite_out32(iob, 0);
c=0;
- while ((c++<0xfffff) && ((v_in8(iob+FIFOOUTVALID)&0x7)>0))
- (void)v_in32(iob);
+ while ((c++<0xfffff) && ((verite_in8(iob+FIFOOUTVALID)&0x7)>0))
+ (void)verite_in32(iob);
-/* if(!(c%0xffff))ErrorF("#F2# !0x%x! -- ",v_in8(iob+FIFOOUTVALID)); */
+/* if(!(c%0xffff))ErrorF("#F2# !0x%x! -- ",verite_in8(iob+FIFOOUTVALID)); */
if (c >= 0xfffff) {
- ErrorF("RENDITION: RISC synchronization failed (2) FIFO out == %d!\n",
- v_in8(iob+FIFOOUTVALID)&0x1f);
+ ErrorF ("Rendition: RISC synchronization failed (2) FIFO out == %d!\n",
+ verite_in8(iob+FIFOOUTVALID)&0x1f);
return;
}
/* sync pixel engine using csucode -- I suppose this is quite slow <ml> */
v1k_stop(pScreenInfo);
v1k_start(pScreenInfo, pRendition->board.csucode_base);
- v_out32(iob, 2); /* a0 - sync command */
+ verite_out32(iob, 2); /* a0 - sync command */
c=0;
- while ((c++<0xfffff) && ((v_in8(iob+FIFOOUTVALID)&0x7)>0))
- (void)v_in32(iob);
+ while ((c++<0xfffff) && ((verite_in8(iob+FIFOOUTVALID)&0x7)>0))
+ (void)verite_in32(iob);
-/* if(!(c%0xffff))ErrorF("#F3# !0x%x! -- ",v_in8(iob+FIFOOUTVALID)); */
+/* if(!(c%0xffff))ErrorF("#F3# !0x%x! -- ",verite_in8(iob+FIFOOUTVALID)); */
if (c == 0xfffff) {
- ErrorF("RENDITION: Pixel engine synchronization failed FIFO out == %d!\n",
- v_in8(iob+FIFOOUTVALID)&0x1f);
- return;
+ ErrorF ("Rendition: Pixel engine synchronization failed FIFO out == %d!\n",
+ verite_in8(iob+FIFOOUTVALID)&0x1f);
+ return;
}
/* restart the ucode */
- v_out32(iob, 0); /* a0 - ucode init command */
- v_out32(iob, 0); /* a1 - 1024 byte context store area */
- v_out32(iob, 0); /* a2 */
- v_out32(iob, pRendition->board.ucode_entry);
+ verite_out32(iob, 0); /* a0 - ucode init command */
+ verite_out32(iob, 0); /* a1 - 1024 byte context store area */
+ verite_out32(iob, 0); /* a2 */
+ verite_out32(iob, pRendition->board.ucode_entry);
/* init the ucode */
waitfifo(6);
- v_out32(iob, CMD_SETUP);
- v_out32(iob, P2(pRendition->board.mode.virtualwidth,
+ verite_out32(iob, CMD_SETUP);
+ verite_out32(iob, P2(pRendition->board.mode.virtualwidth,
pRendition->board.mode.virtualheight));
- v_out32(iob, P2(pRendition->board.mode.bitsperpixel,
+ verite_out32(iob, P2(pRendition->board.mode.bitsperpixel,
pRendition->board.mode.pixelformat));
- v_out32(iob, MC_SIZE);
+ verite_out32(iob, MC_SIZE);
- v_out32(iob, pRendition->board.mode.virtualwidth *
+ verite_out32(iob, pRendition->board.mode.virtualwidth *
(pRendition->board.mode.bitsperpixel>>3));
- v_out32(iob, (pRendition->board.mode.stride1<<12) |
+ verite_out32(iob, (pRendition->board.mode.stride1<<12) |
(pRendition->board.mode.stride0<<8));
}
@@ -601,16 +568,16 @@ RENDITIONSubsequentScreenToScreenCopy(ScrnInfoPtr pScreenInfo,
#if 1 /* def DEBUG */
- ErrorF("#ScreentoScreen# FIFO_INFREE 0x%x -- \n",v_in8(iob+FIFOINFREE));
- ErrorF("#ScreentoScreen# FIFO_OUTVALID 0x%x -- \n",v_in8(iob+FIFOOUTVALID));
+ ErrorF("#ScreentoScreen# FIFO_INFREE 0x%x -- \n",verite_in8(iob+FIFOINFREE));
+ ErrorF("#ScreentoScreen# FIFO_OUTVALID 0x%x -- \n",verite_in8(iob+FIFOOUTVALID));
#endif
waitfifo(5);
- v_out32(iob, CMD_SCREEN_BLT);
- v_out32(iob, pRendition->board.Rop);
- v_out32(iob, P2(srcX, srcY));
- v_out32(iob, P2(w, h));
- v_out32(iob, P2(dstX, dstY));
+ verite_out32(iob, CMD_SCREEN_BLT);
+ verite_out32(iob, pRendition->board.Rop);
+ verite_out32(iob, P2(srcX, srcY));
+ verite_out32(iob, P2(w, h));
+ verite_out32(iob, P2(dstX, dstY));
}
@@ -652,14 +619,14 @@ RENDITIONSubsequentSolidFillRect(ScrnInfoPtr pScreenInfo,
waitfifo(4);
#ifdef DEBUG
- ErrorF("#SubsequentSolidFill# FIFO_INFREE 0x%x -- \n",v_in8(iob+FIFOINFREE));
- ErrorF("#SubsequentSolidFill# FIFO_OUTVALID 0x%x -- \n",v_in8(iob+FIFOOUTVALID));
+ ErrorF("#SubsequentSolidFill# FIFO_INFREE 0x%x -- \n",verite_in8(iob+FIFOINFREE));
+ ErrorF("#SubsequentSolidFill# FIFO_OUTVALID 0x%x -- \n",verite_in8(iob+FIFOOUTVALID));
sleep(1);
#endif
- v_out32(iob, P2(pRendition->board.Rop, CMD_RECT_SOLID_ROP));
- v_out32(iob, pRendition->board.Color);
- v_out32(iob, P2(x, y));
- v_out32(iob, P2(w, h));
+ verite_out32(iob, P2(pRendition->board.Rop, CMD_RECT_SOLID_ROP));
+ verite_out32(iob, pRendition->board.Color);
+ verite_out32(iob, P2(x, y));
+ verite_out32(iob, P2(w, h));
}
@@ -684,11 +651,11 @@ RENDITIONSubsequentTwoPointLine(ScrnInfoPtr pScreenInfo,
#endif
waitfifo(5);
- v_out32(iob, P2(1, CMD_LINE_SOLID));
- v_out32(iob, pRendition->board.Rop);
- v_out32(iob, pRendition->board.Color);
- v_out32(iob, P2(x1, y1));
- v_out32(iob, P2(x2, y2));
+ verite_out32(iob, P2(1, CMD_LINE_SOLID));
+ verite_out32(iob, pRendition->board.Rop);
+ verite_out32(iob, pRendition->board.Color);
+ verite_out32(iob, P2(x1, y1));
+ verite_out32(iob, P2(x2, y2));
}
/*
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/rendition/hwcursor.c b/xc/programs/Xserver/hw/xfree86/drivers/rendition/hwcursor.c
index 808e393cc..e7b5ca926 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/rendition/hwcursor.c
+++ b/xc/programs/Xserver/hw/xfree86/drivers/rendition/hwcursor.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/rendition/hwcursor.c,v 1.6 2000/02/25 21:03:00 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/rendition/hwcursor.c,v 1.7 2000/03/31 20:13:25 dawes Exp $ */
/*
* includes
*/
@@ -138,11 +138,11 @@ RENDITIONShowCursor(ScrnInfoPtr pScreenInfo)
#endif
/* enable cursor - X11 mode */
- v_enablecursor(pScreenInfo, V_3COLORS,
+ verite_enablecursor(pScreenInfo, VERITE_3COLORS,
#ifdef BIGCURSOR
- V_CURSOR64
+ VERITE_CURSOR64
#else
- V_CURSOR32
+ VERITE_CURSOR32
#endif
);
}
@@ -157,7 +157,7 @@ RENDITIONHideCursor(ScrnInfoPtr pScreenInfo)
#endif
/* Disable cursor */
- v_enablecursor(pScreenInfo, V_NOCURSOR, 0);
+ verite_enablecursor(pScreenInfo, VERITE_NOCURSOR, 0);
}
@@ -169,7 +169,7 @@ RENDITIONSetCursorPosition(ScrnInfoPtr pScreenInfo, int x, int y)
ErrorF( "RENDITION: SetCursorPosition(%d, %d) called\n", x, y);
#endif
- v_movecursor(pScreenInfo, x, y, 1 /* xorigin */, 1 /* yorigin */);
+ verite_movecursor(pScreenInfo, x, y, 1 /* xorigin */, 1 /* yorigin */);
}
@@ -181,7 +181,7 @@ RENDITIONSetCursorColors(ScrnInfoPtr pScreenInfo, int bg, int fg)
ErrorF( "RENDITION: SetCursorColors(%x, %x) called\n", fg, bg);
#endif
- v_setcursorcolor(pScreenInfo, bg, fg);
+ verite_setcursorcolor(pScreenInfo, bg, fg);
}
@@ -192,11 +192,11 @@ RENDITIONLoadCursorImage(ScrnInfoPtr pScreenInfo, unsigned char* src)
#ifdef DEBUG
ErrorF( "RENDITION: loadcursor called\n");
#endif
- v_loadcursor(pScreenInfo,
+ verite_loadcursor(pScreenInfo,
#ifdef BIGCURSOR
- V_CURSOR64,
+ VERITE_CURSOR64,
#else
- V_CURSOR32,
+ VERITE_CURSOR32,
#endif
(vu8 *)src);
}
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/rendition/rendition.cpp b/xc/programs/Xserver/hw/xfree86/drivers/rendition/rendition.cpp
index 644cbc732..6e9572ba4 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/rendition/rendition.cpp
+++ b/xc/programs/Xserver/hw/xfree86/drivers/rendition/rendition.cpp
@@ -1,17 +1,17 @@
-.\" $XFree86: xc/programs/Xserver/hw/xfree86/drivers/rendition/rendition.cpp,v 1.2 2000/03/05 16:59:14 dawes Exp $
-.TH RENDITION __drivermansuffix__ "Version 4.0" "XFree86"
+.\" $XFree86: xc/programs/Xserver/hw/xfree86/drivers/rendition/rendition.cpp,v 1.5 2000/06/14 02:13:13 dawes Exp $
+.\" shorthand for double quote that works everywhere.
+.ds q \N'34'
+.TH RENDITION __drivermansuffix__ "Version 4.0.1" "XFree86"
.SH NAME
rendition \- Rendition video driver
.SH SYNOPSIS
-.B "Section ""Device"""
-.br
-.BI " Identifier """ devname """"
-.br
-.B " Driver ""rendition"""
-.br
+.nf
+.B "Section \*qDevice\*q"
+.BI " Identifier \*q" devname \*q
+.B " Driver \*qrendition\*q"
\ \ ...
-.br
.B EndSection
+.fi
.SH DESCRIPTION
.B rendition
is an XFree86 driver for Rendition/Micron based video cards. The driver
@@ -39,7 +39,7 @@ driver.
The driver auto-detects the chipset type, but the following
.B ChipSet
names may optionally be specified in the config file
-.B """Device"""
+.B \*qDevice\*q
section, and will override the auto-detection:
.PP
.RS 4
@@ -51,40 +51,40 @@ chips. If the amount of memory is detected incorrectly, the actual amount
of video memory should be specified with a
.B VideoRam
entry in the config file
-.B """Device"""
+.B \*qDevice\*q
section.
.PP
The following driver
.B Options
are supported:
.TP
-.BI "Option ""SWCursor"" """ boolean """
+.BI "Option \*qSWCursor\*q \*q" boolean \*q
Disables use of the hardware cursor. Default: use HW-cursor.
.TP
-.BI "Option ""OverclockMem"" """ boolean """
+.BI "Option \*qOverclockMem\*q \*q" boolean \*q
Increases the Mem/Sys clock to 125MHz/60MHz from standard 110MHz/50MHz.
Default: Not overclocked.
.TP
-.BI "Option ""DacSpeed"" """ MHz """
+.BI "Option \*qDacSpeed\*q \*q" MHz \*q
Run the memory at a higher clock. Useful on some cards with display glitches
at higher resolutions. But adds the risk to damage the hardware. Use with
caution.
.TP
-.BI "Option ""FramebufferWC"" """ boolean """
+.BI "Option \*qFramebufferWC\*q \*q" boolean \*q
If writecombine is disabled in BIOS, and you add this option in configuration
file, then the driver will try to request writecombined access to the
framebuffer. This can drastically increase the performance on unaccelerated
server. Requires that "MTRR"-support is compiled into the OS-kernel.
Default: Disabled for V1000, enabled for V2100/V2200.
.TP
-.BI "Option ""NoDDC"" """ boolean """
+.BI "Option \*qNoDDC\*q \*q" boolean \*q
Disable probing of DDC-information from your monitor. This information is not
used yet and is only there for informational purposes. This might change
before final XFree86 4.0 release. Safe to disable if you experience problems
during startup of X-server.
Default: Probe DDC.
.TP
-.BI "Option ""ShadowFB"" """ boolean """
+.BI "Option \*qShadowFB\*q \*q" boolean \*q
If this option is enabled, the driver will cause the CPU to do each drawing
operation first into a shadow frame buffer in system virtual memory and then
copy the result into video memory. If this option is not active, the CPU will
@@ -95,18 +95,18 @@ normally the case for PCI or AGP adapters, and, so, this option is enabled by
default unless acceleration is enabled.
Default: Enabled unless acceleration is used.
.TP
-.BI "Option ""Rotate"" ""CW""
+.BI "Option \*qRotate\*q \*qCW\*q"
.TP
-.BI "Option ""Rotate"" ""CCW""
+.BI "Option \*qRotate\*q \*qCCW\*q"
Rotate the display clockwise or counterclockwise. This mode is unaccelerated.
Default: no rotation.
.TP
.SH "Notes"
For the moment the driver defaults to not request write-combine for any chipset
as there has been indications of problems with it. Use
-.B "Option ""MTRR"""
+.B "Option \*qMTRR\*q"
to let the driver request write-combining of memory access on the videoboard.
.SH "SEE ALSO"
-XFree86(1), XF86Config(__filemansuffix__), xf86config(1), Xserver(1), X(1)
+XFree86(1), XF86Config(__filemansuffix__), xf86config(1), Xserver(1), X(__miscmansuffix__)
.SH AUTHORS
Authors include: Marc Langenbach, Dejan Ilic
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/rendition/rendition.h b/xc/programs/Xserver/hw/xfree86/drivers/rendition/rendition.h
index a9f73bb01..6a5a6e81b 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/rendition/rendition.h
+++ b/xc/programs/Xserver/hw/xfree86/drivers/rendition/rendition.h
@@ -1,11 +1,8 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/rendition/rendition.h,v 1.5 2000/02/25 21:03:02 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/rendition/rendition.h,v 1.6 2000/04/04 19:25:15 dawes Exp $ */
#ifndef __RENDITION_H__
#define __RENDITION_H__
-/* Everything using inb/outb, etc needs "compiler.h" */
-#include "compiler.h"
-
/* All drivers should typically include these */
#include "xf86.h"
#include "xf86_OSproc.h"
@@ -13,6 +10,9 @@
/* All drivers need this */
#include "xf86_ansic.h"
+/* Everything using inb/outb, etc needs "compiler.h" */
+#include "compiler.h"
+
/* This is used for module versioning */
#include "xf86Version.h"
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/rendition/vloaduc.c b/xc/programs/Xserver/hw/xfree86/drivers/rendition/vloaduc.c
index ec03fa1d0..cc2c6e66e 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/rendition/vloaduc.c
+++ b/xc/programs/Xserver/hw/xfree86/drivers/rendition/vloaduc.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/rendition/vloaduc.c,v 1.10 2000/02/25 21:03:04 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/rendition/vloaduc.c,v 1.12 2000/04/07 03:57:51 tsi Exp $ */
/*
* includes
*/
@@ -45,7 +45,7 @@ static void mmve(ScrnInfoPtr pScreenInfo, vu32 size, vu8 *data, vu32 phys_addr);
*/
/*
- * int v_load_ucfile(ScrnInfoPtr pScreenInfo, char *file_name)
+ * int verite_load_ucfile(ScrnInfoPtr pScreenInfo, char *file_name)
*
* Loads verite elf file microcode file in |name| onto the board.
* NOTE: Assumes the ucode loader is already running on the board!
@@ -53,7 +53,7 @@ static void mmve(ScrnInfoPtr pScreenInfo, vu32 size, vu8 *data, vu32 phys_addr);
* Returns the program's entry point, on error -1;
*/
int
-v_load_ucfile(ScrnInfoPtr pScreenInfo, char *file_name)
+verite_load_ucfile(ScrnInfoPtr pScreenInfo, char *file_name)
{
/* renditionPtr pRendition = RENDITIONPTR(pScreenInfo); */
@@ -64,7 +64,7 @@ v_load_ucfile(ScrnInfoPtr pScreenInfo, char *file_name)
Elf32_Shdr *pshdr, *orig_pshdr=NULL;
Elf32_Ehdr ehdr ;
-#if 1 /* DEBUG */
+#ifdef DEBUG
ErrorF("RENDITION: Loading microcode %s\n", file_name);
#endif
@@ -188,7 +188,7 @@ loadSegment2board(ScrnInfoPtr pScreenInfo, int fd, Elf32_Phdr *phdr)
}
if (read(fd, data, size) != size){
- ErrorF("RENDITION: v_readfile Failure, couldn't read %x bytes ", size);
+ ErrorF("RENDITION: verite_readfile Failure, couldn't read %x bytes ", size);
return;
}
@@ -223,8 +223,8 @@ mmve(ScrnInfoPtr pScreenInfo, vu32 size, vu8 *data, vu32 phys_addr)
vu8 *vmb=pRendition->board.vmem_base;
/* swap bytes 3<>0, 2<>1 */
- memend=v_in8(pRendition->board.io_base+MEMENDIAN);
- v_out8(pRendition->board.io_base+MEMENDIAN, MEMENDIAN_END);
+ memend=verite_in8(pRendition->board.io_base+MEMENDIAN);
+ verite_out8(pRendition->board.io_base+MEMENDIAN, MEMENDIAN_END);
dataout=(vu32 *)data;
@@ -232,13 +232,13 @@ mmve(ScrnInfoPtr pScreenInfo, vu32 size, vu8 *data, vu32 phys_addr)
v1k_stop(pScreenInfo);
while (size > 0) {
- v_write_memory32(vmb, phys_addr, *dataout);
+ verite_write_memory32(vmb, phys_addr, *dataout);
phys_addr+=4;
dataout++;
size-=4;
}
- v_out8(pRendition->board.io_base+MEMENDIAN, memend);
+ verite_out8(pRendition->board.io_base+MEMENDIAN, memend);
}
/*
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/rendition/vmisc.c b/xc/programs/Xserver/hw/xfree86/drivers/rendition/vmisc.c
index ffc3861e7..fec54ed7d 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/rendition/vmisc.c
+++ b/xc/programs/Xserver/hw/xfree86/drivers/rendition/vmisc.c
@@ -1,5 +1,5 @@
/* Misc routines used elsewhere in driver */
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/rendition/vmisc.c,v 1.3 2000/02/25 21:03:05 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/rendition/vmisc.c,v 1.4 2000/03/31 20:13:27 dawes Exp $ */
#include "rendition.h"
#include "vtypes.h"
@@ -10,26 +10,26 @@
/* block copy from and to the card */
void
-v_bustomem_cpy(vu8 *dst, vu8 *src, vu32 num)
+verite_bustomem_cpy(vu8 *dst, vu8 *src, vu32 num)
{
int i;
#ifdef DEBUG
- ErrorF ("Rendition: DEBUG v_bustomem_cpy called\n");
+ ErrorF ("Rendition: DEBUG verite_bustomem_cpy called\n");
#endif
for (i=0; i<num; i++)
- dst[i] = v_read_memory8(src, i);
+ dst[i] = verite_read_memory8(src, i);
}
void
-v_memtobus_cpy(vu8 *dst, vu8 *src, vu32 num)
+verite_memtobus_cpy(vu8 *dst, vu8 *src, vu32 num)
{
int i;
#ifdef DEBUG
- ErrorF ("Rendition: DEBUG v_memtobus_cpy called\n");
+ ErrorF ("Rendition: DEBUG verite_memtobus_cpy called\n");
#endif
for (i=0; i<num; i++)
- v_write_memory8(dst, i, src[i]);
+ verite_write_memory8(dst, i, src[i]);
}
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/rendition/vmisc.h b/xc/programs/Xserver/hw/xfree86/drivers/rendition/vmisc.h
index 8813e82ec..c104147e0 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/rendition/vmisc.h
+++ b/xc/programs/Xserver/hw/xfree86/drivers/rendition/vmisc.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/rendition/vmisc.h,v 1.2 1999/11/19 14:59:18 hohndel Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/rendition/vmisc.h,v 1.3 2000/03/31 20:13:27 dawes Exp $ */
#ifndef __VMISC_H__
#define __VMISC_H__
@@ -7,7 +7,7 @@
#include "vtypes.h"
#include "vos.h"
-void v_bustomem_cpy (vu8 *, vu8 *, vu32);
-void v_memtobus_cpy (vu8 *, vu8 *, vu32);
+void verite_bustomem_cpy (vu8 *, vu8 *, vu32);
+void verite_memtobus_cpy (vu8 *, vu8 *, vu32);
#endif /* __VMISC_H__ */
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/sis/sis.cpp b/xc/programs/Xserver/hw/xfree86/drivers/sis/sis.cpp
index dfe733bb2..3f58c7c9d 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/sis/sis.cpp
+++ b/xc/programs/Xserver/hw/xfree86/drivers/sis/sis.cpp
@@ -1,17 +1,17 @@
-.\" $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sis/sis.cpp,v 1.1 2000/03/03 01:05:42 dawes Exp $
-.TH SIS __drivermansuffix__ "Version 4.0" "XFree86"
+.\" $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sis/sis.cpp,v 1.4 2000/06/14 02:13:13 dawes Exp $
+.\" shorthand for double quote that works everywhere.
+.ds q \N'34'
+.TH SIS __drivermansuffix__ "Version 4.0.1" "XFree86"
.SH NAME
sis \- SiS video driver
.SH SYNOPSIS
-.B "Section ""Device"""
-.br
-.BI " Identifier """ devname """"
-.br
-.B " Driver ""sis"""
-.br
+.nf
+.B "Section \*qDevice\*q"
+.BI " Identifier \*q" devname \*q
+.B " Driver \*qsis\*q"
\ \ ...
-.br
.B EndSection
+.fi
.SH DESCRIPTION
.B sis
is an XFree86 driver for SiS video cards.
@@ -25,6 +25,6 @@ Please refer to XF86Config(__filemansuffix__) for general configuration
details. This section only covers configuration details specific to this
driver.
.SH "SEE ALSO"
-XFree86(1), XF86Config(__filemansuffix__), xf86config(1), Xserver(1), X(1)
+XFree86(1), XF86Config(__filemansuffix__), xf86config(1), Xserver(1), X(__miscmansuffix__)
.SH AUTHORS
Authors include: ...
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/tdfx/Imakefile b/xc/programs/Xserver/hw/xfree86/drivers/tdfx/Imakefile
index 340127207..29db072d0 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/tdfx/Imakefile
+++ b/xc/programs/Xserver/hw/xfree86/drivers/tdfx/Imakefile
@@ -1,4 +1,4 @@
-XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/drivers/tdfx/Imakefile,v 1.12 2000/03/03 01:05:43 dawes Exp $
+XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/drivers/tdfx/Imakefile,v 1.16 2000/06/30 17:15:17 dawes Exp $
XCOMM
XCOMM This is the Imakefile for the TDFX driver.
XCOMM
@@ -29,7 +29,7 @@ INCLUDES = -I. -I../../include
INCLUDES = -I. -I$(XF86COMSRC) -I$(XF86OSSRC) \
-I$(SERVERSRC)/mfb -I$(SERVERSRC)/mi \
-I$(XF86SRC)/xaa -I$(XF86SRC)/rac -I$(XF86SRC)/int10 \
- -I$(SERVERSRC)/cfb -I$(XF86SRC)/xaa -I$(XF86SRC)/ramdac \
+ -I$(SERVERSRC)/fb -I$(XF86SRC)/xaa -I$(XF86SRC)/ramdac \
-I$(XF86SRC)/vgahw -I$(XF86SRC)/ddc -I$(XF86SRC)/i2c \
-I$(XF86SRC)/ddc -I$(XF86OSSRC)/vbe -I$(SERVERSRC)/Xext \
-I$(FONTINCSRC) -I$(SERVERSRC)/include -I$(XINCLUDESRC) \
@@ -68,5 +68,8 @@ InstallDriverSDKNonExecFile(tdfx_dripriv.h,$(DRIVERSDKDIR)/drivers/tdfx)
InstallDriverSDKNonExecFile(tdfx_driver.c,$(DRIVERSDKDIR)/drivers/tdfx)
InstallDriverSDKNonExecFile(tdfx_hwcurs.c,$(DRIVERSDKDIR)/drivers/tdfx)
InstallDriverSDKNonExecFile(tdfx_io.c,$(DRIVERSDKDIR)/drivers/tdfx)
+InstallDriverSDKNonExecFile(tdfx_priv.c,$(DRIVERSDKDIR)/drivers/tdfx)
+InstallDriverSDKNonExecFile(tdfx_priv.h,$(DRIVERSDKDIR)/drivers/tdfx)
+InstallDriverSDKNonExecFile(tdfx_sli.c,$(DRIVERSDKDIR)/drivers/tdfx)
InstallDriverSDKObjectModule(tdfx,$(DRIVERSDKMODULEDIR),drivers)
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx.cpp b/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx.cpp
index 1a7c2dad2..a92c55a65 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx.cpp
+++ b/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx.cpp
@@ -1,17 +1,17 @@
-.\" $XFree86: xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx.cpp,v 1.1 2000/03/03 01:05:43 dawes Exp $
-.TH TDFX __drivermansuffix__ "Version 4.0" "XFree86"
+.\" $XFree86: xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx.cpp,v 1.4 2000/06/14 02:13:15 dawes Exp $
+.\" shorthand for double quote that works everywhere.
+.ds q \N'34'
+.TH TDFX __drivermansuffix__ "Version 4.0.1" "XFree86"
.SH NAME
tdfx \- 3Dfx video driver
.SH SYNOPSIS
-.B "Section ""Device"""
-.br
-.BI " Identifier """ devname """"
-.br
-.B " Driver ""tdfx"""
-.br
+.nf
+.B "Section \*qDevice\*q"
+.BI " Identifier \*q" devname \*q
+.B " Driver \*qtdfx\*q"
\ \ ...
-.br
.B EndSection
+.fi
.SH DESCRIPTION
.B tdfx
is an XFree86 driver for 3Dfx video cards.
@@ -25,6 +25,6 @@ Please refer to XF86Config(__filemansuffix__) for general configuration
details. This section only covers configuration details specific to this
driver.
.SH "SEE ALSO"
-XFree86(1), XF86Config(__filemansuffix__), xf86config(1), Xserver(1), X(1)
+XFree86(1), XF86Config(__filemansuffix__), xf86config(1), Xserver(1), X(__miscmansuffix__)
.SH AUTHORS
Authors include: ...
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx.h b/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx.h
index 66e9c0d65..74eab72e8 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx.h
+++ b/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx.h
@@ -5,7 +5,7 @@
Copyright: 1998,1999
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx.h,v 1.9 2000/02/18 12:20:02 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx.h,v 1.10 2000/06/17 00:03:24 martin Exp $ */
#ifndef _TDFX_H_
#define _TDFX_H_
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_accel.c b/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_accel.c
index bc0d5ff3f..a38e8abe6 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_accel.c
+++ b/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_accel.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_accel.c,v 1.9 2000/03/02 16:07:52 martin Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_accel.c,v 1.12 2000/06/17 17:44:25 dawes Exp $ */
/* All drivers should typically include these */
#include "xf86.h"
@@ -85,10 +85,12 @@ TDFXFirstSync(ScrnInfoPtr pScrn) {
TDFXPtr pTDFX = TDFXPTR(pScrn);
if (!pTDFX->syncDone) {
+#ifdef XF86DRI
if (pTDFX->directRenderingEnabled) {
DRILock(screenInfo.screens[pScrn->scrnIndex], 0);
TDFXSwapContextPrivate(screenInfo.screens[pScrn->scrnIndex]);
}
+#endif
pTDFX->syncDone=TRUE;
pTDFX->sync(pScrn);
}
@@ -101,10 +103,12 @@ TDFXCheckSync(ScrnInfoPtr pScrn) {
if (pTDFX->syncDone) {
pTDFX->sync(pScrn);
pTDFX->syncDone=FALSE;
+#ifdef XF86DRI
if (pTDFX->directRenderingEnabled) {
TDFXLostContext(screenInfo.screens[pScrn->scrnIndex]);
DRIUnlock(screenInfo.screens[pScrn->scrnIndex]);
}
+#endif
}
}
@@ -144,6 +148,7 @@ TDFXSelectBuffer(TDFXPtr pTDFX, int which) {
TDFXWriteLong(pTDFX, SST_2D_SRCFORMAT, fmt);
break;
default:
+ ;
}
}
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_dga.c b/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_dga.c
index 400355fa6..896add046 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_dga.c
+++ b/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_dga.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_dga.c,v 1.2 2000/02/08 17:19:17 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_dga.c,v 1.3 2000/06/17 00:03:25 martin Exp $ */
#include "xf86.h"
#include "xf86_OSproc.h"
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_dri.c b/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_dri.c
index 11ea6f3f0..d41141490 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_dri.c
+++ b/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_dri.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_dri.c,v 1.6 2000/02/15 07:13:42 martin Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_dri.c,v 1.10 2000/06/23 23:43:45 alanh Exp $ */
#include "xf86.h"
#include "xf86_OSproc.h"
@@ -6,11 +6,7 @@
#include "xf86Priv.h"
#include "xf86PciInfo.h"
#include "xf86Pci.h"
-#define PSZ 8
-#include "cfb.h"
-#undef PSZ
-#include "cfb16.h"
-#include "cfb32.h"
+#include "fb.h"
#include "miline.h"
#include "GL/glxtokens.h"
#include "tdfx.h"
@@ -275,13 +271,16 @@ Bool TDFXDRIScreenInit(ScreenPtr pScreen)
if (pTDFX->ChipType<=PCI_CHIP_VOODOO3) return FALSE;
}
-#if XFree86LOADER
/* Check that the GLX, DRI, and DRM modules have been loaded by testing
for canonical symbols in each module. */
- if (!LoaderSymbol("GlxSetVisualConfigs")) return FALSE;
- if (!LoaderSymbol("DRIScreenInit")) return FALSE;
- if (!LoaderSymbol("drmAvailable")) return FALSE;
-#endif
+ if (!xf86LoaderCheckSymbol("GlxSetVisualConfigs")) return FALSE;
+ if (!xf86LoaderCheckSymbol("DRIScreenInit")) return FALSE;
+ if (!xf86LoaderCheckSymbol("drmAvailable")) return FALSE;
+ if (!xf86LoaderCheckSymbol("DRIQueryVersion")) {
+ xf86DrvMsg(pScreen->myNum, X_ERROR,
+ "TDFXDRIScreenInit failed (libdri.a too old)\n");
+ return FALSE;
+ }
/* Check the DRI version */
{
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_driver.c b/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_driver.c
index 34b23bf66..aebb2ae3c 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_driver.c
+++ b/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_driver.c
@@ -25,7 +25,7 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
**************************************************************************/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_driver.c,v 1.30 2000/03/06 23:54:13 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_driver.c,v 1.39 2000/06/23 23:43:45 alanh Exp $ */
/*
* Authors:
@@ -74,17 +74,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
/* Required for line biases */
#include "miline.h"
-/* Drivers using cfb need: */
-
-#define PSZ 8
-#include "cfb.h"
-#undef PSZ
-
-/* Drivers supporting bpp 16, 24 or 32 with cfb need one or more of: */
-
-#include "cfb16.h"
-#include "cfb24.h"
-#include "cfb32.h"
+#include "fb.h"
/* !!! These need to be checked !!! */
#if 0
@@ -109,6 +99,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
/* Required Functions: */
+static OptionInfoPtr TDFXAvailableOptions(int chipid, int busid);
/* Print a driver identifying message. */
static void TDFXIdentify(int flags);
@@ -157,6 +148,7 @@ DriverRec TDFX = {
#endif
TDFXIdentify,
TDFXProbe,
+ TDFXAvailableOptions,
NULL,
0
};
@@ -211,13 +203,8 @@ static const char *vgahwSymbols[] = {
0
};
-static const char *cfbSymbols[] = {
- "cfbScreenInit",
- "cfb16ScreenInit",
- "cfb24ScreenInit",
- "cfb32ScreenInit",
- "cfb8_32ScreenInit",
- "cfb24_32ScreenInit",
+static const char *fbSymbols[] = {
+ "fbScreenInit",
NULL
};
@@ -268,6 +255,8 @@ static const char *drmSymbols[] = {
"drmMapBufs",
"drmMarkBufs",
"drmUnmapBufs",
+ "drmFreeVersion",
+ "drmGetVersion",
NULL
};
@@ -284,6 +273,7 @@ static const char *driSymbols[] = {
"DRIUnlock",
"DRIGetSAREAPrivate",
"DRIGetContext",
+ "DRIQueryVersion",
"GlxSetVisualConfigs",
NULL
};
@@ -330,7 +320,7 @@ tdfxSetup(pointer module, pointer opts, int *errmaj, int *errmin)
* Tell the loader about symbols from other modules that this module
* might refer to.
*/
- LoaderRefSymLists(vgahwSymbols, cfbSymbols, xaaSymbols,
+ LoaderRefSymLists(vgahwSymbols, fbSymbols, xaaSymbols,
xf8_32bppSymbols, ramdacSymbols, vbeSymbols,
#ifdef XF86DRI
drmSymbols, driSymbols,
@@ -385,6 +375,26 @@ TDFXIdentify(int flags) {
xf86PrintChipsets(TDFX_NAME, "Driver for 3dfx Banshee/Voodoo3 chipsets", TDFXChipsets);
}
+static
+OptionInfoPtr
+TDFXAvailableOptions(int chipid, int busid)
+{
+ return TDFXOptions;
+}
+
+void
+TDFXProbeDDC(ScrnInfoPtr pScrn, int index)
+{
+ vbeInfoPtr pVbe;
+#ifdef XFree86LOADER
+ if (xf86LoadSubModule(pScrn, "vbe"))
+#endif
+ {
+ pVbe = VBEInit(NULL,index);
+ vbeDoEDID(pVbe, NULL);
+ }
+}
+
/*
* TDFXProbe --
*
@@ -418,6 +428,8 @@ TDFXProbe(DriverPtr drv, int flags) {
devSections, numDevSections,
drv, &usedChips);
+ if (devSections)
+ xfree(devSections);
if (numUsed<=0) return FALSE;
if (flags & PROBE_DETECT)
@@ -426,23 +438,24 @@ TDFXProbe(DriverPtr drv, int flags) {
ScrnInfoPtr pScrn;
/* Allocate new ScrnInfoRec and claim the slot */
- pScrn = xf86AllocateScreen(drv, 0);
-
- pScrn->driverVersion = TDFX_VERSION;
- pScrn->driverName = TDFX_DRIVER_NAME;
- pScrn->name = TDFX_NAME;
- pScrn->Probe = TDFXProbe;
- pScrn->PreInit = TDFXPreInit;
- pScrn->ScreenInit = TDFXScreenInit;
- pScrn->SwitchMode = TDFXSwitchMode;
- pScrn->AdjustFrame = TDFXAdjustFrame;
- pScrn->EnterVT = TDFXEnterVT;
- pScrn->LeaveVT = TDFXLeaveVT;
- pScrn->FreeScreen = TDFXFreeScreen;
- pScrn->ValidMode = TDFXValidMode;
- foundScreen = TRUE;
-
- xf86ConfigActivePciEntity(pScrn, usedChips[i], TDFXPciChipsets, 0, 0, 0, 0, 0);
+ pScrn = NULL;
+ if ((pScrn = xf86ConfigPciEntity(pScrn, 0, usedChips[i],
+ TDFXPciChipsets, 0, 0, 0, 0, 0))) {
+
+ pScrn->driverVersion = TDFX_VERSION;
+ pScrn->driverName = TDFX_DRIVER_NAME;
+ pScrn->name = TDFX_NAME;
+ pScrn->Probe = TDFXProbe;
+ pScrn->PreInit = TDFXPreInit;
+ pScrn->ScreenInit = TDFXScreenInit;
+ pScrn->SwitchMode = TDFXSwitchMode;
+ pScrn->AdjustFrame = TDFXAdjustFrame;
+ pScrn->EnterVT = TDFXEnterVT;
+ pScrn->LeaveVT = TDFXLeaveVT;
+ pScrn->FreeScreen = TDFXFreeScreen;
+ pScrn->ValidMode = TDFXValidMode;
+ foundScreen = TRUE;
+ }
}
xfree(usedChips);
if (devSections) xfree(devSections);
@@ -530,18 +543,6 @@ TDFXCountRam(ScrnInfoPtr pScrn) {
return memSize*1024;
}
-extern xf86MonPtr ConfiguredMonitor;
-
-static void
-TDFXProbeDDC(ScrnInfoPtr pScrn, int index)
-{
- vbeInfoPtr pVbe;
- if (xf86LoadSubModule(pScrn, "vbe")) {
- pVbe = VBEInit(NULL,index);
- ConfiguredMonitor = vbeDoEDID(pVbe);
- }
-}
-
static int TDFXCfgToSize(int cfg)
{
if (cfg<4) return 0x8000000<<cfg;
@@ -654,6 +655,11 @@ TDFXPreInit(ScrnInfoPtr pScrn, int flags)
pTDFX->initDone=FALSE;
pTDFX->pEnt = xf86GetEntityInfo(pScrn->entityList[0]);
+ if (flags & PROBE_DETECT) {
+ TDFXProbeDDC(pScrn, pTDFX->pEnt->index);
+ return TRUE;
+ }
+
if (pTDFX->pEnt->location.type != BUS_PCI) return FALSE;
if (flags & PROBE_DETECT) {
@@ -882,7 +888,7 @@ TDFXPreInit(ScrnInfoPtr pScrn, int flags)
break;
}
}
- clockRanges = xnfalloc(sizeof(ClockRange));
+ clockRanges = xnfcalloc(sizeof(ClockRange), 1);
clockRanges->next=NULL;
clockRanges->minClock= 12000; /* !!! What's the min clock? !!! */
clockRanges->maxClock=pTDFX->MaxClock;
@@ -918,29 +924,11 @@ TDFXPreInit(ScrnInfoPtr pScrn, int flags)
xf86SetDpi(pScrn, 0, 0);
- switch (pScrn->bitsPerPixel) {
- case 8:
- mod = "cfb";
- reqSym = "cfbScreenInit";
- break;
- case 16:
- mod = "cfb16";
- reqSym = "cfb16ScreenInit";
- break;
- case 24:
- mod = "cfb24";
- reqSym = "cfb24ScreenInit";
- break;
- case 32:
- mod = "cfb32";
- reqSym = "cfb32ScreenInit";
- break;
- }
- if (mod && !xf86LoadSubModule(pScrn, mod)) {
+ if (!xf86LoadSubModule(pScrn, "fb")) {
TDFXFreeRec(pScrn);
return FALSE;
}
- xf86LoaderReqSymbols(reqSym, NULL);
+ xf86LoaderReqSymbols("fbScreenInit", NULL);
if (!xf86ReturnOptValBool(TDFXOptions, OPTION_NOACCEL, FALSE)) {
if (!xf86LoadSubModule(pScrn, "xaa")) {
@@ -968,7 +956,7 @@ TDFXPreInit(ScrnInfoPtr pScrn, int flags)
/* Initialize DDC1 if possible */
if (xf86LoadSubModule(pScrn, "vbe")) {
xf86MonPtr pMon;
- pMon = vbeDoEDID(VBEInit(NULL,pTDFX->pEnt->index));
+ pMon = vbeDoEDID(VBEInit(NULL,pTDFX->pEnt->index), NULL);
xf86SetDDCproperties(pScrn,xf86PrintEDID(pMon));
}
@@ -1738,42 +1726,25 @@ TDFXScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) {
#ifdef XF86DRI
/*
- * Setup DRI after visuals have been established, but before cfbScreenInit
- * is called. cfbScreenInit will eventually call into the drivers
+ * Setup DRI after visuals have been established, but before fbScreenInit
+ * is called. fbScreenInit will eventually call into the drivers
* InitGLXVisuals call back.
*/
pTDFX->directRenderingEnabled = TDFXDRIScreenInit(pScreen);
/* Force the initialization of the context */
- TDFXLostContext(pScreen);
+ if (pTDFX->directRenderingEnabled)
+ TDFXLostContext(pScreen);
#endif
switch (pScrn->bitsPerPixel) {
case 8:
- if (!cfbScreenInit(pScreen, pTDFX->FbBase+pTDFX->fbOffset,
- pScrn->virtualX, pScrn->virtualY,
- pScrn->xDpi, pScrn->yDpi,
- pScrn->displayWidth))
- return FALSE;
- break;
case 16:
- if (!cfb16ScreenInit(pScreen, pTDFX->FbBase+pTDFX->fbOffset,
- pScrn->virtualX, pScrn->virtualY,
- pScrn->xDpi, pScrn->yDpi,
- pScrn->displayWidth))
- return FALSE;
- break;
case 24:
- if (!cfb24ScreenInit(pScreen, pTDFX->FbBase+pTDFX->fbOffset,
- pScrn->virtualX, pScrn->virtualY,
- pScrn->xDpi, pScrn->yDpi,
- pScrn->displayWidth))
- return FALSE;
- break;
case 32:
- if (!cfb32ScreenInit(pScreen, pTDFX->FbBase+pTDFX->fbOffset,
- pScrn->virtualX, pScrn->virtualY,
- pScrn->xDpi, pScrn->yDpi,
- pScrn->displayWidth))
+ if (!fbScreenInit(pScreen, pTDFX->FbBase+pTDFX->fbOffset,
+ pScrn->virtualX, pScrn->virtualY,
+ pScrn->xDpi, pScrn->yDpi,
+ pScrn->displayWidth, pScrn->bitsPerPixel))
return FALSE;
break;
default:
@@ -1850,7 +1821,7 @@ TDFXScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) {
#ifdef XF86DRI
if (pTDFX->directRenderingEnabled) {
- /* Now that mi, cfb, drm and others have done their thing,
+ /* Now that mi, fb, drm and others have done their thing,
* complete the DRI setup.
*/
pTDFX->directRenderingEnabled = TDFXDRIFinishScreenInit(pScreen);
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_io.c b/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_io.c
index 73a8b4604..f15f321bf 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_io.c
+++ b/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_io.c
@@ -24,7 +24,7 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
**************************************************************************/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_io.c,v 1.4 2000/02/23 04:47:21 martin Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_io.c,v 1.5 2000/06/17 00:03:25 martin Exp $ */
/*
* Authors:
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_priv.c b/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_priv.c
index 7fc57b19e..41d9d2270 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_priv.c
+++ b/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_priv.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_priv.c,v 1.7 2000/02/18 12:20:05 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_priv.c,v 1.10 2000/06/21 21:40:04 tsi Exp $ */
#if 0
@@ -85,7 +85,7 @@ void TDFXResetFifo(ScrnInfoPtr pScrn)
{
TDFXPtr pTDFX;
int oldValue;
- CARD32 start_sec, end_sec, dummy;
+ long start_sec, end_sec, dummy;
pTDFX=TDFXPTR(pScrn);
ErrorF("Resetting FIFO\n");
@@ -94,16 +94,16 @@ void TDFXResetFifo(ScrnInfoPtr pScrn)
/* Toggle the reset bits */
oldValue=TDFXReadLongMMIO(pTDFX, MISCINIT0);
TDFXWriteLongMMIO(pTDFX, MISCINIT0, oldValue|0x23);
- xf86getsecs(&start_sec, &dummy);
+ getsecs(&start_sec, &dummy);
do {
- xf86getsecs(&end_sec, &dummy);
+ getsecs(&end_sec, &dummy);
} while (end_sec-start_sec<2);
TDFXWriteLongMMIO(pTDFX, MISCINIT0, oldValue);
oldValue=TDFXReadLongMMIO(pTDFX, MISCINIT1);
TDFXWriteLongMMIO(pTDFX, MISCINIT1, oldValue|BIT(19));
- xf86getsecs(&start_sec, &dummy);
+ getsecs(&start_sec, &dummy);
do {
- xf86getsecs(&end_sec, &dummy);
+ getsecs(&end_sec, &dummy);
} while (end_sec-start_sec<2);
TDFXWriteLongMMIO(pTDFX, MISCINIT1, oldValue);
InstallFifo(pScrn);
@@ -122,7 +122,7 @@ static void TDFXSyncFifo(ScrnInfoPtr pScrn)
TDFXPtr pTDFX;
int i, cnt;
int stat;
- CARD32 start_sec, end_sec, dummy;
+ long start_sec, end_sec, dummy;
TDFXTRACEACCEL("TDFXSyncFifo start\n");
pTDFX=TDFXPTR(pScrn);
@@ -136,9 +136,9 @@ static void TDFXSyncFifo(ScrnInfoPtr pScrn)
cnt++;
if (cnt==1000) {
if (!start_sec) {
- xf86getsecs(&start_sec, &dummy);
+ getsecs(&start_sec, &dummy);
} else {
- xf86getsecs(&end_sec, &dummy);
+ getsecs(&end_sec, &dummy);
if (end_sec-start_sec>3) {
TDFXResetFifo(pScrn);
start_sec=0;
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfxdefs.h b/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfxdefs.h
index c6224d78f..ed177cb5a 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfxdefs.h
+++ b/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfxdefs.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfxdefs.h,v 1.5 2000/02/15 07:13:44 martin Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfxdefs.h,v 1.6 2000/06/17 00:03:25 martin Exp $ */
/*
Voodoo Banshee driver version 1.0.1
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/trident/trident.cpp b/xc/programs/Xserver/hw/xfree86/drivers/trident/trident.cpp
index 0db87b93a..ad4f3567d 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/trident/trident.cpp
+++ b/xc/programs/Xserver/hw/xfree86/drivers/trident/trident.cpp
@@ -1,17 +1,17 @@
-.\" $XFree86: xc/programs/Xserver/hw/xfree86/drivers/trident/trident.cpp,v 1.1 2000/03/03 01:05:44 dawes Exp $
-.TH TRIDENT __drivermansuffix__ "Version 4.0" "XFree86"
+.\" $XFree86: xc/programs/Xserver/hw/xfree86/drivers/trident/trident.cpp,v 1.4 2000/06/14 02:13:15 dawes Exp $
+.\" shorthand for double quote that works everywhere.
+.ds q \N'34'
+.TH TRIDENT __drivermansuffix__ "Version 4.0.1" "XFree86"
.SH NAME
trident \- Trident video driver
.SH SYNOPSIS
-.B "Section ""Device"""
-.br
-.BI " Identifier """ devname """"
-.br
-.B " Driver ""trident"""
-.br
+.nf
+.B "Section \*qDevice\*q"
+.BI " Identifier \*q" devname \*q
+.B " Driver \*qtrident\*q"
\ \ ...
-.br
.B EndSection
+.fi
.SH DESCRIPTION
.B trident
is an XFree86 driver for Trident video chips.
@@ -25,6 +25,6 @@ Please refer to XF86Config(__filemansuffix__) for general configuration
details. This section only covers configuration details specific to this
driver.
.SH "SEE ALSO"
-XFree86(1), XF86Config(__filemansuffix__), xf86config(1), Xserver(1), X(1)
+XFree86(1), XF86Config(__filemansuffix__), xf86config(1), Xserver(1), X(__miscmansuffix__)
.SH AUTHORS
Authors include: ...
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/tseng/tseng.cpp b/xc/programs/Xserver/hw/xfree86/drivers/tseng/tseng.cpp
index 7ed52b27f..5d0cbfe5b 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/tseng/tseng.cpp
+++ b/xc/programs/Xserver/hw/xfree86/drivers/tseng/tseng.cpp
@@ -1,17 +1,17 @@
-.\" $XFree86: xc/programs/Xserver/hw/xfree86/drivers/tseng/tseng.cpp,v 1.1 2000/03/03 01:05:44 dawes Exp $
-.TH TSENG __drivermansuffix__ "Version 4.0" "XFree86"
+.\" $XFree86: xc/programs/Xserver/hw/xfree86/drivers/tseng/tseng.cpp,v 1.4 2000/06/14 02:13:15 dawes Exp $
+.\" shorthand for double quote that works everywhere.
+.ds q \N'34'
+.TH TSENG __drivermansuffix__ "Version 4.0.1" "XFree86"
.SH NAME
tseng \- Tseng Labs video driver
.SH SYNOPSIS
-.B "Section ""Device"""
-.br
-.BI " Identifier """ devname """"
-.br
-.B " Driver ""tseng"""
-.br
+.nf
+.B "Section \*qDevice\*q"
+.BI " Identifier \*q" devname \*q
+.B " Driver \*qtseng\*q"
\ \ ...
-.br
.B EndSection
+.fi
.SH DESCRIPTION
.B tseng
is an XFree86 driver for Tseng Labs video cards.
@@ -25,6 +25,6 @@ Please refer to XF86Config(__filemansuffix__) for general configuration
details. This section only covers configuration details specific to this
driver.
.SH "SEE ALSO"
-XFree86(1), XF86Config(__filemansuffix__), xf86config(1), Xserver(1), X(1)
+XFree86(1), XF86Config(__filemansuffix__), xf86config(1), Xserver(1), X(__miscmansuffix__)
.SH AUTHORS
Authors include: ...
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/v4l/v4l.cpp b/xc/programs/Xserver/hw/xfree86/drivers/v4l/v4l.cpp
index a2bf9f4b3..fb06a6567 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/v4l/v4l.cpp
+++ b/xc/programs/Xserver/hw/xfree86/drivers/v4l/v4l.cpp
@@ -1,17 +1,17 @@
-.\" $XFree86: xc/programs/Xserver/hw/xfree86/drivers/v4l/v4l.cpp,v 1.1 2000/03/03 01:05:45 dawes Exp $
-.TH V4L __drivermansuffix__ "Version 4.0" "XFree86"
+.\" $XFree86: xc/programs/Xserver/hw/xfree86/drivers/v4l/v4l.cpp,v 1.4 2000/06/14 02:13:16 dawes Exp $
+.\" shorthand for double quote that works everywhere.
+.ds q \N'34'
+.TH V4L __drivermansuffix__ "Version 4.0.1" "XFree86"
.SH NAME
v4l \- Video 4 Linux driver
.SH SYNOPSIS
-.B "Section ""Device"""
-.br
-.BI " Identifier """ devname """"
-.br
-.B " Driver ""v4l"""
-.br
+.nf
+.B "Section \*qDevice\*q"
+.BI " Identifier \*q" devname \*q
+.B " Driver \*qv4l\*q"
\ \ ...
-.br
.B EndSection
+.fi
.SH DESCRIPTION
.B v4l
is an XFree86 driver for Video 4 Linux.
@@ -25,6 +25,6 @@ Please refer to XF86Config(__filemansuffix__) for general configuration
details. This section only covers configuration details specific to this
driver.
.SH "SEE ALSO"
-XFree86(1), XF86Config(__filemansuffix__), xf86config(1), Xserver(1), X(1)
+XFree86(1), XF86Config(__filemansuffix__), xf86config(1), Xserver(1), X(__miscmansuffix__)
.SH AUTHORS
Authors include: ...
diff --git a/xc/programs/Xserver/hw/xfree86/etc/Xinstall.sh b/xc/programs/Xserver/hw/xfree86/etc/Xinstall.sh
index ed1455f63..b2dd8279c 100644
--- a/xc/programs/Xserver/hw/xfree86/etc/Xinstall.sh
+++ b/xc/programs/Xserver/hw/xfree86/etc/Xinstall.sh
@@ -1,12 +1,13 @@
#!/bin/sh
#
-# $XFree86: xc/programs/Xserver/hw/xfree86/etc/Xinstall.sh,v 1.7 2000/02/29 18:01:20 dawes Exp $
+# $XFree86: xc/programs/Xserver/hw/xfree86/etc/Xinstall.sh,v 1.13 2000/06/30 21:44:37 dawes Exp $
#
# Copyright © 2000 by Precision Insight, Inc.
+# Copyright © 2000 by VA Linux Systems, Inc.
# Portions Copyright © 1996-2000 by The XFree86 Project, Inc.
#
-# This script should be used to install XFree86 4.0.
+# This script should be used to install XFree86 4.0.1.
#
# Parts of this script are based on the old preinst.sh and postinst.sh
# scripts.
@@ -16,7 +17,7 @@
# Authors: David Dawes <dawes@xfree86.org>
#
-VERSION=4.0
+VERSION=4.0.1
RUNDIR=/usr/X11R6
ETCDIR=/etc/X11
@@ -39,6 +40,12 @@ OLDDIRS=" \
$RUNDIR/lib/X11/xkb/compiled \
"
+OLDMODULES=" \
+ xie.so \
+ pex5.so \
+ glx.so \
+ "
+
BASEDIST=" \
Xbin.tgz \
Xlib.tgz \
@@ -50,7 +57,7 @@ BASEDIST=" \
ETCDIST="Xetc.tgz"
-VARDIST="Xvar.tgz"
+VARDIST=""
SERVDIST=" \
Xxserv.tgz \
@@ -85,6 +92,8 @@ ETCLINKS=" \
xserver \
"
+XKBDIR="/etc/X11/xkb"
+
FONTDIRS=" \
local \
misc
@@ -235,8 +244,12 @@ GetOsInfo()
;;
*)
L="-L"
+ ;;
esac
;;
+ SunOS)
+ L="-h" # /bin/sh built-in doesn't do -L
+ ;;
OS-with-no-symlinks) # Need to set this correctly
L="-b"
NoSymlinks=YES
@@ -417,6 +430,16 @@ FindDistName()
;;
esac
;;
+ mips)
+ case "$OsLibcMajor.$OsLibcMinor" in
+ 6.0)
+ DistName="Linux-mips-glibc20"
+ ;;
+ *)
+ Message="No Linux/Mips binaries for this libc version"
+ ;;
+ esac
+ ;;
*)
Message="No Linux binaries available for this architecture"
;;
@@ -557,16 +580,20 @@ fi
GetOsInfo
-# Make OS-specific adjustments to the distribution file lists
+# Make OS-specific adjustments
case "$OsName" in
+FreeBSD|NetBSD|OpenBSD)
+ VARDIST="Xvar.tgz"
+ XKBDIR="/var/db/xkb"
+ ;;
Interactive) # Need the correct name for this
- VARDIST=""
EXTRADIST="Xbin1.tgz"
EXTRAOPTDIST="Xxdm.tgz"
;;
-LynxOS)
- VARDIST=""
+Linux)
+ VARDIST="Xvar.tgz"
+ XKBDIR="/var/state/xkb"
;;
esac
@@ -677,6 +704,8 @@ if [ X"$NEEDSOMETHING" != X ]; then
exit 1
fi
+echo ""
+
# Link extract to gnu-tar so it can also be used as a regular tar
rm -f gnu-tar
ln extract gnu-tar
@@ -737,6 +766,10 @@ if [ X"$OLDDIRS" != X ]; then
echo ""
fi
+if [ ! -d $RUNDIR/lib/X11/xkb ]; then
+ echo "Creating $RUNDIR/lib/X11/xkb"
+ mkdir $RUNDIR/lib/X11/xkb
+fi
# Check for config file directories that may need to be moved.
EtcToMove=
@@ -768,7 +801,7 @@ if [ X"$EtcToMove" != X ]; then
;;
esac
echo ""
- if [ X"NoSymlinks" != XYES ]; then
+ if [ X"$NoSymLinks" != XYES ]; then
for i in $EtcToMove; do
echo "Moving $RUNDIR/lib/X11/$i to $ETCDIR/$i ..."
if [ ! -d $ETCDIR/$i ]; then
@@ -823,8 +856,20 @@ for i in $ETCLINKS; do
$TAR -C $RUNDIR/lib/X11/$i -v -x -p -U -f -
fi
done
+if [ X"$XKBDIR" != X ]; then
+ rm -fr $RUNDIR/lib/X11/xkb/compiled
+ if [ X"$NoSymLinks" = XYES ]; then
+ XKBDIR=$RUNDIR/lib/X11/xkb/compiled
+ fi
+ if [ -d .etctmp/xkb ]; then
+ mkdir $XKBDIR
+ $TAR -C .etctmp/xkb -c -f - . | \
+ $TAR -C $XKBDIR -v -x -p -U -f -
+ fi
+fi
rm -fr .etctmp
+echo ""
echo "Installing the mandatory parts of the binary distribution"
echo ""
for i in $BASEDIST $SERVDIST; do
@@ -834,6 +879,11 @@ if [ X"$VARDIST" != X ]; then
(cd $VARDIR; $EXTRACT $WDIR/$VARDIST)
fi
+if [ X"$XKBDIR" != X -a X"$XKBDIR" != X"$RUNDIR/lib/X11/xkb/compiled" ]; then
+ rm -fr $RUNDIR/lib/X11/xkb/compiled
+ ln -s $XKBDIR $RUNDIR/lib/X11/xkb/compiled
+fi
+
echo "Checking for optional components to install ..."
for i in $OPTDIST $EXTRAOPTDIST; do
if [ -f $i ]; then
@@ -969,6 +1019,67 @@ if [ -d $TINFODIR ]; then
esac
fi
+if [ -f $RUNDIR/lib/libGL.so ]; then
+ existing=""
+ if [ -f /usr/lib/libGL.so ]; then
+ existing="$existing /usr/lib/libGL.so"
+ fi
+ if [ -f /usr/lib/libGL.so.1 ]; then
+ existing="$existing /usr/lib/libGL.so.1"
+ fi
+ if [ -d /usr/include/GL ]; then
+ existing="$existing /usr/include/GL"
+ fi
+ echo ""
+ echo "On some platforms (e.g., Linux), the OpenGL standard requires"
+ echo "that the GL shared library and header files be visible from the"
+ echo "standard system lib and include directories (/usr/lib and"
+ echo "/usr/include). This can be done by installing links in those"
+ echo "directories to the files that have been installed under $RUNDIR."
+ echo ""
+ echo "NOTE: installing these links will overwrite existing files or"
+ echo "links."
+ if [ X"$existing" != X ]; then
+ echo ""
+ echo "The follwing links/files/directories already exist:"
+ echo ""
+ ls -ld $existing
+ fi
+ echo ""
+ Echo "Do you wish to have the (new) links installed (y/n)? [n] "
+ read response
+ case "$response" in
+ [yY]*)
+ rm -f /usr/lib/libGL.so
+ if [ ! -f /usr/lib/libGL.so ]; then
+ echo "Creating link from $RUNDIR/lib/libGL.so to /usr/lib/libGL.so"
+ ln -s $RUNDIR/lib/libGL.so /usr/lib/libGL.so
+ else
+ echo "Could not remove existing /usr/lib/libGL.so, so the new"
+ echo "link has not been created."
+ fi
+ rm -f /usr/lib/libGL.so.1
+ if [ ! -f /usr/lib/libGL.so.1 ]; then
+ echo "Creating link from $RUNDIR/lib/libGL.so.1 to /usr/lib/libGL.so.1"
+ ln -s $RUNDIR/lib/libGL.so.1 /usr/lib/libGL.so.1
+ else
+ echo "Could not remove existing /usr/lib/libGL.so.1, so the new"
+ echo "link has not been created."
+ fi
+ if [ -d $RUNDIR/include/GL ]; then
+ rm -f /usr/include/GL
+ if [ ! -d /usr/include/GL ]; then
+ echo "Creating link from $RUNDIR/include/GL to /usr/include/GL"
+ ln -s $RUNDIR/include/GL /usr/include/GL
+ else
+ echo "Could not remove existing /usr/include/GL, so the new"
+ echo "link has not been created."
+ fi
+ fi
+ ;;
+ esac
+fi
+
if [ -f $RUNDIR/bin/rstartd ]; then
echo ""
echo "If you are going to use rstart and $RUNDIR/bin isn't in the"
@@ -986,6 +1097,60 @@ if [ -f $RUNDIR/bin/rstartd ]; then
esac
fi
+# Finally, check for old 3.3.x modules that will conflict with 4.x
+if [ -d $RUNDIR/lib/modules ]; then
+ for i in $OLDMODULES; do
+ if [ -f $RUNDIR/lib/modules/$i ]; then
+ ModList="$ModList $i"
+ fi
+ done
+ if [ X"$ModList" != X ]; then
+ echo ""
+ echo "The following 3.3.x X server modules were found in"
+ echo "$RUNDIR/lib/modules, and they may cause problems when running"
+ echo "$VERSION:"
+ echo ""
+ echo " $ModList"
+ echo ""
+ echo "Do you want them moved to $RUNDIR/lib/modules/old?"
+ echo "Note: that if you want to use them with 3.3.x again, you'll"
+ Echo "need to move them back manually. (y/n) [n] "
+ read response
+ case "$response" in
+ [yY]*)
+ if [ ! -d $RUNDIR/lib/modules/old ]; then
+ echo ""
+ echo "Creating $RUNDIR/lib/modules/old"
+ mkdir $RUNDIR/lib/modules/old
+ else
+ echo ""
+ fi
+ if [ -d $RUNDIR/lib/modules/old ]; then
+ for i in $ModList; do
+ echo "Moving $i to $RUNDIR/lib/modules/old"
+ mv $RUNDIR/lib/modules/$i $RUNDIR/lib/modules/old/$i
+ done
+ else
+ echo "Failed to create directory $RUNDIR/lib/modules/old"
+ fi
+ ;;
+ *)
+ echo ""
+ echo "Make sure that you rename, move or delete the old modules"
+ echo "before running $VERSION."
+ esac
+ fi
+ # Some distributions have old codeconv modules
+ if [ -d $RUNDIR/lib/modules/codeconv ]; then
+ if [ -f $RUNDIR/lib/modules/codeconv/ISO8859_1.so ]; then
+ echo ""
+ echo "Warning: it looks like there are some old *.so modules"
+ echo "in $RUNDIR/lib/modules/codeconv. You may need to rename,"
+ echo "move or delete them if you use the xtt font module."
+ fi
+ fi
+fi
+
echo ""
echo "Installation complete."
diff --git a/xc/programs/Xserver/hw/xfree86/etc/bindist/FreeBSD-aout/set-list b/xc/programs/Xserver/hw/xfree86/etc/bindist/FreeBSD-aout/set-list
deleted file mode 100644
index 3bb030a3f..000000000
--- a/xc/programs/Xserver/hw/xfree86/etc/bindist/FreeBSD-aout/set-list
+++ /dev/null
@@ -1,5 +0,0 @@
-bin/XF86Setup
-bin/xmseconfig
-lib/X11/XF86Setup
-man/man1/XF86Setup.1.gz
-man/man1/xmseconfig.1.gz
diff --git a/xc/programs/Xserver/hw/xfree86/etc/bindist/FreeBSD/set-list b/xc/programs/Xserver/hw/xfree86/etc/bindist/FreeBSD/set-list
deleted file mode 100644
index 3bb030a3f..000000000
--- a/xc/programs/Xserver/hw/xfree86/etc/bindist/FreeBSD/set-list
+++ /dev/null
@@ -1,5 +0,0 @@
-bin/XF86Setup
-bin/xmseconfig
-lib/X11/XF86Setup
-man/man1/XF86Setup.1.gz
-man/man1/xmseconfig.1.gz
diff --git a/xc/programs/Xserver/hw/xfree86/etc/bindist/Interactive/set-list b/xc/programs/Xserver/hw/xfree86/etc/bindist/Interactive/set-list
deleted file mode 100644
index 23509474a..000000000
--- a/xc/programs/Xserver/hw/xfree86/etc/bindist/Interactive/set-list
+++ /dev/null
@@ -1,5 +0,0 @@
-bin/XF86Setup
-bin/xmseconfig
-lib/X11/XF86Setup
-man/man1/XF86Setup.1x.Z
-man/man1/xmseconfig.1x.Z
diff --git a/xc/programs/Xserver/hw/xfree86/etc/bindist/Linux-axp/set-list b/xc/programs/Xserver/hw/xfree86/etc/bindist/Linux-axp/set-list
deleted file mode 100644
index 83d032807..000000000
--- a/xc/programs/Xserver/hw/xfree86/etc/bindist/Linux-axp/set-list
+++ /dev/null
@@ -1,5 +0,0 @@
-bin/XF86Setup
-bin/xmseconfig
-lib/X11/XF86Setup
-man/man1/XF86Setup.1x
-man/man1/xmseconfig.1x
diff --git a/xc/programs/Xserver/hw/xfree86/etc/bindist/Linux-ix86/set-list b/xc/programs/Xserver/hw/xfree86/etc/bindist/Linux-ix86/set-list
deleted file mode 100644
index 83d032807..000000000
--- a/xc/programs/Xserver/hw/xfree86/etc/bindist/Linux-ix86/set-list
+++ /dev/null
@@ -1,5 +0,0 @@
-bin/XF86Setup
-bin/xmseconfig
-lib/X11/XF86Setup
-man/man1/XF86Setup.1x
-man/man1/xmseconfig.1x
diff --git a/xc/programs/Xserver/hw/xfree86/etc/bindist/Linux-m68k/set-list b/xc/programs/Xserver/hw/xfree86/etc/bindist/Linux-m68k/set-list
deleted file mode 100644
index 83d032807..000000000
--- a/xc/programs/Xserver/hw/xfree86/etc/bindist/Linux-m68k/set-list
+++ /dev/null
@@ -1,5 +0,0 @@
-bin/XF86Setup
-bin/xmseconfig
-lib/X11/XF86Setup
-man/man1/XF86Setup.1x
-man/man1/xmseconfig.1x
diff --git a/xc/programs/Xserver/hw/xfree86/etc/bindist/Linux-ppc/set-list b/xc/programs/Xserver/hw/xfree86/etc/bindist/Linux-ppc/set-list
deleted file mode 100644
index 83d032807..000000000
--- a/xc/programs/Xserver/hw/xfree86/etc/bindist/Linux-ppc/set-list
+++ /dev/null
@@ -1,5 +0,0 @@
-bin/XF86Setup
-bin/xmseconfig
-lib/X11/XF86Setup
-man/man1/XF86Setup.1x
-man/man1/xmseconfig.1x
diff --git a/xc/programs/Xserver/hw/xfree86/etc/bindist/LynxOS/set-list b/xc/programs/Xserver/hw/xfree86/etc/bindist/LynxOS/set-list
deleted file mode 100644
index 6d5d8a24f..000000000
--- a/xc/programs/Xserver/hw/xfree86/etc/bindist/LynxOS/set-list
+++ /dev/null
@@ -1,5 +0,0 @@
-bin/XF86Setup
-bin/xmseconfig
-lib/X11/XF86Setup
-man/cat1/XF86Setup.1
-man/cat1/xmseconfig.1
diff --git a/xc/programs/Xserver/hw/xfree86/etc/bindist/NetBSD-ix86/set-list b/xc/programs/Xserver/hw/xfree86/etc/bindist/NetBSD-ix86/set-list
deleted file mode 100644
index 3bb030a3f..000000000
--- a/xc/programs/Xserver/hw/xfree86/etc/bindist/NetBSD-ix86/set-list
+++ /dev/null
@@ -1,5 +0,0 @@
-bin/XF86Setup
-bin/xmseconfig
-lib/X11/XF86Setup
-man/man1/XF86Setup.1.gz
-man/man1/xmseconfig.1.gz
diff --git a/xc/programs/Xserver/hw/xfree86/etc/bindist/OpenBSD-ix86/set-list b/xc/programs/Xserver/hw/xfree86/etc/bindist/OpenBSD-ix86/set-list
deleted file mode 100644
index ac2d180b8..000000000
--- a/xc/programs/Xserver/hw/xfree86/etc/bindist/OpenBSD-ix86/set-list
+++ /dev/null
@@ -1,5 +0,0 @@
-bin/XF86Setup
-bin/xmseconfig
-lib/X11/XF86Setup
-man/cat1/XF86Setup.0
-man/cat1/xmseconfig.0
diff --git a/xc/programs/Xserver/hw/xfree86/etc/bindist/SVR4.0/set-list b/xc/programs/Xserver/hw/xfree86/etc/bindist/SVR4.0/set-list
deleted file mode 100644
index 83d032807..000000000
--- a/xc/programs/Xserver/hw/xfree86/etc/bindist/SVR4.0/set-list
+++ /dev/null
@@ -1,5 +0,0 @@
-bin/XF86Setup
-bin/xmseconfig
-lib/X11/XF86Setup
-man/man1/XF86Setup.1x
-man/man1/xmseconfig.1x
diff --git a/xc/programs/Xserver/hw/xfree86/etc/bindist/SVR4.0/var-dir b/xc/programs/Xserver/hw/xfree86/etc/bindist/SVR4.0/var-dir
deleted file mode 100644
index 186857b9e..000000000
--- a/xc/programs/Xserver/hw/xfree86/etc/bindist/SVR4.0/var-dir
+++ /dev/null
@@ -1 +0,0 @@
-var
diff --git a/xc/programs/Xserver/hw/xfree86/etc/bindist/SVR4.0/var-list b/xc/programs/Xserver/hw/xfree86/etc/bindist/SVR4.0/var-list
deleted file mode 100644
index 65eef93d6..000000000
--- a/xc/programs/Xserver/hw/xfree86/etc/bindist/SVR4.0/var-list
+++ /dev/null
@@ -1 +0,0 @@
-db
diff --git a/xc/programs/Xserver/hw/xfree86/etc/bindist/Solaris/set-list b/xc/programs/Xserver/hw/xfree86/etc/bindist/Solaris/set-list
deleted file mode 100644
index 83d032807..000000000
--- a/xc/programs/Xserver/hw/xfree86/etc/bindist/Solaris/set-list
+++ /dev/null
@@ -1,5 +0,0 @@
-bin/XF86Setup
-bin/xmseconfig
-lib/X11/XF86Setup
-man/man1/XF86Setup.1x
-man/man1/xmseconfig.1x
diff --git a/xc/programs/Xserver/hw/xfree86/etc/bindist/Solaris/var-dir b/xc/programs/Xserver/hw/xfree86/etc/bindist/Solaris/var-dir
deleted file mode 100644
index 186857b9e..000000000
--- a/xc/programs/Xserver/hw/xfree86/etc/bindist/Solaris/var-dir
+++ /dev/null
@@ -1 +0,0 @@
-var
diff --git a/xc/programs/Xserver/hw/xfree86/etc/bindist/Solaris/var-list b/xc/programs/Xserver/hw/xfree86/etc/bindist/Solaris/var-list
deleted file mode 100644
index 65eef93d6..000000000
--- a/xc/programs/Xserver/hw/xfree86/etc/bindist/Solaris/var-list
+++ /dev/null
@@ -1 +0,0 @@
-db
diff --git a/xc/programs/Xserver/hw/xfree86/etc/bindist/UnixWare/set-list b/xc/programs/Xserver/hw/xfree86/etc/bindist/UnixWare/set-list
deleted file mode 100644
index 83d032807..000000000
--- a/xc/programs/Xserver/hw/xfree86/etc/bindist/UnixWare/set-list
+++ /dev/null
@@ -1,5 +0,0 @@
-bin/XF86Setup
-bin/xmseconfig
-lib/X11/XF86Setup
-man/man1/XF86Setup.1x
-man/man1/xmseconfig.1x
diff --git a/xc/programs/Xserver/hw/xfree86/etc/bindist/UnixWare/var-dir b/xc/programs/Xserver/hw/xfree86/etc/bindist/UnixWare/var-dir
deleted file mode 100644
index 186857b9e..000000000
--- a/xc/programs/Xserver/hw/xfree86/etc/bindist/UnixWare/var-dir
+++ /dev/null
@@ -1 +0,0 @@
-var
diff --git a/xc/programs/Xserver/hw/xfree86/etc/bindist/UnixWare/var-list b/xc/programs/Xserver/hw/xfree86/etc/bindist/UnixWare/var-list
deleted file mode 100644
index 65eef93d6..000000000
--- a/xc/programs/Xserver/hw/xfree86/etc/bindist/UnixWare/var-list
+++ /dev/null
@@ -1 +0,0 @@
-db
diff --git a/xc/programs/Xserver/hw/xfree86/input/dynapro/dynapro.cpp b/xc/programs/Xserver/hw/xfree86/input/dynapro/dynapro.cpp
index 55b8870cd..ddf710e77 100644
--- a/xc/programs/Xserver/hw/xfree86/input/dynapro/dynapro.cpp
+++ b/xc/programs/Xserver/hw/xfree86/input/dynapro/dynapro.cpp
@@ -1,19 +1,18 @@
-.\" $XFree86: xc/programs/Xserver/hw/xfree86/input/dynapro/dynapro.cpp,v 1.1 2000/03/03 01:05:48 dawes Exp $
-.TH DYNAPRO __drivermansuffix__ "Version 4.0" "XFree86"
+.\" $XFree86: xc/programs/Xserver/hw/xfree86/input/dynapro/dynapro.cpp,v 1.4 2000/06/14 02:13:17 dawes Exp $
+.\" shorthand for double quote that works everywhere.
+.ds q \N'34'
+.TH DYNAPRO __drivermansuffix__ "Version 4.0.1" "XFree86"
.SH NAME
dynapro \- Dynapro input driver
.SH SYNOPSIS
-.B "Section ""InputDevice"""
-.br
-.BI " Identifier """ idevname """"
-.br
-.B " Driver ""dynapro"""
-.br
-.BI " Option ""Device"" """ devpath """"
-.br
+.nf
+.B "Section \*qInputDevice\*q"
+.BI " Identifier \*q" idevname \*q
+.B " Driver \*qdynapro\*q"
+.BI " Option \*qDevice\*q \*q" devpath \*q
\ \ ...
-.br
.B EndSection
+.fi
.SH DESCRIPTION
.B dynapro
is an XFree86 input driver for Dynapro devices...
@@ -32,6 +31,6 @@ section only covers configuration details specific to this driver.
.PP
Config details...
.SH "SEE ALSO"
-XFree86(1), XF86Config(__filemansuffix__), xf86config(1), Xserver(1), X(1).
+XFree86(1), XF86Config(__filemansuffix__), xf86config(1), Xserver(1), X(__miscmansuffix__).
.SH AUTHORS
Authors include...
diff --git a/xc/programs/Xserver/hw/xfree86/input/keyboard/keyboard.cpp b/xc/programs/Xserver/hw/xfree86/input/keyboard/keyboard.cpp
index dab66ca60..ff163e5c2 100644
--- a/xc/programs/Xserver/hw/xfree86/input/keyboard/keyboard.cpp
+++ b/xc/programs/Xserver/hw/xfree86/input/keyboard/keyboard.cpp
@@ -1,17 +1,17 @@
-.\" $XFree86: xc/programs/Xserver/hw/xfree86/input/keyboard/keyboard.cpp,v 1.1 2000/03/03 01:05:49 dawes Exp $
-.TH KEYBOARD __drivermansuffix__ "Version 4.0" "XFree86"
+.\" $XFree86: xc/programs/Xserver/hw/xfree86/input/keyboard/keyboard.cpp,v 1.4 2000/06/14 02:13:17 dawes Exp $
+.\" shorthand for double quote that works everywhere.
+.ds q \N'34'
+.TH KEYBOARD __drivermansuffix__ "Version 4.0.1" "XFree86"
.SH NAME
keyboard \- Keyboard input driver
.SH SYNOPSIS
-.B "Section ""InputDevice"""
-.br
-.BI " Identifier """ idevname """"
-.br
-.B " Driver ""keyboard"""
-.br
+.nf
+.B "Section \*qInputDevice\*q"
+.BI " Identifier \*q" idevname \*q
+.B " Driver \*qkeyboard\*q"
\ \ ...
-.br
.B EndSection
+.fi
.SH DESCRIPTION
.B keyboard
is an XFree86 input driver for keyboards. The driver supports the standard
@@ -32,7 +32,7 @@ The following driver
.B Options
are supported:
.TP 7
-.BI "Option ""Protocol"" """ string """
+.BI "Option \*qProtocol\*q \*q" string \*q
Specify the mouse protocol. Valid protocol types include:
.PP
.RS 12
@@ -43,7 +43,7 @@ Standard, Xqueue.
Not all protocols are supported on all platforms. Default: "Standard".
.RE
.TP 7
-.BI "Option ""AutoRepeat"" """ "delay rate" """
+.BI "Option \*qAutoRepeat\*q \*q" "delay rate" \*q
sets the auto repeat behaviour for the keyboard. This is not implemented
on all platforms.
.I delay
@@ -51,18 +51,18 @@ is the time in milliseconds before a key starts repeating.
.I rate
is the number of times a key repeats per second. Default: "500 30".
.TP 7
-.BI "Option ""XLeds"" """ ledlist """
+.BI "Option \*qXLeds\*q \*q" ledlist \*q
makes the keyboard LEDs specified in
.I ledlist
available for client use instead of their traditional function
(Scroll Lock, Caps Lock and Num Lock). The numbers in the list are
in the range 1 to 3. Default: empty list.
.TP 7
-.BI "Option ""XkbDisable"" """ boolean """
+.BI "Option \*qXkbDisable\*q \*q" boolean \*q
disable/enable the XKEYBOARD extension. The \-kb command line
option overrides this config file option. Default: XKB is enabled.
.TP 7
-.BI "Option ""XkbRules"" """ rules """
+.BI "Option \*qXkbRules\*q \*q" rules \*q
specifies which XKB rules file to use for interpreting the
.BR XkbModel ,
.BR XkbLayout ,
@@ -72,21 +72,21 @@ and
settings. Default: "xfree86" for most platforms, but "xfree98" for the
Japanese PC-98 platforms.
.TP 7
-.BI "Option ""XkbModel"" """ modelname """
+.BI "Option \*qXkbModel\*q \*q" modelname \*q
specifies the XKB keyboard model name. Default: "pc101" for most platforms,
but "pc98" for the Japanese PC-98 platforms, and "pc101_sol8x86" for
Solaris 8 on x86.
.TP 7
-.BI "Option ""XkbLayout"" """ layoutname """
+.BI "Option \*qXkbLayout\*q \*q" layoutname \*q
specifies the XKB keyboard layout name. This is usually the country or
language type of the keyboard. Default: "us" for most platforms, but
"nec/jp" for the Japanese PC-98 platforms.
.TP 7
-.BI "Option ""XkbVariant"" """ variants """
+.BI "Option \*qXkbVariant\*q \*q" variants \*q
specifies the XKB keyboard variant components. These can be used to
enhance the keyboard layout details. Default: not set.
.TP 7
-.BI "Option ""XkbOptions"" """ options """
+.BI "Option \*qXkbOptions\*q \*q" options \*q
specifies the XKB keyboard option components. These can be used to
enhance the keyboard behaviour. Default: not set.
.PP
@@ -94,4 +94,4 @@ Some other XKB-related options are available, but they are incompatible
with the ones listed above and are not recommended, so they are not
documented here.
.SH "SEE ALSO"
-XFree86(1), XF86Config(__filemansuffix__), xf86config(1), Xserver(1), X(1).
+XFree86(1), XF86Config(__filemansuffix__), xf86config(1), Xserver(1), X(__miscmansuffix__).
diff --git a/xc/programs/Xserver/hw/xfree86/input/microtouch/microtouch.cpp b/xc/programs/Xserver/hw/xfree86/input/microtouch/microtouch.cpp
index 3507b8f50..c29ebd7bb 100644
--- a/xc/programs/Xserver/hw/xfree86/input/microtouch/microtouch.cpp
+++ b/xc/programs/Xserver/hw/xfree86/input/microtouch/microtouch.cpp
@@ -1,19 +1,18 @@
-.\" $XFree86: xc/programs/Xserver/hw/xfree86/input/microtouch/microtouch.cpp,v 1.1 2000/03/03 01:05:49 dawes Exp $
-.TH MICROTOUCH __drivermansuffix__ "Version 4.0" "XFree86"
+.\" $XFree86: xc/programs/Xserver/hw/xfree86/input/microtouch/microtouch.cpp,v 1.4 2000/06/14 02:13:18 dawes Exp $
+.\" shorthand for double quote that works everywhere.
+.ds q \N'34'
+.TH MICROTOUCH __drivermansuffix__ "Version 4.0.1" "XFree86"
.SH NAME
microtouch \- MicroTouch input driver
.SH SYNOPSIS
-.B "Section ""InputDevice"""
-.br
-.BI " Identifier """ idevname """"
-.br
-.B " Driver ""microtouch"""
-.br
-.BI " Option ""Device"" """ devpath """"
-.br
+.nf
+.B "Section \*qInputDevice\*q"
+.BI " Identifier \*q" idevname \*q
+.B " Driver \*qmicrotouch\*q"
+.BI " Option \*qDevice\*q \*q" devpath \*q
\ \ ...
-.br
.B EndSection
+.fi
.SH DESCRIPTION
.B microtouch
is an XFree86 input driver for MicroTouch devices...
@@ -32,6 +31,6 @@ section only covers configuration details specific to this driver.
.PP
Config details...
.SH "SEE ALSO"
-XFree86(1), XF86Config(__filemansuffix__), xf86config(1), Xserver(1), X(1).
+XFree86(1), XF86Config(__filemansuffix__), xf86config(1), Xserver(1), X(__miscmansuffix__).
.SH AUTHORS
Authors include...
diff --git a/xc/programs/Xserver/hw/xfree86/input/mouse/mouse.cpp b/xc/programs/Xserver/hw/xfree86/input/mouse/mouse.cpp
index 9c3dfce4d..d71323380 100644
--- a/xc/programs/Xserver/hw/xfree86/input/mouse/mouse.cpp
+++ b/xc/programs/Xserver/hw/xfree86/input/mouse/mouse.cpp
@@ -1,21 +1,19 @@
-.\" $XFree86: xc/programs/Xserver/hw/xfree86/input/mouse/mouse.cpp,v 1.1 2000/03/03 01:05:50 dawes Exp $
-.TH MOUSE __drivermansuffix__ "Version 4.0" "XFree86"
+.\" $XFree86: xc/programs/Xserver/hw/xfree86/input/mouse/mouse.cpp,v 1.4 2000/06/14 02:13:18 dawes Exp $
+.\" shorthand for double quote that works everywhere.
+.ds q \N'34'
+.TH MOUSE __drivermansuffix__ "Version 4.0.1" "XFree86"
.SH NAME
mouse \- Mouse input driver
.SH SYNOPSIS
-.B "Section ""InputDevice"""
-.br
-.BI " Identifier """ idevname """"
-.br
-.B " Driver ""mouse"""
-.br
-.BI " Option ""Protocol"" """ protoname """"
-.br
-.BI " Option ""Device"" """ devpath """"
-.br
+.nf
+.B "Section \*qInputDevice\*q"
+.BI " Identifier \*q" idevname \*q
+.B " Driver \*qmouse\*q"
+.BI " Option \*qProtocol\*q \*q" protoname \*q
+.BI " Option \*qDevice\*q \*q" devpath \*q
\ \ ...
-.br
.B EndSection
+.fi
.SH DESCRIPTION
.B mouse
is an XFree86 input driver for mice. The driver supports most available
@@ -52,7 +50,7 @@ The following driver
.B Options
are supported:
.TP 7
-.BI "Option ""Protocol"" """ string """
+.BI "Option \*qProtocol\*q \*q" string \*q
Specify the mouse protocol. Valid protocol types include:
.PP
.RS 12
@@ -66,37 +64,38 @@ NetMousePS/2, NetScrollPS/2, BusMouse, SysMouse, WSMouse, USB, Xqueue.
Not all protocols are supported on all platforms. The "Auto" platform
specifies that protocol auto-detection should be attempted. There is no
default protocol setting, and specifying this option is mandatory.
+.RE
.TP 7
-.BI "Option ""Device"" """ string """
+.BI "Option \*qDevice\*q \*q" string \*q
Specifies the device through which the mouse can be accessed. A common
setting is "/dev/mouse", which is often a symbolic link to the real
device. This option is mandatory, and there is no default setting.
.TP 7
-.BI "Option ""Buttons"" """ integer """
+.BI "Option \*qButtons\*q \*q" integer \*q
Specifies the number of mouse buttons. In cases where the number of buttons
cannot be auto-detected, the default value is 3.
.TP 7
-.BI "Option ""Emulate3Buttons"" """ boolean """
+.BI "Option \*qEmulate3Buttons\*q \*q" boolean \*q
Enable/disable the emulation of the third (middle) mouse button for mice
which only have two physical buttons. The third button is emulated by
pressing both buttons simultaneously. Default: off
.TP 7
-.BI "Option ""Emulate3Timeout"" """ integer """
+.BI "Option \*qEmulate3Timeout\*q \*q" integer \*q
Sets the timeout (in milliseconds) that the driver waits before decicing
if two buttons where pressed "simultaneously" when 3 button emulation is
enabled. Default: 50.
.TP 7
-.BI "Option ""ChordMiddle"" """ boolean """
+.BI "Option \*qChordMiddle\*q \*q" boolean \*q
Enable/disable handling of mice that send left+right events when the middle
button is used. Default: off.
.TP 7
-.BI "Option ""ZAxisMapping"" ""X"""
+.BI "Option \*qZAxisMapping\*q \*qX\*q"
.TP 7
-.BI "Option ""ZAxisMapping"" ""Y"""
+.BI "Option \*qZAxisMapping\*q \*qY\*q"
.TP 7
-.BI "Option ""ZAxisMapping"" """ "N1 N2" """
+.BI "Option \*qZAxisMapping\*q \*q" "N1 N2" \*q
.TP 7
-.BI "Option ""ZAxisMapping"" """ "N1 N2 N3 N4" """
+.BI "Option \*qZAxisMapping\*q \*q" "N1 N2 N3 N4" \*q
Set the mapping for the Z axis (wheel) motion to buttons or another axis
.RB ( X
or
@@ -112,33 +111,33 @@ of the second wheel mapped respectively to buttons number
and
.IR N4 .
.TP 7
-.BI "Option ""FlipXY"" """ boolean """
+.BI "Option \*qFlipXY\*q \*q" boolean \*q
Enable/disable swapping the X and Y axes. Default: off.
.TP 7
-.BI "Option ""SampleRate"" """ integer """
+.BI "Option \*qSampleRate\*q \*q" integer \*q
Sets the number of motion/button events the mouse sends per second. Setting
this is only supported for some mice, including some Logitech mice and
some PS/2 mice on some platforms. Default: whatever the mouse is
already set to.
.TP 7
-.BI "Option ""Resolution"" """ integer """
+.BI "Option \*qResolution\*q \*q" integer \*q
Sets the resolution of the device in counts per inch. Setting this is
only supported for some mice, including some PS/2 mice on some platforms.
Default: whatever the mouse is already set to.
.TP 7
-.BI "Option ""ClearDTR"" """ boolean """
+.BI "Option \*qClearDTR\*q \*q" boolean \*q
Enable/disable clearing the DTR line on the serial port used by the mouse.
Some dual-protocol mice require the DTR line to be cleared to operate
in the non-default protocol. This option is for serial mice only.
Default: off.
.TP 7
-.BI "Option ""ClearRTS"" """ boolean """
+.BI "Option \*qClearRTS\*q \*q" boolean \*q
Enable/disable clearing the RTS line on the serial port used by the mouse.
Some dual-protocol mice require the RTS line to be cleared to operate
in the non-default protocol. This option is for serial mice only.
Default: off.
.TP 7
-.BI "Option ""BaudRate"" """ integer """
+.BI "Option \*qBaudRate\*q \*q" integer \*q
Set the baud rate to use for communicating with a serial mouse. This
option should rarely be required because the default is correct for almost
all situations. Valid values include: 300, 1200, 2400, 4800, 9600, 19200.
@@ -148,5 +147,5 @@ There are some other options that may be used to control various parameters
for serial port communication, but they are not documented here because
the driver sets them correctly for each mouse protocol type.
.SH "SEE ALSO"
-XFree86(1), XF86Config(__filemansuffix__), xf86config(1), Xserver(1), X(1),
+XFree86(1), XF86Config(__filemansuffix__), xf86config(1), Xserver(1), X(__miscmansuffix__),
README.mouse.
diff --git a/xc/programs/Xserver/hw/xfree86/input/void/void.cpp b/xc/programs/Xserver/hw/xfree86/input/void/void.cpp
index 9a321faf9..0a6b756a1 100644
--- a/xc/programs/Xserver/hw/xfree86/input/void/void.cpp
+++ b/xc/programs/Xserver/hw/xfree86/input/void/void.cpp
@@ -1,17 +1,17 @@
-.\" $XFree86: xc/programs/Xserver/hw/xfree86/input/void/void.cpp,v 1.1 2000/03/03 01:05:50 dawes Exp $
-.TH VOID __drivermansuffix__ "Version 4.0" "XFree86"
+.\" $XFree86: xc/programs/Xserver/hw/xfree86/input/void/void.cpp,v 1.4 2000/06/14 02:13:19 dawes Exp $
+.\" shorthand for double quote that works everywhere.
+.ds q \N'34'
+.TH VOID __drivermansuffix__ "Version 4.0.1" "XFree86"
.SH NAME
void \- null input driver
.SH SYNOPSIS
-.B "Section ""InputDevice"""
-.br
-.BI " Identifier """ idevname """"
-.br
-.B " Driver ""void"""
-.br
+.nf
+.B "Section \*qInputDevice\*q"
+.BI " Identifier \*q" idevname \*q
+.B " Driver \*qvoid\*q"
\ \ ...
-.br
.B EndSection
+.fi
.SH DESCRIPTION
.B void
is an dummy/null XFree86 input driver. It doesn't connect to any
@@ -24,6 +24,6 @@ Please refer to XF86Config(__filemansuffix__) for general configuration
details and for options that can be used with all input drivers. This
driver doesn't have any configuration options in addition to those.
.SH "SEE ALSO"
-XFree86(1), XF86Config(__filemansuffix__), xf86config(1), Xserver(1), X(1).
+XFree86(1), XF86Config(__filemansuffix__), xf86config(1), Xserver(1), X(__miscmansuffix__).
.SH AUTHORS
Authors include...
diff --git a/xc/programs/Xserver/hw/xfree86/input/wacom/wacom.cpp b/xc/programs/Xserver/hw/xfree86/input/wacom/wacom.cpp
index a346b4f7c..57c7bdf7e 100644
--- a/xc/programs/Xserver/hw/xfree86/input/wacom/wacom.cpp
+++ b/xc/programs/Xserver/hw/xfree86/input/wacom/wacom.cpp
@@ -1,19 +1,18 @@
-.\" $XFree86: xc/programs/Xserver/hw/xfree86/input/wacom/wacom.cpp,v 1.1 2000/03/03 01:05:51 dawes Exp $
-.TH WACOM __drivermansuffix__ "Version 4.0" "XFree86"
+.\" $XFree86: xc/programs/Xserver/hw/xfree86/input/wacom/wacom.cpp,v 1.4 2000/06/14 02:13:19 dawes Exp $
+.\" shorthand for double quote that works everywhere.
+.ds q \N'34'
+.TH WACOM __drivermansuffix__ "Version 4.0.1" "XFree86"
.SH NAME
wacom \- Wacom input driver
.SH SYNOPSIS
-.B "Section ""InputDevice"""
-.br
-.BI " Identifier """ idevname """"
-.br
-.B " Driver ""wacom"""
-.br
-.BI " Option ""Device"" """ devpath """"
-.br
+.nf
+.B "Section \*qInputDevice\*q"
+.BI " Identifier \*q" idevname \*q
+.B " Driver \*qwacom\*q"
+.BI " Option \*qDevice\*q \*q" devpath \*q
\ \ ...
-.br
.B EndSection
+.fi
.SH DESCRIPTION
.B wacom
is an XFree86 input driver for Wacom devices...
@@ -32,6 +31,6 @@ section only covers configuration details specific to this driver.
.PP
Config details...
.SH "SEE ALSO"
-XFree86(1), XF86Config(__filemansuffix__), xf86config(1), Xserver(1), X(1).
+XFree86(1), XF86Config(__filemansuffix__), xf86config(1), Xserver(1), X(__miscmansuffix__).
.SH AUTHORS
Authors include...
diff --git a/xc/programs/Xserver/hw/xfree86/loader/extsym.c b/xc/programs/Xserver/hw/xfree86/loader/extsym.c
index 98441ad28..2715acd8d 100644
--- a/xc/programs/Xserver/hw/xfree86/loader/extsym.c
+++ b/xc/programs/Xserver/hw/xfree86/loader/extsym.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/extsym.c,v 1.3 2000/01/06 20:10:04 mvojkovi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/extsym.c,v 1.4 2000/03/30 18:20:58 mvojkovi Exp $ */
/*
*
@@ -41,6 +41,11 @@ extern int PanoramiXNumScreens;
extern PanoramiXData *panoramiXdataPtr;
extern unsigned long XRT_WINDOW;
extern unsigned long XRT_PIXMAP;
+extern unsigned long XRT_GC;
+extern unsigned long XRT_COLORMAP;
+extern unsigned long XRC_DRAWABLE;
+extern Bool XineramaRegisterConnectionBlockCallback(void (*func)(void));
+extern int XineramaDeleteResource(pointer, XID);
#endif
LOOKUP extLookupTab[] = {
@@ -50,11 +55,16 @@ LOOKUP extLookupTab[] = {
SYMVAR(ShmSegType)
#ifdef PANORAMIX
+ SYMFUNC(XineramaRegisterConnectionBlockCallback)
+ SYMFUNC(XineramaDeleteResource)
SYMVAR(noPanoramiXExtension)
SYMVAR(PanoramiXNumScreens)
SYMVAR(panoramiXdataPtr)
SYMVAR(XRT_WINDOW)
SYMVAR(XRT_PIXMAP)
+ SYMVAR(XRT_GC)
+ SYMVAR(XRT_COLORMAP)
+ SYMVAR(XRC_DRAWABLE)
#endif
{ 0, 0 },
diff --git a/xc/programs/Xserver/hw/xfree86/loader/xf86sym.c b/xc/programs/Xserver/hw/xfree86/loader/xf86sym.c
index 9844d6d90..89767f811 100644
--- a/xc/programs/Xserver/hw/xfree86/loader/xf86sym.c
+++ b/xc/programs/Xserver/hw/xfree86/loader/xf86sym.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/xf86sym.c,v 1.134 2000/03/01 16:01:30 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/xf86sym.c,v 1.155 2000/06/30 19:06:58 keithp Exp $ */
/*
*
@@ -53,6 +53,7 @@
#include "xisb.h"
#include "xf86Priv.h"
#include "vbe.h"
+#include "xf86sbusBus.h"
#ifdef __FreeBSD__
/* XXX used in drmOpen(). This should change to use a less os-specific
@@ -81,6 +82,7 @@ extern unsigned long inl(unsigned int a);
#if defined(__alpha__)
#ifdef linux
+extern unsigned long _bus_base(void);
extern void _outb(char val, unsigned short port);
extern void _outw(short val, unsigned short port);
extern void _outl(int val, unsigned short port);
@@ -143,7 +145,12 @@ LOOKUP SparcLookupTab[] = {
#if defined(__powerpc__) && (defined(Lynx) || defined(linux))
void eieio();
+void _restf14();
void _restf17();
+void _restf18();
+void _restf19();
+void _restf20();
+void _restf22();
void _restf23();
void _restf24();
void _restf25();
@@ -151,7 +158,12 @@ void _restf26();
void _restf27();
void _restf28();
void _restf29();
+void _savef14();
void _savef17();
+void _savef18();
+void _savef19();
+void _savef20();
+void _savef22();
void _savef23();
void _savef24();
void _savef25();
@@ -254,7 +266,7 @@ LOOKUP xfree86LookupTab[] = {
SYMFUNC(xf86CheckPciSlot)
SYMFUNC(xf86ClaimPciSlot)
SYMFUNC(xf86GetPciVideoInfo)
- SYMFUNC(xf86GetEntityForPciInfo)
+ SYMFUNC(xf86GetPciEntity)
SYMFUNC(xf86GetPciConfigInfo)
SYMFUNC(xf86SetPciVideo)
SYMFUNC(xf86ClaimIsaSlot)
@@ -267,10 +279,17 @@ LOOKUP xfree86LookupTab[] = {
SYMFUNC(xf86IsPrimaryIsa)
SYMFUNC(xf86CheckPciGAType)
SYMFUNC(xf86PrintResList)
+ SYMFUNC(xf86AddResToList)
+ SYMFUNC(xf86JoinResLists)
+ SYMFUNC(xf86DupResList)
+ SYMFUNC(xf86FreeResList)
SYMFUNC(xf86ClaimFixedResources)
SYMFUNC(xf86AddEntityToScreen)
+ SYMFUNC(xf86SetEntityInstanceForScreen)
SYMFUNC(xf86RemoveEntityFromScreen)
SYMFUNC(xf86GetEntityInfo)
+ SYMFUNC(xf86GetNumEntityInstances)
+ SYMFUNC(xf86GetDevFromEntity)
SYMFUNC(xf86GetPciInfoForEntity)
SYMFUNC(xf86SetEntityFuncs)
SYMFUNC(xf86DeallocateResourcesForEntity)
@@ -291,10 +310,23 @@ LOOKUP xfree86LookupTab[] = {
SYMFUNC(xf86FindPciClass)
SYMFUNC(xf86RegisterStateChangeNotificationCallback)
SYMFUNC(xf86DeregisterStateChangeNotificationCallback)
+ SYMFUNC(xf86NoSharedResources)
#ifdef async
SYMFUNC(xf86QueueAsyncEvent)
#endif
-
+ /* Shared Accel Accessor Functions */
+ SYMFUNC(xf86GetLastScrnFlag)
+ SYMFUNC(xf86SetLastScrnFlag)
+ SYMFUNC(xf86IsEntityShared)
+ SYMFUNC(xf86SetEntityShared)
+ SYMFUNC(xf86IsEntitySharable)
+ SYMFUNC(xf86SetEntitySharable)
+ SYMFUNC(xf86IsPrimInitDone)
+ SYMFUNC(xf86SetPrimInitDone)
+ SYMFUNC(xf86ClearPrimInitDone)
+ SYMFUNC(xf86AllocateEntityPrivateIndex)
+ SYMFUNC(xf86GetEntityPrivate)
+
/* xf86Configure.c */
SYMFUNC(xf86AddDeviceToConfigure)
@@ -312,6 +344,7 @@ LOOKUP xfree86LookupTab[] = {
SYMFUNC(DGAAvailable)
SYMFUNC(DGAActive)
SYMFUNC(DGASetMode)
+ SYMFUNC(DGASetInputMode)
SYMFUNC(DGASelectInput)
SYMFUNC(DGAGetViewportStatus)
SYMFUNC(DGASetViewport)
@@ -391,7 +424,9 @@ LOOKUP xfree86LookupTab[] = {
SYMFUNC(xf86GetAllowMouseOpenFail)
SYMFUNC(xf86IsPc98)
SYMFUNC(xf86GetClocks)
+ SYMFUNC(xf86LoadDrvSubModule)
SYMFUNC(xf86LoadSubModule)
+ SYMFUNC(xf86UnloadSubModule)
SYMFUNC(xf86LoaderCheckSymbol)
SYMFUNC(xf86LoaderReqSymLists)
SYMFUNC(xf86LoaderReqSymbols)
@@ -403,6 +438,8 @@ LOOKUP xfree86LookupTab[] = {
/* SYMFUNC(xf86NewSerialNumber) */
SYMFUNC(xf86FindXvOptions)
SYMFUNC(xf86GetOS)
+ SYMFUNC(xf86ConfigPciEntity)
+ SYMFUNC(xf86ConfigIsaEntity)
SYMFUNC(xf86ConfigActivePciEntity)
SYMFUNC(xf86ConfigActiveIsaEntity)
SYMFUNC(xf86ConfigPciEntityInactive)
@@ -411,6 +448,23 @@ LOOKUP xfree86LookupTab[] = {
SYMFUNC(xf86RegisterRootWindowProperty)
SYMFUNC(xf86IsUnblank)
+#ifdef __sparc__
+ /* xf86sbusBus.c */
+ SYMFUNC(xf86MatchSbusInstances)
+ SYMFUNC(xf86GetSbusInfoForEntity)
+ SYMFUNC(xf86GetEntityForSbusInfo)
+ SYMFUNC(xf86SbusUseBuiltinMode)
+ SYMFUNC(xf86MapSbusMem)
+ SYMFUNC(xf86UnmapSbusMem)
+ SYMFUNC(xf86SbusHideOsHwCursor)
+ SYMFUNC(xf86SbusSetOsHwCursorCmap)
+ SYMFUNC(xf86SbusHandleColormaps)
+ SYMFUNC(sparcPromInit)
+ SYMFUNC(sparcPromClose)
+ SYMFUNC(sparcPromGetProperty)
+ SYMFUNC(sparcPromGetBool)
+#endif
+
/* xf86Init.c */
SYMFUNC(xf86GetPixFormat)
SYMFUNC(xf86GetBppFromDepth)
@@ -479,6 +533,7 @@ LOOKUP xfree86LookupTab[] = {
SYMFUNC(xf86FBManagerRunning)
SYMFUNC(xf86QueryLargestOffscreenArea)
SYMFUNC(xf86PurgeUnlockedOffscreenAreas)
+ SYMFUNC(xf86RegisterOffscreenManager)
/* xf86cmap.c */
SYMFUNC(xf86HandleColormaps)
@@ -488,6 +543,9 @@ LOOKUP xfree86LookupTab[] = {
SYMFUNC(xf86XVRegisterGenericAdaptorDriver)
SYMFUNC(xf86XVListGenericAdaptors)
SYMFUNC(xf86XVRegisterOffscreenImages)
+ SYMFUNC(xf86XVQueryOffscreenImages)
+ SYMFUNC(xf86XVAllocateVideoAdaptorRec)
+ SYMFUNC(xf86XVFreeVideoAdaptorRec)
/* xf86VidMode.c */
SYMFUNC(VidModeExtensionInit)
@@ -528,6 +586,7 @@ LOOKUP xfree86LookupTab[] = {
SYMFUNC(MiscExtGetKbdValue)
SYMFUNC(MiscExtSetKbdValue)
SYMFUNC(MiscExtCreateStruct)
+ SYMFUNC(MiscExtDestroyStruct)
SYMFUNC(MiscExtApply)
#endif
@@ -804,6 +863,9 @@ LOOKUP xfree86LookupTab[] = {
of the X server) easier. */
SYMFUNC(xf86InstallSIGIOHandler)
SYMFUNC(xf86RemoveSIGIOHandler)
+#ifdef __alpha__
+ SYMFUNC(_bus_base)
+#endif
#endif
SYMFUNC(xf86BlockSIGIO)
SYMFUNC(xf86UnblockSIGIO)
@@ -873,7 +935,12 @@ LOOKUP xfree86LookupTab[] = {
SYMFUNC(testinx2)
SYMFUNC(testinx)
#if defined(Lynx)
+ SYMFUNC(_restf14)
SYMFUNC(_restf17)
+ SYMFUNC(_restf18)
+ SYMFUNC(_restf19)
+ SYMFUNC(_restf20)
+ SYMFUNC(_restf22)
SYMFUNC(_restf23)
SYMFUNC(_restf24)
SYMFUNC(_restf25)
@@ -881,7 +948,12 @@ LOOKUP xfree86LookupTab[] = {
SYMFUNC(_restf27)
SYMFUNC(_restf28)
SYMFUNC(_restf29)
+ SYMFUNC(_savef14)
SYMFUNC(_savef17)
+ SYMFUNC(_savef18)
+ SYMFUNC(_savef19)
+ SYMFUNC(_savef20)
+ SYMFUNC(_savef22)
SYMFUNC(_savef23)
SYMFUNC(_savef24)
SYMFUNC(_savef25)
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/Imakefile b/xc/programs/Xserver/hw/xfree86/os-support/Imakefile
index c42f5b2b7..91a9b8706 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/Imakefile
+++ b/xc/programs/Xserver/hw/xfree86/os-support/Imakefile
@@ -1,4 +1,4 @@
-XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/os-support/Imakefile,v 3.37 2000/02/22 01:02:34 mvojkovi Exp $
+XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/os-support/Imakefile,v 3.41 2000/06/30 17:15:17 dawes Exp $
@@ -13,7 +13,8 @@ XCOMM $XConsortium: Imakefile /main/9 1996/10/25 15:38:46 kaleb $
#if defined(i386Architecture) || defined(ia64Architecture) || \
(defined(LinuxArchitecture) && defined(AlphaArchitecture)) || \
(defined(FreeBSDArchitecture) && defined(AlphaArchitecture)) || \
- defined(PpcArchitecture) || defined(SparcArchitecture)
+ defined(PpcArchitecture) || defined(SparcArchitecture) || \
+ (defined(LinuxArchitecture) && defined(MipsArchitecture))
BUS_SUBDIR = bus
#endif
@@ -62,7 +63,7 @@ OS_SUBDIR = lynxos
#endif
#if defined(i386BsdArchitecture) || defined(AlphaBsdArchitecture)
-# if defined(BSD386Architecture)
+# if defined(BSDOSArchitecture)
OS_SUBDIR = bsdi
# else
OS_SUBDIR = bsd
@@ -129,6 +130,7 @@ ForceSubdirs($(SUBDIRS))
DependSubdirs($(SUBDIRS))
InstallDriverSDKNonExecFile(xf86_OSproc.h,$(DRIVERSDKINCLUDEDIR))
+InstallDriverSDKNonExecFile(xf86_OSlib.h,$(DRIVERSDKINCLUDEDIR))
InstallDriverSDKNonExecFile(xf86_ansic.h,$(DRIVERSDKINCLUDEDIR))
InstallDriverSDKNonExecFile(xf86_libc.h,$(DRIVERSDKINCLUDEDIR))
InstallDriverSDKNonExecFile(xf86drm.h,$(DRIVERSDKINCLUDEDIR))
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/amoeba/Imakefile b/xc/programs/Xserver/hw/xfree86/os-support/amoeba/Imakefile
index 1a5463273..86518badb 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/amoeba/Imakefile
+++ b/xc/programs/Xserver/hw/xfree86/os-support/amoeba/Imakefile
@@ -1,4 +1,4 @@
-XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/os-support/amoeba/Imakefile,v 3.2 1999/07/10 07:24:47 dawes Exp $
+XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/os-support/amoeba/Imakefile,v 3.4 2000/06/27 14:27:29 tsi Exp $
@@ -12,9 +12,9 @@ IOSRC = inout.S
IOOBJ = inout.o
#endif
-SRCS = am_init.c am_video.c am_io.c mapVT_noop.c ioperm_noop.c \
+SRCS = am_init.c am_video.c am_io.c ioperm_noop.c \
VTsw_noop.c $(IOSRC) kmod_noop.c
-OBJS = am_init.o am_video.o am_io.o mapVT_noop.o ioperm_noop.o \
+OBJS = am_init.o am_video.o am_io.o ioperm_noop.o \
VTsw_noop.o $(IOOBJ) kmod_noop.o
INCLUDES = -I$(XF86COMSRC) -I$(XF86OSSRC) -I. -I$(SERVERSRC)/include \
@@ -24,7 +24,6 @@ SubdirLibraryRule($(OBJS))
NormalLibraryObjectRule()
NormalAsmObjectRule()
-ObjectFromSpecialSource(mapVT_noop,../shared/mapVT_noop,/**/)
ObjectFromSpecialSource(ioperm_noop,../shared/ioperm_noop,/**/)
ObjectFromSpecialSource(VTsw_noop,../shared/VTsw_noop,/**/)
ObjectFromSpecialSource(kmod_noop,../shared/kmod_noop,/**/)
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/bsd/Imakefile b/xc/programs/Xserver/hw/xfree86/os-support/bsd/Imakefile
index 5ac90fb38..424ff2cca 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/bsd/Imakefile
+++ b/xc/programs/Xserver/hw/xfree86/os-support/bsd/Imakefile
@@ -4,7 +4,7 @@ XCOMM $XConsortium: Imakefile /main/12 1996/10/27 11:06:35 kaleb $
-XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/Imakefile,v 3.41 2000/03/05 16:59:16 dawes Exp $
+XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/Imakefile,v 3.43 2000/06/23 19:51:01 dawes Exp $
#include <Server.tmpl>
@@ -73,7 +73,7 @@ APMSRC = pm_noop.c
APMOBJ = pm_noop.o
#endif
-#if defined(FreeBSDArchitecture)
+#if defined(FreeBSDArchitecture) && (OSMajorVersion > 2)
KMODSRC = bsd_kmod.c
KMODOBJ = bsd_kmod.o
#else
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/bsdi/Imakefile b/xc/programs/Xserver/hw/xfree86/os-support/bsdi/Imakefile
index d51e6183c..dff53fa05 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/bsdi/Imakefile
+++ b/xc/programs/Xserver/hw/xfree86/os-support/bsdi/Imakefile
@@ -1,4 +1,4 @@
-XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsdi/Imakefile,v 3.10 2000/02/13 03:36:06 dawes Exp $
+XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsdi/Imakefile,v 3.12 2000/06/27 14:27:29 tsi Exp $
@@ -11,12 +11,12 @@ MOUSESRC = bsdi_mouse.c
MOUSEOBJ = bsdi_mouse.o
SRCS = bsdi_init.c bsdi_video.c bsdi_io.c bios_devmem.c \
- mapVT_noop.c VTsw_noop.c std_kbdEv.c posix_tty.c $(MOUSESRC) \
+ VTsw_noop.c std_kbdEv.c posix_tty.c $(MOUSESRC) \
libc_wrapper.c stdResource.c stdPci.c sigiostubs.c pm_noop.c \
kmod_noop.c
OBJS = bsdi_init.o bsdi_video.o bsdi_io.o bios_devmem.o \
- mapVT_noop.o VTsw_noop.o std_kbdEv.o posix_tty.o $(MOUSEOBJ) \
+ VTsw_noop.o std_kbdEv.o posix_tty.o $(MOUSEOBJ) \
libc_wrapper.o stdResource.o stdPci.o sigiostubs.o pm_noop.o \
kmod_noop.o
@@ -31,7 +31,6 @@ SubdirLibraryRule($(OBJS))
NormalLibraryObjectRule()
LinkSourceFile(bios_devmem.c,../shared)
-LinkSourceFile(mapVT_noop.c,../shared)
LinkSourceFile(VTsw_noop.c,../shared)
LinkSourceFile(std_kbdEv.c,../shared)
LinkSourceFile(posix_tty.c,../shared)
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/dgux/Imakefile b/xc/programs/Xserver/hw/xfree86/os-support/dgux/Imakefile
index 49fb043d9..8d77cdc61 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/dgux/Imakefile
+++ b/xc/programs/Xserver/hw/xfree86/os-support/dgux/Imakefile
@@ -1,4 +1,4 @@
-XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/os-support/dgux/Imakefile,v 1.5 2000/02/13 03:36:07 dawes Exp $
+XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/os-support/dgux/Imakefile,v 1.6 2000/06/17 00:03:33 martin Exp $
#include <Server.tmpl>
BIOS_MOD = bios_DGmmap
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/hurd/Imakefile b/xc/programs/Xserver/hw/xfree86/os-support/hurd/Imakefile
index ce5c27bfa..8542e901f 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/hurd/Imakefile
+++ b/xc/programs/Xserver/hw/xfree86/os-support/hurd/Imakefile
@@ -1,4 +1,4 @@
-XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/os-support/hurd/Imakefile,v 1.9 2000/02/13 03:36:08 dawes Exp $
+XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/os-support/hurd/Imakefile,v 1.11 2000/06/27 14:27:30 tsi Exp $
#include <Server.tmpl>
@@ -8,11 +8,11 @@ MOUSESRC = hurd_mouse.c
MOUSEOBJ = hurd_mouse.o
SRCS = hurd_init.c hurd_video.c hurd_io.c libc_wrapper.c $(BIOS_MOD).c \
- mapVT_noop.c VTsw_noop.c posix_tty.c std_kbdEv.c $(MOUSESRC) \
+ VTsw_noop.c posix_tty.c std_kbdEv.c $(MOUSESRC) \
stdResource.c stdPci.c sigiostubs.c pm_noop.c kmod_noop.c
OBJS = hurd_init.o hurd_video.o hurd_io.o libc_wrapper.o $(BIOS_MOD).o \
- mapVT_noop.o VTsw_noop.o posix_tty.o std_kbdEv.o $(MOUSEOBJ) \
+ VTsw_noop.o posix_tty.o std_kbdEv.o $(MOUSEOBJ) \
stdResource.o stdPci.o sigiostubs.o pm_noop.o kmod_noop.o
INCLUDES = -I$(XF86COMSRC) -I$(XF86OSSRC) -I. -I$(SERVERSRC)/include \
@@ -27,7 +27,6 @@ NormalLibraryObjectRule()
LinkSourceFile(VTsw_noop.c,../shared)
-LinkSourceFile(mapVT_noop.c,../shared)
LinkSourceFile(posix_tty.c,../shared)
LinkSourceFile(std_kbdEv.c,../shared)
LinkSourceFile(libc_wrapper.c,../shared)
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/linux/Imakefile b/xc/programs/Xserver/hw/xfree86/os-support/linux/Imakefile
index ed314b993..122a9e374 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/linux/Imakefile
+++ b/xc/programs/Xserver/hw/xfree86/os-support/linux/Imakefile
@@ -1,5 +1,5 @@
XCOMM $XConsortium: Imakefile /main/10 1996/10/19 18:06:19 kaleb $
-XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/Imakefile,v 3.38 2000/02/23 04:47:22 martin Exp $
+XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/Imakefile,v 3.41 2000/06/27 14:27:30 tsi Exp $
#include <Server.tmpl>
@@ -40,12 +40,12 @@ AXP_OBJ=lnx_ev56.o
#endif
SRCS = lnx_init.c lnx_video.c lnx_io.c libc_wrapper.c bios_mmap.c \
- mapVT_noop.c VTsw_usl.c std_kbdEv.c posix_tty.c $(MOUSESRC) \
+ VTsw_usl.c std_kbdEv.c posix_tty.c $(MOUSESRC) \
lnx_pci.c vidmem.c lnx_apm.c $(JOYSTICK_SRC) $(DRI_SRC) $(RES_SRCS) \
$(AXP_SRC) lnx_kmod.c
OBJS = lnx_init.o lnx_video.o lnx_io.o libc_wrapper.o bios_mmap.o \
- mapVT_noop.o VTsw_usl.o std_kbdEv.o posix_tty.o $(MOUSEOBJ) \
+ VTsw_usl.o std_kbdEv.o posix_tty.o $(MOUSEOBJ) \
lnx_pci.o vidmem.o lnx_apm.o $(JOYSTICK_OBJ) $(DRI_OBJ) $(RES_OBJS) \
$(AXP_OBJ) lnx_kmod.o
@@ -94,7 +94,6 @@ InstallDynamicModule(lnx_jstk.o,$(MODULEDIR),input)
#endif
LinkSourceFile(bios_mmap.c,../shared)
-LinkSourceFile(mapVT_noop.c,../shared)
LinkSourceFile(std_kbdEv.c,../shared)
LinkSourceFile(posix_tty.c,../shared)
LinkSourceFile(libc_wrapper.c,../shared)
@@ -110,6 +109,7 @@ LinkSourceFile(stdResource.c,../shared)
DependTarget()
+InstallDriverSDKNonExecFile(agpgart.h,$(DRIVERSDKINCLUDEDIR)/linux)
#if 0
InstallDriverSDKDynamicModule(lnx_jstk.o,$(DRIVERSDKMODULEDIR))
#endif
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/linux/agpgart.h b/xc/programs/Xserver/hw/xfree86/os-support/linux/agpgart.h
index 7457cd114..a3d03d03e 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/linux/agpgart.h
+++ b/xc/programs/Xserver/hw/xfree86/os-support/linux/agpgart.h
@@ -23,6 +23,7 @@
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*/
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/agpgart.h,v 1.3 2000/06/17 00:03:33 martin Exp $ */
#ifndef _AGP_H
#define _AGP_H 1
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/Imakefile b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/Imakefile
index fdaecb972..5620604a0 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/Imakefile
+++ b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/Imakefile
@@ -1,4 +1,4 @@
-XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/Imakefile,v 1.5 2000/02/23 04:47:22 martin Exp $
+XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/Imakefile,v 1.6 2000/06/17 00:03:34 martin Exp $
#define IHaveModules
#include <Server.tmpl>
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/drmmodule.c b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/drmmodule.c
index 8192e97eb..8be822445 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/drmmodule.c
+++ b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/drmmodule.c
@@ -25,7 +25,7 @@
*
* Authors: Rickard E. (Rik) Faith <faith@valinux.com>
*
- * $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/drmmodule.c,v 1.2 2000/02/23 04:47:22 martin Exp $
+ * $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/drmmodule.c,v 1.3 2000/06/17 00:03:34 martin Exp $
*
*/
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/Makefile.kernel b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/Makefile.kernel
index a169473af..e262213ad 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/Makefile.kernel
+++ b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/Makefile.kernel
@@ -9,7 +9,7 @@
# Note 2! The CFLAGS definitions are now inherited from the
# parent makes..
#
-# $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/Makefile.kernel,v 1.5 2000/02/14 06:27:25 martin Exp $
+# $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/Makefile.kernel,v 1.6 2000/06/17 00:03:34 martin Exp $
L_TARGET := libdrm.a
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/i810_dma.c b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/i810_dma.c
index 94f35b61c..96b7a44fe 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/i810_dma.c
+++ b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/i810_dma.c
@@ -211,7 +211,7 @@ static int i810_unmap_buffer(drm_buf_t *buf)
if(buf_priv->currently_mapped != I810_BUF_MAPPED) return -EINVAL;
down(&current->mm->mmap_sem);
- retcode = do_munmap((unsigned long)buf_priv->virtual,
+ retcode = do_munmap(current->mm, (unsigned long)buf_priv->virtual,
(size_t) buf->total);
buf_priv->currently_mapped = I810_BUF_UNMAPPED;
buf_priv->virtual = 0;
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/mga_dma.c b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/mga_dma.c
index 25e3622ca..28e8811c8 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/mga_dma.c
+++ b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/mga_dma.c
@@ -572,10 +572,12 @@ int mga_dma_schedule(drm_device_t *dev, int locked)
{
drm_mga_private_t *dev_priv = (drm_mga_private_t *)dev->dev_private;
drm_device_dma_t *dma = dev->dma;
+ int retval = 0;
if (test_and_set_bit(0, &dev->dma_flag)) {
atomic_inc(&dma->total_missed_dma);
- return -EBUSY;
+ retval = -EBUSY;
+ goto sch_out_wakeup;
}
DRM_DEBUG("%s\n", __FUNCTION__);
@@ -591,7 +593,8 @@ int mga_dma_schedule(drm_device_t *dev, int locked)
atomic_inc(&dma->total_missed_lock);
clear_bit(0, &dev->dma_flag);
DRM_DEBUG("Not locked\n");
- return -EBUSY;
+ retval = -EBUSY;
+ goto sch_out_wakeup;
}
DRM_DEBUG("I'm locked\n");
@@ -621,12 +624,12 @@ int mga_dma_schedule(drm_device_t *dev, int locked)
}
}
+sch_out_wakeup:
if(test_bit(MGA_IN_FLUSH, &dev_priv->dispatch_status) &&
- dev_priv->next_prim->num_dwords == 0 &&
atomic_read(&dev_priv->pending_bufs) == 0) {
- /* Everything has been processed by the hardware */
+ /* Everything has been processed by the hardware */
clear_bit(MGA_IN_FLUSH, &dev_priv->dispatch_status);
- wake_up_interruptible(&dev_priv->flush_queue);
+ wake_up_interruptible(&dev_priv->flush_queue);
}
if(test_bit(MGA_IN_GETBUF, &dev_priv->dispatch_status) &&
@@ -641,7 +644,7 @@ int mga_dma_schedule(drm_device_t *dev, int locked)
}
clear_bit(0, &dev->dma_flag);
- return 0;
+ return retval;
}
static void mga_dma_service(int irq, void *device, struct pt_regs *regs)
@@ -956,11 +959,11 @@ static int mga_flush_queue(drm_device_t *dev)
}
if(dev_priv->next_prim->num_dwords != 0) {
- set_bit(MGA_IN_FLUSH, &dev_priv->dispatch_status);
current->state = TASK_INTERRUPTIBLE;
add_wait_queue(&dev_priv->flush_queue, &entry);
+ set_bit(MGA_IN_FLUSH, &dev_priv->dispatch_status);
+ mga_dma_schedule(dev, 0);
for (;;) {
- mga_dma_schedule(dev, 0);
if (!test_bit(MGA_IN_FLUSH,
&dev_priv->dispatch_status))
break;
@@ -1093,14 +1096,15 @@ int mga_flush_ioctl(struct inode *inode, struct file *filp,
}
if(lock.flags & _DRM_LOCK_FLUSH || lock.flags & _DRM_LOCK_FLUSH_ALL) {
- drm_mga_prim_buf_t *temp_buf =
- dev_priv->prim_bufs[dev_priv->current_prim_idx];
+ drm_mga_prim_buf_t *temp_buf;
+
+ temp_buf = dev_priv->current_prim;
if(temp_buf && temp_buf->num_dwords) {
set_bit(MGA_BUF_FORCE_FIRE, &temp_buf->buffer_status);
mga_advance_primary(dev);
- mga_dma_schedule(dev, 1);
}
+ mga_dma_schedule(dev, 1);
}
if(lock.flags & _DRM_LOCK_QUIESCENT) {
mga_flush_queue(dev);
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/mga_state.c b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/mga_state.c
index 0f7da2c79..723ccc539 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/mga_state.c
+++ b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/mga_state.c
@@ -546,7 +546,6 @@ static void mga_dma_dispatch_vertex(drm_device_t * dev, drm_buf_t * buf)
10 + 15 * MGA_NR_SAREA_CLIPRECTS);
PRIM_OVERFLOW(dev, dev_priv, primary_needed);
mgaEmitState(dev_priv);
-
do {
if (i < sarea_priv->nbox) {
DRM_DEBUG("idx %d Emit box %d/%d:"
@@ -572,7 +571,6 @@ static void mga_dma_dispatch_vertex(drm_device_t * dev, drm_buf_t * buf)
PRIMADVANCE(dev_priv);
} while (++i < sarea_priv->nbox);
}
-
if (buf_priv->discard) {
if (buf_priv->dispatched == 1)
AGEBUF(dev_priv, buf_priv);
@@ -748,10 +746,15 @@ static void mga_dma_dispatch_swap(drm_device_t * dev)
DRM_DEBUG("%s\n", __FUNCTION__);
primary_needed = nbox * 5;
- primary_needed += 60;
+ primary_needed += 65;
PRIM_OVERFLOW(dev, dev_priv, primary_needed);
PRIMGETPTR(dev_priv);
+ PRIMOUTREG(MGAREG_DMAPAD, 0);
+ PRIMOUTREG(MGAREG_DMAPAD, 0);
+ PRIMOUTREG(MGAREG_DWGSYNC, 0x7100);
+ PRIMOUTREG(MGAREG_DWGSYNC, 0x7000);
+
PRIMOUTREG(MGAREG_DSTORG, dev_priv->frontOffset);
PRIMOUTREG(MGAREG_MACCESS, dev_priv->mAccess);
PRIMOUTREG(MGAREG_SRCORG, dev_priv->backOffset);
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/xf86drm.c b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/xf86drm.c
index 1174a0fa2..e4bc53bc3 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/xf86drm.c
+++ b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/xf86drm.c
@@ -27,7 +27,7 @@
* Authors: Rickard E. (Rik) Faith <faith@valinux.com>
* Kevin E. Martin <martin@valinux.com>
*
- * $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/xf86drm.c,v 1.10 2000/02/23 04:47:23 martin Exp $
+ * $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/xf86drm.c,v 1.14 2000/06/27 16:42:07 alanh Exp $
*
*/
@@ -68,6 +68,13 @@ extern int xf86RemoveSIGIOHandler(int fd);
# endif
#endif
+#ifdef __alpha__
+extern unsigned long _bus_base(void);
+#define BUS_BASE _bus_base()
+#else
+#define BUS_BASE (0)
+#endif
+
/* Not all systems have MAP_FAILED defined */
#ifndef MAP_FAILED
#define MAP_FAILED ((void *)-1)
@@ -270,7 +277,7 @@ static int drmOpenByName(const char *name)
#if defined(XFree86Server)
mode = xf86ConfigDRI.mode ? xf86ConfigDRI.mode : DRM_DEV_MODE;
- group = xf86ConfigDRI.group ? xf86ConfigDRI.group : DRM_DEV_GID;
+ group = (xf86ConfigDRI.group >= 0) ? xf86ConfigDRI.group : DRM_DEV_GID;
#endif
#if defined(XFree86Server)
@@ -496,6 +503,10 @@ int drmAddMap(int fd,
drm_map_t map;
map.offset = offset;
+#ifdef __alpha__
+ if (!(type & DRM_SHM))
+ map.offset += BUS_BASE;
+#endif
map.size = size;
map.handle = 0;
map.type = type;
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/xf86drmHash.c b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/xf86drmHash.c
index 17089e448..24b698cce 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/xf86drmHash.c
+++ b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/xf86drmHash.c
@@ -25,7 +25,7 @@
*
* Authors: Rickard E. (Rik) Faith <faith@valinux.com>
*
- * $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/xf86drmHash.c,v 1.2 2000/02/23 04:47:23 martin Exp $
+ * $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/xf86drmHash.c,v 1.3 2000/06/17 00:03:34 martin Exp $
*
* DESCRIPTION
*
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/xf86drmRandom.c b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/xf86drmRandom.c
index 71ef11556..9e1e9ee2c 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/xf86drmRandom.c
+++ b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/xf86drmRandom.c
@@ -25,7 +25,7 @@
*
* Authors: Rickard E. (Rik) Faith <faith@valinux.com>
*
- * $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/xf86drmRandom.c,v 1.3 2000/02/23 04:47:23 martin Exp $
+ * $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/xf86drmRandom.c,v 1.4 2000/06/17 00:03:34 martin Exp $
*
* DESCRIPTION
*
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/xf86drmSL.c b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/xf86drmSL.c
index f67434bee..dd634c30f 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/xf86drmSL.c
+++ b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/xf86drmSL.c
@@ -25,7 +25,7 @@
*
* Authors: Rickard E. (Rik) Faith <faith@valinux.com>
*
- * $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/xf86drmSL.c,v 1.2 2000/02/23 04:47:24 martin Exp $
+ * $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/xf86drmSL.c,v 1.3 2000/06/17 00:03:34 martin Exp $
*
* DESCRIPTION
*
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/linux/int10/Imakefile b/xc/programs/Xserver/hw/xfree86/os-support/linux/int10/Imakefile
index ddc9bff0f..de4314ef0 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/linux/int10/Imakefile
+++ b/xc/programs/Xserver/hw/xfree86/os-support/linux/int10/Imakefile
@@ -1,4 +1,4 @@
-XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/int10/Imakefile,v 1.9 2000/02/15 02:00:15 eich Exp $
+XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/int10/Imakefile,v 1.10 2000/03/31 22:55:54 dawes Exp $
#define IHaveModules
@@ -102,8 +102,6 @@ all::
InstallDriverSDKLibraryModule(int10,$(DRIVERSDKMODULEDIR),.)
-InstallDriverSDKNonExecFile(../../int10/xf86int10.h,$(DRIVERSDKINCLUDEDIR))
-
#endif
DependTarget()
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/linux/int10/linux.c b/xc/programs/Xserver/hw/xfree86/os-support/linux/int10/linux.c
index 3e6f39685..820ad7805 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/linux/int10/linux.c
+++ b/xc/programs/Xserver/hw/xfree86/os-support/linux/int10/linux.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/int10/linux.c,v 1.8 2000/02/29 03:09:26 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/int10/linux.c,v 1.11 2000/05/31 07:15:10 eich Exp $ */
/*
* linux specific part of the int10 module
* Copyright 1999 Egbert Eich
@@ -62,7 +62,6 @@ xf86InitInt10(int entityIndex)
char *base;
char *base_high;
int pagesize;
- int alloc_entries;
legacyVGARec vga;
screen = (xf86FindScreenForEntity(entityIndex))->scrnIndex;
@@ -111,7 +110,6 @@ xf86InitInt10(int entityIndex)
goto error0;
pInt->mem = &linuxMem;
pagesize = getpagesize();
- alloc_entries = ALLOC_ENTRIES(pagesize);
pInt->private = (pointer)xnfcalloc(1,sizeof(linuxInt10Priv));
((linuxInt10Priv*)pInt->private)->screen = screen;
((linuxInt10Priv*)pInt->private)->alloc =
@@ -155,28 +153,24 @@ xf86InitInt10(int entityIndex)
#endif
if (xf86IsEntityPrimary(entityIndex)) {
+ int size;
int cs = ((CARD16*)0)[(0x10<<1)+1];
CARD8 *bios_base = (unsigned char *)(cs << 4);
- int size;
- xf86DrvMsg(screen,X_INFO,"Primary V_BIOS segment is: 0x%x\n",cs);
- if (xf86ReadBIOS(cs << 4,0,bios_base, 0x10) < 0) {
- xf86DrvMsg(screen,X_ERROR,"Cannot read V_BIOS\n");
- goto error3;
- }
- if (!(*bios_base == 0x55 && *(bios_base + 1) == 0xAA)) {
- xf86DrvMsg(screen,X_ERROR,"No V_BIOS found\n");
- goto error3;
- }
- size = *(bios_base + 2) * 512;
- if (xf86ReadBIOS(cs << 4,0,bios_base, size) < 0) {
- xf86DrvMsg(screen,X_ERROR,"Cannot read V_BIOS\n");
- goto error3;
- }
- if (bios_checksum(bios_base,size)) {
- xf86DrvMsg(screen,X_ERROR,"Bad checksum of V_BIOS \n");
- goto error3;
+ if (!int10_read_bios(screen,cs,bios_base)) {
+ int cs = ((CARD16*)0)[(0x42<<1)+1];
+ bios_base = (unsigned char *)(cs << 4);
+ if (!int10_read_bios(screen,cs,bios_base)) {
+ cs = V_BIOS >> 4;
+ bios_base = (unsigned char *)(cs << 4);
+ if (!int10_read_bios(screen,cs,bios_base)) {
+ xf86DrvMsg(screen,X_ERROR,"No V_BIOS found\n");
+ goto error3;
+ }
+ }
}
+ xf86DrvMsg(screen,X_INFO,"Primary V_BIOS segment is: 0x%x\n",cs);
+
pInt->BIOSseg = cs;
set_return_trap(pInt);
} else {
@@ -430,7 +424,7 @@ vm86_rep(struct vm86_struct *ptr)
:"=a" (__res)
:"n" ((int)113), "r" ((struct vm86_struct *)ptr));
#else
- __asm__ __volatile__("int $0x80"
+ __asm__ __volatile__("int $0x80\n\t"
:"=a" (__res):"a" ((int)113),
"b" ((struct vm86_struct *)ptr));
#endif
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/linux/lnxResource.c b/xc/programs/Xserver/hw/xfree86/os-support/linux/lnxResource.c
index 72ab22f8a..4e22a12cb 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/linux/lnxResource.c
+++ b/xc/programs/Xserver/hw/xfree86/os-support/linux/lnxResource.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnxResource.c,v 3.7 2000/03/06 22:59:33 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnxResource.c,v 3.9 2000/06/13 02:28:36 dawes Exp $ */
/* Resource information code */
@@ -150,7 +150,7 @@ xf86AccResFromOS(resPtr ret)
return ret;
}
-#elif defined(__powerpc__)
+#elif defined(__powerpc__) || defined(__sparc__) || defined(__mips__)
/* XXX this isn't exactly correct but it will get the server working
* for now until we get something better.
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/lynxos/Imakefile b/xc/programs/Xserver/hw/xfree86/os-support/lynxos/Imakefile
index 36013ddb4..4f44b4e62 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/lynxos/Imakefile
+++ b/xc/programs/Xserver/hw/xfree86/os-support/lynxos/Imakefile
@@ -1,4 +1,4 @@
-XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/os-support/lynxos/Imakefile,v 3.18 2000/02/13 03:36:09 dawes Exp $
+XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/os-support/lynxos/Imakefile,v 3.20 2000/06/27 14:27:30 tsi Exp $
#include <Server.tmpl>
#if !defined(PpcArchitecture)
@@ -17,12 +17,12 @@ PPC_OBJS=lynx_noinline.o lynx_ppc.o
MOUSESRC = lynx_mouse.c
MOUSEOBJ = lynx_mouse.o
-SRCS = lynx_init.c lynx_video.c lynx_io.c lynx_mmap.c mapVT_noop.c \
+SRCS = lynx_init.c lynx_video.c lynx_io.c lynx_mmap.c \
VTsw_usl.c std_kbdEv.c posix_tty.c $(MOUSESRC) \
$(IOPERM_SRCS) $(PPC_SRCS) libc_wrapper.c stdResource.c stdPci.c \
vidmem.c sigio.c pm_noop.c kmod_noop.c
-OBJS = lynx_init.o lynx_video.o lynx_io.o lynx_mmap.o mapVT_noop.o \
+OBJS = lynx_init.o lynx_video.o lynx_io.o lynx_mmap.o \
VTsw_usl.o std_kbdEv.o posix_tty.o $(MOUSEOBJ) \
$(IOPERM_OBJS) $(PPC_OBJS) libc_wrapper.o stdResource.o stdPci.o \
vidmem.o sigio.o pm_noop.o kmod_noop.o
@@ -40,7 +40,6 @@ NormalLibraryObjectRule()
#if !defined(PpcArchitecture)
LinkSourceFile(ioperm_noop.c,../shared)
#endif
-LinkSourceFile(mapVT_noop.c,../shared)
LinkSourceFile(VTsw_usl.c,../shared)
LinkSourceFile(std_kbdEv.c,../shared)
LinkSourceFile(posix_tty.c,../shared)
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/mach/Imakefile b/xc/programs/Xserver/hw/xfree86/os-support/mach/Imakefile
index 19bc8517a..6b12f3c9c 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/mach/Imakefile
+++ b/xc/programs/Xserver/hw/xfree86/os-support/mach/Imakefile
@@ -1,4 +1,4 @@
-XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/os-support/mach/Imakefile,v 3.1 1996/12/23 06:50:09 dawes Exp $
+XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/os-support/mach/Imakefile,v 3.3 2000/06/27 14:27:30 tsi Exp $
@@ -13,10 +13,10 @@ BIOS_MOD = bios_devmem
BIOS_MOD = bios_mmap
#endif
-SRCS = mach_init.c mach_video.c mach_io.c $(BIOS_MOD).c mapVT_noop.c \
+SRCS = mach_init.c mach_video.c mach_io.c $(BIOS_MOD).c \
VTsw_noop.c kmod_noop.c
-OBJS = mach_init.o mach_video.o mach_io.o $(BIOS_MOD).o mapVT_noop.o \
+OBJS = mach_init.o mach_video.o mach_io.o $(BIOS_MOD).o \
VTsw_noop.o kmod_noop.o
INCLUDES = -I$(XF86COMSRC) -I$(XF86OSSRC) -I. -I$(SERVERSRC)/include \
@@ -28,7 +28,6 @@ NormalLibraryObjectRule()
#if defined(OsfArchitecture)
ObjectFromSpecialSource(bios_devmem,../shared/bios_devmem,/**/)
#endif
-ObjectFromSpecialSource(mapVT_noop,../shared/mapVT_noop,/**/)
ObjectFromSpecialSource(VTsw_noop,../shared/VTsw_noop,/**/)
ObjectFromSpecialSource(kmod_noop,../shared/kmod_noop,/**/)
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/minix/Imakefile b/xc/programs/Xserver/hw/xfree86/os-support/minix/Imakefile
index 5d0f0f964..aca4c717c 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/minix/Imakefile
+++ b/xc/programs/Xserver/hw/xfree86/os-support/minix/Imakefile
@@ -1,4 +1,4 @@
-XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/os-support/minix/Imakefile,v 3.4 1996/12/23 06:50:15 dawes Exp $
+XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/os-support/minix/Imakefile,v 3.6 2000/06/27 14:27:30 tsi Exp $
@@ -8,10 +8,10 @@ XCOMM $XConsortium: Imakefile /main/5 1996/09/28 17:24:04 rws $
#include <Server.tmpl>
-SRCS = mnx_init.c mnx_video.c mnx_io.c bios_devmem.c mapVT_noop.c \
+SRCS = mnx_init.c mnx_video.c mnx_io.c bios_devmem.c \
ioperm_noop.c VTsw_noop.c std_mouse.c posix_tty.c kmod_noop.c
-OBJS = mnx_init.o mnx_video.o mnx_io.o bios_devmem.o mapVT_noop.o \
+OBJS = mnx_init.o mnx_video.o mnx_io.o bios_devmem.o \
ioperm_noop.o VTsw_noop.o posix_tty.o kmod_noop.o
INCLUDES = -I$(XF86COMSRC) -I$(XF86OSSRC) -I. -I$(SERVERSRC)/include \
@@ -21,7 +21,6 @@ SubdirLibraryRule($(OBJS))
NormalLibraryObjectRule()
NormalAsmObjectRule()
-ObjectFromSpecialSource(mapVT_noop,../shared/mapVT_noop,/**/)
ObjectFromSpecialSource(ioperm_noop,../shared/ioperm_noop,/**/)
ObjectFromSpecialSource(VTsw_noop,../shared/VTsw_noop,/**/)
ObjectFromSpecialSource(posix_tty,../shared/posix_tty,/**/)
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/nto/Imakefile b/xc/programs/Xserver/hw/xfree86/os-support/nto/Imakefile
index 74e3eea12..18bdea822 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/nto/Imakefile
+++ b/xc/programs/Xserver/hw/xfree86/os-support/nto/Imakefile
@@ -1,13 +1,13 @@
-XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/os-support/nto/Imakefile,v 1.2 1999/12/27 00:45:44 robin Exp $
+XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/os-support/nto/Imakefile,v 1.4 2000/06/27 14:27:30 tsi Exp $
XCOMM
#include <Server.tmpl>
-SRCS = nto_io.c nto_init.c nto_kbdEv.c mapVT_noop.c nto_ioperm.c nto_video.c \
+SRCS = nto_io.c nto_init.c nto_kbdEv.c nto_ioperm.c nto_video.c \
VTsw_noop.c posix_tty.c std_mseEv.c std_mouse.c kmod_noop.c
-OBJS = nto_io.o nto_init.o nto_kbdEv.o mapVT_noop.o nto_ioperm.o nto_video.o \
+OBJS = nto_io.o nto_init.o nto_kbdEv.o nto_ioperm.o nto_video.o \
VTsw_noop.o posix_tty.o std_mseEv.o std_mouse.o kmod_noop.o
INCLUDES = -I$(XF86COMSRC) -I$(XF86OSSRC) -I. -I$(SERVERSRC)/include \
@@ -18,7 +18,6 @@ NormalLibraryObjectRule()
ObjectFromSpecialSource(IO_utils,../shared/IO_utils,/**/)
-ObjectFromSpecialSource(mapVT_noop,../shared/mapVT_noop,/**/)
ObjectFromSpecialSource(VTsw_noop,../shared/VTsw_noop,/**/)
ObjectFromSpecialSource(posix_tty,../shared/posix_tty,/**/)
ObjectFromSpecialSource(std_mseEv,../shared/std_mseEv,/**/)
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/os2/Imakefile b/xc/programs/Xserver/hw/xfree86/os-support/os2/Imakefile
index 806a98585..1d052d344 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/os2/Imakefile
+++ b/xc/programs/Xserver/hw/xfree86/os-support/os2/Imakefile
@@ -4,17 +4,17 @@ XCOMM $XConsortium: Imakefile /main/7 1996/09/28 17:24:18 rws $
-XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/os-support/os2/Imakefile,v 3.14 2000/02/13 03:36:09 dawes Exp $
+XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/os-support/os2/Imakefile,v 3.16 2000/06/27 14:27:31 tsi Exp $
#include <Server.tmpl>
BIOS_MOD = os2_bios
-SRCS = os2_init.c os2_video.c os2_io.c $(BIOS_MOD).c mapVT_noop.c \
+SRCS = os2_init.c os2_video.c os2_io.c $(BIOS_MOD).c \
os2_ioperm.c os2_VTsw.c os2_mouse.c os2_KbdEv.c os2_stubs.c \
os2_select.c os2_diag.c libc_wrapper.c stdResource.c stdPci.c \
vidmem.c sigiostubs.c pm_noop.c kmod_noop.c
-OBJS = os2_init.o os2_video.o os2_io.o $(BIOS_MOD).o mapVT_noop.o \
+OBJS = os2_init.o os2_video.o os2_io.o $(BIOS_MOD).o \
os2_ioperm.o os2_VTsw.o os2_mouse.o os2_kbdEv.o os2_stubs.o \
os2_select.o os2_diag.o libc_wrapper.o stdResource.o stdPci.o \
vidmem.o sigiostubs.o pm_noop.o kmod_noop.o
@@ -30,7 +30,6 @@ SubdirLibraryRule($(OBJS))
NormalLibraryObjectRule()
NormalAsmObjectRule()
-LinkSourceFile(mapVT_noop.c,../shared)
LinkSourceFile(VTsw_noop.c,../shared)
LinkSourceFile(libc_wrapper.c,../shared)
LinkSourceFile(stdResource.c,../shared)
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/pmax/Imakefile b/xc/programs/Xserver/hw/xfree86/os-support/pmax/Imakefile
index fe69c7231..9441ffd8a 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/pmax/Imakefile
+++ b/xc/programs/Xserver/hw/xfree86/os-support/pmax/Imakefile
@@ -1,5 +1,5 @@
-XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/os-support/pmax/Imakefile,v 1.8 2000/02/13 03:36:10 dawes Exp $
+XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/os-support/pmax/Imakefile,v 1.9 2000/06/17 00:03:41 martin Exp $
#include <Server.tmpl>
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/qnx4/Imakefile b/xc/programs/Xserver/hw/xfree86/os-support/qnx4/Imakefile
index d6cbd6223..58fdd559d 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/qnx4/Imakefile
+++ b/xc/programs/Xserver/hw/xfree86/os-support/qnx4/Imakefile
@@ -1,16 +1,14 @@
-XCOMM
-XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/os-support/qnx4/Imakefile,v 1.3 2000/02/13 03:36:10 dawes Exp $
-XCOMM
+XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/os-support/qnx4/Imakefile,v 1.5 2000/06/27 14:27:31 tsi Exp $
#include <Server.tmpl>
-SRCS = qnx_io.c qnx_init.c qnx_utils.c mapVT_noop.c ioperm_noop.c qnx_video.c \
+SRCS = qnx_io.c qnx_init.c qnx_utils.c ioperm_noop.c qnx_video.c \
qnx_VTsw.c qnx_kbd.c posix_tty.c qnx_mouse.c qnx_select.c \
libc_wrapper.c stdResource.c stdPci.c sigiostubs.c pm_noop.c \
kmod_noop.c
-OBJS = qnx_io.o qnx_init.o qnx_utils.o mapVT_noop.o ioperm_noop.o qnx_video.o \
+OBJS = qnx_io.o qnx_init.o qnx_utils.o ioperm_noop.o qnx_video.o \
qnx_VTsw.o qnx_kbd.o posix_tty.o qnx_mouse.o qnx_select.o \
libc_wrapper.o stdResource.o stdPci.o sigiostubs.o pm_noop.o \
kmod_noop.o
@@ -28,7 +26,6 @@ NormalLibraryObjectRule()
LinkSourceFile(libc_wrapper.c,../shared)
LinkSourceFile(posix_tty.c,../shared)
-LinkSourceFile(mapVT_noop.c,../shared)
LinkSourceFile(ioperm_noop.c,../shared)
LinkSourceFile(stdResource.c,../shared)
LinkSourceFile(stdPci.c,../shared)
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/sco/Imakefile b/xc/programs/Xserver/hw/xfree86/os-support/sco/Imakefile
index 619dcb008..ccd0290ce 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/sco/Imakefile
+++ b/xc/programs/Xserver/hw/xfree86/os-support/sco/Imakefile
@@ -1,4 +1,4 @@
-XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/os-support/sco/Imakefile,v 3.7 2000/02/13 03:36:11 dawes Exp $
+XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/os-support/sco/Imakefile,v 3.9 2000/06/27 14:27:31 tsi Exp $
@@ -7,12 +7,12 @@ XCOMM $XConsortium: Imakefile /main/4 1996/09/28 17:24:25 rws $
#include <Server.tmpl>
-SRCS = sco_init.c sco_video.c sco_io.c bios_devmem.c mapVT_noop.c VTsw_sco.c \
+SRCS = sco_init.c sco_video.c sco_io.c bios_devmem.c VTsw_sco.c \
sysv_kbd.c std_kbdEv.c sysv_tty.c std_mseEv.c sco_mouse.c \
libc_wrapper.c stdResource.c stdPci.o sigiostubs.c pm_noop.c \
kmod_noop.c
-OBJS = sco_init.o sco_video.o sco_io.o bios_devmem.o mapVT_noop.o VTsw_sco.o \
+OBJS = sco_init.o sco_video.o sco_io.o bios_devmem.o VTsw_sco.o \
sysv_kbd.o std_kbdEv.o sysv_tty.o std_mseEv.o sco_mouse.o \
libc_wrapper.o stdResource.o stdPci.o sigiostubs.o pm_noop.o \
kmod_noop.o
@@ -28,7 +28,6 @@ SubdirLibraryRule($(OBJS))
NormalLibraryObjectRule()
LinkSourceFile(bios_devmem.c,../shared)
-LinkSourceFile(mapVT_noop.c,../shared)
LinkSourceFile(sysv_kbd.c,../shared)
LinkSourceFile(std_kbdEv.c,../shared)
LinkSourceFile(sysv_tty.c,../shared)
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/shared/libc_wrapper.c b/xc/programs/Xserver/hw/xfree86/os-support/shared/libc_wrapper.c
index 14a8c9f5a..b509b7883 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/shared/libc_wrapper.c
+++ b/xc/programs/Xserver/hw/xfree86/os-support/shared/libc_wrapper.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/shared/libc_wrapper.c,v 1.60 2000/02/09 15:47:50 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/shared/libc_wrapper.c,v 1.65 2000/06/17 00:03:42 martin Exp $ */
/*
* Copyright 1997 by The XFree86 Project, Inc.
*
@@ -32,10 +32,6 @@
#undef _ANSI_SOURCE
#endif
#include <sys/time.h>
-#if defined(__bsdi__)
-#define _POSIX_SOURCE
-#define _ANSI_SOURCE
-#endif
#include <math.h>
#include <stdarg.h>
#include <fcntl.h>
@@ -50,6 +46,7 @@
#include <sys/ioctl.h>
#ifdef __EMX__
#define NO_MMAP
+#include <sys/param.h>
#endif
#ifdef HAS_SVR3_MMAPDRV
#define NO_MMAP
@@ -1088,7 +1085,7 @@ xf86usleep(usec)
}
void
-xf86getsecs(CARD32 * secs, CARD32 * usecs)
+xf86getsecs(long * secs, long * usecs)
{
struct timeval tv;
@@ -1323,7 +1320,9 @@ xfToOsChmodMode(xf86mode_t xfmode)
if (xfmode & XF86_S_ISUID) mode |= S_ISUID;
if (xfmode & XF86_S_ISGID) mode |= S_ISGID;
+#ifndef __EMX__
if (xfmode & XF86_S_ISVTX) mode |= S_ISVTX;
+#endif
if (xfmode & XF86_S_IRUSR) mode |= S_IRUSR;
if (xfmode & XF86_S_IWUSR) mode |= S_IWUSR;
if (xfmode & XF86_S_IXUSR) mode |= S_IXUSR;
@@ -1350,7 +1349,11 @@ xf86chmod(const char *path, xf86mode_t xfmode)
int
xf86chown(const char *path, xf86uid_t owner, xf86gid_t group)
{
+#ifndef __EMX__
int rc = chown(path, owner, group);
+#else
+ int rc = 0;
+#endif
xf86errno = xf86GetErrno();
return rc;
}
@@ -1380,7 +1383,9 @@ xfToOsMknodMode(xf86mode_t xfmode)
if (xfmode & XF86_S_IFREG) mode |= S_IFREG;
if (xfmode & XF86_S_IFCHR) mode |= S_IFCHR;
+#ifndef __EMX__
if (xfmode & XF86_S_IFBLK) mode |= S_IFBLK;
+#endif
if (xfmode & XF86_S_IFIFO) mode |= S_IFIFO;
return mode;
@@ -1389,8 +1394,11 @@ xfToOsMknodMode(xf86mode_t xfmode)
int xf86mknod(const char *pathname, xf86mode_t xfmode, xf86dev_t dev)
{
mode_t mode = xfToOsMknodMode(xfmode);
+#ifndef __EMX__
int rc = mknod(pathname, mode, dev);
-
+#else
+ int rc = 0;
+#endif
xf86errno = xf86GetErrno();
return rc;
}
@@ -1795,7 +1803,7 @@ xf86GetErrno ()
int
xf86shmget(xf86key_t key, int size, int xf86shmflg)
{
- int shmflg = 0;
+ int shmflg = xf86shmflg & 0777;
if (key == XF86IPC_PRIVATE) key = IPC_PRIVATE;
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/shared/mapVT_noop.c b/xc/programs/Xserver/hw/xfree86/os-support/shared/mapVT_noop.c
deleted file mode 100644
index 74be8ee6c..000000000
--- a/xc/programs/Xserver/hw/xfree86/os-support/shared/mapVT_noop.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/shared/mapVT_noop.c,v 3.2 1998/07/25 16:57:01 dawes Exp $ */
-/*
- * Copyright 1993 by David Wexelblat <dwex@XFree86.org>
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of David Wexelblat not be used in
- * advertising or publicity pertaining to distribution of the software without
- * specific, written prior permission. David Wexelblat makes no representations
- * about the suitability of this software for any purpose. It is provided
- * "as is" without express or implied warranty.
- *
- * DAVID WEXELBLAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL DAVID WEXELBLAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- *
- */
-/* $XConsortium: mapVT_noop.c /main/3 1996/02/21 17:53:42 kaleb $ */
-
-/*
- * These routines are currently only needed for OSs with true USL-style VTs.
- * All other OSs get no-ops.
- */
-
-#if 0
-/* ARGSUSED */
-void xf86MapDisplay(int ScreenNum, int Region)
-{
- return;
-}
-
-/* ARGSUSED */
-void xf86UnMapDisplay(int ScreenNum, int Region)
-{
- return;
-}
-#endif
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/shared/sigio.c b/xc/programs/Xserver/hw/xfree86/os-support/shared/sigio.c
index 18083770d..e603af4d7 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/shared/sigio.c
+++ b/xc/programs/Xserver/hw/xfree86/os-support/shared/sigio.c
@@ -25,7 +25,7 @@
*
* Authors: Rickard E. (Rik) Faith <faith@valinux.com>
*
- * $XFree86: xc/programs/Xserver/hw/xfree86/os-support/shared/sigio.c,v 1.9 2000/03/02 16:07:53 martin Exp $
+ * $XFree86: xc/programs/Xserver/hw/xfree86/os-support/shared/sigio.c,v 1.11 2000/06/17 00:03:43 martin Exp $
*
*/
@@ -109,6 +109,16 @@ xf86SIGIO (int sig)
}
int
+xf86IsPipe (int fd)
+{
+ struct stat buf;
+
+ if (fstat (fd, &buf) < 0)
+ return 0;
+ return S_ISFIFO(buf.st_mode);
+}
+
+int
xf86InstallSIGIOHandler(int fd, void (*f)(int, void *), void *closure)
{
struct sigaction sa;
@@ -119,19 +129,8 @@ xf86InstallSIGIOHandler(int fd, void (*f)(int, void *), void *closure)
{
if (!xf86SigIOFuncs[i].f)
{
- sigemptyset(&sa.sa_mask);
- sigaddset(&sa.sa_mask, SIGIO);
- sa.sa_flags = 0;
- sa.sa_handler = xf86SIGIO;
- sigaction(SIGIO, &sa, &osa);
- xf86SigIOFuncs[i].fd = fd;
- xf86SigIOFuncs[i].closure = closure;
- xf86SigIOFuncs[i].f = f;
- if (i >= xf86SigIOMax)
- xf86SigIOMax = i+1;
- if (fd >= xf86SigIOMaxFd)
- xf86SigIOMaxFd = fd + 1;
- FD_SET (fd, &xf86SigIOMask);
+ if (xf86IsPipe (fd))
+ return 0;
if (fcntl(fd, F_SETOWN, getpid()) == -1) {
#ifdef XFree86Server
xf86Msg(X_WARNING, "fcntl(%d, F_SETOWN): %s\n",
@@ -152,6 +151,19 @@ xf86InstallSIGIOHandler(int fd, void (*f)(int, void *), void *closure)
#endif
return 0;
}
+ sigemptyset(&sa.sa_mask);
+ sigaddset(&sa.sa_mask, SIGIO);
+ sa.sa_flags = 0;
+ sa.sa_handler = xf86SIGIO;
+ sigaction(SIGIO, &sa, &osa);
+ xf86SigIOFuncs[i].fd = fd;
+ xf86SigIOFuncs[i].closure = closure;
+ xf86SigIOFuncs[i].f = f;
+ if (i >= xf86SigIOMax)
+ xf86SigIOMax = i+1;
+ if (fd >= xf86SigIOMaxFd)
+ xf86SigIOMaxFd = fd + 1;
+ FD_SET (fd, &xf86SigIOMask);
return 1;
}
/* Allow overwriting of the closure and callback */
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/sol8_x86/Imakefile b/xc/programs/Xserver/hw/xfree86/os-support/sol8_x86/Imakefile
index 0ac6d3044..97005bf4d 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/sol8_x86/Imakefile
+++ b/xc/programs/Xserver/hw/xfree86/os-support/sol8_x86/Imakefile
@@ -1,4 +1,4 @@
-XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/os-support/sol8_x86/Imakefile,v 1.4 2000/02/13 03:36:11 dawes Exp $
+XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/os-support/sol8_x86/Imakefile,v 1.5 2000/06/17 00:03:43 martin Exp $
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/solx86/Imakefile b/xc/programs/Xserver/hw/xfree86/os-support/solx86/Imakefile
index 970351ced..a6af01b15 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/solx86/Imakefile
+++ b/xc/programs/Xserver/hw/xfree86/os-support/solx86/Imakefile
@@ -1,4 +1,4 @@
-XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/os-support/solx86/Imakefile,v 3.16 2000/02/13 03:36:12 dawes Exp $
+XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/os-support/solx86/Imakefile,v 3.17 2000/06/17 00:03:43 martin Exp $
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/sysv/Imakefile b/xc/programs/Xserver/hw/xfree86/os-support/sysv/Imakefile
index ca5c6134a..08e68785b 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/sysv/Imakefile
+++ b/xc/programs/Xserver/hw/xfree86/os-support/sysv/Imakefile
@@ -1,4 +1,4 @@
-XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/os-support/sysv/Imakefile,v 3.21 2000/02/13 03:36:12 dawes Exp $
+XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/os-support/sysv/Imakefile,v 3.22 2000/06/17 00:03:43 martin Exp $
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/vbe/Imakefile b/xc/programs/Xserver/hw/xfree86/os-support/vbe/Imakefile
index ca2a48a01..04b459979 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/vbe/Imakefile
+++ b/xc/programs/Xserver/hw/xfree86/os-support/vbe/Imakefile
@@ -1,6 +1,10 @@
-XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/os-support/vbe/Imakefile,v 1.4 2000/02/09 20:47:15 dawes Exp $
+XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/os-support/vbe/Imakefile,v 1.8 2000/05/23 04:47:49 dawes Exp $
+
+#if DoLoadableServer
+#define IHaveSubdirs
+SUBDIRS = module
+#endif
-#define IHaveModules
#include <Server.tmpl>
SRCS = vbe.c vbe_module.c
@@ -12,16 +16,19 @@ INCLUDES = -I. -I$(XF86COMSRC) -I$(XF86OSSRC) \
-I$(XF86SRC)/int10 -I$(XF86SRC)/ddc \
-I$(XF86SRC)/i2c
+#if DoLoadableServer
+#define IHaveSubdirs
+SUBDIRS = module
+#endif
+
SubdirLibraryRule($(OBJS))
NormalLibraryObjectRule()
-LibraryModuleTarget(vbe, $(OBJS))
-
-InstallLibraryModule(vbe,$(MODULEDIR),.)
+#if DoLoadableServer
+ForceSubdirs($(SUBDIRS))
+MakeSubdirs($(SUBDIRS))
+DependSubdirs($(SUBDIRS))
+#endif
DependTarget()
-InstallDriverSDKLibraryModule(vbe,$(DRIVERSDKMODULEDIR),.)
-
-InstallDriverSDKNonExecFile(vbe.h,$(DRIVERSDKINCLUDEDIR))
-
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/vbe/vbe.c b/xc/programs/Xserver/hw/xfree86/os-support/vbe/vbe.c
index 1c9bcc75f..cc067165c 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/vbe/vbe.c
+++ b/xc/programs/Xserver/hw/xfree86/os-support/vbe/vbe.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/vbe/vbe.c,v 1.4 2000/02/08 13:13:32 eich Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/vbe/vbe.c,v 1.9 2000/05/31 09:39:45 eich Exp $ */
#include "xf86.h"
#include "xf86_ansic.h"
@@ -192,15 +192,34 @@ vbeProbeDDC(vbeInfoPtr pVbe)
return TRUE;
}
+typedef enum {
+ VBEOPT_NOVBE
+} VBEOpts;
+
+static OptionInfoRec VBEOptions[] = {
+ { VBEOPT_NOVBE, "NoVBE", OPTV_BOOLEAN, {0}, FALSE },
+ { -1, NULL, OPTV_NONE, {0}, FALSE },
+};
+
+#define nVBEOptions (sizeof(VBEOptions) / sizeof(VBEOptions[0]))
+
static unsigned char *
vbeReadEDID(vbeInfoPtr pVbe)
{
int RealOff = pVbe->real_mode_base;
pointer page = pVbe->memory;
unsigned char *tmp = NULL;
+ Bool novbe = FALSE;
int screen = pVbe->pInt10->scrnIndex;
+ OptionInfoRec options[nVBEOptions];
if (!page) return NULL;
+
+ (void)memcpy(options, VBEOptions, sizeof(VBEOptions));
+ xf86ProcessOptions(screen, xf86Screens[screen]->options, options);
+ xf86GetOptValBool(options, VBEOPT_NOVBE, &novbe);
+ if (novbe) return NULL;
+
if (!vbeProbeDDC(pVbe)) goto error;
pVbe->pInt10->ax = 0x4F15;
@@ -232,24 +251,33 @@ vbeReadEDID(vbeInfoPtr pVbe)
}
xf86MonPtr
-vbeDoEDID(vbeInfoPtr pVbe)
+vbeDoEDID(vbeInfoPtr pVbe, pointer pDDCModule)
{
+ xf86MonPtr pMonitor;
+ pointer pModule;
unsigned char *DDC_data = NULL;
if (!pVbe) return NULL;
if (pVbe->version < 0x200)
return NULL;
+
+ if (!(pModule = pDDCModule)) {
+ pModule =
+ xf86LoadSubModule(xf86Screens[pVbe->pInt10->scrnIndex], "ddc");
+ if (!pModule)
+ return NULL;
+
+ xf86LoaderReqSymLists(ddcSymbols, NULL);
+ }
DDC_data = vbeReadEDID(pVbe);
if (!DDC_data)
return NULL;
- if (!xf86LoadSubModule(xf86Screens[pVbe->pInt10->scrnIndex], "ddc"))
- return NULL;
- xf86LoaderReqSymLists(ddcSymbols, NULL);
+ pMonitor = xf86InterpretEDID(pVbe->pInt10->scrnIndex, DDC_data);
- return xf86InterpretEDID(DDC_data);
+ if (!pDDCModule)
+ xf86UnloadSubModule(pModule);
+ return pMonitor;
}
-
-
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/vbe/vbe.h b/xc/programs/Xserver/hw/xfree86/os-support/vbe/vbe.h
index 070f8e273..2bdfb7952 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/vbe/vbe.h
+++ b/xc/programs/Xserver/hw/xfree86/os-support/vbe/vbe.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/vbe/vbe.h,v 1.3 2000/02/08 13:13:32 eich Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/vbe/vbe.h,v 1.4 2000/04/20 21:28:50 tsi Exp $ */
#ifndef _VBE_H
#define _VBE_H
@@ -27,7 +27,7 @@ typedef struct {
vbeInfoPtr VBEInit(xf86Int10InfoPtr pInt, int entityIndex);
void vbeFree(vbeInfoPtr pVbe);
-xf86MonPtr vbeDoEDID(vbeInfoPtr pVbe);
+xf86MonPtr vbeDoEDID(vbeInfoPtr pVbe, pointer pDDCModule);
#pragma pack(1)
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/xf86_OSproc.h b/xc/programs/Xserver/hw/xfree86/os-support/xf86_OSproc.h
index d190da8f6..fcfc32024 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/xf86_OSproc.h
+++ b/xc/programs/Xserver/hw/xfree86/os-support/xf86_OSproc.h
@@ -64,7 +64,7 @@
*
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/xf86_OSproc.h,v 3.39 2000/02/08 13:13:27 eich Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/xf86_OSproc.h,v 3.42 2000/06/24 17:23:57 dawes Exp $ */
#ifndef _XF86_OSPROC_H
#define _XF86_OSPROC_H
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/xf86_ansic.h b/xc/programs/Xserver/hw/xfree86/os-support/xf86_ansic.h
index 01e12ec0f..6e4956812 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/xf86_ansic.h
+++ b/xc/programs/Xserver/hw/xfree86/os-support/xf86_ansic.h
@@ -1,5 +1,5 @@
/*
- * Copyright 1997,1998 by The XFree86 Project, Inc
+ * Copyright 1997-2000 by The XFree86 Project, Inc
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
@@ -22,15 +22,32 @@
*
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/xf86_ansic.h,v 3.36 2000/02/16 15:28:34 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/xf86_ansic.h,v 3.40 2000/06/17 00:03:26 martin Exp $ */
#ifndef _XF86_ANSIC_H
#define _XF86_ANSIC_H
-#ifndef FONTMODULE
-#include "misc.h"
-#endif
-#include "xf86_libc.h"
+/* Handle <stdarg.h> */
+
+#ifndef IN_MODULE
+# include <stdarg.h>
+#else /* !IN_MODULE */
+# ifndef __OS2ELF__
+# include <stdarg.h>
+# else /* __OS2ELF__ */
+ /* EMX/gcc_elf under OS/2 does not have native header files */
+# if !defined (_VA_LIST)
+# define _VA_LIST
+ typedef char *va_list;
+# endif
+# define _VA_ROUND(t) ((sizeof (t) + 3) & -4)
+# if !defined (va_start)
+# define va_start(ap,v) ap = (va_list)&v + ((sizeof (v) + 3) & -4)
+# define va_end(ap) (ap = 0, (void)0)
+# define va_arg(ap,t) (ap += _VA_ROUND (t), *(t *)(ap - _VA_ROUND (t)))
+# endif
+# endif /* __OS2ELF__ */
+#endif /* IN_MODULE */
/*
* The first set of definitions are required both for modules and
@@ -64,6 +81,11 @@
#ifndef SHRT_MIN
#define SHRT_MIN ((short)(1 << (x_SHORTBITS - 1)))
#endif
+
+#ifndef FONTMODULE
+#include "misc.h"
+#endif
+#include "xf86_libc.h"
#ifndef SHRT_MAX
#define SHRT_MAX ((short)~SHRT_MIN)
#endif
@@ -107,8 +129,6 @@
#define MAXLONG LONG_MAX
#endif
-#include <stdarg.h>
-
/*
* ANSI C compilers only.
*/
@@ -298,7 +318,7 @@ extern int xf86shmctl(int id, int xf86cmd, pointer *buf);
extern int xf86getpagesize(void);
extern void xf86usleep(unsigned long);
-extern void xf86getsecs(CARD32 *, CARD32 *);
+extern void xf86getsecs(long *, long *);
#ifndef DONT_DEFINE_WRAPPERS
#undef getpagesize
#define getpagesize() xf86getpagesize()
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/xf86_libc.h b/xc/programs/Xserver/hw/xfree86/os-support/xf86_libc.h
index c11c73c48..763952e10 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/xf86_libc.h
+++ b/xc/programs/Xserver/hw/xfree86/os-support/xf86_libc.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/xf86_libc.h,v 3.47 2000/02/08 17:19:21 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/xf86_libc.h,v 3.48 2000/06/17 00:03:26 martin Exp $ */
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/xf86drm.h b/xc/programs/Xserver/hw/xfree86/os-support/xf86drm.h
index c4dbca2d6..032023c45 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/xf86drm.h
+++ b/xc/programs/Xserver/hw/xfree86/os-support/xf86drm.h
@@ -26,7 +26,7 @@
*
* Author: Rickard E. (Rik) Faith <faith@valinux.com>
*
- * $XFree86: xc/programs/Xserver/hw/xfree86/os-support/xf86drm.h,v 1.7 2000/02/23 04:47:21 martin Exp $
+ * $XFree86: xc/programs/Xserver/hw/xfree86/os-support/xf86drm.h,v 1.9 2000/06/20 05:08:48 dawes Exp $
*
*/
@@ -203,6 +203,28 @@ typedef struct { unsigned int a[100]; } __drm_dummy_lock_t;
} while (0)
#endif
+#ifdef __sparc__
+#define DRM_CAS(lock,old,new,__ret) \
+do { register unsigned int __old __asm("o0"); \
+ register unsigned int __new __asm("o1"); \
+ register volatile unsigned int *__lock __asm("o2"); \
+ __old = old; \
+ __new = new; \
+ __lock = (volatile unsigned int *)lock; \
+ __asm__ __volatile__( \
+ /*"cas [%2], %3, %0"*/ \
+ ".word 0xd3e29008\n\t" \
+ /*"membar #StoreStore | #StoreLoad"*/ \
+ ".word 0x8143e00a" \
+ : "=&r" (__new) \
+ : "0" (__new), \
+ "r" (__lock), \
+ "r" (__old) \
+ : "memory"); \
+ __ret = (__new != __old); \
+} while(0)
+#endif
+
#ifndef DRM_CAS
#define DRM_CAS(lock,old,new,ret) do { ret=1; } while (0) /* FAST LOCK FAILS */
#endif
diff --git a/xc/programs/Xserver/hw/xfree86/xaa/NOTES b/xc/programs/Xserver/hw/xfree86/xaa/NOTES
deleted file mode 100644
index 560a890ea..000000000
--- a/xc/programs/Xserver/hw/xfree86/xaa/NOTES
+++ /dev/null
@@ -1,1904 +0,0 @@
-
-This document describes the XAA (XFree86 Acceleration Architecture),
-which is the new acceleration interface for the SVGA server (but not
-limited to the SVGA server).
-
-This code is not at all dependent on the SVGA server, but does
-assume linear addressing at > 8bpp. It might be extendable to an
-mi-based set up for configurations that can't use cfb. There are
-still configurations around that need banked support for 16bpp.
-
-To use the new acceleration interface, write low-level functions
-like the sampledrv.c and ark_accel.c and call the ChipInitAccel()
-function before screen initialization (from FbInit in a SVGA
-driver, for example).
-
-You're welcome to comment, test, debug, or add to this code.
-
-Have fun...
-
-Harm Hanemaayer
-H.Hanemaayer@inter.nl.net
-
-Here's a list of known problems (roughly in order of importance). If you
-can confirm a problem using the lastest version, please do so.
-
-- I've seen crashes when using Netscape related to stipple functions.
- These might be caused by the "fall-back" logic still getting it
- wrong. It seems to be triggered by a call of
- vga8256FillRectTransparentStippled32. Fixed by mod 186?
-
-- The "NonTE" text acceleration triggers core dumps (related to an invalid
- fall-back function scheme in ValidateGC). It might also trigger lock-ups
- (which would point towards a problem in NonTE text color expansion).
- These functions are currently disabled.
-
-- Color expanded (monochrome) 8x8 pattern is may not be working correctly
- yet in all cases (not fully tested).
-
-- The disabled non-terminal emulator font acceleration is suspect, I
- don't think it handles horizontally overlapping characters correctly
- (no visible evidence yet) in the xf86DrawNonTETextScanline function.
- I don't know enough about the X font parameters to correctly
- implement it.
-
-- The SCANLINE_PAD_BYTE and SCANLINE_NO_PAD text transfer code for CPU
- to screen color expansion has not been fully tested, nor has the
- FIXED_BASE support.
-
-- The pattern fill primitives are taken to have the same graphics operation
- restrictions (planemask, rop etc) as ScreenToScreenCopy.
-
-- The support for TRIPLE_BITS_24BPP has improved, but it has not yet
- been fully tested.
-
-- For color expansion implementation of stipples the graphics operation
- restriction of color expansion are not honoured, but instead the
- CopyArea ones are used. This is now sort-of fixed, but it has not been
- tested in relevant cases.
-
-- Instead of not accelerating GXinvert operations that would normally
- access the source, we could instead to a GXinvert FillRectSolid.
-
-When the server crashes, run 'gdb -c core XF86_SVGA' and print a
-back-trace ('backtrace').
-
-Change Log:
-
-218. As well as GXinvert, also avoid GXclear, GXnoop, and GXset.
-217. Don't accelerate functions that use source bitmap data (such as text,
- stipples, bitmaps) when the raster-op is GXinvert.
-216. Truncate pixel values to pixel depth in ValidateGC.
-
-XFree86 3.2v
-215. Rotate monochrome patterns stored in video memory in opposite
- direction (David Bateman). I doubt whether this is correct.
-214. Add FullPlanemask field to xf86AccelInfoRec, and use it for planemask
- checks.
-213. Use GC alu instead of cfb reduced "rrop" when checking raster-op
- restrictions.
-212. Add secondary restriction flag hack for stippled rectangles to
- correctly handle different restrictions for pixmap cache and color
- expansion stipple acceleration.
-211. Move macros for graphics operations restriction checks to from
- xf86gcmisc.c to xf86local.h.
-210. Fix the check for server resets in xf86initac.c and xf86scrin.c (use
- serverGeneration instead of xf86Resetting).
-
-XFree86 3.2u
-209. Fix monochrome pattern stored in video memory with PROGRAMMED_ORIGIN
- and SCREEN_ORIGIN (Corin Anderson).
-
-XFree86 3.2s
-208. Respect CapStyle when using TwoPointLine for a non-clipped segment.
-207. Fix line clipping when hardware clipping is used with multiple
- clipping regions (Xavier Ducoin).
-206. Add a hack to counter cfb cheating in PolyGlyphBlt when it does not
- call ValidateGC when changing the foreground color to fill in the
- background (affecting RGB_EQUAL).
-205. Remove left-over fall-back tile function setting code in xf86gcmisc.c
- that may have caused problems.
-204. At ValidateGC time, take note of background color changes for
- evaluation of RGB_EQUAL restrictions.
-203. Add support for a monochrome pattern with PROGRAMMED_BITS that
- needs to be rotated in software, so that all possible monochrome
- pattern variations are now supported.
-202. Add NO_TEXT_COLOR_EXPANSION flag.
-201. Fix bitmap (CopyPlane1ToN) color expansion acceleration at 24bpp with
- TRIPLE_BITS_24BPP defined.
-200. Fix support for ScanlineScreenToScreenColorExpand with
- TRIPLE_BITS_24BPP defined.
-199. Fix the case of a monochrome 8x8 pattern stored in video memory.
- The code was not consistently assuming that the patternx
- coordinate is in units of "bits" (David Bateman).
-198. Invalidate the pixmap cache when VT-switching back (suggested by
- Andrew Vanderstock).
-197. If color expansion is used for stipples, say so in the start-up
- messages.
-196. Indicate in start-up messages whether 8x8 pattern fill is actually
- usable.
-195. Better RGB_EQUAL checks for text acceleration with TRIPLE_BITS_24BPP
- (David Bateman).
-194. Do not accelerate lines with non-FillSolid fill style. Stippled lines
- were rendered incorrectly as solid lines.
-
-XFree86 3.2r
-193. Check RGB_EQUAL for text acceleration with TRIPLE_BITS_24BPP
- (David Bateman).
-192. Honour RGB_EQUAL when deciding CopyPlane1To24 acceleration in
- xf86plane.c.
-191. Fix bugs in handling of left edge in CPU-to-screen color expansion
- of bitmaps.
-190. When the server resets, don't execute the start-up benchmarks.
-189. When the server resets, don't execute the main part of the
- xf86GCInfoRec and xf86AccelInfoRec initialization code, which
- depends on default values for some fields.
-188. When there is any kind of accelerated stippled rectangle fill, also
- use it for stippled spans.
-187. Add 10x10 CPU-to-screen color expansion benchmark.
-186. Remove left-over broken fall-back stipple function setting code
- in xf86gcmisc.c, probably fixing crashes.
-185. Implement "no_pixmap_cache", and new "xaa_benchmark" and
- "xaa_no_color_exp" server flags.
-184. Only print detailed messages when xf86Verbose is TRUE.
-183. Implement color expansion acceleration of stipple-filled rectangles
- in xf86stip.c. Requires SCANLINE_PAD_DWORD for CPU-to-screen color
- expansion, and does not support TRIPLE_BITS_24BPP.
-182. Fix SCANLINE_NO_PAD CPU-to-screen color expansion by not defining
- the flag definition as zero (Koen Gadeyne).
-181. Add LEFT_EDGE_CLIPPING_NEGATIVE_X color expansion flag.
-180. Fix potential bug in handling of LEFT_EDGE_CLIPPING.
-179. Add new file xf86tables.c with byte expansion tables for
- TRIPLE_BITS_24BPP.
-178. Support TRIPLE_BITS_24BPP for bitmap color expansion, with the
- exception of non-DWORD scanline padding of CPU-to-screen color
- expansion.
-177. Fix a probable bug in CPU-to-screen bitmap color expansion in
- MSB-first mode without left edge clipping.
-176. When checking for hardware pattern usage for tiles, prefer the
- color expand (monochrome) pattern.
-175. Improve TRIPLE_BITS_24BPP support with color expansion enabled for
- text using screen-to-screen color color expansion or CPU-to-screen
- with SCANLINE_PAD_DWORD.
-174. Add TRANSPARENCY_GXCOPY graphics operation flag, and take it into
- consideration for ScreenToScreenCopy with transparency.
-
-XFree86 3.2q
-173. Fix infinite loop in CPU_TRANSFER_BASE_FIXED color expansion
- (Xavier Ducoin).
-172. Fix color expansion benchmark when TRIPLE_BITS_24BPP is defined
- (David Bateman).
-171. When using the monochrome pattern, use an existing cache entry when
- the stipple is the same but the colors are different.
-170. Fix bugs in pattern handling code.
-169. Fix a bug in the MSB-first version of the Pentium-optimized text
- bitmap transfer functions (David Bateman).
-168. Fully implement detection of tiles that only use two colors in order
- to use a monochrome (color-expand) hardware pattern.
-167. Potentially fix the case of rotated monochrome patterns stored video
- memory.
-166. Change start-up messages a little.
-165. Add support for 8x8 hardware pattern with SCREEN_ORIGIN in addition
- to PROGRAMMED_ORIGIN, and take into account the bit order when
- PROGRAMMED_BITS is defined (Radek).
-164. Mark pixmaps that are found to be unsuitable for caching.
-163. Make caching of transparent stipples possible for chips that don't
- have ScreenToScreenCopy with transparency but do have a color-expand
- pattern fill that supports transparency.
-162. Add low-level benchmarks for 10x10 pattern fill.
-161. Use 64-bit access on DEC alpha in CPU-to-framebuffer bandwidth
- benchmark.
-160. Add the HARDWARE_PATTERN_MONO_TRANSPARENCY flag to further
- differentiate between mono pattern and regular color expansion.
-159. Use depth instead of bitsperpixel in planemask check for line
- rectangles.
-158. Reorganize the "cfbGetLongWidthAndPointer" function.
-157. Support the HARDWARE_PATTERN_PROGRAMMED_ORIGIN for non-color
- expanded patterns (including patterns that must be aligned on a 64
- pixel boundary) and for color-expanded patterns that are stored
- in video memory.
-156. Various fixes for the cfb8 (non-vga256) support.
-155. At start-up, display a message when no acceleration primitives
- are defined.
-154. Add ScratchBufferBase field to support scanline screen-to-screen
- color expansion without a linear framebuffer.
-153. Support multiple buffers for scanline screen-to-screen color
- expansion. Adds the PingPongBuffers field.
-
-XFree86 3.2n
-152. Add HARDWARE_PATTERN_BIT_ORDER_MSBFIRST flag to differentiate between
- mono hardware pattern and regular color expansion.
-151. Fix missing fields in xf86defs.c.
-150. Delay the actual initialization of the pixmap cache until general XAA
- initialization. A server InfoRec field and pixmap cache memory boundary
- fields are added to the xf86AccelInfoRec. This also eliminates the
- dependency of the XAA code on vga256 (the SVGA server).
-149. Lift the SCANLINE_PAD_DWORD requirement in xf86initac.c for the
- enabling of text color expansion.
-148. Add functions in xf86expblt.c for whole text bitmap transfer in the
- case of BYTE padding or no padding at the end of scanlines, and
- support this in xf86text.c.
-147. Add a cfb8-based layer to support stand-alone servers not using
- vga256.
-146. Enable fixed-base CPU-to-screen color-expansion for bitmap and TE text.
-145. Add FIXEDBASE support to color expansion functions in xf86expblt.c.
-144. Add the HARDWARE_PATTERN_PROGRAMMED_BITS and HARDWARE_PATTERN_
- PROGRAMMED_ORIGIN flags, and implement 8x8 mono pattern code
- used when both flags are set.
-143. Don't use scanline-byte-padded CPU to screen color expansion since
- it doesn't work.
-142. Use MSB-first versions of Pentium-optimized text transfer functions
- when required.
-141. Finally fix the flawed fall-back function schemes, potentially fixing
- crashes associated with some span and rectangle fills. Still not stable.
-140. More heavily unroll the CPU to framebuffer benchmark code (mainly
- for the Cyrix 6x86).
-
-XFree86 3.2g
-139. Enable 24bpp CopyPlane acceleration (Dirk).
-
-Version of 17 December 1996 (XFree86 3.2f)
-138. Enable the Pentium-optimized text transfer functions for 6 and 8-pixel
- wide fonts.
-137. Fix a problem with accelerated horizontal and vertical lines clashing
- with framebuffer lines.
-136. In some places, fix the "NO_PLANEMASK" check to only check bits up to
- the actual depth (rather than PMSK).
-135. Avoid recursive xf86miFillRectStippledFallBack call.
-134. When the new HARDWARE_PATTERN_MOD_64_OFFSET flag is set, do use
- the hardware pattern when the framebuffer width guarantees
- corrects alignment.
-133. Avoid unaligned accesses in xf86expblt.c for DEC Alpha. Not tested.
- What's a mem_barrier? Do we need them?
-132. Do not use 8x8 pattern stipple fill at 24bpp because there's no
- pixmap-to-pixmap CopyPlane1ToN primitive.
-131. Allow CopyPlane1ToN to be accelerated at 24bpp.
-130. Remove messages printed when xf86miStippleFallBack is called.
-129. Add FillRectSolid graphics operation restriction flags to the line
- draw restrictions in xf86initac.c, fixing a problem with planemask
- restrictions not being honoured for some lines.
-128. Add some Pentium-optimized text bitmap transfer functions in
- xf86txtblt.s, but they are not used yet.
-
-XFree86 3.2e
-127. ImakefileBPP renamed to Imakefile.BPP
-
-Version 0.4f (XFree86 3.2d) (28 November 1996)
-126. Fix typo in xf86frect.c, pixmap-cache re-enabled (Alan).
-125. Disable Non-TE text acceleration.
-124. Add text fall-back functions in xf86gcmisc.c.
-123. Fix ImakefileBPP.
-
-Version 0.4e (XFree86 3.2c) (24 November 1996)
-122. Fix some problems with drawing of Non-TE of text strings.
-121. Fix compilation problem in xf86spans.c (Takaaki Nomura).
-120. Add sanity checks in PolyFillRect and FillSpans for <= 0 specified
- rects or spans.
-119. Make sure the cfb fall-back text functions are initialized correctly.
- This problem showed up when non-TE text acceleration was added.
-118. Add the TWO_POINT_LINE_ERROR_TERM flag, but don't implement it yet.
-117. Implement a stipple bitmap scanline function in xf86expblt.c for
- future use in color expansion stipple acceleration.
-116. Implement color expansion text acceleration for non-terminal emulator
- fonts. Fix non-TE text scanline function in xf86expblt.c.
-115. Add NO_SYNC_AFTER_CPU_COLOR_EXPAND flag.
-114. When cfb MatchCommon is succesful in ValidateGC, make sure the
- devPrivate.val is still correct. Fixes memory leak.
-113. Fix bug in xf86PolyFillRect. This does not fix the pixmap cache.
-
-Version 0.4d (XFree86 3.2a) (18 November 1996)
-112. Prepare for integration into source tree (hw/xfree86/xaa/*).
-111. Move the declaration of xf86PixmapIndex into xf86initac.c.
-110. Screeninit functions renamed; vgabpp.h renamed to xf86scrin.h.
-109. Cosmetic changes in preparation for integration into source tree.
-108. Rename xf86gc.h to xf86xaa.h, and modify some long filenames.
-107. In ValidateGC, correctly handle the case of the drawable of an
- on-screen GC being changed to a pixmap.
-106. Fix a problem with byte-padded CPU to screen color expansion in
- xf86bitmap.c.
-105. Initialize CPUToScreenColorExpandRange to default value of 64K
- if it is not defined.
-104. Fix missing cfb stipple function mappings in vga256map.h.
-
-Version 0.4c (15 November 1996)
-103. Really fix the CPU-to-screen color expansion benchmark.
-102. Disable the accidently enabled debugging on-screen pixmap cache.
-
-Version 0.4b (15 November 1996)
-101. Add the UsingVGA256 flag to the xf86AccelInfoRec, and use this
- to adjust the address pointer for low-level line fall-backs for
- vga256 so that the non-bank checking versions will be used when
- linear addressing is enabled (implemented in cfb8GetLongWidthAndPointer
- in xf86im.c).
-100. Add general line acceleration for chips that can only accelerate
- horizontal/vertical lines using FillRectSolid and for chips that
- only have TwoPointLine without fool-proof hardware clipping.
- 99. Fix crash with line rectangles when the raster-op is not GXcopy.
- 98. Change the 8x8 pattern benchmark a little.
- 97. Add an aligned screen copy (scroll) test to the low-level benchmarks,
- and remove the transparent color expansion tests.
- 96. Fix related type warnings in xf86bitmap.c (Radek).
- 95. Really fix the initialization of CPUToScreenColorExpandEndMarker
- (Radek).
- 94. Fix the initialization of CPUToScreenColorExpandEndMarker in
- xf86initacl.c
- 93. Fix problems with small patterns when using 8x8 hardware pattern fill.
- 92. Fix for CopyPlane1to32 (resolves olvwm crash at 32bpp).
- 91. Fix the CPU to screen color expansion benchmark (Radek).
- 90. Use the accelerated FillPolygonSolid from the GCInfoRec in ValidateGC.
- 89. In xf86orect.c, use cfbGCGetPrivate().
- 88. Add monochrome 8x8 tile detection (not used yet).
- 87. Fix external byte_reversed declaration in xf86expblt.c and
- xf86pcache.c (fixes problem with 8x8 color expanded pattern).
- 86. Fix xf86expblt.c inline asm for different OSs (Takaaki Nomura).
- 85. Support xf86bench.c on different OSs (Akio Morita).
- 84. Fix a bug in the color expanded 8x8 pattern code.
- 83. In ReduceTileToSize8, don't give up when not using 8bpp.
- 82. Cosmetic changes to sampledrv.c.
- 81. Improve the start-up messages.
- 80. In the benchmark routines, avoid memset().
- 79. Lift the LSBFIRST requirement for buffered screen-to-screen color
- expansion.
-
-Version 0.4a (7 November 1996)
- 78. Correct xf86AccelInfoRec.BitsPerPixel for 24bpp.
- 77. Add ONLY_LEFT_TO_RIGHT_BITBLT for chips that only support screen-to-
- screen BitBLTs with xdir = 1, and support this in CopyArea.
- 76. Make decisions in InitAccel about whether specified CPU-to-screen
- color expansion memory range is large enough.
- 75. Add FramebufferWidth (equivalent to infoRec.displayWidth).
- 74. Add CPUToScreenColorExpandRange, which is taken into account after
- each scanline in text and bitmap color-expansion operations
- (CPUToScreenColorExpandEndMarker is derived from it).
- 73. Only allow text CPU-to-screen color expansion with SCANLINE_PAD_DWORD
- defined.
- 72. If the CPUToScreenColorExpandBase isn't initialized, use the
- start of the framebuffer as color expansion base address.
- 71. Fix bug in DrawNonTETextScanline (a function not yet used).
- 70. Add ONLY_TWO_BITBLT_DIRECTIONS for chips that only support screen-to-
- screen BitBLTs with xdir = ydir, and support this in CopyArea.
- 69. Add VIDEO_SOURCE_GRANULARITY_DWORD flag for color expansion.
- 68. Fix cfbPushPixels8 name mapping for vga256. This was probably causing
- most of the stability problems.
-
-Version 0.4 (5 November 1996)
- 67. Add support for color-expanded 8x8 hardware patterns (untested).
- 66. Fix a bug in FillSpansSolid that caused some spans to be drawn
- at the wrong position (Radek).
- 65. In FillSpansSolid, correctly handle the case of no spans remaining
- after clipping.
- 64. When doing the raster-op precomputations for cfb in ValidateGC,
- don't clear the flag indicating that the raster-op has changed
- since we must still evaluate accelerated functions.
- 63. Correctly modify devPrivate.val when new GC ops are created in
- ValidateGC.
- 62. Reduce tiles to 8x8 pixels if possible.
- 61. Set the USE_TWO_POINT_LINE flag if appropriate.
- 60. Reduce stipples to 8x8 pixels if possible.
- 59. Add start-up benchmark timings for low-level primitives.
- 58. Reduce stipples and tiles to 8 pixels wide if possible in order to
- use the 8x8 hardware pattern.
- 57. Add 8x8 hardware pattern stipples.
- 56. Provide a mechanism to call non-accelerated CopyPlane1toN
- directly. Adds CopyPlane1toNFallBack to GCInfoRec.
- 55. Add the HARDWARE_PATTERN_ALIGN_64 flag (not supported yet).
- 54. Debug the 8x8 hardware pattern.
- 53. Guarantee a different transparency color instead of using the GC
- background color when caching transparent stipples.
- 52. Add support for 8x8 hardware patterns, and use them for small
- tiles.
- 51. Add BitsPerPixel to xf86AccelInfoRec.
- 50. Assign fall-back function to xf86AccelInfoRec.ImageWrite if
- necessary for convenience.
- 49. Lift the VIDEO_SOURCE_GRANULARITY_PIXEL requirement for indirect
- screen-to-screen text color expansion.
- 48. Add an extra set of wide slots to the pixmap cache. Disabled.
- 47. Honour ONE_RECT_CLIPPING flag when checking line drawing function.
- 46. Support WriteBitmap when only non-transparent color expansion is
- supported.
-
-Version 0.3b (31 October 1996)
- 45. Update vga256 patch (vga.c) to force GC validation after a VT-switch.
- 44. Support ImageText when only transparent color expansion is supported.
- 43. Add PolyText color expansion for TE fonts.
- 42. Use devPrivate.val to signal status of GC ops, and use this to
- modify them when required.
- 41. Create new GC ops when GC ops are still pointing to a defaults
- structure when modifying GC ops in ValidateGC.
- 40. As a stop-gap measure, reset all GC ops and pretend everything in
- the GC has changed when a switch-away is detected in ValidateGC.
- 39. Update sampledrv.c.
- 38. Disable the pixmap cache if the memory range is wrongly specified
- (Alan).
- 37. Fix typo in pixmap cache initialization in sampledrv.c.
- 36. Make xf86PolyRectangle use new line drawing functions for vertical
- lines.
- 35. Add ErrorTermBits to the xf86AccelInfoRec for re-scaling Bresenham
- error terms when software clipping is used.
- 34. Add flags to indicate whether PolySegment is supported with CapNotLast
- using TwoPointLine.
- 33. Implement xf86PolyLine/Segment using BresenhamLine or TwoPointLine
- (untested).
- 32. Add BresenhamLine and TwoPointLine primitives.
- 32. Fix initial coordinates for color-expanded text.
- 31. Move function prototypes from xf86gc.h to xf86local.h.
- 30. Take into account source offset into first byte of bitmap scanline.
- 29. Bitmap with buffered screen-to-screen color expansion now works.
- 28. Fix prototypes for intermediate-level text functions.
- 27. Fix source overrun problems in xf86DrawBitmapScanline.
- 26. Intialize FramebufferBase in ScreenInit.
- 25. Implement untested/unused functions for filling 24bpp pixels using
- 8bpp mode color expansion in two passes.
- 24. Fix color expand flag testing in xf86bitmap.c.
-
-Version 0.3a (28 October 1996)
- 23. If tiles are cached but not stipples (but stipples are accelerated),
- be aware of this in xf86PolyFillRect.
- 22. Disable updating of the PolyGlyphBlt GC op in ValidateGC because of an
- unresolved problem showing up at > 8bpp.
- 21. Implement a better understanding of how GC changes affect the selection
- of cfb and accelerated functions in ValidateGC.
- 20. Fix the way ValidateGC handles cfb operations initialized with
- MatchCommon.
- 19. Add xf86mapfuncs.h for local functions that are depth-mapped.
- 18. Fix bugs accidently introduced into xf86initacl.c in version 0.3,
- which effectively disabled pixmap caching.
- 17. Add untested, unoptimized CopyPlane1to24 (GXcopy, no planemask),
- for use with stipple caching. Doesn't work yet.
-
-Version 0.3 (27 October 1996)
- 16. Use framebuffer function for some vertical lines in PolyRectangle.
- 15. Fix SaveAreas and RestoreAreas for vga256.
- 14. Add PolyLine and PolySegment hooks to the xf86GCInfoRec.
- 13. Fix missing cfbPolyFillArc mappings in vga256map.h.
- 12. Fix MatchCommon call in ValidateGC. This fixes vga256 operation.
- 11. Fix updating of GC ops for text functions during ValidateGC.
- 10. Optimize the CopyPlane1to16/32 functions.
- 9. Update the docs, and include a sample driver template.
-
-Version 0.2 (26 October 1996)
- 8. Re-enable CopyPlane hook.
- 7. Fix typo that prevented CopyArea from being accelerated.
- 6. Fix confusion over arguments of cfbBitBlt helper function.
- 5. Call the correct depth-specific cfbBitBlt helper function.
- 4. Fix the coordinates for the transparent stipple mi fall-back.
- 3. Fix problem with zero-width spans in FillSpansAsRects.
- 2. Disable CopyPlane hook because it doesn't work.
-
-Version 0.1 (25 October 1996)
- 1. First logged version. Implements solid filled rectangles, arcs,
- polygons, CopyArea, pixmap caching.
- Untested are line-drawn rectangles, color expansion text, color
- expansion stipple upload, bitmaps.
-
-
-Overview of XAA
----------------
-
-1.1
-
-Some advantages of this new interface:
-
-- Easier implementation of accelerated functions.
-- More efficient use of accelerated functions.
-- Code size reduction.
-- Source code size reduction (less duplicated code).
-- Greater test base for higher level code.
-- Improvements can be beneficial for all drivers.
-
-Disadvantages:
-
-- More overhead in ValidateGC.
-- Arguably more complex set of acceleration primitives.
-
-
-1.2 Graphics Operation Flags
-
-GXCOPY_ONLY
-
- Indicates that the graphics operation only allows a GXcopy
- raster-op (copy source). If this flag is not defined, the graphics
- operation is assumed to be supported with all 16 raster operations.
-
-NO_PLANEMASK
-
- Indicates that the graphics operation does not allow a write
- planemask. All bits in a pixel are written.
-
-ONE_RECT_CLIPPING
-
- Indicates that an accelerated function (usually a high-level one that
- handles clipping) only accepts one clipping rectangle. This may be
- of use for line drawing. [It is only checked for line drawing]
-
-RGB_EQUAL
-
- Indicates that the graphics operation requires that the red, green,
- and blue bytes of the foreground color (and background color, if
- applicable) are equal. This is useful for 24bpp when the graphics
- coprocessor is used in 8bpp mode, which is the often the case since
- most chips have no or only limited support for acceleration at
- 24bpp. This way, many operations will be accelerated for the common
- case of "grayscale" colors. It should only be defined for 24bpp.
-
-NO_TRANSPARENCY
-
- Indicates that the graphics operation does not handle transparency.
- This can be enabled for screen-to-screen copy.
-
-NO_CAP_NOT_LAST
-
- Indicates that the graphics operation (PolyLine or PolySegment) does
- not support not drawing of the last pixel.
-
-TRANSPARENCY_GXCOPY
-
- Indicates that, unlike the case of no transparency, when
- transparency is enabled only the GXcopy raster-op is allowed. This
- is valid only for ScreenToScreenCopy.
-
-
-1.3 The AccelInfoRec
-
-Flags
-
- This is a set of flags that controls some overall parameters for
- the acceleration code.
-
- BACKGROUND_OPERATIONS
-
- If enabled, the "simple" acceleration functions are not assumed to
- wait until the graphic coprocessor operation is finished. The
- generic acceleration functions will call Sync() when all operations
- have been done.
-
- DELAYED_SYNC
-
- If enabled, the acceleration functions will try to use as much
- parallellism between the CPU and the accelerator as possible by
- postponing calls to Sync() as much as possible. Without this flag, and
- with BACKGROUND_OPERATIONS enabled, the acceleration functions will call
- Sync() after each major set of acelerated operations. With DELAYED_SYNC
- set, Sync() will only be called when absolutely necessary to maintain
- framebuffer consistency. In practice, this means Sync() will only be
- called just before writing to or reading from the framebuffer with the
- CPU. This option increases performance, but is much more vulnerable to
- display errors and synchronisation problems.
-
- PIXMAP_CACHE
-
- Use a pixmap cache for tiles and stipples, when the required
- low-level functions (such as ScreenToScreenCopy) are available.
-
- COP_FRAMEBUFFER_CONCURRENCY
-
- CPU access to the framebuffer can continue while a screen-to-screen
- coprocessor operation is being executed. This is taken advantage of
- in some color expansion routines when CPU-to-screen color expansion
- is not available, and potentially in some other places.
-
- DO_NOT_CACHE_STIPPLES
-
- Do not cache stipples, but instead use the CPU-to-screen color
- expansion routines for stipples. These routines have not yet been
- implemented.
-
- HARDWARE_CLIP_LINE
-
- When a general line has to be clipped, use hardware clipping
- (SetClippingRectangle must be defined, and clipping must only
- be active for the single following general line draw).
-
- USE_TWO_POINT_LINE
-
- Use two-point lines (TwoPointLine) instead of Bresenham lines for
- general lines. This flag is automatically set if appropriate. It
- must be set in a driver.
-
- HORIZONTAL_TWOPOINTLINE
-
- Use TwoPointLine for Horizontal Lines instead of the FillRectSolid
- function.
-
- TWO_POINT_LINE_NOT_LAST
-
- Indicates that TwoPointLine supports the notlast flag that indicates
- whether the last pixel should be drawn. If this is not supported,
- PolyLine and PolySegment cannot support the CapNotLast CapStyle.
-
- TWO_POINT_LINE_ERROR_TERM
-
- Indicates that TwoPointLine supports the optional error term flag
- and parameter that allows the initial error term to be provided
- for software clipped lines.
-
- ONLY_TWO_BITBLT_DIRECTIONS
-
- Indicates that ScreenToScreenCopy is only allowed with xdir = ydir
- (both -1 or both 1). BitBLTs are converted to smaller BitBLTs with
- supported directions if necessary.
-
- ONLY_LEFT_TO_RIGHT_BITBLT
-
- Indicates that ScreenToScreenCopy is only allowed with xdir = 1.
- BitBLTs are converted to smaller BitBLTs with supported directions
- if necessary.
-
- NO_SYNC_AFTER_CPU_COLOR_EXPAND
-
- Indicates that a Sync() is not required after a CPU-to-screen color
- expansion operation. Generally, this can be defined if host color
- expansion data is processed by the graphics chip in the same way as
- accelerated graphics commands (it uses the command FIFO).
-
- NO_TEXT_COLOR_EXPANSION
-
- Do not use color expansion to accelerate text. Define this if
- color expansion is slower than plain framebuffer for text (which
- might happen with scanline screen-to-screen color expansion,
- when there is little video memory bandwidth but the CPU to
- framebuffer bandwidth is decent).
-
- LINE_PATTERN_POWER_OF_2_ONLY
-
- Indicates that hardware dashed lines only support pattern lengths
- that are a power of two.
-
- LINE_PATTERN_ONLY_TRANSPARENCY
-
- Indicates that the hardware dashed lines only support the foreground
- colors.
-
- LINE_PATTERN_MSBFIRST_INCREASING
- LINE_PATTERN_MSBFIRST_DECREASING
-
- Indicates that the dashed line pattern stored in the LinePatternBuffer
- progresses from MSB to LSB within each DWORD. INCREASING patterns
- are stored with the beginning of the pattern in the first DWORD of
- the LinePatternBuffer, while DECREASING indicates that the end of the
- pattern is in the first DWORD in the LinePatternBuffer. INCREASING or
- DECREASING is only relevant if the pattern is longer than a DWORD.
-
-PatternFlags
-
- This is a set of flags that controls some overall parameters for
- the acceleration code related to the hardware pattern.
-
- HARDWARE_PATTERN_SCREEN_ORIGIN
-
- Indicates that the baseline origin for hardware 8x8 pattern fills
- is the top left corner of the screen, as opposed to the top left
- corner of the area to be filled. Note that an origin offset feature
- might still be supported.
-
- HARDWARE_PATTERN_TRANSPARENCY
-
- Indicates that the hardware 8x8 pattern fill supports transparency
- color compare (does not apply to mono pattern).
-
- HARDWARE_PATTERN_ALIGN_64
-
- Indicates that the 8x8 hardware pattern must be stored on a
- 64-pixel boundary in video memory, and programmed pattern start
- location must be the start of such a pattern. In the absence of a
- programmable origin, this requires a lot more pre-rotated copies to
- be made, although they should still fit within a 128x128 cache
- area.
-
- HARDWARE_PATTERN_MOD_64_OFFSET
-
- Indicates that while the 8x8 hardware pattern must be stored
- aligned on a 64-pixel boundary, the programmed pattern start
- location can in fact include a multiple-of-8-pixels offset, which
- indicates the vertical offset into the pattern. This flag is
- mutually exclusive to HARDWARE_PATTERN_ALIGN_64. If you can also
- specify the horizontal offset, do not use this flag, but instead
- use HARDWARE_PATTERN_PROGRAMMED_ORIGIN.
-
- HARDWARE_PATTERN_PROGRAMMED_BITS
-
- Indicates that the monochrome (color expand) 8x8 pattern data must be
- programmed into registers, rather than stored in video memory. This
- is only supported in combination with the following flag.
-
- HARDWARE_PATTERN_PROGRAMMED_ORIGIN
-
- Indicates that the hardware pattern supports a programmable origin
- (x and y offsets into the pattern). This is supported for all three
- pattern storage types (programmed monochrome, monochrome in video
- memory and regular (pixel depth) in video memory).
-
- HARDWARE_PATTERN_BIT_ORDER_MSBFIRST
-
- Indicates that the monochrome 8x8 pattern data is in MSB-first bit
- order ("Windows-style").
-
- HARDWARE_PATTERN_MONO_TRANSPARENCY
-
- Indicates that the monochrome 8x8 pattern supports transparency
- (signalled by a background color equal to -1).
-
- HARDWARE_PATTERN_NOT_LINEAR
-
- Indicates that the 8x8 pattern data should not be stored linearly
- in video memory, but rather, as a tiled 8x8 pattern in the cache.
-
- HARDWARE_PATTERN_NO_PLANEMASK
-
- Indicates that the 8x8 pattern doesn't support a write planemask.
- All bits in a pixel must be written.
-
-Sync()
-
- This function should be defined if BACKGROUND_OPERATIONS is enabled
- (and also if any kind of CPU-to-screen color expansion is used). It
- should wait for all graphics coprocessor operations to finish. It
- also provides an opportunity to clean up the coprocessor state
- after a batch for commands.
-
-SetupForFillRectSolid(color, rop, planemask)
-
- Sets up the color, raster-op and planemask for a solid rectangle
- fill. It is called once before a batch of "Subsequent" fill
- commands. Currently the restrictions for the operation are set up
- with xf86GCInfoRec.PolyFillRectSolidFlags.
-
- Another acceleration commmand might still be executing when a SetUp
- function is called (assuming BACKGROUND_OPERATIONS). You may have
- to do a Sync() here. In the current XAA code this doesn't happen,
- but it might in the future.
-
-SubsequentFillRectSolid(x, y, w, h)
-
- This actually fills a rectangle. When writing spans, h will
- be 1. It is usually called many times in a row.
-
- A key thing to notice here is that the function call overhead
- is "eaten" when performing coprocessor operations "in the
- background" (concurrently with CPU processing). If you need to
- wait for the previous operation to finish before sending the
- commands for the next one, you can do that in this function.
- Generally, you want to avoid querying the chip as much as
- possible since PCI read operations have a devastating effect
- on performance.
-
- This function is taken advantage of when filling solid rectangles,
- spans, polygons and arcs, and in other places.
-
-SubsequentFillTrapezoidSolid(y, h, left, dxl, dyl, el, right, dxr, dyr, er)
-
- Defining this will enable most solid polygons to be rendered as a
- collection of trapezoids rather than horizontal spans. Y is the
- top line of a trapezoid which has height h. Left and right are the
- starting X positions of the left and right edges on the top line.
- Dyl/dxl and dyr/dxr define the slopes of the left and right edges
- and el and er are the initial error terms (always rendered from
- top of the screen to the bottom).
-
- Note that dyl, dxl, dyr and dxr are merely used to define the slope
- of the line and are not necessarily the deltas between the top and
- bottom points.
-
-SetupForScreenToScreenCopy(xdir, ydir, rop, planemask, transparency_color)
-
- Set up for a screen-to-screen BitBLT. The transparency color is -1
- when there is no transparency. Transparency is used when drawing
- transparent stipples from the pixmap cache. There are general flags
- (set in xf86AccelInfoRec.Flags) to indicate restrictions for the
- direction of the BitBLT (xdir, ydir); if restrictions exist, the
- generic code converts the blits to allowable blits. Currently the
- other restrictions for the operation are set up with
- xf86GCInfoRec.CopyAreaFlags.
-
-SubsequentScreenToScreenCopy(x1, y1, x2, y2, w, h)
-
- Perform a screen-to-screen BitBLT. Again often there is
- a batch of commands. Note that (x1, y1) is always the top-left
- corner, regardless of the direction.
-
- It is used for screen-to-screen area copies (such as scrolling),
- and for the pixmap cache.
-
-SubsequentBresenhamLine(x1, y1, octant, err, e1, e2, length)
-
- Draw a line using the Bresenham algorithm. This is the most common
- general line drawing feature that chips support. The octant consists
- of bitflags that are defined as follows (miline.h defines them):
-
- XDECREASING 4 Draw from right to left (a.o.t. right to left).
- YDECREASING 2 Draw from bottom to top (top to bottom).
- YMAJOR 1 Y is the major axis (X is the major axis).
-
- The error terms are usually no bigger than a screen coordinate, but
- when software clipping is used, the error time might be too big; it
- is then rescaled according to the number of bits specified in
- ErrorTermBits. When HARDWARE_CLIP_LINE is defined,
- SetClippingRectangle must be defined. It seems to me that hardware
- clipping makes the implicit assumption that the chip can handle
- coordinates in the range [-37268, 32767]. Or are coordinates
- guaranteed to be on-screen? Anyway I think having the chip trace
- lines way off the screen does not sound like a good idea.
-
- There is no SetUp function. SetupForFillRectSolid is called before
- a batch of lines (this linked to the fact that horizontal lines
- are drawn with FillRectSolid; they should not be affected by
- hardware clipping).
-
-SubsequentTwoPointLine(x1, y1, x2, y2, bias)
-
- Draw a line between (x1, y1) and (x2, y2); the last point is drawn.
- This is found in some newer chips. It is taken advantage of. The 8
- lower bits of bias indicate whether 1 should be subtracted from the
- error term for each of the octants (e.g. bit 0 matches octant 0),
- it is not a requirement to support this parameter. If bit 8
- (0x100) of bias is set, the last pixel should not be drawn (use
- TWO_POINT_LINE_NOT_LAST to indicate whether this flag is
- supported). This function requires hardware clipping.
-
- Note that horizontal lines are always drawn with FillRectSolid.
-
-SetClippingRectangle(x1, y1, x2, y2)
-
- Set the hardware clipping rectangle. (x2, y2) is the inclusive
- right-bottom corner. Clipping should be active only for the first
- following line draw (BresenhamLine or TwoPointLine). This function
- is only used when HARDWARE_CLIP_LINE is enabled.
-
-SetupForDashedLine(fg, bg, rop, planemask, size)
-
- Setup the hardware for accelerated dashed lines. Fg and bg are the
- foreground and background colors respectively. If bg is -1, the
- background is transparent. Size indicates the length of the color
- expand pattern in bits (pixels) to be used by the subsequent dashed
- line command. By the time this function is called, the bit pattern
- will already reside in the LinePatternBuffer. The packing order in
- the buffer is determined by one of the following flags:
- LINE_PATTERN_MSBFIRST_MSBJUSTIFIED
- LINE_PATTERN_MSBFIRST_LSBJUSTIFIED
- One and only one of these flags must be set. A LinePatternBuffer must
- be allocated and its length (in bits) recorded as LinePatternMaxLength
- in order to use hardware dashed lines.
-
-SubsequentDashedBresenhamLine(x1, y1, octant, err, e1, e2, length, offset)
-SubsequentDashedTwoPointLine(x1, y1, x2, y2, bias, offset)
-
- Draw a dashed line. The first arguments are identical to those of
- SubsequentBresenhamLine and SubsequentTwoPointLine. The only
- difference is the offset argument which specifies the offset into
- the bit pattern the first pixel of this line must start on.
-
-LinePatternMaxLength
-LinePatternBuffer
-
- LinePatternMaxLength is the maximum length pattern that the hardware
- can accelerate. Additionally the LINE_PATTERN_POWER_OF_2_ONLY flag
- can be set indicating that only patterns with lengths that are a
- power of two can be accelerated. The LinePatternBuffer should be
- allocated by the driver and should be long enough to hold
- LinePatternMaxLength bits padded out to a DWORD.
-
-SetupForImageWrite(rop, planemask, transparency_color)
-
- This sets up for multiple pixmap (image) transfers using the
- transfer window defined by ImageWriteBase and ImageWriteRange.
- Currently, DWORD padding is required. CPU_TRANSFER_BASE_FIXED
- is supported but is often only faster than the non-accelerated
- versions for rops other than GXcopy.
-
- If the transparency_color is not -1, then it defines the
- transparent "masking" color. If your hardware cannot do
- transparent image transfers then you should set NO_TRANSPARENCY
- in the ImageWriteFlags.
-
-SubsequentImageWrite(x, y, w, h, skipleft)
-
- This sets up for an individual image transfer and is
- analogous to the SubsequentCPUToScreenColorExpand function.
- If the driver supports left edge clipping, then the skipleft
- parameter specifies the number of pixels to be skipped on the
- left edge (0 - 3). This is used in cases of unfavorable source
- alignment.
-
-SubsequentScanlineScreenToScreenCopy(LineAddr, skipleft, x, y, w)
-
- This sets up for a scanline by scanline image transfer. If the
- driver supports left edge clipping, then the skipleft parameter
- specifies the number of pixels to be skipped on the left edge
- (0 - 3). This is used in cases of unfavourable source alignment.
-
-ImageWriteFlags
-
- In addition to the regular planemask/rop restrictions, the
- following flags are defined (with meaning similar to the color
- expand flags).
-
- LEFT_EDGE_CLIPPING
- LEFT_EDGE_CLIPPING_NEGATIVE_X
- NO_TRANSPARENCY
- CPU_TRANSFER_BASE_FIXED
-
- Additionally, a NO_GXCOPY flag can be set to indicate that
- ImageWrites should only be used for the more complicated rops.
- This is useful in the case where accelerator assisted image transfers
- are not faster than the unaccelerated versions for simple copies.
- Note: When using the Scanline version of ImageWrite the
- CPU_TRANSFER_BASE_FIXED is currently unsupported.
-
-ImageWriteBase
-ImageWriteRange
-ImageWriteOffset
-
- This is often, but not necessarily, the same window defined by the
- CPUToScreenColorExpandBase and Range. ImageWrites may be
- suboptimal if this range is not at least as large as the
- framebuffer width. By default ImageWriteBase is set to
- FramebufferBase if not defined.
-
- When using the ScanlineScreenToScreenCopy, the ImageWriteRange must
- be a large buffer in video memory, from testing about four scanlines
- should be sufficient. (needs furthur testing).
- ImageWriteOffset should be set as the (x * y) offset into the frame
- buffer for the copy, similar to ImageWriteBase. ImageWriteBase is
- not used in the Scanline version.
-
-SetupForFill8x8Pattern(patternx, patterny, rop, planemask, trans_col)
-
- Set up for hardware 8x8 pattern fill (non-color expanded). If
- neither the HARDWARE_PATTERN_SCREEN_ORIGIN flag or the HARDWARE_
- PATTERN_PROGRAMMED_ORIGIN flag is set, patternx and patterny can be
- ignored. Otherwise, patternx and patterny just indicate the video
- memory address where the pattern is stored. The pattern is stored
- linearly in video memory unless HARDWARE_PATTERN_NOT_LINEAR is
- specified. When the transparency color is -1 there is no transparency.
-
-SubsequentFill8x8Pattern(patternx, patterny, x, y, w, h)
-
- Perform a hardware 8x8 pattern fill. If the flag HARDWARE_PATTERN_
- SCREEN_ORIGIN is set, patternx and patterny can be ignored;
- otherwise, patternx and patterny indicate the video memory address
- where the pattern is stored. However, if HARDWARE_PATTERN_
- PROGRAMMED_ORIGIN is set patternx and patterny define the origin
- offset into the pattern. Any rotation issues are handled by the
- generic code by generating pre-rotated copies of the pattern. The
- pattern address will always be at a multiple of 8 pixels offset
- from the start of a scanline (x will be a multiple of 8), unless
- the HARDWARE_PATTERN_ALIGN_64 is set. At the moment, setting
- HARDWARE_PATTERN_ALIGN_64 in the absence of HARDWARE_PATTERN_
- PROGRAMMED_ORIGIN will disable the use of this function, but this
- will change in a future version.
-
-SetupFor8x8PatternColorExpand(patternx, patterny, bg, fg, rop, planemask)
-
- Set up for hardware color-expanded 8x8 pattern fill. If the flag
- HARDWARE_PATTERN_SCREEN_ORIGIN is set, or HARDWARE_PATTERN_
- PROGRAMMED_ORIGIN is set in the absence of HARDWARE_PATTERN_
- PROGRAMMED_BITS, patternx and patterny indicate the video memory
- address where the pattern is stored, which will be on an 8 byte
- boundary relative to the start of a scanline. Otherwise, patternx
- and patterny can be ignored. The pattern x-coordinate will be in
- units of "bits", that is, a byte offset of one relative to the
- start of the scanline is represented by a patternx value of 8.
-
- If HARDWARE_PATTERN_PROGRAMMED_BITS is set, patternx and patterny
- are overloaded as follows: patternx holds the first 4 lines (32
- pixels) of the pattern, with each byte (MSB-first bit order if the
- HARDWARE_PATTERN_BIT_ORDER_MSBFIRST flag is set) corresponding to a
- scanline of the pattern. patterny holds the second half of the
- pattern. This is the so-called "Windows-format".
-
- A background color of -1 indicates transparency (support of
- transparency is indicated by HARDWARE_PATTERN_MONO_TRANSPARENCY).
-
-Subsequent8x8PatternColorExpand(patternx, patterny, x, y, w, h)
-
- Perform a hardware color-expanded 8x8 pattern fill. If the flag
- HARDWARE_PATTERN_SCREEN_ORIGIN is set, patternx and patterny
- can be ignored; otherwise, patternx and patterny indicate the
- video memory address where the pattern is stored. Any rotating
- issues are handled by the generic code by generating pre-rotated
- copies of the pattern. Again patternx is in "bit" or "stencil"
- units.
-
- If HARDWARE_PATTERN_PROGRAMMED_ORIGIN is set, patternx and
- patterny hold the origin (x and y offsets into the pattern).
- HARDWARE_PATTERN_SCREEN_ORIGIN may be defined additionally;
- in that case, the following is true: patternx and patterny will
- be the same for all "Subsequent" calls. You may only need to
- program the origin in the first Subsequent call.
-
-ColorExpandFlags
-
- This selects the restrictions for color expansion operations. The
- flags are extended with a set of flags that is used to define
- details about the hardware-specific implementation of color
- expansion, as performed by the low-level color expansion functions.
- The following extra flags are defined:
-
- SCANLINE_NO_PAD
- SCANLINE_PAD_BYTE
- SCANLINE_PAD_DWORD
-
- Defines the padding at the end of a scanline of monochrome
- data, which indicates the number of bits that is ignored by the
- graphics chip at the end of each scanline in multi-scanline
- color-expansion operations from the CPU to the screen. DWORD
- padding is preferred. These flags do not apply to screen-to-screen
- color expansion. Currently, not defining SCANLINE_PAD_DWORD will
- result in non-optimized and limited use of CPU-to-screen color
- expansion.
-
- CPU_TRANSFER_PAD_DWORD
- CPU_TRANSFER_PAD_QWORD
-
- Defines the total amount of data to be transferred in a
- multi-scanline CPU-to-screen color-expansion operation. Most
- chips pad to a DWORD boundary.
-
- CPU_TRANSFER_BASE_FIXED
-
- Indicates that the destination address for monochrome data for
- CPU-to-screen color-expansion is a fixed address, rather than
- a large range starting from the ColorExpandBase address.
-
- ONLY_TRANSPARENCY_SUPPORTED
-
- Indicates that the color expansion operations only work with
- transparency (bit 0 pixels are not written).
-
- TRIPLE_BITS_24BPP
-
- When enabled (must be in 24bpp mode), color expansion functions
- are expected to require three times the amount of bits to be
- transferred so that 24bpp grayscale colors can used with color
- expansion in 8bpp coprocessor mode. Each bit is expanded to 3
- bits when writing the monochrome data. When definining this
- flag, also define RGB_EQUAL.
-
- VIDEO_SOURCE_GRANULARITY_PIXEL
- VIDEO_SOURCE_GRANULARITY_BYTE
- VIDEO_SOURCE_GRANULARITY_DWORD
-
- This indicates the granularity of the horizontal source location
- specification for screen-to-screen color expansion operations.
- It is either one pixel, 8 pixels (a byte), or 32 pixels (a 32-bit
- word). If there's some kind of clipping mechanism available, pixel
- granularity is usually possible.
-
- BIT_ORDER_IN_BYTE_LSBFIRST
- BIT_ORDER_IN_BYTE_MSBFIRST
-
- This defines the order of bits within a byte. As far as X is
- concerned, it's best when the lowest-order bit corresponds to
- the leftmost pixel on the screen (this is the technically
- superior format), but many chips only support the "wrong" bit
- order (MSBFIRST).
-
- LEFT_EDGE_CLIPPING
-
- This indicates that CPU-to-screen color expansion operations
- support the left-edge clipping parameter, which indicates
- the number of pixels to skip at the left edge.
-
- LEFT_EDGE_CLIPPING_NEGATIVE_X
-
- This indicates that when the left-edge clipping parameter is
- specified, the x coordinate is allowed to be negative (while
- being on-screen when the parameter is actually added to it).
- At the moment, this flag is a requirement for CPU-to-screen
- color expansion acceleration of (large) stipples.
-
- Note that the regular graphics operations flags for raster-op,
- planemask and color restrictions are also valid. NO_TRANSPARENCY
- indicates that color expansion does not support transparency.
-
-SetupForCPUToScreenColorExpand(bg, fg, rop, planemask)
-
- Set up for CPU-to-screen color expansion operations. This is used
- for writing bitmaps and text, and (not yet) stipples. When bg is
- equal to -1, the background (bits that are 0) is transparent.
-
-SubsequentCPUToScreenColorExpand(x, y, w, h, skipleft)
-
- Perform a CPU-to-screen color expansion operation. The monochrome
- data will be transferred after this function has been called.
- Sync() is called when the data has been transferred. The optional
- skipleft parameter defines a number of pixels (0 - 7) to be skipped
- at the left edge (at the start of each scanline).
-
-SetupForScreenToScreenColorExpand(bg, fg, rop, planemask)
-
- Set up for screen-to-screen color expansion operations. This will
- only be used when the storing of monochrome data in the pixmap (or
- font) cache is implemented.
-
-SubsequentScreenToScreenColorExpand(srcx, srcy, x, y, w, h)
-
- Perform a screen-to-screen color expansion operation. scrx is in
- pixel units (8 corresponds to one byte offset).
-
-SetupForScanlineCPUToScreenColorExpand(x, y, w, bg, fg, rop, planemask)
-
- Set up for a scanline-by-scanline color expansion operation from
- the CPU to the screen. This is not of much use (except when a chip
- is not compatible with supported methods of color expanding a whole
- bitmap). It's not used currently.
-
-SubsequentScanlineCPUToScreenColorExpand()
-
- Color expand a scanline from the CPU to the screen. Many chips
- automatically add the pitch of the dislay to the destination
- address after a scanline has been written so that it doesn't need
- to be updated. Otherwise you'll need to keep track of the address.
-
-SetupForScanlineScreenToScreenColorExpand(x, y, w, h, bg, fg, rop, planemask)
-
- Set up for a scanline-by-scanline color expansion operation from
- the screen to the screen (top-down). This is typically used for
- chips that don't have usable CPU-to-screen color expansion. It is
- taken advantage of for bitmaps, text, and (not yet) stipples.
-
-SubsequentScanlineScreenToScreenColorExpand(srcaddr)
-
- This performs color expansion of a scanline from the screen
- (typically a scratch buffer) to the screen. To take advantage of
- this operation, ScratchBufferAddr and ScratchBufferSize must be
- defined (> 0), and either linear addressing must be used or
- ScratchBufferBase must be defined. Being able to support
- COP_FRAMEBUFFER_CONCURRENCY is a win here. The srcaddr is the
- linear framebuffer address in (non-expanded) pixel units. The real
- address is (srcaddr / 8). When TRIPLE_BITS_24BPP is defined,
- srcaddr is in non-expanded 8bpp pixel units.
-
- In addition, PingPongBuffers defines the number of alternating
- buffers used. The default is two. Depending on the implementation
- and size of framebuffer and coprocessor write buffers on the chip,
- you might need more than two.
-
-CPUToScreenColorExpandBase
-
- This address defines the base address for writing monochrome bitmap
- data to when performing CPU-to-screen color expansion operations.
- When the CPU_TRANSFER_BASE_FIXED flag is not set and
- CPUToScreenColorExpandRange is not defined, a large range is
- assumed to be available (at least the number pixels in the virtual
- screen / 8). For text operations this is probably never a problem.
- At the moment hardware that has 64 bytes or so of transfer space is
- unlucky. 32-bit access is always used.
-
- If this is not defined, FramebufferBase will automatically be
- used.
-
-CPUToScreenColorExpandRange
-
- This defines the size of the "window" starting from the base
- address for writing CPU-to-screen color-expand data. If this is
- not defined or zero, the range is assumed to be large enough.
- When it is greater than the width of the screen in pixels / 8,
- the base address will be adjusted if necessary at the end of each
- scanline. Currently, if it is smaller than that, the
- CPU_TRANSFER_BASE_FIXED flag is set.
-
- At the moment, the bottom line is that you need about 256 bytes
- of transfer space to use CPU-to-screen color expansion (128 bytes
- with a 1024 pixel screen width) with PCI-burst mode support.
- However, "fixed-base" operation is supported.
-
-FramebufferBase
-
- This is a pointer to the framebuffer. It is required by the
- ScanlineScreenToScreenColorExpand, and is automatically
- initialized. It should not be set up in a chip-specific driver.
-
-BitsPerPixel
-
- This is the number of bits per pixel, stored here for convenience.
- There's no need to initialize this from a driver.
-
-FramebufferWidth
-
- The is the width of the framebuffer in pixels, stored here for
- convenience. There's no need to initialize this from a driver.
-
-ScratchBufferAddr
-ScratchBufferSize
-
- This specifies the linear address in bytes and size of the scratch
- buffer used for ScanlineScreenToScreenColorExpand operations.
-
-ScratchBufferBase
-
- This is a pointer to the mapped video memory of the scratch buffer.
- When not defined, the scratch buffer is assumed to be at the
- specified offset (ScratchBufferAddr) into a linear framebuffer.
- This field should only be initialized when using
- ScanlineScreenToScreenColorExpand with a non-linear framebuffer,
- in which case it should be noted that it is totally independent
- from ScratchBufferAddr.
-
-PingPongBuffers
-
- This field defines the number of alternating buffers used in the
- scratch buffer for ScanlineScreenToScreenColorExpand. The default
- is two. Depending on the implementation and size of framebuffer and
- coprocessor write buffers on the chip, you might need more than
- two.
-
-ErrorTermBits
-
- Indicates the number of bits of precision for the Bresenham line
- error terms. The absolute values of the of the terms are guaranteed
- to be in the range [0, 2 ^ ErrorTermBits - 1]. If your registers
- have 14 significant bits, you would probably use 13 here because of
- the sign bit.
-
-ServerInfoRec
-
- This is a pointer to the XFree86 server InfoRec. It must be defined.
- The InitPixmapCache function initializes it for compatibility with
- earlier versions of XAA. The SVGA server initializes it
- automatically.
-
-PixmapCacheMemoryStart
-PixmapCacheMemoryEnd
-
- These values must be defined if the pixmap cache is enabled. The
- InitPixmapCache function initializes them, for compatibility with
- earlier versions of XAA.
-
-
-1.6 Commonly Used Parameters
-
-This section clarifies the format of some of the commonly used
-parameters in the low-level functions (as described above).
-
-Coordinates ("x", "y") are pixel coordinates unless otherwise noted.
-
-The width and height ("w", "h") define the size of the area involved in
-pixel units.
-
-Colors (named "color", "bg" or "fg") are simple pixel values. They are
-not "replicated" over the 32-bit integer argument. So for example in
-8bpp mode, bits 0-7 of the value represent the pixel value, and the
-rest of the bits is zero. If your chip requires a "replicated" 32-bit
-pixel value (4 duplicated pixels for 8bpp), you will have to do that in
-your low-level functions implementation.
-
-The planemask is a mask that defines what bits in the pixel value
-are to be modified on the screen. Again, this value cannot be assumed
-to be "replicated" to 32-bit in 8bpp and 16bpp modes.
-
-The raster-op ("rop") is one of the 16 raster-operations that X
-defines:
-
- #define GXclear 0x0 /* 0 */
- #define GXand 0x1 /* src AND dst */
- #define GXandReverse 0x2 /* src AND NOT dst */
- #define GXcopy 0x3 /* src */
- #define GXandInverted 0x4 /* NOT src AND dst */
- #define GXnoop 0x5 /* dst */
- #define GXxor 0x6 /* src XOR dst */
- #define GXor 0x7 /* src OR dst */
- #define GXnor 0x8 /* NOT src AND NOT dst */
- #define GXequiv 0x9 /* NOT src XOR dst */
- #define GXinvert 0xa /* NOT dst */
- #define GXorReverse 0xb /* src OR NOT dst */
- #define GXcopyInverted 0xc /* NOT src */
- #define GXorInverted 0xd /* NOT src OR dst */
- #define GXnand 0xe /* NOT src OR NOT dst */
- #define GXset 0xf /* 1 */
-
-For each graphics operation you can define that only GXcopy is supported
-by setting the GXCOPY_ONLY flag in the flags for that particular
-operation. Similarly, NO_PLANEMASK indicates that the plane mask is
-not supported.
-
-
-1.5 The best strategy
-
-Start with simple filled solid rectangles and screen-to-screen copies
-(BitBLT). Those two functions alone will accelerate the vast majority
-of graphic operations requested. The sample driver can be used as a
-starting point.
-
-Next you might want to look at color expansion (CPUToScreen, or if
-that can't be done, ScanlineScreenToScreen), BresenhamLine or
-TwoPointLine, and Fill8x8Pattern/ColorExpand8x8Pattern.
-
-The relative win of seperately implementing functions that are already
-accelerated with solid filled rectangles varies, but it can make a
-difference since just using rectangle fills has some overhead. You may
-be able to make better use of features of the graphics chip, and better
-exploit CPU/graphics concurrency, although this already done by the
-generic code for some operations (such as filled polygons and arcs).
-
-
-2 Acceleration hooks
-
-Many operations can be "hooked" at a higher level, instead of just
-defining the low-level functions. This can be useful for existing code
-or operations for which there are no adequate low-level functions. What
-follow is a description of most of the functions that can be hooked.
-
-[This isn't complete]
-
-2.1 Filled Rectangles
-
-Rectangles can be filled with a single source color, or with three
-different types of repeating pattern:
-
- Stipple: a transparent bitmap pattern where 1's correspond to the
- foreground color.
-
- Opaque stipple: a bitmap pattern where 0's correspond to the
- background color and 1's to the foreground color.
-
- Tile: an image pattern that can have full pixel depth.
-
-2.1.1 Solid Filled Rectangles
-
-Solid filled rectangles are a very common operation. Apart from
-a regular solid fill, special raster ops are often used, for example
-for inverting the destination.
-
-To define a simple function for drawing one filled rectangle that will
-be used for many kinds of operation, use this:
-
- xf86AccelInfoRec.SetupForFillRectSolid = MySetupForFillRectSolid;
- xf86AccelInfoRec.SubsequentFillRectSolid = MySubsequentFillRectSolid;
-
-If you accelerate solid filled rectangles, and have a complete
-replacement for PolyFillRect that handles clipping, do this:
-
- xf86GCInfoRec.PolyFillRectSolid = MyPolyFillRect;
-
-If you don't handle clipping, but do have a replacement for accelerated
-solid filled rectangles, do this:
-
- xf86GCInfoRec.PolyFillRectSolid = xf86PolyFillRect;
- xf86AccelInfoRec.FillRectSolid = MyFillRectSolid;
-
-In all cases, the following flags can be set in
-xfGCInfoRec.FillRectSolidFlags:
-
- GXCOPY_ONLY Only the raster-op GXcopy is supported.
- NO_PLANEMASK No special planemask is supported.
- RGB_EQUAL Only a foreground color with same values
- for red, green and blue is accepted.
-
-2.1.2 Tiled Filled Rectangles
-
-If you have the required low-level functions and enable PIXMAP_CACHE,
-the pixmap cache will be used to draw tiles. For tiles, you just need
-ScreenToScreenCopy.
-
-If you accelerate tiled filled rectangles, and have a complete
-replacement for PolyFillRect that handles clipping, do this:
-
- xf86GCInfoRec.PolyFillRectTiled = MyPolyFillRect;
-
-If you don't handle clipping, but do have accelerated tiled filled
-rectangles, do this:
-
- xf86GCInfoRec.PolyFillRectTiled = xf86PolyFillRect;
- xf86AccelInfoRec.FillRectTiled = MyFillRectTiled;
-
-In both cases, the following flags can be set in
-xfGCInfoRec.FillRectTiledFlags:
-
- GXCOPY_ONLY Only the raster-op GXcopy is supported.
- NO_PLANEMASK No special planemask is supported.
-
-2.1.3 Stippled Filled Rectangles
-
-If you have the required low-level functions and enable PIXMAP_CACHE,
-the pixmap cache will be used to draw stipples. For stipples, you just need
-ScreenToScreenCopy with support for transparency.
-
-If you accelerate stippled filled rectangles, and have a complete
-replacement for PolyFillRect that handles clipping, do this:
-
- xf86GCInfoRec.PolyFillRectStippled = MyPolyFillRect;
-
-If you don't handle clipping, but do have accelerated stippled filled
-rectangles, do this:
-
- xf86GCInfoRec.PolyFillRectStippled = xf86PolyFillRect;
- xf86AccelInfoRec.FillRectStippled = MyFillRectStippled;
-
-In both cases, the following flags can be set in
-xfGCInfoRec.FillRectStippledFlags:
-
- GXCOPY_ONLY Only the raster-op GXcopy is supported.
- NO_PLANEMASK No special planemask is supported.
-
-2.1.4 Opaque Stippled Filled Rectangles
-
-If you have the required low-level functions and enable PIXMAP_CACHE,
-the pixmap cache will be used to draw stipples. For stipples, you just need
-ScreenToScreenCopy.
-
-If you accelerate opaque filled rectangles, and have a complete
-replacement for PolyFillRect that handles clipping, do this:
-
- xf86GCInfoRec.PolyFillRectOpaqueStippled = MyPolyFillRect;
-
-If you don't handle clipping, but do have accelerated opaque filled
-rectangles, do this:
-
- xf86GCInfoRec.PolyFillRectOpaqueStippled = xf86PolyFillRect;
- xf86AccelInfoRec.FillRectOpaqueStippled = MyFillRectOpaqueStippled;
-
-In both cases, the following flags can be set in
-xf86GCInfoRec.FillRectOpaqueStippledFlags:
-
- GXCOPY_ONLY Only the raster-op GXcopy is supported.
- NO_PLANEMASK No special planemask is supported.
-
-2.2 Filled Spans
-
-Filled spans can be used for many purposes, mostly filled areas
-of different shapes. The fill style can be solid (by far the most
-useful), tiled, stippled and opaque stippled.
-
-If you accelerate solid filled spans, and have a complete
-replacement for FillSpansSolid that handles clipping, do this:
-
- xf86GCInfoRec.FillSpansSolid = MyFillSpanstSolid;
-
-And similarly for other fill styles:
-
- xf86GCInfoRec.FillSpansTiled = MyFillSpanstTiled;
- xf86GCInfoRec.FillSpansStippled = MyFillSpanstStippled;
- xf86GCInfoRec.FillSpansOpaqueStippled = MyFillSpanstOpaqueStippled;
-
-If you don't handle clipping, but do have a function for drawing solid
-filled spans, do this:
-
- xf86GCInfoRec.FillSpansSolid = xf86FillSpans;
- xf86AccelInfoRec.FillSpansSolid = MyFillSpansSolid;
-
-In all cases, the following flags can be set in
-xfGCInfoRec.FillSpansSolidFlags (and similarly for for other fill styles):
-
- GXCOPY_ONLY Only the raster-op GXcopy is supported.
- NO_PLANEMASK No special planemask is supported.
- RGB_EQUAL Only a foreground color with same values
- for red, green and blue is accepted.
-
-2.3 Filled Arcs
-
-If you accelerate filled solid arcs, and have a complete replacement
-for PolyFillArc that handles clipping, do this:
-
- xf86GCInfoRec.PolyFillArc = MyPolyFillArc;
-
-The following flags can be set in xf86GCInfoRec.PolyFillArcFlags:
-
- GXCOPY_ONLY Only the raster-op GXcopy is supported.
- NO_PLANEMASK No special planemask is supported.
-
-If you have a function for accelerated solid horizontal spans, it will
-automatically be taken advantage of for filled arcs.
-
-2.4 Text
-
-There are two kinds of text, transparent text (the background is not
-written), and image text (the background is filled with the background
-color).
-
-There are also two types of font. Terminal-emulator fonts, which have
-characters that are all the same size, and non-terminal emulator fonts,
-which have characters of varying size.
-
-In the case of image text with a non-terminal emulator font, the filled
-background corresponds to the bounding box of the text image.
-
-2.4.1 Transparent Text
-
-If you accelerate transparent text strings, and have a complete replacement
-for PolyGlyphBlt that handles clipping, do this if you accelerate
-terminal-emulator fonts:
-
- xf86GCInfoRec.PolyGlyphBltTE = MyPolyGlyphBltTE;
-
-And if you also support non-terminal emulator fonts:
-
- xf8GCInfoRec.PolyGlyphBltNonTE = MyPolyGlyphBltNonTE;
-
-And if you also support non-terminal emulator fonts:
-
- xf8GCInfoRec.PolyGlyphBltNonTE = MyPolyGlyphBltNonTE;
-
-If you don't handle clipping, but do have accelerated transparent text:
-
- xf86GCInfoRec.PolyGlyphBltTE = xf86PolyGlyphBltTE;
- xf86AccelInfoRec.PolyTextTE = MyPolyTextTE;
-
-And similarly for non-terminal emulator fonts:
-
- xf86GCInfoRec.PolyGlyphBltNonTE = xf86PolyGlyphBltNonTE;
- xf86AccelInfoRec.PolyTextNonTE = MyPolyTextNonTE;
-
-2.4.2 Image text
-
-If you accelerate image text strings, and have a complete replacement
-for ImageGlyphBlt that handles clipping, do this if you accelerate
-terminal-emulator fonts:
-
- xf86GCInfoRec.ImageGlyphBltTE = MyImageGlyphBltTE;
-
-And if you also support non-terminal emulator fonts:
-
- xf8GCInfoRec.ImageGlyphBltNonTE = MyImageGlyphBltNonTE;
-
-If you don't handle clipping, but do have accelerated transparent text:
-
- xf86GCInfoRec.ImageGlyphBltTE = xf86ImageGlyphBltTE;
- xf86AccelInfoRec.ImageTextTE = MyImageTextTE;
-
-And similarly for non-terminal emulator fonts:
-
- xf86GCInfoRec.ImageGlyphBltNonTE = xf86ImageGlyphBltNonTE;
- xf86AccelInfoRec.ImageTextNonTE = MyImageTextNonTE;
-
-2.5 CopyArea
-
-Screen-to-screen area copies (BitBLTs) are extremely useful. It's vital
-for smooth scrolling and dragging of windows. Unaccelerated, this
-operation is often slow because of the slowness of read operations
-from the framebuffer. This function can also be used to great effect
-for caching mechanisms for patterns and fonts, when support for it
-is added.
-
-If you accelerate screen-to-screen area copies (BitBLTs), and have a
-complete replacement for CopyArea that handles clipping, do this:
-
- xf8GCInfoRec.CopyArea = MyCopyArea;
-
-If you don't handle clipping, but do have an accelerated CopyArea:
-
- xf86GCInfoRec.CopyArea = xf86CopyArea;
- xf86AccelInfoRec.ScreenToScreenBitBlt = MyScreenToScreenBitBlt;
-
-In all cases, the following flags can be set in
-xfGCInfoRec.CopyAreaFlags:
-
- GXCOPY_ONLY Only the raster-op GXcopy is supported.
- NO_PLANEMASK No special planemask is supported.
- NO_TRANSPARENCY Transparency color compare is not supported.
-
-
-3. Opportunities For Improvement
-
-- The graphics operation flags aren't consistent. There should be
- seperate flags indicating the restrictions for the lower-level
- functions.
-
-- VT-switching awareness has not been extensively tested, and the
- current implement has a few rough edges.
-
-- Solid tile fill may be faster with cfb in some cases (if the chip
- doesn't have much video memory bandwidth to play with and the PCI
- bus bandwidth is decent).
-
-- Having a function for clipped filled spans that clips on the fly. This
- doesn't exist yet anywhere in the source tree. This would be a minor
- speed up for things like clipped filled polygons and arcs, and wide
- lines.
-
-- Having the pixmap cache store stipples in monochrome format, and using
- color expansion features of the graphics chip to replicate them. This
- is more efficient since less video memory bandwidth is required for
- the cached pattern source. Not all chips support this kind of operation
- easily, especially w.r.t. clipping of the leftmost edge (the first pixel
- to be drawn may start at some bit of the leftmost video memory byte), and
- defining the location of the monochrome pattern in video memory can be
- a little complex.
-
-- Taking more advantage of built-in (8x8) chip pattern registers. This
- works OK now, but things not implemented include detection of
- tiles that have only two colors so that they can be done with
- color-expand 8x8 pattern fill, and interleaving schemes allowing 16
- and 32 pixel high patterns to be done using the hardware pattern. Also
- some chips support 16x8 and 32x8 pattern fill at 8bpp by using 16bpp
- or 32bpp pattern fill. Currently, support for chips that require the
- pattern to be aligned on a 64-pixel boundary is missing in most cases,
- which in practice means the 8x8 pattern is not usable for many chips.
-
-- Font-caching (useful for configurations where it's not possible to use
- color expansion for text, and for certain fonts). Non-"terminal emulator"
- fonts is certainly a weak area of XAA.
-
-- Complete implementation of non-terminal emulator font text acceleration
- using color expansion (the code is in place, but causes problems).
-
-- Generic hardware-cursor code (this sounds very useful to me), including
- Harald Koenig's support for real-time software/hardware cursor switching.
-
-- More complete 24bpp-in-8bpp-mode support. Missing is full implementation
- of color expansion schemes to allow 24bpp fills in 8bpp mode in two
- passes.
-
-- The Pentium optimized text bitmap functions exist only for 6 and 8-pixel
- wide fonts. BTW, on a Cyrix 6x86 the Pentium-optimized 6-wide function
- seems to cause a 2% performance decrease.
-
-- Accelerated stipples using direct color expansion would definitely be
- worthwhile. The lowest-level function is in place (but untested). It
- would take care of cases where the font cache cannot be used (such as
- 24bpp, lack of transparency color compare for transparent stipples,
- lack of off-screen video memory), or when color expansion is faster
- (generally on video memory bandwidth-starved configurations).
-
-3.1 More Concurrency?
-
-More concurrency between graphics and CPU processing sounds very
-attractive. This can be implemented by not "syncing" when leaving the
-graphic drawing code, but instead allowing graphics commands to
-continue while X is doing its request processing, or even during
-context switching or when the client is running. The ever larger PCI
-write buffers help to make this a very nice optimization. This requires
-awareness of coprocessor activity at several levels in the server code
-(for example, at any point where something is read or written to the
-video card).
-
-There are variations between chipsets that affect how easily they would
-support such a scheme. The best behaviour is what I would call "in
-order execution" of coprocessor commands and simple CPU writes to the
-framebuffer. That is, if you send some graphics coprocessor commands to
-the chip, and then write something to the framebuffer, it is guaranteed
-that the framebuffer writes will only happen when the graphics commands
-have been completed. This avoids, for example, having to check for
-coprocessor activity each time something is drawn with a "dumb"
-framebuffer function. I think that PCI write buffers on the motherboard
-generally follow this behaviour, but graphics chips generally do not.
-
-Of course, reading or querying anything from the graphics card is
-something you will want to avoid, since in most cases this will result
-in the CPU being stalled until all the PCI and on-chip write buffers
-are flushed and processed. Chips that require frequent querying or do
-not allow concurrent coprocessor execution and CPU framebuffer access
-will take much less benefit.
-
-A somewhat wild way to test this kind of scheme is to simply not define
-the BACKGROUND_OPERATIONS flag, but despite that not do any syncing
-in the graphics primitives. Without BACKGROUND_OPERATIONS set, the XAA
-code almost never calls Sync itself. Someone (inadvertently) tried
-this on an ET6000, and it seemed to measurably increase
-performance. This is of course hazardous and prone to lock-ups etc.
-
-
-4. Comparison Of Chip-specific Implementations
-
-
-4.1 Current Chip-specific Implementations
-
-ARK Logic
-
- Uses BACKGROUND_OPERATIONS and COP_FRAMEBUFFER_CONCURRENCY. The
- latter is vital for high-performance color expansion, since the
- ARK chips don't appear to have CPU-to-screen color expansion.
- There's no need to "sync" during a batch of accelerator commands;
- the ARK chips seem to have "PCI-Retry" support.
-
- Screen locations are programmed as pixel addresses. The ARK chip
- also supports coordinates, but that restricts the possible
- framebuffer widths and I don't think it would be faster.
-
- FillRectSolid is provided. At 24bpp, it uses 8bpp coprocessor mode
- which leads to RGB_EQUAL and NO_PLANEMASK restrictions.
- ScreenToScreenCopy is supported, again restrictions at 24bpp:
- NO_PLANEMASK and NO_TRANSPARENCY. BresenhamLine is very
- straightforward.
-
- Fill8x8Pattern is supported; the ARK chip requires the pattern to
- be aligned on a 64-pixel boundary and the address modulo 64 seems
- to indicate the vertical offset (y origin) (HARDWARE_PATTERN_MOD_
- 64_OFFSET). The latter means the pattern can actually be used (when
- the framebuffer width is a multiple of 64), despite the limited
- support for 64-pixel pattern alignment in XAA. The ARK chips don't
- seem to have support for a monochrome pattern.
-
- Color expansion is implemented using ScanlineScreenToScreen-
- ColorExpand (24bpp: RGB_EQUAL, NO_PLANEMASK), which is pretty fast
- thanks to COP_FRAMEBUFFER_CONCURRENCY.
- Color expansion flags are VIDEO_SOURCE_GRANULARITY_PIXEL and
- BIT_ORDER_IN_BYTE_LSBFIRST. At 24bpp, TRIPLE_BITS_24BPP would be
- useful but is not yet supported by XAA.
-
- ScreenToScreenColorExpand is provided for future use by XAA. One
- thing that ARK chips can accelerate but is not yet provided by XAA
- is styled (patterned) line drawing.
-
-Cirrus Logic GD5426/28/29/30/34/40/46 and 7543/48
-
- Uses BACKGROUND_OPERATIONS. The driver is shared by a very wide
- range of largely compatible chips, from the first-generation
- accelerator CL-GD5426 to the recent CL-GD5446, which is the only
- one to support COP_FRAMEBUFFER_CONCURRENCY and also doesn't need
- "sync"-ing between coprocessor operations. Screen locations are
- programmed as byte addresses (which makes the driver larger than,
- for example, ARK). The driver is compiled twice, with programmed I/O
- (required for earlier chips) and with memory-mapped I/O.
-
- FillSolidRect is provided (NO_PLANEMASK, since the chips don't
- support a planemask), and at 24bpp on a non-5436/46 uses 8bpp mode
- in which case RGB_EQUAL is set.
-
- ScreenToScreenCopy is supported (NO_PLANEMASK). A few chips
- (5429/30/34) don't support transparency color compare at all
- (NO_TRANSPARENCY), and none of the chips support it at pixel depths
- greater than 16bpp.
-
- For CPU-to-screen color expansion, chips earlier than the CL-GD5436
- don't support DWORD padding of scanlines, so the XAA code isn't
- usable for them. Instead, these chips use byte-padding-aware text
- acceleration code from the old accelerated driver, and the
- ScanlineScreenToScreenColorExpand method (which isn't very fast
- on these chips) is provided for other things. NO_PLANEMASK. The
- 5436/46 support 24bpp color expansion, but only with transparency
- (ONLY_TRANSPARENCY_SUPPORTED); the others would benefit from
- TRIPLE_BITS_24BPP. The bit order is BIT_ORDER_IN_BYTE_MSBFIRST. The
- LEFT_EDGE_CLIPPING parameter (a value from 0 to 7) is supported for
- CPU-to-screen color expansion. Screen-to-screen color expansion is
- provided for future use. It requires the source to be aligned on a
- DWORD boundary (VIDEO_SOURCE_GRANULARITY_DWORD).
-
-Matrox Millennium
-
- BACKGROUND_OPERATIONS
- 24bpp: NO_PLANEMASK
- FillRectSolid
- ScreenToScreenCopy (NO_TRANSPARENCY)
-
- Color expansion:
- CPUToScreenColorExpand
- SCANLINE_PAD_DWORD
- CPU_TRANSFER_PAD_DWORD
- BIT_ORDER_IN_BYTE_LSBFIRST
- LEFT_EDGE_CLIPPING
- ScreenToScreenColorExpand
- VIDEO_SOURCE_GRANULARITY_PIXEL
-
-
-4.2 Chip-specific Performance
-
-This table is intended to help with determining what kinds of
-operations best suit a particular chip. It shows the results (in MB/s)
-for the low-level bandwidth benchmarks run at start-up. Because refresh
-is disabled at the time time benchmark is run, the result reflects the
-full DRAM bandwidth on DRAM-based cards (the dot clock doesn't really
-matter). For this reason, the comparison isn't really fair (biased against
-VRAM/WRAM and MDRAM). The virtual display width can have an influence.
-
-Chip ARK1000PV Trid9385 CLGD5434 TGUI9440 MGA-Mill ET6000
-Memory 1MB DRAM 2MB DRAM 2MB DRAM 1MB DRAM 2MB WRAM 2MB MDRAM
-CPU DX4/100 ? DX4/100 AMK5/100 AMK5/100 6x86P150+
-Bus PCI 33MHz PCI VLB 33MHz PCI 33MHz PCI 33MHz PCI 30MHz
-bpp, width 8bpp 1024 8bpp 8bpp 1024 8bpp 8bpp 8bpp
------------------------------------------------------------------------------
-framebuffer 43.95 15.89 32.76 44.23 44.48 61.40
-solid filled rect
-10x1 7.38 3.14 4.58 8.72 34.99 28.22
-40x40 85.82 89.93 120.34 62.60 369.84 143.84
-400x400 108.81 157.20 211.18 80.03 1618.11 264.35
-screen copy
-10x10 24.77 11.26 20.49 18.53 28.14 24.22
-40x40 38.81 43.90 41.68 32.11 89.27 70.57
-400x400 46.70 68.59 54.47 34.14 126.88 194.23
-400x400 scroll - - 55.63 40.22 - 189.34
-8x8 pattern fill
-400x400 105.16 116.08 - 80.02 - 264.34
-color expansion
-CPU to screen - - 116.25 - 261.03* -
-scanl. scr-to-scr 71.75 - 80.64 - - 187.25
-10x10 scr-to-scr 29.90 - 26.69 20.07 - -
-
-Chip MGA-Mill MGA-Mill MGA-Mill TGUI9680 ARK2000PV
-Memory 2MB WRAM 4MB WRAM 2MB WRAM 2MB DRAM 2MB EDO
-CPU DX4/133 P133 P133 DX4/100
-Bus PCI 33MHz PCI 33MHz PCI 33Mhz PCI PCI 33MHz
-bpp, width 8bpp 8bpp 1024 8bpp 1152 8bpp 2048 8bpp 1024
--------------------------------------------------------------------
-framebuffer 26.48 83.70 83.13 10.09 64.44
-solid filled rect
-10x1 28.63 34.28 41.30 3.06 7.91
-40x40 385.13 316.47 453.02 55.97 155.76
-400x400 1656.93 1367.64 1942.59 145.16 244.35
-screen copy
-10x10 29.18 23.47 35.09 12.61 33.20
-40x40 81.52 74.55 99.92 35.38 78.80
-400x400 114.81 105.83 137.60 46.48 99.03
-400x400 scroll - - - 51.88 100.08
-8x8 pattern fill
-400x400 - - - 51.74 228.70
-color expansion
-CPU to screen 211.11* 419.09* 416.23* - -
-scanl. scr-to-scr - - - - 137.97
-10x10 scr-to-scr - - - 15.26 36.79
-
-Chip ARK2000PV ARK2000PV MGA-Mill CL-GD5426 CL-GD5446
-Memory 2MB EDO 2MB EDO 2MB WRAM 1MB DRAM 2MB DRAM
-CPU 6x86P150+ 6x86P166+ 6x86P166+ DX4/100 P133
-Bus PCI 30MHz PCI 33Mhz PCI 33MHz VLB 33MHz PCI 33Mhz
-bpp, width 8bpp 1024 8bpp 1024 8bpp 1024 8bpp 1024 8bpp 1280
--------------------------------------------------------------------
-framebuffer 88.84 100.45 92.18 13.22 80.81
-solid filled rect
-10x1 20.99 22.82 41.30 1.16 25.49
-40x40 157.00 157.00 458.38 28.88 167.10
-400x400 244.34 244.34 1961.74 41.74 218.02
-screen copy
-10x10 33.22 33.23 35.09 5.35 34.39
-40x40 78.81 78.81 99.93 15.83 77.71
-400x400 99.13 99.02 137.87 20.98 97.03
-400x400 scroll 100.09 100.09 664.02 21.18 98.55
-8x8 pattern fill
-400x400 228.68 228.72 - 41.10 217.91
-color expansion
-CPU to screen - 730.52 - 221.10
-scanl. scr-to-scr 138.01 138.09 - 19.56 -
-10x10 scr-to-scr 36.87 36.86 39.19 6.16 66.46
-
-(*) After this benchmark was taken, the color expansion benchmark was
- changed to write a pattern including both colors instead of just the
- background one, which is likely to affect the score.
-
-The 10x1 filled rectangles score tells a lot about the command overhead
-for small fills, which is important for operations that fill span-by-span.
-The 10x10 and 40x40 screencopy give an impression of pixmap cache
-efficiency, while the 10x10 score also indicates how a simple font cache
-would perform (compare with color expansion). The 10x10 screen-to-screen
-color expand score reflects a smarter kind of font cache.
-
-If your implementation seems weak at a particular kind of operation, maybe
-you are not doing it optimally and can improve it (usually by reducing
-the command overhead, for example by minimizing the number of graphics
-chip queries).
-
-
-5. Development notes
-
-When adding a function to the GCInfoRec or AccelInfoRec, make sure to
-have a Makefile with dependencies (run make depend after doing make
-Makefile). If you don't, you're bound to get unexplainable core dumps.
-That also applies to SVGA drivers using the new interface; they should
-be recompiled after a new version of the generic acceleration code
-in installed.
-
-Header files:
-
-vgabpp.h Declares the new ScreenInit functions for each depth.
-
-xf86xaa.h General public definitions, including the GCInfoRec and
- AccelInfoRec.
-
-xf86scrin.h XAA screen initialization functions.
-
-xf86local.h Declares functions local to the generic acceleration code.
-
-xf86gcmap.h Maps names of some local functions to depth-specific
- versions.
-
-xf86maploc.h Declares local functions that are name-mapped depending on
- the depth.
-
-vga256map.h Maps the name of some cfb functions to their vga256
- equivalents. This is used for the vga256 version of the
- GC validation code.
-
-xf86pcache.h Some declarations for the pixmap cache.
-
-xf86expblt.h Declares monochrome data color-expansion blit functions
- defined in xf86expblt.c
-
-
-6. Acknowledgements
-
-The Mach64 server by Kevin Martin has been used a base for some parts
-(notably pixmap caching), and the set of functions accelerated in the
-Mach64 server provided a baseline for what to implement first.
-
-
-
-$XFree86: xc/programs/Xserver/hw/xfree86/xaa/NOTES,v 3.20 1998/07/26 00:40:48 dawes Exp $
diff --git a/xc/programs/Xserver/hw/xfree86/xaa/xaaStateChange.c b/xc/programs/Xserver/hw/xfree86/xaa/xaaStateChange.c
new file mode 100644
index 000000000..5885061e3
--- /dev/null
+++ b/xc/programs/Xserver/hw/xfree86/xaa/xaaStateChange.c
@@ -0,0 +1,1628 @@
+/* $XFree86: xc/programs/Xserver/hw/xfree86/xaa/xaaStateChange.c,v 3.1 2000/06/20 05:08:49 dawes Exp $ */
+
+#include "misc.h"
+#include "xf86.h"
+#include "xf86_ansic.h"
+#include "xf86_OSproc.h"
+
+#include "X.h"
+#include "scrnintstr.h"
+#include "pixmapstr.h"
+#include "windowstr.h"
+#include "xf86str.h"
+#include "mi.h"
+#include "miline.h"
+#include "xaa.h"
+#include "xaalocal.h"
+#include "xaawrap.h"
+#include "servermd.h"
+
+#define XAA_STATE_WRAP(func) do {\
+if(infoRec->func) { \
+ pStatePriv->func = infoRec->func;\
+ infoRec->func = XAAStateWrap##func;\
+}} while(0)
+
+/* Wrap all XAA functions and allocate our private structure.
+ */
+
+typedef struct _XAAStateWrapRec {
+ ScrnInfoPtr pScrn;
+ void (*RestoreAccelState)(ScrnInfoPtr pScrn);
+ void (*Sync)(ScrnInfoPtr pScrn);
+ void (*SetupForScreenToScreenCopy)(ScrnInfoPtr pScrn, int xdir, int ydir,
+ int rop, unsigned int planemask,
+ int trans_color);
+ void (*SetupForSolidFill)(ScrnInfoPtr pScrn, int color, int rop,
+ unsigned int planemask);
+ void (*SetupForSolidLine)(ScrnInfoPtr pScrn,int color,int rop,
+ unsigned int planemask);
+ void (*SetupForDashedLine)(ScrnInfoPtr pScrn, int fg, int bg, int rop,
+ unsigned int planemask, int length,
+ unsigned char *pattern);
+ void (*SetClippingRectangle) (ScrnInfoPtr pScrn, int left, int top,
+ int right, int bottom);
+ void (*DisableClipping)(ScrnInfoPtr pScrn);
+ void (*SetupForMono8x8PatternFill)(ScrnInfoPtr pScrn, int patx, int paty,
+ int fg, int bg, int rop,
+ unsigned int planemask);
+ void (*SetupForColor8x8PatternFill)(ScrnInfoPtr pScrn, int patx, int paty,
+ int rop, unsigned int planemask,
+ int transparency_color);
+ void (*SetupForCPUToScreenColorExpandFill)(ScrnInfoPtr pScrn, int fg,
+ int bg, int rop,
+ unsigned int planemask);
+ void (*SetupForScanlineCPUToScreenColorExpandFill)(ScrnInfoPtr pScrn,
+ int fg, int bg, int rop,
+ unsigned int planemask);
+ void (*SetupForScreenToScreenColorExpandFill) (ScrnInfoPtr pScrn,
+ int fg, int bg, int rop,
+ unsigned int planemask);
+ void (*SetupForImageWrite)(ScrnInfoPtr pScrn, int rop,
+ unsigned int planemask, int transparency_color,
+ int bpp, int depth);
+ void (*SetupForScanlineImageWrite)(ScrnInfoPtr pScrn, int rop,
+ unsigned int planemask,
+ int transparency_color,
+ int bpp, int depth);
+ void (*SetupForImageRead) (ScrnInfoPtr pScrn, int bpp, int depth);
+ void (*ScreenToScreenBitBlt)(ScrnInfoPtr pScrn, int nbox,
+ DDXPointPtr pptSrc, BoxPtr pbox, int xdir,
+ int ydir, int alu, unsigned int planmask);
+ void (*WriteBitmap) (ScrnInfoPtr pScrn, int x, int y, int w, int h,
+ unsigned char *src, int srcwidth, int skipleft,
+ int fg, int bg, int rop, unsigned int planemask);
+ void (*FillSolidRects)(ScrnInfoPtr pScrn, int fg, int rop,
+ unsigned int planemask, int nBox, BoxPtr pBox);
+ void (*FillMono8x8PatternRects)(ScrnInfoPtr pScrn, int fg, int bg, int rop,
+ unsigned int planemask, int nBox,
+ BoxPtr pBox, int pat0, int pat1,
+ int xorg, int yorg);
+ void (*FillColor8x8PatternRects)(ScrnInfoPtr pScrn, int rop,
+ unsigned int planemask, int nBox,
+ BoxPtr pBox, int xorg, int yorg,
+ XAACacheInfoPtr pCache);
+ void (*FillCacheBltRects)(ScrnInfoPtr pScrn, int rop,
+ unsigned int planemask, int nBox, BoxPtr pBox,
+ int xorg, int yorg, XAACacheInfoPtr pCache);
+ void (*FillColorExpandRects)(ScrnInfoPtr pScrn, int fg, int bg, int rop,
+ unsigned int planemask, int nBox,
+ BoxPtr pBox, int xorg, int yorg,
+ PixmapPtr pPix);
+ void (*FillCacheExpandRects)(ScrnInfoPtr pScrn, int fg, int bg, int rop,
+ unsigned int planemask, int nBox, BoxPtr pBox,
+ int xorg, int yorg, PixmapPtr pPix);
+ void (*FillImageWriteRects)(ScrnInfoPtr pScrn, int rop,
+ unsigned int planemask, int nBox, BoxPtr pBox,
+ int xorg, int yorg, PixmapPtr pPix);
+ void (*FillSolidSpans)(ScrnInfoPtr pScrn, int fg, int rop,
+ unsigned int planemask, int n, DDXPointPtr points,
+ int *widths, int fSorted);
+ void (*FillMono8x8PatternSpans)(ScrnInfoPtr pScrn, int fg, int bg, int rop,
+ unsigned int planemask, int n,
+ DDXPointPtr points, int *widths,
+ int fSorted, int pat0, int pat1,
+ int xorg, int yorg);
+ void (*FillColor8x8PatternSpans)(ScrnInfoPtr pScrn, int rop,
+ unsigned int planemask, int n,
+ DDXPointPtr points, int *widths,
+ int fSorted, XAACacheInfoPtr pCache,
+ int xorg, int yorg);
+ void (*FillCacheBltSpans)(ScrnInfoPtr pScrn, int rop,
+ unsigned int planemask, int n, DDXPointPtr points,
+ int *widths, int fSorted, XAACacheInfoPtr pCache,
+ int xorg, int yorg);
+ void (*FillColorExpandSpans)(ScrnInfoPtr pScrn, int fg, int bg, int rop,
+ unsigned int planemask, int n,
+ DDXPointPtr points, int *widths, int fSorted,
+ int xorg, int yorg, PixmapPtr pPix);
+ void (*FillCacheExpandSpans)(ScrnInfoPtr pScrn, int fg, int bg, int rop,
+ unsigned int planemask, int n, DDXPointPtr ppt,
+ int *pwidth, int fSorted, int xorg, int yorg,
+ PixmapPtr pPix);
+ void (*TEGlyphRenderer)(ScrnInfoPtr pScrn, int x, int y, int w, int h,
+ int skipleft, int startline, unsigned int **glyphs,
+ int glyphWidth, int fg, int bg, int rop,
+ unsigned planemask);
+ void (*NonTEGlyphRenderer)(ScrnInfoPtr pScrn, int x, int y, int n,
+ NonTEGlyphPtr glyphs, BoxPtr pbox,
+ int fg, int rop, unsigned int planemask);
+ void (*WritePixmap) (ScrnInfoPtr pScrn, int x, int y, int w, int h,
+ unsigned char *src, int srcwidth, int rop,
+ unsigned int planemask, int transparency_color,
+ int bpp, int depth);
+ void (*ReadPixmap) (ScrnInfoPtr pScrn, int x, int y, int w, int h,
+ unsigned char *dst, int dstwidth, int bpp, int depth);
+ RegionPtr (*CopyArea)(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable,
+ GC *pGC, int srcx, int srcy, int width, int height,
+ int dstx, int dsty);
+ RegionPtr (*CopyPlane)(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC,
+ int srcx, int srcy, int width, int height, int dstx,
+ int dsty, unsigned long bitPlane);
+ void (*PushPixelsSolid) (GCPtr pGC, PixmapPtr pBitMap,
+ DrawablePtr pDrawable, int dx, int dy, int xOrg,
+ int yOrg);
+ void (*PolyFillRectSolid)(DrawablePtr pDraw, GCPtr pGC, int nrectFill,
+ xRectangle *prectInit);
+ void (*PolyFillRectStippled)(DrawablePtr pDraw, GCPtr pGC, int nrectFill,
+ xRectangle *prectInit);
+ void (*PolyFillRectOpaqueStippled)(DrawablePtr pDraw, GCPtr pGC,
+ int nrectFill, xRectangle *prectInit);
+ void (*PolyFillRectTiled)(DrawablePtr pDraw, GCPtr pGC, int nrectFill,
+ xRectangle *prectInit);
+ void (*FillSpansSolid)(DrawablePtr pDraw, GCPtr pGC, int nInit,
+ DDXPointPtr ppt, int *pwidth, int fSorted);
+ void (*FillSpansStippled)(DrawablePtr pDraw, GCPtr pGC, int nInit,
+ DDXPointPtr ppt, int *pwidth, int fSorted);
+ void (*FillSpansOpaqueStippled)(DrawablePtr pDraw, GCPtr pGC, int nInit,
+ DDXPointPtr ppt, int *pwidth, int fSorted);
+ void (*FillSpansTiled)(DrawablePtr pDraw, GCPtr pGC, int nInit,
+ DDXPointPtr ppt, int *pwidth, int fSorted);
+ int (*PolyText8TE) (DrawablePtr pDraw, GCPtr pGC, int x, int y, int count,
+ char *chars);
+ int (*PolyText16TE) (DrawablePtr pDraw, GCPtr pGC, int x, int y, int count,
+ unsigned short *chars);
+ void (*ImageText8TE) (DrawablePtr pDraw, GCPtr pGC, int x, int y, int count,
+ char *chars);
+ void (*ImageText16TE) (DrawablePtr pDraw, GCPtr pGC, int x, int y,
+ int count, unsigned short *chars);
+ void (*ImageGlyphBltTE) (DrawablePtr pDrawable, GCPtr pGC, int xInit,
+ int yInit, unsigned int nglyph, CharInfoPtr *ppci,
+ pointer pglyphBase);
+ void (*PolyGlyphBltTE) (DrawablePtr pDrawable, GCPtr pGC, int xInit,
+ int yInit, unsigned int nglyph, CharInfoPtr *ppci,
+ pointer pglyphBase);
+ int (*PolyText8NonTE) (DrawablePtr pDraw, GCPtr pGC, int x, int y,
+ int count, char *chars);
+ int (*PolyText16NonTE) (DrawablePtr pDraw, GCPtr pGC, int x, int y,
+ int count, unsigned short *chars);
+ void (*ImageText8NonTE) (DrawablePtr pDraw, GCPtr pGC, int x, int y,
+ int count, char *chars);
+ void (*ImageText16NonTE) (DrawablePtr pDraw, GCPtr pGC, int x, int y,
+ int count, unsigned short *chars);
+ void (*ImageGlyphBltNonTE) (DrawablePtr pDrawable, GCPtr pGC, int xInit,
+ int yInit, unsigned int nglyph,
+ CharInfoPtr *ppci, pointer pglyphBase);
+ void (*PolyGlyphBltNonTE) (DrawablePtr pDrawable, GCPtr pGC, int xInit,
+ int yInit, unsigned int nglyph,
+ CharInfoPtr *ppci, pointer pglyphBase);
+ void (*PolyRectangleThinSolid)(DrawablePtr pDrawable,GCPtr pGC,
+ int nRectsInit, xRectangle *pRectsInit);
+ void (*PolylinesWideSolid)(DrawablePtr pDrawable, GCPtr pGC, int mode,
+ int npt, DDXPointPtr pPts);
+ void (*PolylinesThinSolid)(DrawablePtr pDrawable, GCPtr pGC, int mode,
+ int npt, DDXPointPtr pPts);
+ void (*PolySegmentThinSolid)(DrawablePtr pDrawable, GCPtr pGC, int nseg,
+ xSegment *pSeg);
+ void (*PolylinesThinDashed)(DrawablePtr pDrawable, GCPtr pGC, int mode,
+ int npt, DDXPointPtr pPts);
+ void (*PolySegmentThinDashed)(DrawablePtr pDrawable, GCPtr pGC, int nseg,
+ xSegment *pSeg);
+ void (*FillPolygonSolid)(DrawablePtr pDrawable, GCPtr pGC, int shape,
+ int mode, int count, DDXPointPtr ptsIn);
+ void (*FillPolygonStippled)(DrawablePtr pDrawable, GCPtr pGC, int shape,
+ int mode, int count, DDXPointPtr ptsIn);
+ void (*FillPolygonOpaqueStippled)(DrawablePtr pDrawable, GCPtr pGC,
+ int shape, int mode, int count,
+ DDXPointPtr ptsIn);
+ void (*FillPolygonTiled)(DrawablePtr pDrawable, GCPtr pGC, int shape,
+ int mode, int count, DDXPointPtr ptsIn);
+ void (*PolyFillArcSolid)(DrawablePtr pDraw, GCPtr pGC, int narcs,
+ xArc *parcs);
+ void (*PutImage)(DrawablePtr pDraw, GCPtr pGC, int depth, int x, int y,
+ int w, int h, int leftPad, int format, char *pImage);
+ ValidateGCProcPtr ValidateFillSpans;
+ ValidateGCProcPtr ValidateSetSpans;
+ ValidateGCProcPtr ValidatePutImage;
+ ValidateGCProcPtr ValidateCopyArea;
+ ValidateGCProcPtr ValidateCopyPlane;
+ ValidateGCProcPtr ValidatePolyPoint;
+ ValidateGCProcPtr ValidatePolylines;
+ ValidateGCProcPtr ValidatePolySegment;
+ ValidateGCProcPtr ValidatePolyRectangle;
+ ValidateGCProcPtr ValidatePolyArc;
+ ValidateGCProcPtr ValidateFillPolygon;
+ ValidateGCProcPtr ValidatePolyFillRect;
+ ValidateGCProcPtr ValidatePolyFillArc;
+ ValidateGCProcPtr ValidatePolyText8;
+ ValidateGCProcPtr ValidatePolyText16;
+ ValidateGCProcPtr ValidateImageText8;
+ ValidateGCProcPtr ValidateImageText16;
+ ValidateGCProcPtr ValidatePolyGlyphBlt;
+ ValidateGCProcPtr ValidateImageGlyphBlt;
+ ValidateGCProcPtr ValidatePushPixels;
+ void (*ComputeDash)(GCPtr pGC);
+ void (*InitPixmapCache)(ScreenPtr pScreen, RegionPtr areas, pointer data);
+ void (*ClosePixmapCache)(ScreenPtr pScreen);
+ int (*StippledFillChooser)(GCPtr pGC);
+ int (*OpaqueStippledFillChooser)(GCPtr pGC);
+ int (*TiledFillChooser)(GCPtr pGC);
+ XAACacheInfoPtr (*CacheTile)(ScrnInfoPtr Scrn, PixmapPtr pPix);
+ XAACacheInfoPtr (*CacheStipple)(ScrnInfoPtr Scrn, PixmapPtr pPix, int fg,
+ int bg);
+ XAACacheInfoPtr (*CacheMonoStipple)(ScrnInfoPtr Scrn, PixmapPtr pPix);
+ XAACacheInfoPtr (*CacheMono8x8Pattern)(ScrnInfoPtr Scrn, int pat0,
+ int pat1);
+ XAACacheInfoPtr (*CacheColor8x8Pattern)(ScrnInfoPtr Scrn, PixmapPtr pPix,
+ int fg, int bg);
+ void (*WriteBitmapToCache) (ScrnInfoPtr pScrn, int x, int y, int w, int h,
+ unsigned char *src, int srcwidth, int fg,
+ int bg);
+ void (*WritePixmapToCache) (ScrnInfoPtr pScrn, int x, int y, int w, int h,
+ unsigned char *src, int srcwidth, int bpp,
+ int depth);
+ void (*WriteMono8x8PatternToCache)(ScrnInfoPtr pScrn,
+ XAACacheInfoPtr pCache);
+ void (*WriteColor8x8PatternToCache)(ScrnInfoPtr pScrn, PixmapPtr pPix,
+ XAACacheInfoPtr pCache);
+ GetImageProcPtr GetImage;
+ GetSpansProcPtr GetSpans;
+ PaintWindowBackgroundProcPtr PaintWindowBackground;
+ PaintWindowBorderProcPtr PaintWindowBorder;
+ CopyWindowProcPtr CopyWindow;
+ BackingStoreSaveAreasProcPtr SaveAreas;
+ BackingStoreRestoreAreasProcPtr RestoreAreas;
+} XAAStateWrapRec, *XAAStateWrapPtr;
+
+static int XAAStateIndex = -1;
+static unsigned long XAAStateGeneration = 0;
+
+/* Wrap functions start here */
+#define GET_STATEPRIV_GC(pGC) XAAStateWrapPtr pStatePriv =\
+(XAAStateWrapPtr)(pGC->pScreen->devPrivates[XAAStateIndex].ptr)
+
+#define GET_STATEPRIV_SCREEN(pScreen) XAAStateWrapPtr pStatePriv =\
+(XAAStateWrapPtr)(pScreen->devPrivates[XAAStateIndex].ptr)
+
+#define GET_STATEPRIV_PSCRN(pScrn) XAAStateWrapPtr pStatePriv =\
+(XAAStateWrapPtr)(pScrn->pScreen->devPrivates[XAAStateIndex].ptr)
+
+#define STATE_CHECK_SP(pStatePriv) {\
+ ScrnInfoPtr pScrn = pStatePriv->pScrn;\
+ int i = 0;\
+ int need_change = 0;\
+ while(i < pScrn->numEntities) {\
+ if(xf86IsEntityShared(pScrn->entityList[i]) &&\
+ xf86GetLastScrnFlag(pScrn->entityList[i]) != pScrn->scrnIndex) {\
+ need_change = 1;\
+ xf86SetLastScrnFlag(pScrn->entityList[i],\
+ pScrn->scrnIndex);\
+ }\
+ i++;\
+ }\
+ if(need_change == 1) (*pStatePriv->RestoreAccelState)(pScrn);\
+}
+
+#define STATE_CHECK_PSCRN(pScrn) {\
+ int i = 0;\
+ int need_change = 0;\
+ while(i < pScrn->numEntities) {\
+ if(xf86IsEntityShared(pScrn->entityList[i]) &&\
+ xf86GetLastScrnFlag(pScrn->entityList[i]) != pScrn->scrnIndex) {\
+ need_change = 1;\
+ xf86SetLastScrnFlag(pScrn->entityList[i],\
+ pScrn->scrnIndex);\
+ }\
+ i++;\
+ }\
+ if(need_change == 1) (*pStatePriv->RestoreAccelState)(pScrn);\
+}
+
+static void XAAStateWrapSync(ScrnInfoPtr pScrn)
+{
+ GET_STATEPRIV_PSCRN(pScrn);
+ STATE_CHECK_PSCRN(pScrn);
+
+ (*pStatePriv->Sync)(pScrn);
+}
+
+static void XAAStateWrapSetupForScreenToScreenCopy(ScrnInfoPtr pScrn, int xdir, int ydir,
+ int rop, unsigned int planemask,
+ int trans_color)
+{
+ GET_STATEPRIV_PSCRN(pScrn);
+ STATE_CHECK_PSCRN(pScrn);
+
+ (*pStatePriv->SetupForScreenToScreenCopy)(pScrn, xdir, ydir, rop, planemask,
+ trans_color);
+}
+
+static void XAAStateWrapSetupForSolidFill(ScrnInfoPtr pScrn, int color, int rop,
+ unsigned int planemask)
+{
+ GET_STATEPRIV_PSCRN(pScrn);
+ STATE_CHECK_PSCRN(pScrn);
+
+ (*pStatePriv->SetupForSolidFill)(pScrn, color, rop, planemask);
+}
+
+static void XAAStateWrapSetupForSolidLine(ScrnInfoPtr pScrn,int color,int rop,
+ unsigned int planemask)
+{
+ GET_STATEPRIV_PSCRN(pScrn);
+ STATE_CHECK_PSCRN(pScrn);
+
+ (*pStatePriv->SetupForSolidLine)(pScrn, color, rop, planemask);
+}
+
+static void XAAStateWrapSetupForDashedLine(ScrnInfoPtr pScrn, int fg, int bg, int rop,
+ unsigned int planemask, int length,
+ unsigned char *pattern)
+{
+ GET_STATEPRIV_PSCRN(pScrn);
+ STATE_CHECK_PSCRN(pScrn);
+
+ (*pStatePriv->SetupForDashedLine)(pScrn, fg, bg, rop, planemask, length, pattern);
+}
+
+static void XAAStateWrapSetClippingRectangle(ScrnInfoPtr pScrn, int left, int top,
+ int right, int bottom)
+{
+ GET_STATEPRIV_PSCRN(pScrn);
+ STATE_CHECK_PSCRN(pScrn);
+
+ (*pStatePriv->SetClippingRectangle)(pScrn, left, top, right, bottom);
+}
+
+static void XAAStateWrapDisableClipping(ScrnInfoPtr pScrn)
+{
+ GET_STATEPRIV_PSCRN(pScrn);
+ STATE_CHECK_PSCRN(pScrn);
+
+ (*pStatePriv->DisableClipping)(pScrn);
+}
+
+static void XAAStateWrapSetupForMono8x8PatternFill(ScrnInfoPtr pScrn, int patx, int paty,
+ int fg, int bg, int rop,
+ unsigned int planemask)
+{
+ GET_STATEPRIV_PSCRN(pScrn);
+ STATE_CHECK_PSCRN(pScrn);
+
+ (*pStatePriv->SetupForMono8x8PatternFill)(pScrn, patx, paty, fg, bg, rop, planemask);
+}
+
+static void XAAStateWrapSetupForColor8x8PatternFill(ScrnInfoPtr pScrn, int patx, int paty,
+ int rop, unsigned int planemask,
+ int transparency_color)
+{
+ GET_STATEPRIV_PSCRN(pScrn);
+ STATE_CHECK_PSCRN(pScrn);
+
+ (*pStatePriv->SetupForColor8x8PatternFill)(pScrn, patx, paty, rop, planemask,
+ transparency_color);
+}
+
+static void XAAStateWrapSetupForCPUToScreenColorExpandFill(ScrnInfoPtr pScrn, int fg,
+ int bg, int rop,
+ unsigned int planemask)
+{
+ GET_STATEPRIV_PSCRN(pScrn);
+ STATE_CHECK_PSCRN(pScrn);
+
+ (*pStatePriv->SetupForCPUToScreenColorExpandFill)(pScrn, fg, bg, rop, planemask);
+}
+
+static void XAAStateWrapSetupForScanlineCPUToScreenColorExpandFill(ScrnInfoPtr pScrn,
+ int fg, int bg,
+ int rop,
+ unsigned int planemask)
+{
+ GET_STATEPRIV_PSCRN(pScrn);
+ STATE_CHECK_PSCRN(pScrn);
+
+ (*pStatePriv->SetupForScanlineCPUToScreenColorExpandFill)(pScrn, fg, bg, rop,
+ planemask);
+}
+
+static void XAAStateWrapSetupForScreenToScreenColorExpandFill(ScrnInfoPtr pScrn,
+ int fg, int bg, int rop,
+ unsigned int planemask)
+{
+ GET_STATEPRIV_PSCRN(pScrn);
+ STATE_CHECK_PSCRN(pScrn);
+
+ (*pStatePriv->SetupForScreenToScreenColorExpandFill)(pScrn, fg, bg, rop, planemask);
+}
+
+static void XAAStateWrapSetupForImageWrite(ScrnInfoPtr pScrn, int rop,
+ unsigned int planemask, int transparency_color,
+ int bpp, int depth)
+{
+ GET_STATEPRIV_PSCRN(pScrn);
+ STATE_CHECK_PSCRN(pScrn);
+
+ (*pStatePriv->SetupForImageWrite)(pScrn, rop, planemask, transparency_color, bpp,
+ depth);
+}
+
+static void XAAStateWrapSetupForScanlineImageWrite(ScrnInfoPtr pScrn, int rop,
+ unsigned int planemask,
+ int transparency_color,
+ int bpp, int depth)
+{
+ GET_STATEPRIV_PSCRN(pScrn);
+ STATE_CHECK_PSCRN(pScrn);
+
+ (*pStatePriv->SetupForScanlineImageWrite)(pScrn, rop, planemask, transparency_color,
+ bpp, depth);
+}
+
+static void XAAStateWrapSetupForImageRead(ScrnInfoPtr pScrn, int bpp, int depth)
+{
+ GET_STATEPRIV_PSCRN(pScrn);
+ STATE_CHECK_PSCRN(pScrn);
+
+ (*pStatePriv->SetupForImageRead)(pScrn, bpp, depth);
+}
+
+static void XAAStateWrapScreenToScreenBitBlt(ScrnInfoPtr pScrn, int nbox,
+ DDXPointPtr pptSrc, BoxPtr pbox, int xdir,
+ int ydir, int alu, unsigned int planmask)
+{
+ GET_STATEPRIV_PSCRN(pScrn);
+ STATE_CHECK_PSCRN(pScrn);
+
+ (*pStatePriv->ScreenToScreenBitBlt)(pScrn, nbox,
+ pptSrc, pbox, xdir,
+ ydir, alu, planmask);
+}
+
+static void XAAStateWrapWriteBitmap(ScrnInfoPtr pScrn, int x, int y, int w, int h,
+ unsigned char *src, int srcwidth, int skipleft,
+ int fg, int bg, int rop, unsigned int planemask)
+{
+ GET_STATEPRIV_PSCRN(pScrn);
+ STATE_CHECK_PSCRN(pScrn);
+
+ (*pStatePriv->WriteBitmap)(pScrn, x, y, w, h,
+ src, srcwidth, skipleft,
+ fg, bg, rop, planemask);
+}
+
+static void XAAStateWrapFillSolidRects(ScrnInfoPtr pScrn, int fg, int rop,
+ unsigned int planemask, int nBox, BoxPtr pBox)
+{
+ GET_STATEPRIV_PSCRN(pScrn);
+ STATE_CHECK_PSCRN(pScrn);
+
+ (*pStatePriv->FillSolidRects)(pScrn, fg, rop,
+ planemask, nBox, pBox);
+}
+
+static void XAAStateWrapFillMono8x8PatternRects(ScrnInfoPtr pScrn, int fg, int bg,
+ int rop, unsigned int planemask, int nBox,
+ BoxPtr pBox, int pat0, int pat1,
+ int xorg, int yorg)
+{
+ GET_STATEPRIV_PSCRN(pScrn);
+ STATE_CHECK_PSCRN(pScrn);
+
+ (*pStatePriv->FillMono8x8PatternRects)(pScrn, fg, bg,
+ rop, planemask, nBox,
+ pBox, pat0, pat1,
+ xorg, yorg);
+}
+
+static void XAAStateWrapFillColor8x8PatternRects(ScrnInfoPtr pScrn, int rop,
+ unsigned int planemask, int nBox,
+ BoxPtr pBox, int xorg, int yorg,
+ XAACacheInfoPtr pCache)
+{
+ GET_STATEPRIV_PSCRN(pScrn);
+ STATE_CHECK_PSCRN(pScrn);
+
+ (*pStatePriv->FillColor8x8PatternRects)(pScrn, rop,
+ planemask, nBox,
+ pBox, xorg, yorg,
+ pCache);
+}
+
+static void XAAStateWrapFillCacheBltRects(ScrnInfoPtr pScrn, int rop,
+ unsigned int planemask, int nBox, BoxPtr pBox,
+ int xorg, int yorg, XAACacheInfoPtr pCache)
+{
+ GET_STATEPRIV_PSCRN(pScrn);
+ STATE_CHECK_PSCRN(pScrn);
+
+ (*pStatePriv->FillCacheBltRects)(pScrn, rop,
+ planemask, nBox, pBox,
+ xorg, yorg, pCache);
+}
+
+static void XAAStateWrapFillColorExpandRects(ScrnInfoPtr pScrn, int fg, int bg, int rop,
+ unsigned int planemask, int nBox,
+ BoxPtr pBox, int xorg, int yorg,
+ PixmapPtr pPix)
+{
+ GET_STATEPRIV_PSCRN(pScrn);
+ STATE_CHECK_PSCRN(pScrn);
+
+ (*pStatePriv->FillColorExpandRects)(pScrn, fg, bg, rop,
+ planemask, nBox,
+ pBox, xorg, yorg,
+ pPix);
+}
+
+static void XAAStateWrapFillCacheExpandRects(ScrnInfoPtr pScrn, int fg, int bg, int rop,
+ unsigned int planemask, int nBox,
+ BoxPtr pBox, int xorg, int yorg,
+ PixmapPtr pPix)
+{
+ GET_STATEPRIV_PSCRN(pScrn);
+ STATE_CHECK_PSCRN(pScrn);
+
+ (*pStatePriv->FillCacheExpandRects)(pScrn, fg, bg, rop,
+ planemask, nBox,
+ pBox, xorg, yorg,
+ pPix);
+}
+
+static void XAAStateWrapFillImageWriteRects(ScrnInfoPtr pScrn, int rop,
+ unsigned int planemask, int nBox, BoxPtr pBox,
+ int xorg, int yorg, PixmapPtr pPix)
+{
+ GET_STATEPRIV_PSCRN(pScrn);
+ STATE_CHECK_PSCRN(pScrn);
+
+ (*pStatePriv->FillImageWriteRects)(pScrn, rop,
+ planemask, nBox, pBox,
+ xorg, yorg, pPix);
+}
+
+static void XAAStateWrapFillSolidSpans(ScrnInfoPtr pScrn, int fg, int rop,
+ unsigned int planemask, int n, DDXPointPtr points,
+ int *widths, int fSorted)
+{
+ GET_STATEPRIV_PSCRN(pScrn);
+ STATE_CHECK_PSCRN(pScrn);
+
+ (*pStatePriv->FillSolidSpans)(pScrn, fg, rop,
+ planemask, n, points,
+ widths, fSorted);
+}
+
+static void XAAStateWrapFillMono8x8PatternSpans(ScrnInfoPtr pScrn, int fg, int bg,
+ int rop, unsigned int planemask, int n,
+ DDXPointPtr points, int *widths,
+ int fSorted, int pat0, int pat1,
+ int xorg, int yorg)
+{
+ GET_STATEPRIV_PSCRN(pScrn);
+ STATE_CHECK_PSCRN(pScrn);
+
+ (*pStatePriv->FillMono8x8PatternSpans)(pScrn, fg, bg,
+ rop, planemask, n,
+ points, widths,
+ fSorted, pat0, pat1,
+ xorg, yorg);
+}
+
+static void XAAStateWrapFillColor8x8PatternSpans(ScrnInfoPtr pScrn, int rop,
+ unsigned int planemask, int n,
+ DDXPointPtr points, int *widths,
+ int fSorted, XAACacheInfoPtr pCache,
+ int xorg, int yorg)
+{
+ GET_STATEPRIV_PSCRN(pScrn);
+ STATE_CHECK_PSCRN(pScrn);
+
+ (*pStatePriv->FillColor8x8PatternSpans)(pScrn, rop,
+ planemask, n,
+ points, widths,
+ fSorted, pCache,
+ xorg, yorg);
+}
+
+static void XAAStateWrapFillCacheBltSpans(ScrnInfoPtr pScrn, int rop,
+ unsigned int planemask, int n,
+ DDXPointPtr points, int *widths,
+ int fSorted, XAACacheInfoPtr pCache,
+ int xorg, int yorg)
+{
+ GET_STATEPRIV_PSCRN(pScrn);
+ STATE_CHECK_PSCRN(pScrn);
+
+ (*pStatePriv->FillCacheBltSpans)(pScrn, rop,
+ planemask, n,
+ points, widths,
+ fSorted, pCache,
+ xorg, yorg);
+}
+
+static void XAAStateWrapFillColorExpandSpans(ScrnInfoPtr pScrn, int fg, int bg, int rop,
+ unsigned int planemask, int n,
+ DDXPointPtr points, int *widths, int fSorted,
+ int xorg, int yorg, PixmapPtr pPix)
+{
+ GET_STATEPRIV_PSCRN(pScrn);
+ STATE_CHECK_PSCRN(pScrn);
+
+ (*pStatePriv->FillColorExpandSpans)(pScrn, fg, bg, rop,
+ planemask, n,
+ points, widths, fSorted,
+ xorg, yorg, pPix);
+}
+
+static void XAAStateWrapFillCacheExpandSpans(ScrnInfoPtr pScrn, int fg, int bg, int rop,
+ unsigned int planemask, int n,
+ DDXPointPtr ppt, int *pwidth, int fSorted,
+ int xorg, int yorg, PixmapPtr pPix)
+{
+ GET_STATEPRIV_PSCRN(pScrn);
+ STATE_CHECK_PSCRN(pScrn);
+
+ (*pStatePriv->FillCacheExpandSpans)(pScrn, fg, bg, rop,
+ planemask, n,
+ ppt, pwidth, fSorted,
+ xorg, yorg, pPix);
+}
+
+static void XAAStateWrapTEGlyphRenderer(ScrnInfoPtr pScrn, int x, int y, int w, int h,
+ int skipleft, int startline,
+ unsigned int **glyphs,
+ int glyphWidth, int fg, int bg, int rop,
+ unsigned planemask)
+{
+ GET_STATEPRIV_PSCRN(pScrn);
+ STATE_CHECK_PSCRN(pScrn);
+
+ (*pStatePriv->TEGlyphRenderer)(pScrn, x, y, w, h,
+ skipleft, startline,
+ glyphs,
+ glyphWidth, fg, bg, rop,
+ planemask);
+}
+
+static void XAAStateWrapNonTEGlyphRenderer(ScrnInfoPtr pScrn, int x, int y, int n,
+ NonTEGlyphPtr glyphs, BoxPtr pbox,
+ int fg, int rop, unsigned int planemask)
+{
+ GET_STATEPRIV_PSCRN(pScrn);
+ STATE_CHECK_PSCRN(pScrn);
+
+ (*pStatePriv->NonTEGlyphRenderer)(pScrn, x, y, n,
+ glyphs, pbox,
+ fg, rop, planemask);
+}
+
+static void XAAStateWrapWritePixmap(ScrnInfoPtr pScrn, int x, int y, int w, int h,
+ unsigned char *src, int srcwidth, int rop,
+ unsigned int planemask, int transparency_color,
+ int bpp, int depth)
+{
+ GET_STATEPRIV_PSCRN(pScrn);
+ STATE_CHECK_PSCRN(pScrn);
+
+ (*pStatePriv->WritePixmap)(pScrn, x, y, w, h,
+ src, srcwidth, rop,
+ planemask, transparency_color,
+ bpp, depth);
+}
+
+static void XAAStateWrapReadPixmap(ScrnInfoPtr pScrn, int x, int y, int w, int h,
+ unsigned char *dst, int dstwidth, int bpp, int depth)
+{
+ GET_STATEPRIV_PSCRN(pScrn);
+ STATE_CHECK_PSCRN(pScrn);
+
+ (*pStatePriv->ReadPixmap)(pScrn, x, y, w, h,
+ dst, dstwidth, bpp, depth);
+}
+
+static RegionPtr XAAStateWrapCopyArea(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable,
+ GC *pGC, int srcx, int srcy, int width, int height,
+ int dstx, int dsty)
+{
+ GET_STATEPRIV_GC(pGC);
+ STATE_CHECK_SP(pStatePriv);
+
+ return (*pStatePriv->CopyArea)(pSrcDrawable, pDstDrawable,
+ pGC, srcx, srcy, width, height,
+ dstx, dsty);
+}
+
+static RegionPtr XAAStateWrapCopyPlane(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC,
+ int srcx, int srcy, int width, int height,
+ int dstx, int dsty, unsigned long bitPlane)
+{
+ GET_STATEPRIV_GC(pGC);
+ STATE_CHECK_SP(pStatePriv);
+
+ return (*pStatePriv->CopyPlane)(pSrc, pDst, pGC,
+ srcx, srcy, width, height,
+ dstx, dsty, bitPlane);
+}
+
+static void XAAStateWrapPushPixelsSolid(GCPtr pGC, PixmapPtr pBitMap,
+ DrawablePtr pDrawable, int dx, int dy, int xOrg,
+ int yOrg)
+{
+ GET_STATEPRIV_GC(pGC);
+ STATE_CHECK_SP(pStatePriv);
+
+ (*pStatePriv->PushPixelsSolid)(pGC, pBitMap,
+ pDrawable, dx, dy, xOrg,
+ yOrg);
+}
+
+static void XAAStateWrapPolyFillRectSolid(DrawablePtr pDraw, GCPtr pGC, int nrectFill,
+ xRectangle *prectInit)
+{
+ GET_STATEPRIV_GC(pGC);
+ STATE_CHECK_SP(pStatePriv);
+
+ (*pStatePriv->PolyFillRectSolid)(pDraw, pGC, nrectFill,
+ prectInit);
+}
+
+static void XAAStateWrapPolyFillRectStippled(DrawablePtr pDraw, GCPtr pGC, int nrectFill,
+ xRectangle *prectInit)
+{
+ GET_STATEPRIV_GC(pGC);
+ STATE_CHECK_SP(pStatePriv);
+
+ (*pStatePriv->PolyFillRectStippled)(pDraw, pGC, nrectFill,
+ prectInit);
+}
+
+static void XAAStateWrapPolyFillRectOpaqueStippled(DrawablePtr pDraw, GCPtr pGC,
+ int nrectFill, xRectangle *prectInit)
+{
+ GET_STATEPRIV_GC(pGC);
+ STATE_CHECK_SP(pStatePriv);
+
+ (*pStatePriv->PolyFillRectOpaqueStippled)(pDraw, pGC,
+ nrectFill, prectInit);
+}
+
+static void XAAStateWrapPolyFillRectTiled(DrawablePtr pDraw, GCPtr pGC, int nrectFill,
+ xRectangle *prectInit)
+{
+ GET_STATEPRIV_GC(pGC);
+ STATE_CHECK_SP(pStatePriv);
+
+ (*pStatePriv->PolyFillRectTiled)(pDraw, pGC, nrectFill,
+ prectInit);
+}
+
+static void XAAStateWrapFillSpansSolid(DrawablePtr pDraw, GCPtr pGC, int nInit,
+ DDXPointPtr ppt, int *pwidth, int fSorted)
+{
+ GET_STATEPRIV_GC(pGC);
+ STATE_CHECK_SP(pStatePriv);
+
+ (*pStatePriv->FillSpansSolid)(pDraw, pGC, nInit,
+ ppt, pwidth, fSorted);
+}
+
+static void XAAStateWrapFillSpansStippled(DrawablePtr pDraw, GCPtr pGC, int nInit,
+ DDXPointPtr ppt, int *pwidth, int fSorted)
+{
+ GET_STATEPRIV_GC(pGC);
+ STATE_CHECK_SP(pStatePriv);
+
+ (*pStatePriv->FillSpansStippled)(pDraw, pGC, nInit,
+ ppt, pwidth, fSorted);
+}
+
+static void XAAStateWrapFillSpansOpaqueStippled(DrawablePtr pDraw, GCPtr pGC, int nInit,
+ DDXPointPtr ppt, int *pwidth, int fSorted)
+{
+ GET_STATEPRIV_GC(pGC);
+ STATE_CHECK_SP(pStatePriv);
+
+ (*pStatePriv->FillSpansOpaqueStippled)(pDraw, pGC, nInit,
+ ppt, pwidth, fSorted);
+}
+
+static void XAAStateWrapFillSpansTiled(DrawablePtr pDraw, GCPtr pGC, int nInit,
+ DDXPointPtr ppt, int *pwidth, int fSorted)
+{
+ GET_STATEPRIV_GC(pGC);
+ STATE_CHECK_SP(pStatePriv);
+
+ (*pStatePriv->FillSpansTiled)(pDraw, pGC, nInit,
+ ppt, pwidth, fSorted);
+}
+
+static int XAAStateWrapPolyText8TE(DrawablePtr pDraw, GCPtr pGC, int x, int y, int count,
+ char *chars)
+{
+ GET_STATEPRIV_GC(pGC);
+ STATE_CHECK_SP(pStatePriv);
+
+ return (*pStatePriv->PolyText8TE)(pDraw, pGC, x, y, count,
+ chars);
+}
+
+static int XAAStateWrapPolyText16TE(DrawablePtr pDraw, GCPtr pGC, int x, int y, int count,
+ unsigned short *chars)
+{
+ GET_STATEPRIV_GC(pGC);
+ STATE_CHECK_SP(pStatePriv);
+
+ return (*pStatePriv->PolyText16TE)(pDraw, pGC, x, y, count,
+ chars);
+}
+
+static void XAAStateWrapImageText8TE(DrawablePtr pDraw, GCPtr pGC, int x, int y,
+ int count, char *chars)
+{
+ GET_STATEPRIV_GC(pGC);
+ STATE_CHECK_SP(pStatePriv);
+
+ (*pStatePriv->ImageText8TE)(pDraw, pGC, x, y,
+ count, chars);
+}
+
+static void XAAStateWrapImageText16TE(DrawablePtr pDraw, GCPtr pGC, int x, int y,
+ int count, unsigned short *chars)
+{
+ GET_STATEPRIV_GC(pGC);
+ STATE_CHECK_SP(pStatePriv);
+
+ (*pStatePriv->ImageText16TE)(pDraw, pGC, x, y,
+ count, chars);
+}
+
+static void XAAStateWrapImageGlyphBltTE(DrawablePtr pDrawable, GCPtr pGC, int xInit,
+ int yInit, unsigned int nglyph, CharInfoPtr *ppci,
+ pointer pglyphBase)
+{
+ GET_STATEPRIV_GC(pGC);
+ STATE_CHECK_SP(pStatePriv);
+
+ (*pStatePriv->ImageGlyphBltTE)(pDrawable, pGC, xInit,
+ yInit, nglyph, ppci,
+ pglyphBase);
+}
+
+static void XAAStateWrapPolyGlyphBltTE(DrawablePtr pDrawable, GCPtr pGC, int xInit,
+ int yInit, unsigned int nglyph, CharInfoPtr *ppci,
+ pointer pglyphBase)
+{
+ GET_STATEPRIV_GC(pGC);
+ STATE_CHECK_SP(pStatePriv);
+
+ (*pStatePriv->PolyGlyphBltTE)(pDrawable, pGC, xInit,
+ yInit, nglyph, ppci,
+ pglyphBase);
+}
+
+static int XAAStateWrapPolyText8NonTE(DrawablePtr pDraw, GCPtr pGC, int x, int y,
+ int count, char *chars)
+{
+ GET_STATEPRIV_GC(pGC);
+ STATE_CHECK_SP(pStatePriv);
+
+ return (*pStatePriv->PolyText8NonTE)(pDraw, pGC, x, y,
+ count, chars);
+}
+
+static int XAAStateWrapPolyText16NonTE(DrawablePtr pDraw, GCPtr pGC, int x, int y,
+ int count, unsigned short *chars)
+{
+ GET_STATEPRIV_GC(pGC);
+ STATE_CHECK_SP(pStatePriv);
+
+ return (*pStatePriv->PolyText16NonTE)(pDraw, pGC, x, y,
+ count, chars);
+}
+
+static void XAAStateWrapImageText8NonTE(DrawablePtr pDraw, GCPtr pGC, int x, int y,
+ int count, char *chars)
+{
+ GET_STATEPRIV_GC(pGC);
+ STATE_CHECK_SP(pStatePriv);
+
+ (*pStatePriv->ImageText8NonTE)(pDraw, pGC, x, y,
+ count, chars);
+}
+
+static void XAAStateWrapImageText16NonTE(DrawablePtr pDraw, GCPtr pGC, int x, int y,
+ int count, unsigned short *chars)
+{
+ GET_STATEPRIV_GC(pGC);
+ STATE_CHECK_SP(pStatePriv);
+
+ (*pStatePriv->ImageText16NonTE)(pDraw, pGC, x, y,
+ count, chars);
+}
+
+static void XAAStateWrapImageGlyphBltNonTE(DrawablePtr pDrawable, GCPtr pGC, int xInit,
+ int yInit, unsigned int nglyph,
+ CharInfoPtr *ppci, pointer pglyphBase)
+{
+ GET_STATEPRIV_GC(pGC);
+ STATE_CHECK_SP(pStatePriv);
+
+ (*pStatePriv->ImageGlyphBltNonTE)(pDrawable, pGC, xInit,
+ yInit, nglyph,
+ ppci, pglyphBase);
+}
+
+static void XAAStateWrapPolyGlyphBltNonTE(DrawablePtr pDrawable, GCPtr pGC, int xInit,
+ int yInit, unsigned int nglyph,
+ CharInfoPtr *ppci, pointer pglyphBase)
+{
+ GET_STATEPRIV_GC(pGC);
+ STATE_CHECK_SP(pStatePriv);
+
+ (*pStatePriv->PolyGlyphBltNonTE)(pDrawable, pGC, xInit,
+ yInit, nglyph,
+ ppci, pglyphBase);
+}
+
+static void XAAStateWrapPolyRectangleThinSolid(DrawablePtr pDrawable,GCPtr pGC,
+ int nRectsInit, xRectangle *pRectsInit)
+{
+ GET_STATEPRIV_GC(pGC);
+ STATE_CHECK_SP(pStatePriv);
+
+ (*pStatePriv->PolyRectangleThinSolid)(pDrawable, pGC,
+ nRectsInit, pRectsInit);
+}
+
+static void XAAStateWrapPolylinesWideSolid(DrawablePtr pDrawable, GCPtr pGC, int mode,
+ int npt, DDXPointPtr pPts)
+{
+ GET_STATEPRIV_GC(pGC);
+ STATE_CHECK_SP(pStatePriv);
+
+ (*pStatePriv->PolylinesWideSolid)(pDrawable, pGC, mode,
+ npt, pPts);
+}
+
+static void XAAStateWrapPolylinesThinSolid(DrawablePtr pDrawable, GCPtr pGC, int mode,
+ int npt, DDXPointPtr pPts)
+{
+ GET_STATEPRIV_GC(pGC);
+ STATE_CHECK_SP(pStatePriv);
+
+ (*pStatePriv->PolylinesThinSolid)(pDrawable, pGC, mode,
+ npt, pPts);
+}
+
+static void XAAStateWrapPolySegmentThinSolid(DrawablePtr pDrawable, GCPtr pGC, int nseg,
+ xSegment *pSeg)
+{
+ GET_STATEPRIV_GC(pGC);
+ STATE_CHECK_SP(pStatePriv);
+
+ (*pStatePriv->PolySegmentThinSolid)(pDrawable, pGC, nseg,
+ pSeg);
+}
+
+static void XAAStateWrapPolylinesThinDashed(DrawablePtr pDrawable, GCPtr pGC, int mode,
+ int npt, DDXPointPtr pPts)
+{
+ GET_STATEPRIV_GC(pGC);
+ STATE_CHECK_SP(pStatePriv);
+
+ (*pStatePriv->PolylinesThinDashed)(pDrawable, pGC, mode,
+ npt, pPts);
+}
+
+static void XAAStateWrapPolySegmentThinDashed(DrawablePtr pDrawable, GCPtr pGC, int nseg,
+ xSegment *pSeg)
+{
+ GET_STATEPRIV_GC(pGC);
+ STATE_CHECK_SP(pStatePriv);
+
+ (*pStatePriv->PolySegmentThinDashed)(pDrawable, pGC, nseg,
+ pSeg);
+}
+
+static void XAAStateWrapFillPolygonSolid(DrawablePtr pDrawable, GCPtr pGC, int shape,
+ int mode, int count, DDXPointPtr ptsIn)
+{
+ GET_STATEPRIV_GC(pGC);
+ STATE_CHECK_SP(pStatePriv);
+
+ (*pStatePriv->FillPolygonSolid)(pDrawable, pGC, shape,
+ mode, count, ptsIn);
+}
+
+static void XAAStateWrapFillPolygonStippled(DrawablePtr pDrawable, GCPtr pGC, int shape,
+ int mode, int count, DDXPointPtr ptsIn)
+{
+ GET_STATEPRIV_GC(pGC);
+ STATE_CHECK_SP(pStatePriv);
+
+ (*pStatePriv->FillPolygonStippled)(pDrawable, pGC, shape,
+ mode, count, ptsIn);
+}
+
+static void XAAStateWrapFillPolygonOpaqueStippled(DrawablePtr pDrawable, GCPtr pGC,
+ int shape, int mode, int count,
+ DDXPointPtr ptsIn)
+{
+ GET_STATEPRIV_GC(pGC);
+ STATE_CHECK_SP(pStatePriv);
+
+ (*pStatePriv->FillPolygonOpaqueStippled)(pDrawable, pGC,
+ shape, mode, count,
+ ptsIn);
+}
+
+static void XAAStateWrapFillPolygonTiled(DrawablePtr pDrawable, GCPtr pGC, int shape,
+ int mode, int count, DDXPointPtr ptsIn)
+{
+ GET_STATEPRIV_GC(pGC);
+ STATE_CHECK_SP(pStatePriv);
+
+ (*pStatePriv->FillPolygonTiled)(pDrawable, pGC, shape,
+ mode, count, ptsIn);
+}
+
+static void XAAStateWrapPolyFillArcSolid(DrawablePtr pDraw, GCPtr pGC, int narcs,
+ xArc *parcs)
+{
+ GET_STATEPRIV_GC(pGC);
+ STATE_CHECK_SP(pStatePriv);
+
+ (*pStatePriv->PolyFillArcSolid)(pDraw, pGC, narcs,
+ parcs);
+}
+
+static void XAAStateWrapPutImage(DrawablePtr pDraw, GCPtr pGC, int depth, int x, int y,
+ int w, int h, int leftPad, int format, char *pImage)
+{
+ GET_STATEPRIV_GC(pGC);
+ STATE_CHECK_SP(pStatePriv);
+
+ (*pStatePriv->PutImage)(pDraw, pGC, depth, x, y,
+ w, h, leftPad, format, pImage);
+}
+
+static void XAAStateWrapValidateFillSpans(GCPtr pGC, unsigned long changes,
+ DrawablePtr pDraw)
+{
+ GET_STATEPRIV_GC(pGC);
+ STATE_CHECK_SP(pStatePriv);
+
+ (*pStatePriv->ValidateFillSpans)(pGC, changes,
+ pDraw);
+}
+
+static void XAAStateWrapValidateSetSpans(GCPtr pGC, unsigned long changes,
+ DrawablePtr pDraw)
+{
+ GET_STATEPRIV_GC(pGC);
+ STATE_CHECK_SP(pStatePriv);
+
+ (*pStatePriv->ValidateSetSpans)(pGC, changes,
+ pDraw);
+}
+
+static void XAAStateWrapValidatePutImage(GCPtr pGC, unsigned long changes,
+ DrawablePtr pDraw)
+{
+ GET_STATEPRIV_GC(pGC);
+ STATE_CHECK_SP(pStatePriv);
+
+ (*pStatePriv->ValidatePutImage)(pGC, changes,
+ pDraw);
+}
+
+static void XAAStateWrapValidateCopyArea(GCPtr pGC, unsigned long changes,
+ DrawablePtr pDraw)
+{
+ GET_STATEPRIV_GC(pGC);
+ STATE_CHECK_SP(pStatePriv);
+
+ (*pStatePriv->ValidateCopyArea)(pGC, changes,
+ pDraw);
+}
+
+static void XAAStateWrapValidateCopyPlane(GCPtr pGC, unsigned long changes,
+ DrawablePtr pDraw)
+{
+ GET_STATEPRIV_GC(pGC);
+ STATE_CHECK_SP(pStatePriv);
+
+ (*pStatePriv->ValidateCopyPlane)(pGC, changes,
+ pDraw);
+}
+
+static void XAAStateWrapValidatePolyPoint(GCPtr pGC, unsigned long changes,
+ DrawablePtr pDraw)
+{
+ GET_STATEPRIV_GC(pGC);
+ STATE_CHECK_SP(pStatePriv);
+
+ (*pStatePriv->ValidatePolyPoint)(pGC, changes,
+ pDraw);
+}
+
+static void XAAStateWrapValidatePolylines(GCPtr pGC, unsigned long changes,
+ DrawablePtr pDraw)
+{
+ GET_STATEPRIV_GC(pGC);
+ STATE_CHECK_SP(pStatePriv);
+
+ (*pStatePriv->ValidatePolylines)(pGC, changes,
+ pDraw);
+}
+
+static void XAAStateWrapValidatePolySegment(GCPtr pGC, unsigned long changes,
+ DrawablePtr pDraw)
+{
+ GET_STATEPRIV_GC(pGC);
+ STATE_CHECK_SP(pStatePriv);
+
+ (*pStatePriv->ValidatePolySegment)(pGC, changes,
+ pDraw);
+}
+
+static void XAAStateWrapValidatePolyRectangle(GCPtr pGC, unsigned long changes,
+ DrawablePtr pDraw)
+{
+ GET_STATEPRIV_GC(pGC);
+ STATE_CHECK_SP(pStatePriv);
+
+ (*pStatePriv->ValidatePolyRectangle)(pGC, changes,
+ pDraw);
+}
+
+static void XAAStateWrapValidatePolyArc(GCPtr pGC, unsigned long changes,
+ DrawablePtr pDraw)
+{
+ GET_STATEPRIV_GC(pGC);
+ STATE_CHECK_SP(pStatePriv);
+
+ (*pStatePriv->ValidatePolyArc)(pGC, changes,
+ pDraw);
+}
+
+static void XAAStateWrapValidateFillPolygon(GCPtr pGC, unsigned long changes,
+ DrawablePtr pDraw)
+{
+ GET_STATEPRIV_GC(pGC);
+ STATE_CHECK_SP(pStatePriv);
+
+ (*pStatePriv->ValidateFillPolygon)(pGC, changes,
+ pDraw);
+}
+
+static void XAAStateWrapValidatePolyFillRect(GCPtr pGC, unsigned long changes,
+ DrawablePtr pDraw)
+{
+ GET_STATEPRIV_GC(pGC);
+ STATE_CHECK_SP(pStatePriv);
+
+ (*pStatePriv->ValidatePolyFillRect)(pGC, changes,
+ pDraw);
+}
+
+static void XAAStateWrapValidatePolyFillArc(GCPtr pGC, unsigned long changes,
+ DrawablePtr pDraw)
+{
+ GET_STATEPRIV_GC(pGC);
+ STATE_CHECK_SP(pStatePriv);
+
+ (*pStatePriv->ValidatePolyFillArc)(pGC, changes,
+ pDraw);
+}
+
+static void XAAStateWrapValidatePolyText8(GCPtr pGC, unsigned long changes,
+ DrawablePtr pDraw)
+{
+ GET_STATEPRIV_GC(pGC);
+ STATE_CHECK_SP(pStatePriv);
+
+ (*pStatePriv->ValidatePolyText8)(pGC, changes,
+ pDraw);
+}
+
+static void XAAStateWrapValidatePolyText16(GCPtr pGC, unsigned long changes,
+ DrawablePtr pDraw)
+{
+ GET_STATEPRIV_GC(pGC);
+ STATE_CHECK_SP(pStatePriv);
+
+ (*pStatePriv->ValidatePolyText16)(pGC, changes,
+ pDraw);
+}
+
+static void XAAStateWrapValidateImageText8(GCPtr pGC, unsigned long changes,
+ DrawablePtr pDraw)
+{
+ GET_STATEPRIV_GC(pGC);
+ STATE_CHECK_SP(pStatePriv);
+
+ (*pStatePriv->ValidateImageText8)(pGC, changes,
+ pDraw);
+}
+
+static void XAAStateWrapValidateImageText16(GCPtr pGC, unsigned long changes,
+ DrawablePtr pDraw)
+{
+ GET_STATEPRIV_GC(pGC);
+ STATE_CHECK_SP(pStatePriv);
+
+ (*pStatePriv->ValidateImageText16)(pGC, changes,
+ pDraw);
+}
+
+static void XAAStateWrapValidatePolyGlyphBlt(GCPtr pGC, unsigned long changes,
+ DrawablePtr pDraw)
+{
+ GET_STATEPRIV_GC(pGC);
+ STATE_CHECK_SP(pStatePriv);
+
+ (*pStatePriv->ValidatePolyGlyphBlt)(pGC, changes,
+ pDraw);
+}
+
+static void XAAStateWrapValidateImageGlyphBlt(GCPtr pGC, unsigned long changes,
+ DrawablePtr pDraw)
+{
+ GET_STATEPRIV_GC(pGC);
+ STATE_CHECK_SP(pStatePriv);
+ (*pStatePriv->ValidateImageGlyphBlt)(pGC, changes,
+ pDraw);
+}
+
+static void XAAStateWrapValidatePushPixels(GCPtr pGC, unsigned long changes,
+ DrawablePtr pDraw)
+{
+ GET_STATEPRIV_GC(pGC);
+ STATE_CHECK_SP(pStatePriv);
+
+ (*pStatePriv->ValidatePushPixels)(pGC, changes,
+ pDraw);
+}
+
+static void XAAStateWrapComputeDash(GCPtr pGC)
+{
+ GET_STATEPRIV_GC(pGC);
+ STATE_CHECK_SP(pStatePriv);
+
+ (*pStatePriv->ComputeDash)(pGC);
+}
+
+static void XAAStateWrapInitPixmapCache(ScreenPtr pScreen, RegionPtr areas,
+ pointer data)
+{
+ GET_STATEPRIV_SCREEN(pScreen);
+ STATE_CHECK_SP(pStatePriv);
+
+ (*pStatePriv->InitPixmapCache)(pScreen, areas,
+ data);
+}
+
+static void XAAStateWrapClosePixmapCache(ScreenPtr pScreen)
+{
+ GET_STATEPRIV_SCREEN(pScreen);
+ STATE_CHECK_SP(pStatePriv);
+
+ (*pStatePriv->ClosePixmapCache)(pScreen);
+}
+
+static int XAAStateWrapStippledFillChooser(GCPtr pGC)
+{
+ GET_STATEPRIV_GC(pGC);
+ STATE_CHECK_SP(pStatePriv);
+
+ return (*pStatePriv->StippledFillChooser)(pGC);
+}
+
+static int XAAStateWrapOpaqueStippledFillChooser(GCPtr pGC)
+{
+ GET_STATEPRIV_GC(pGC);
+ STATE_CHECK_SP(pStatePriv);
+
+ return (*pStatePriv->OpaqueStippledFillChooser)(pGC);
+}
+
+static int XAAStateWrapTiledFillChooser(GCPtr pGC)
+{
+ GET_STATEPRIV_GC(pGC);
+ STATE_CHECK_SP(pStatePriv);
+
+ return (*pStatePriv->TiledFillChooser)(pGC);
+}
+
+static XAACacheInfoPtr XAAStateWrapCacheTile(ScrnInfoPtr pScrn, PixmapPtr pPix)
+{
+ GET_STATEPRIV_PSCRN(pScrn);
+ STATE_CHECK_PSCRN(pScrn);
+
+ return (*pStatePriv->CacheTile)(pScrn, pPix);
+}
+
+static XAACacheInfoPtr XAAStateWrapCacheStipple(ScrnInfoPtr pScrn, PixmapPtr pPix, int fg,
+ int bg)
+{
+ GET_STATEPRIV_PSCRN(pScrn);
+ STATE_CHECK_PSCRN(pScrn);
+
+ return (*pStatePriv->CacheStipple)(pScrn, pPix, fg,
+ bg);
+}
+
+static XAACacheInfoPtr XAAStateWrapCacheMonoStipple(ScrnInfoPtr pScrn, PixmapPtr pPix)
+{
+ GET_STATEPRIV_PSCRN(pScrn);
+ STATE_CHECK_PSCRN(pScrn);
+
+ return (*pStatePriv->CacheMonoStipple)(pScrn, pPix);
+}
+
+static XAACacheInfoPtr XAAStateWrapCacheMono8x8Pattern(ScrnInfoPtr pScrn, int pat0,
+ int pat1)
+{
+ GET_STATEPRIV_PSCRN(pScrn);
+ STATE_CHECK_PSCRN(pScrn);
+
+ return (*pStatePriv->CacheMono8x8Pattern)(pScrn, pat0,
+ pat1);
+}
+
+static XAACacheInfoPtr XAAStateWrapCacheColor8x8Pattern(ScrnInfoPtr pScrn, PixmapPtr pPix,
+ int fg, int bg)
+{
+ GET_STATEPRIV_PSCRN(pScrn);
+ STATE_CHECK_PSCRN(pScrn);
+
+ return (*pStatePriv->CacheColor8x8Pattern)(pScrn, pPix,
+ fg, bg);
+}
+
+static void XAAStateWrapWriteBitmapToCache(ScrnInfoPtr pScrn, int x, int y, int w, int h,
+ unsigned char *src, int srcwidth, int fg,
+ int bg)
+{
+ GET_STATEPRIV_PSCRN(pScrn);
+ STATE_CHECK_PSCRN(pScrn);
+
+ (*pStatePriv->WriteBitmapToCache)(pScrn, x, y, w, h,
+ src, srcwidth, fg,
+ bg);
+}
+
+static void XAAStateWrapWritePixmapToCache(ScrnInfoPtr pScrn, int x, int y, int w, int h,
+ unsigned char *src, int srcwidth, int bpp,
+ int depth)
+{
+ GET_STATEPRIV_PSCRN(pScrn);
+ STATE_CHECK_PSCRN(pScrn);
+
+ (*pStatePriv->WritePixmapToCache)(pScrn, x, y, w, h,
+ src, srcwidth, bpp,
+ depth);
+}
+
+static void XAAStateWrapWriteMono8x8PatternToCache(ScrnInfoPtr pScrn,
+ XAACacheInfoPtr pCache)
+{
+ GET_STATEPRIV_PSCRN(pScrn);
+ STATE_CHECK_PSCRN(pScrn);
+
+ (*pStatePriv->WriteMono8x8PatternToCache)(pScrn,
+ pCache);
+}
+
+static void XAAStateWrapWriteColor8x8PatternToCache(ScrnInfoPtr pScrn, PixmapPtr pPix,
+ XAACacheInfoPtr pCache)
+{
+ GET_STATEPRIV_PSCRN(pScrn);
+ STATE_CHECK_PSCRN(pScrn);
+
+ (*pStatePriv->WriteColor8x8PatternToCache)(pScrn, pPix,
+ pCache);
+}
+
+static void XAAStateWrapGetImage(DrawablePtr pDrawable, int sx, int sy, int w, int h,
+ unsigned int format,unsigned long planeMask,
+ char *pdstLine)
+{
+ GET_STATEPRIV_SCREEN(pDrawable->pScreen);
+ STATE_CHECK_SP(pStatePriv);
+
+ (*pStatePriv->GetImage)(pDrawable, sx, sy, w, h,
+ format, planeMask,
+ pdstLine);
+}
+
+static void XAAStateWrapGetSpans(DrawablePtr pDrawable, int wMax, DDXPointPtr ppt,
+ int *pwidth, int nspans, char *pdstStart)
+{
+ GET_STATEPRIV_SCREEN(pDrawable->pScreen);
+ STATE_CHECK_SP(pStatePriv);
+
+ (*pStatePriv->GetSpans)(pDrawable, wMax, ppt,
+ pwidth, nspans, pdstStart);
+}
+
+static void XAAStateWrapPaintWindowBackground(WindowPtr pWindow, RegionPtr pRegion,
+ int what)
+{
+ GET_STATEPRIV_SCREEN(pWindow->drawable.pScreen);
+ STATE_CHECK_SP(pStatePriv);
+
+ (*pStatePriv->PaintWindowBackground)(pWindow, pRegion,
+ what);
+}
+
+static void XAAStateWrapPaintWindowBorder(WindowPtr pWindow, RegionPtr pRegion,
+ int what)
+{
+ GET_STATEPRIV_SCREEN(pWindow->drawable.pScreen);
+ STATE_CHECK_SP(pStatePriv);
+
+ (*pStatePriv->PaintWindowBorder)(pWindow, pRegion,
+ what);
+}
+
+static void XAAStateWrapCopyWindow(WindowPtr pWindow, DDXPointRec ptOldOrg,
+ RegionPtr prgnSrc)
+{
+ GET_STATEPRIV_SCREEN(pWindow->drawable.pScreen);
+ STATE_CHECK_SP(pStatePriv);
+
+ (*pStatePriv->CopyWindow)(pWindow, ptOldOrg,
+ prgnSrc);
+}
+
+static void XAAStateWrapSaveAreas(PixmapPtr pBackingPixmap, RegionPtr pObscured, int x,
+ int y, WindowPtr pWin)
+{
+ GET_STATEPRIV_SCREEN(pBackingPixmap->drawable.pScreen);
+ STATE_CHECK_SP(pStatePriv);
+
+ (*pStatePriv->SaveAreas)(pBackingPixmap, pObscured, x,
+ y, pWin);
+}
+
+static void XAAStateWrapRestoreAreas(PixmapPtr pBackingPixmap, RegionPtr pExposed,
+ int x, int y, WindowPtr pWin)
+{
+ GET_STATEPRIV_SCREEN(pBackingPixmap->drawable.pScreen);
+ STATE_CHECK_SP(pStatePriv);
+
+ (*pStatePriv->RestoreAreas)(pBackingPixmap, pExposed,
+ x, y, pWin);
+}
+
+/* Setup Function */
+Bool
+XAAInitStateWrap(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
+{
+ ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ XAAStateWrapPtr pStatePriv;
+ int i = 0;
+
+ if (XAAStateGeneration != serverGeneration) {
+ if((XAAStateIndex = AllocateScreenPrivateIndex()) < 0) return FALSE;
+ XAAStateGeneration = serverGeneration;
+ }
+ if(!(pStatePriv = xalloc(sizeof(XAAStateWrapRec)))) return FALSE;
+ pScreen->devPrivates[XAAStateIndex].ptr = (pointer)pStatePriv;
+ pStatePriv->RestoreAccelState = infoRec->RestoreAccelState;
+ pStatePriv->pScrn = pScrn;
+
+ /* Initialize the last screen to -1 so whenever an accel function
+ * is called the proper state is setup
+ */
+ while(i < pScrn->numEntities) {
+ xf86SetLastScrnFlag(pScrn->entityList[i], -1);
+ i++;
+ }
+/* Do the wrapping */
+ XAA_STATE_WRAP(Sync);
+ XAA_STATE_WRAP(SetupForScreenToScreenCopy);
+ XAA_STATE_WRAP(SetupForSolidFill);
+ XAA_STATE_WRAP(SetupForSolidLine);
+ XAA_STATE_WRAP(SetupForDashedLine);
+ XAA_STATE_WRAP(SetClippingRectangle);
+ XAA_STATE_WRAP(DisableClipping);
+ XAA_STATE_WRAP(SetupForMono8x8PatternFill);
+ XAA_STATE_WRAP(SetupForColor8x8PatternFill);
+ XAA_STATE_WRAP(SetupForCPUToScreenColorExpandFill);
+ XAA_STATE_WRAP(SetupForScanlineCPUToScreenColorExpandFill);
+ XAA_STATE_WRAP(SetupForScreenToScreenColorExpandFill);
+ XAA_STATE_WRAP(SetupForImageWrite);
+ XAA_STATE_WRAP(SetupForScanlineImageWrite);
+ XAA_STATE_WRAP(SetupForImageRead);
+ XAA_STATE_WRAP(ScreenToScreenBitBlt);
+ XAA_STATE_WRAP(WriteBitmap);
+ XAA_STATE_WRAP(FillSolidRects);
+ XAA_STATE_WRAP(FillMono8x8PatternRects);
+ XAA_STATE_WRAP(FillColor8x8PatternRects);
+ XAA_STATE_WRAP(FillCacheBltRects);
+ XAA_STATE_WRAP(FillColorExpandRects);
+ XAA_STATE_WRAP(FillCacheExpandRects);
+ XAA_STATE_WRAP(FillImageWriteRects);
+ XAA_STATE_WRAP(FillSolidSpans);
+ XAA_STATE_WRAP(FillMono8x8PatternSpans);
+ XAA_STATE_WRAP(FillColor8x8PatternSpans);
+ XAA_STATE_WRAP(FillCacheBltSpans);
+ XAA_STATE_WRAP(FillColorExpandSpans);
+ XAA_STATE_WRAP(FillCacheExpandSpans);
+ XAA_STATE_WRAP(TEGlyphRenderer);
+ XAA_STATE_WRAP(NonTEGlyphRenderer);
+ XAA_STATE_WRAP(WritePixmap);
+ XAA_STATE_WRAP(ReadPixmap);
+ XAA_STATE_WRAP(CopyArea);
+ XAA_STATE_WRAP(CopyPlane);
+ XAA_STATE_WRAP(PushPixelsSolid);
+ XAA_STATE_WRAP(PolyFillRectSolid);
+ XAA_STATE_WRAP(PolyFillRectStippled);
+ XAA_STATE_WRAP(PolyFillRectOpaqueStippled);
+ XAA_STATE_WRAP(PolyFillRectTiled);
+ XAA_STATE_WRAP(FillSpansSolid);
+ XAA_STATE_WRAP(FillSpansStippled);
+ XAA_STATE_WRAP(FillSpansOpaqueStippled);
+ XAA_STATE_WRAP(FillSpansTiled);
+ XAA_STATE_WRAP(PolyText8TE);
+ XAA_STATE_WRAP(PolyText16TE);
+ XAA_STATE_WRAP(ImageText8TE);
+ XAA_STATE_WRAP(ImageText16TE);
+ XAA_STATE_WRAP(ImageGlyphBltTE);
+ XAA_STATE_WRAP(PolyGlyphBltTE);
+ XAA_STATE_WRAP(PolyText8NonTE);
+ XAA_STATE_WRAP(PolyText16NonTE);
+ XAA_STATE_WRAP(ImageText8NonTE);
+ XAA_STATE_WRAP(ImageText16NonTE);
+ XAA_STATE_WRAP(ImageGlyphBltNonTE);
+ XAA_STATE_WRAP(PolyGlyphBltNonTE);
+ XAA_STATE_WRAP(PolyRectangleThinSolid);
+ XAA_STATE_WRAP(PolylinesWideSolid);
+ XAA_STATE_WRAP(PolylinesThinSolid);
+ XAA_STATE_WRAP(PolySegmentThinSolid);
+ XAA_STATE_WRAP(PolylinesThinDashed);
+ XAA_STATE_WRAP(PolySegmentThinDashed);
+ XAA_STATE_WRAP(FillPolygonSolid);
+ XAA_STATE_WRAP(FillPolygonStippled);
+ XAA_STATE_WRAP(FillPolygonOpaqueStippled);
+ XAA_STATE_WRAP(FillPolygonTiled);
+ XAA_STATE_WRAP(PolyFillArcSolid);
+ XAA_STATE_WRAP(PutImage);
+ XAA_STATE_WRAP(ValidateFillSpans);
+ XAA_STATE_WRAP(ValidateSetSpans);
+ XAA_STATE_WRAP(ValidatePutImage);
+ XAA_STATE_WRAP(ValidateCopyArea);
+ XAA_STATE_WRAP(ValidateCopyPlane);
+ XAA_STATE_WRAP(ValidatePolyPoint);
+ XAA_STATE_WRAP(ValidatePolylines);
+ XAA_STATE_WRAP(ValidatePolySegment);
+ XAA_STATE_WRAP(ValidatePolyRectangle);
+ XAA_STATE_WRAP(ValidatePolyArc);
+ XAA_STATE_WRAP(ValidateFillPolygon);
+ XAA_STATE_WRAP(ValidatePolyFillRect);
+ XAA_STATE_WRAP(ValidatePolyFillArc);
+ XAA_STATE_WRAP(ValidatePolyText8);
+ XAA_STATE_WRAP(ValidatePolyText16);
+ XAA_STATE_WRAP(ValidateImageText8);
+ XAA_STATE_WRAP(ValidateImageText16);
+ XAA_STATE_WRAP(ValidatePolyGlyphBlt);
+ XAA_STATE_WRAP(ValidateImageGlyphBlt);
+ XAA_STATE_WRAP(ValidatePushPixels);
+ XAA_STATE_WRAP(ComputeDash);
+ XAA_STATE_WRAP(InitPixmapCache);
+ XAA_STATE_WRAP(ClosePixmapCache);
+ XAA_STATE_WRAP(StippledFillChooser);
+ XAA_STATE_WRAP(OpaqueStippledFillChooser);
+ XAA_STATE_WRAP(TiledFillChooser);
+ XAA_STATE_WRAP(CacheTile);
+ XAA_STATE_WRAP(CacheStipple);
+ XAA_STATE_WRAP(CacheMonoStipple);
+ XAA_STATE_WRAP(CacheMono8x8Pattern);
+ XAA_STATE_WRAP(CacheColor8x8Pattern);
+ XAA_STATE_WRAP(WriteBitmapToCache);
+ XAA_STATE_WRAP(WritePixmapToCache);
+ XAA_STATE_WRAP(WriteMono8x8PatternToCache);
+ XAA_STATE_WRAP(WriteColor8x8PatternToCache);
+ XAA_STATE_WRAP(GetImage);
+ XAA_STATE_WRAP(GetSpans);
+ XAA_STATE_WRAP(PaintWindowBackground);
+ XAA_STATE_WRAP(PaintWindowBorder);
+ XAA_STATE_WRAP(CopyWindow);
+ XAA_STATE_WRAP(SaveAreas);
+ XAA_STATE_WRAP(RestoreAreas);
+
+ return TRUE;
+}
diff --git a/xc/programs/Xserver/include/globals.h b/xc/programs/Xserver/include/globals.h
index 2b2d7780f..8171ef79a 100644
--- a/xc/programs/Xserver/include/globals.h
+++ b/xc/programs/Xserver/include/globals.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/include/globals.h,v 1.3 1999/09/25 14:38:21 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/include/globals.h,v 1.4 2000/06/28 18:21:22 tsi Exp $ */
#ifndef _XSERV_GLOBAL_H_
#define _XSERV_GLOBAL_H_
@@ -25,7 +25,7 @@ extern Bool noTestExtensions;
extern DDXPointRec dixScreenOrigins[MAXSCREENS];
-#if DPMSExtension
+#ifdef DPMSExtension
extern CARD32 defaultDPMSStandbyTime;
extern CARD32 defaultDPMSSuspendTime;
extern CARD32 defaultDPMSOffTime;
diff --git a/xc/programs/Xserver/os/Imakefile b/xc/programs/Xserver/os/Imakefile
index f805cae6e..afeeeb3ae 100644
--- a/xc/programs/Xserver/os/Imakefile
+++ b/xc/programs/Xserver/os/Imakefile
@@ -1,5 +1,5 @@
XCOMM $TOG: Imakefile /main/85 1997/12/07 18:26:23 kaleb $
-XCOMM $XFree86: xc/programs/Xserver/os/Imakefile,v 3.26 1999/11/19 13:55:09 hohndel Exp $
+XCOMM $XFree86: xc/programs/Xserver/os/Imakefile,v 3.27 2000/05/05 17:47:29 keithp Exp $
#include <Server.tmpl>
/*
@@ -73,15 +73,20 @@ COLOR_SRCS=oscolor.c
COLOR_OBJS=oscolor.o
#endif
+#if UseInternalMalloc
+MALLOC_SRCS=xalloc.c
+MALLOC_OBJS=xalloc.o
+#endif
+
BOOTSTRAPCFLAGS =
SRCS = WaitFor.c access.c connection.c io.c $(COLOR_SRCS) \
osinit.c utils.c auth.c mitauth.c secauth.c $(XDMAUTHSRCS) \
$(RPCSRCS) $(KRB5SRCS) xdmcp.c decompress.c OtherSources \
- transport.c xalloc.c $(LBX_SRCS)
+ transport.c $(MALLOC_SRCS) $(LBX_SRCS)
OBJS = WaitFor.o access.o connection.o io.o $(COLOR_OBJS) \
osinit.o utils.o auth.o mitauth.o secauth.o $(XDMAUTHOBJS) \
$(RPCOBJS) $(KRB5OBJS) xdmcp.o decompress.o OtherObjects \
- transport.o xalloc.o $(LBX_OBJS)
+ transport.o $(MALLOC_OBJS) $(LBX_OBJS)
#if SpecialMalloc
MEM_DEFINES = -DSPECIAL_MALLOC