summaryrefslogtreecommitdiff
path: root/hw/xfree86
diff options
context:
space:
mode:
Diffstat (limited to 'hw/xfree86')
-rw-r--r--hw/xfree86/common/compiler.h71
-rw-r--r--hw/xfree86/common/xf86Bus.c2
-rw-r--r--hw/xfree86/common/xf86Config.c65
-rw-r--r--hw/xfree86/common/xf86Configure.c9
-rw-r--r--hw/xfree86/common/xf86Cursor.c2
-rw-r--r--hw/xfree86/common/xf86DGA.c2
-rw-r--r--hw/xfree86/common/xf86DPMS.c10
-rw-r--r--hw/xfree86/common/xf86Date.h2
-rw-r--r--hw/xfree86/common/xf86Events.c16
-rw-r--r--hw/xfree86/common/xf86Globals.c2
-rw-r--r--hw/xfree86/common/xf86Helper.c20
-rw-r--r--hw/xfree86/common/xf86Init.c67
-rw-r--r--hw/xfree86/common/xf86Io.c5
-rw-r--r--hw/xfree86/common/xf86Mode.c2
-rw-r--r--hw/xfree86/common/xf86PciInfo.h46
-rw-r--r--hw/xfree86/common/xf86RandR.c83
-rw-r--r--hw/xfree86/common/xf86Version.h4
-rw-r--r--hw/xfree86/common/xf86cmap.c11
-rw-r--r--hw/xfree86/common/xf86fbman.c6
-rw-r--r--hw/xfree86/common/xf86pciBus.c12
-rw-r--r--hw/xfree86/common/xf86str.h24
-rw-r--r--hw/xfree86/common/xorgHelper.c2
-rw-r--r--hw/xfree86/common/xorgVersion.h6
-rw-r--r--hw/xfree86/ddc/interpret_edid.c4
-rw-r--r--hw/xfree86/ddc/xf86DDC.c8
-rw-r--r--hw/xfree86/ddc/xf86DDC.h4
-rw-r--r--hw/xfree86/dixmods/GLcoremodule.c2
-rw-r--r--hw/xfree86/dixmods/afbmodule.c2
-rw-r--r--hw/xfree86/dixmods/bitmapmod.c2
-rw-r--r--hw/xfree86/dixmods/cfb16module.c2
-rw-r--r--hw/xfree86/dixmods/cfb24module.c2
-rw-r--r--hw/xfree86/dixmods/cfb32module.c2
-rw-r--r--hw/xfree86/dixmods/cfbmodule.c2
-rw-r--r--hw/xfree86/dixmods/dbemodule.c2
-rw-r--r--hw/xfree86/dixmods/extmod/modinit.c2
-rw-r--r--hw/xfree86/dixmods/extmod/modinit.h2
-rw-r--r--hw/xfree86/dixmods/extmod/xf86vmode.c2
-rw-r--r--hw/xfree86/dixmods/fbmodule.c2
-rw-r--r--hw/xfree86/dixmods/ftmodule.c2
-rw-r--r--hw/xfree86/dixmods/glxmodule.c5
-rw-r--r--hw/xfree86/dixmods/laymodule.c2
-rw-r--r--hw/xfree86/dixmods/mfbmodule.c2
-rw-r--r--hw/xfree86/dixmods/recordmod.c2
-rw-r--r--hw/xfree86/dixmods/shmodule.c2
-rw-r--r--hw/xfree86/dixmods/type1mod.c2
-rw-r--r--hw/xfree86/dixmods/xf86XTrapModule.c2
-rw-r--r--hw/xfree86/doc/README.DRI1
-rw-r--r--hw/xfree86/doc/README.fonts86
-rw-r--r--hw/xfree86/doc/devel/README.DRIcomp1
-rw-r--r--hw/xfree86/doc/man/Xorg.man.pre2
-rw-r--r--hw/xfree86/doc/man/xorg.conf.man.pre2
-rw-r--r--hw/xfree86/dri/dri.c144
-rw-r--r--hw/xfree86/dri/dri.h26
-rw-r--r--hw/xfree86/dri/drimodule.c4
-rw-r--r--hw/xfree86/dri/dristruct.h14
-rw-r--r--hw/xfree86/dri/sarea.h2
-rw-r--r--hw/xfree86/dri/xf86dri.c23
-rw-r--r--hw/xfree86/fbdevhw/fbdevhw.c40
-rw-r--r--hw/xfree86/fbdevhw/fbdevhw.h9
-rw-r--r--hw/xfree86/fbdevhw/fbdevhwstub.c24
-rw-r--r--hw/xfree86/getconfig/cfg.sample2
-rw-r--r--hw/xfree86/getconfig/getconfig2
-rw-r--r--hw/xfree86/getconfig/xorg.cfg4
-rw-r--r--hw/xfree86/i2c/xf86i2c.c2
-rw-r--r--hw/xfree86/i2c/xf86i2c.h1
-rw-r--r--hw/xfree86/i2c/xf86i2cmodule.c2
-rw-r--r--hw/xfree86/int10/xf86int10module.c2
-rw-r--r--hw/xfree86/loader/dixsym.c22
-rw-r--r--hw/xfree86/loader/elfloader.c3
-rw-r--r--hw/xfree86/loader/extsym.c2
-rw-r--r--hw/xfree86/loader/hash.c2
-rw-r--r--hw/xfree86/loader/loader.c7
-rw-r--r--hw/xfree86/loader/loadmod.c2
-rw-r--r--hw/xfree86/loader/misym.c2
-rw-r--r--hw/xfree86/loader/xf86sym.c32
-rw-r--r--hw/xfree86/os-support/bsd/bsd_mouse.c2
-rw-r--r--hw/xfree86/os-support/bsd/i386_video.c114
-rw-r--r--hw/xfree86/os-support/bus/Pci.c3
-rw-r--r--hw/xfree86/os-support/bus/Pci.h6
-rw-r--r--hw/xfree86/os-support/bus/ix86Pci.c15
-rw-r--r--hw/xfree86/os-support/bus/linuxPci.c22
-rw-r--r--hw/xfree86/os-support/drm/drmmodule.c2
-rw-r--r--hw/xfree86/os-support/linux/int10/linux.c26
-rw-r--r--hw/xfree86/os-support/linux/lnx_ia64.c45
-rw-r--r--hw/xfree86/os-support/linux/lnx_init.c2
-rw-r--r--hw/xfree86/os-support/linux/lnx_io.c1
-rw-r--r--hw/xfree86/os-support/linux/lnx_kbd.c1
-rw-r--r--hw/xfree86/os-support/linux/lnx_video.c2
-rw-r--r--hw/xfree86/os-support/shared/ia64Pci.c81
-rw-r--r--hw/xfree86/os-support/shared/ia64Pci.h41
-rw-r--r--hw/xfree86/os-support/shared/libc_wrapper.c48
-rw-r--r--hw/xfree86/os-support/shared/sigio.c12
-rw-r--r--hw/xfree86/os-support/shared/sigiostubs.c3
-rw-r--r--hw/xfree86/os-support/solaris/sun_init.c19
-rw-r--r--hw/xfree86/os-support/solaris/sun_kbd.c20
-rw-r--r--hw/xfree86/os-support/solaris/sun_kbdEv.c16
-rw-r--r--hw/xfree86/os-support/solaris/sun_mouse.c243
-rw-r--r--hw/xfree86/os-support/xf86OSmouse.h4
-rw-r--r--hw/xfree86/os-support/xf86_OSlib.h4
-rw-r--r--hw/xfree86/os-support/xf86_libc.h2
-rw-r--r--hw/xfree86/parser/configProcs.h4
-rw-r--r--hw/xfree86/parser/read.c7
-rw-r--r--hw/xfree86/parser/write.c2
-rw-r--r--hw/xfree86/parser/xf86Parser.h8
-rw-r--r--hw/xfree86/rac/xf86RACmodule.c2
-rw-r--r--hw/xfree86/ramdac/IBM.c4
-rw-r--r--hw/xfree86/ramdac/IBM.h3
-rw-r--r--hw/xfree86/ramdac/TI.c4
-rw-r--r--hw/xfree86/ramdac/TI.h3
-rw-r--r--hw/xfree86/ramdac/xf86RamDacMod.c2
-rw-r--r--hw/xfree86/scanpci/extrapci.ids2
-rw-r--r--hw/xfree86/scanpci/xf86ScanPci.c4
-rw-r--r--hw/xfree86/shadowfb/sfbmodule.c2
-rw-r--r--hw/xfree86/utils/gtf/gtf.c2
-rw-r--r--hw/xfree86/utils/gtf/gtf.man.pre1
-rw-r--r--hw/xfree86/utils/xorgcfg/loader.c2
-rw-r--r--hw/xfree86/utils/xorgconfig/cards.c18
-rw-r--r--hw/xfree86/utils/xorgconfig/xorgconfig.c148
-rw-r--r--hw/xfree86/vbe/vbe.c19
-rw-r--r--hw/xfree86/vbe/vbe_module.c2
-rw-r--r--hw/xfree86/vgahw/vgaHW.c10
-rw-r--r--hw/xfree86/vgahw/vgaHW.h9
-rw-r--r--hw/xfree86/vgahw/vgaHWmodule.c2
-rw-r--r--hw/xfree86/x86emu/debug.c8
-rw-r--r--hw/xfree86/x86emu/decode.c72
-rw-r--r--hw/xfree86/x86emu/fpu.c1
-rw-r--r--hw/xfree86/x86emu/ops.c30
-rw-r--r--hw/xfree86/x86emu/ops2.c1
-rw-r--r--hw/xfree86/x86emu/prim_ops.c260
-rw-r--r--hw/xfree86/x86emu/sys.c76
-rw-r--r--hw/xfree86/x86emu/x86emu.h14
-rw-r--r--hw/xfree86/x86emu/x86emu/debug.h1
-rw-r--r--hw/xfree86/x86emu/x86emu/decode.h1
-rw-r--r--hw/xfree86/x86emu/x86emu/fpu_regs.h9
-rw-r--r--hw/xfree86/x86emu/x86emu/prim_asm.h1
-rw-r--r--hw/xfree86/x86emu/x86emu/prim_ops.h90
-rw-r--r--hw/xfree86/x86emu/x86emu/regs.h9
-rw-r--r--hw/xfree86/x86emu/x86emu/types.h3
-rw-r--r--hw/xfree86/x86emu/x86emu/x86emui.h5
-rw-r--r--hw/xfree86/xaa/xaa.h40
-rw-r--r--hw/xfree86/xaa/xaaFallback.c7
-rw-r--r--hw/xfree86/xaa/xaaInit.c18
-rw-r--r--hw/xfree86/xaa/xaaInitAccel.c10
-rw-r--r--hw/xfree86/xaa/xaaOverlay.c2
-rw-r--r--hw/xfree86/xaa/xaaPCache.c3
-rw-r--r--hw/xfree86/xaa/xaaPaintWin.c2
-rw-r--r--hw/xfree86/xaa/xaaPict.c109
-rw-r--r--hw/xfree86/xaa/xaaROP.c19
-rw-r--r--hw/xfree86/xaa/xaaStipple.c5
-rw-r--r--hw/xfree86/xaa/xaaTEGlyph.c6
-rw-r--r--hw/xfree86/xaa/xaaWideLine.c5
-rw-r--r--hw/xfree86/xaa/xaalocal.h41
-rw-r--r--hw/xfree86/xaa/xaarop.h6
-rw-r--r--hw/xfree86/xaa/xaawrap.h14
-rw-r--r--hw/xfree86/xf1bpp/mfbmap.h8
-rw-r--r--hw/xfree86/xf1bpp/mfbmodule.c2
-rw-r--r--hw/xfree86/xf4bpp/mfbbres.c6
-rw-r--r--hw/xfree86/xf4bpp/mfbbresd.c6
-rw-r--r--hw/xfree86/xf4bpp/mfbfillarc.c2
-rw-r--r--hw/xfree86/xf4bpp/mfbhrzvert.c2
-rw-r--r--hw/xfree86/xf4bpp/mfbimggblt.c6
-rw-r--r--hw/xfree86/xf4bpp/mfbline.c6
-rw-r--r--hw/xfree86/xf4bpp/mfbzerarc.c2
-rw-r--r--hw/xfree86/xf4bpp/ppcArea.c2
-rw-r--r--hw/xfree86/xf4bpp/ppcGC.c8
-rw-r--r--hw/xfree86/xf4bpp/ppcIO.c8
-rw-r--r--hw/xfree86/xf4bpp/ppcPixFS.c24
-rw-r--r--hw/xfree86/xf4bpp/ppcPntWin.c2
-rw-r--r--hw/xfree86/xf4bpp/ppcPolyPnt.c2
-rw-r--r--hw/xfree86/xf4bpp/ppcWinFS.c24
-rw-r--r--hw/xfree86/xf4bpp/ppcWindow.c2
-rw-r--r--hw/xfree86/xf4bpp/vgaGC.c2
-rw-r--r--hw/xfree86/xf4bpp/vgamodule.c2
-rw-r--r--hw/xfree86/xf8_16bpp/cfb8_16.h5
-rw-r--r--hw/xfree86/xf8_16bpp/cfb8_16module.c2
-rw-r--r--hw/xfree86/xf8_16bpp/cfbscrinit.c2
-rw-r--r--hw/xfree86/xf8_32bpp/cfb8_32.h10
-rw-r--r--hw/xfree86/xf8_32bpp/cfb8_32module.c2
-rw-r--r--hw/xfree86/xf8_32bpp/cfbpntwin.c2
-rw-r--r--hw/xfree86/xf8_32bpp/cfbscrinit.c2
-rw-r--r--hw/xfree86/xf8_32wid/cfb8_32wid.h5
-rw-r--r--hw/xfree86/xf8_32wid/cfb8_32widmodule.c2
-rw-r--r--hw/xfree86/xf8_32wid/cfbscrinit.c4
-rw-r--r--hw/xfree86/xorgconf.cpp2
184 files changed, 2097 insertions, 912 deletions
diff --git a/hw/xfree86/common/compiler.h b/hw/xfree86/common/compiler.h
index f888eb0f6..269b8bfb4 100644
--- a/hw/xfree86/common/compiler.h
+++ b/hw/xfree86/common/compiler.h
@@ -122,7 +122,8 @@ extern int ffs(unsigned long);
# if defined(NO_INLINE) || defined(DO_PROTOTYPES)
-# if !defined(__sparc__) && !defined(__arm32__) \
+# if !defined(__arm__)
+# if !defined(__sparc__) && !defined(__arm32__) \
&& !(defined(__alpha__) && defined(linux))
extern void outb(unsigned short, unsigned char);
@@ -132,7 +133,7 @@ extern unsigned int inb(unsigned short);
extern unsigned int inw(unsigned short);
extern unsigned int inl(unsigned short);
-# else /* __sparc__, __arm32__, __alpha__*/
+# else /* __sparc__, __arm32__, __alpha__*/
extern void outb(unsigned long, unsigned char);
extern void outw(unsigned long, unsigned short);
@@ -141,7 +142,8 @@ extern unsigned int inb(unsigned long);
extern unsigned int inw(unsigned long);
extern unsigned int inl(unsigned long);
-# endif /* __sparc__, __arm32__, __alpha__ */
+# endif /* __sparc__, __arm32__, __alpha__ */
+# endif /* __arm__ */
extern unsigned long ldq_u(unsigned long *);
extern unsigned long ldl_u(unsigned int *);
@@ -897,12 +899,12 @@ static __inline__ void stw_u(unsigned long val, unsigned short *p)
# define mem_barrier() /* XXX: nop for now */
# define write_mem_barrier() /* XXX: nop for now */
-# elif defined(__mips__) || defined(__arm32__)
-#ifdef __arm32__
-#define PORT_SIZE long
-#else
-#define PORT_SIZE short
-#endif
+# elif defined(__mips__) || (defined(__arm32__) && !defined(__linux__))
+# ifdef __arm32__
+# define PORT_SIZE long
+# else
+# define PORT_SIZE short
+# endif
unsigned int IOPortBase; /* Memory mapped I/O port area */
@@ -1293,6 +1295,55 @@ inl(unsigned short port)
# define mem_barrier() eieio()
# define write_mem_barrier() eieio()
+#elif defined(__arm__) && defined(__linux__)
+
+#define ldq_u(p) (*((unsigned long *)(p)))
+#define ldl_u(p) (*((unsigned int *)(p)))
+#define ldw_u(p) (*((unsigned short *)(p)))
+#define stq_u(v,p) (*(unsigned long *)(p)) = (v)
+#define stl_u(v,p) (*(unsigned int *)(p)) = (v)
+#define stw_u(v,p) (*(unsigned short *)(p)) = (v)
+#define mem_barrier() /* NOP */
+#define write_mem_barrier() /* NOP */
+
+/* for Linux on ARM, we use the LIBC inx/outx routines */
+/* note that the appropriate setup via "ioperm" needs to be done */
+/* *before* any inx/outx is done. */
+
+#include <sys/io.h>
+
+static __inline__ void
+xf_outb(unsigned short port, unsigned char val)
+{
+ outb(val, port);
+}
+
+static __inline__ void
+xf_outw(unsigned short port, unsigned short val)
+{
+ outw(val, port);
+}
+
+static __inline__ void
+xf_outl(unsigned short port, unsigned int val)
+{
+ outl(val, port);
+}
+
+#define outb xf_outb
+#define outw xf_outw
+#define outl xf_outl
+
+#define arm_flush_cache(addr) \
+do { \
+ register unsigned long _beg __asm ("a1") = (unsigned long) (addr); \
+ register unsigned long _end __asm ("a2") = (unsigned long) (addr) + 4;\
+ register unsigned long _flg __asm ("a3") = 0; \
+ __asm __volatile ("swi 0x9f0002 @ sys_cacheflush" \
+ : "=r" (_beg) \
+ : "0" (_beg), "r" (_end), "r" (_flg)); \
+} while (0)
+
# else /* ix86 */
# define ldq_u(p) (*((unsigned long *)(p)))
@@ -1732,7 +1783,7 @@ static __inline__ void ppc_flush_icache(char *addr)
: : "r"(addr) : "memory");
}
-# elif defined(__sparc__)
+# elif defined(__sparc__) || defined(sparc)
/*
* Like powerpc, we provide byteswapping and no byteswapping functions
* here with byteswapping as default, drivers that don't need byteswapping
diff --git a/hw/xfree86/common/xf86Bus.c b/hw/xfree86/common/xf86Bus.c
index 5e002c8db..255e65674 100644
--- a/hw/xfree86/common/xf86Bus.c
+++ b/hw/xfree86/common/xf86Bus.c
@@ -2988,7 +2988,7 @@ static void
CheckGenericGA()
{
/* This needs to be changed for multiple domains */
-#if !defined(__sparc__) && !defined(__powerpc__) && !defined(__mips__)
+#if !defined(__sparc__) && !defined(__powerpc__) && !defined(__mips__) && !defined(__ia64__)
IOADDRESS GenericIOBase = VGAHW_GET_IOBASE();
CARD8 CurrentValue, TestValue;
diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index 66a6268ab..54c92ff8f 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -1,4 +1,4 @@
-/* $XdotOrg: xc/programs/Xserver/hw/xfree86/common/xf86Config.c,v 1.1.4.4.2.3 2004/03/04 20:16:17 kaleb Exp $ */
+/* $XdotOrg: xc/programs/Xserver/hw/xfree86/common/xf86Config.c,v 1.5 2004/08/16 20:17:51 kem Exp $ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Config.c,v 3.276 2003/10/08 14:58:26 dawes Exp $ */
@@ -128,6 +128,7 @@ static Bool addDefaultModes(MonPtr monitorp);
#ifdef XF86DRI
static Bool configDRI(XF86ConfDRIPtr drip);
#endif
+static Bool configExtensions(XF86ConfExtensionsPtr conf_ext);
/*
* xf86GetPathElem --
@@ -373,13 +374,14 @@ xf86DriverlistFromConfig()
Bool
xf86BuiltinInputDriver(const char *name)
{
+#ifdef USE_DEPRECATED_KEYBOARD_DRIVER
if (xf86NameCmp(name, "keyboard") == 0)
return TRUE;
else
+#endif
return FALSE;
}
-
char **
xf86InputDriverlistFromConfig()
{
@@ -2396,6 +2398,62 @@ configDRI(XF86ConfDRIPtr drip)
#endif
static Bool
+configExtensions(XF86ConfExtensionsPtr conf_ext)
+{
+ XF86OptionPtr o;
+
+ /* Extension enable/disable in miinitext.c */
+ extern Bool EnableDisableExtension(char *name, Bool enable);
+
+ if (conf_ext && conf_ext->ext_option_lst) {
+ for (o = conf_ext->ext_option_lst; o; o = xf86NextOption(o)) {
+ char *name = xf86OptionName(o);
+ char *val = xf86OptionValue(o);
+ char *n;
+ Bool enable = TRUE;
+
+ /* Handle "No<ExtensionName>" */
+ n = xf86NormalizeName(name);
+ if (strncmp(n, "no", 2) == 0) {
+ name += 2;
+ enable = FALSE;
+ }
+
+ if (!val ||
+ xf86NameCmp(val, "enable") == 0 ||
+ xf86NameCmp(val, "on") == 0 ||
+ xf86NameCmp(val, "1") == 0 ||
+ xf86NameCmp(val, "yes") == 0 ||
+ xf86NameCmp(val, "true") == 0) {
+ /* NOTHING NEEDED -- enabling is handled below */
+ } else if (xf86NameCmp(val, "disable") == 0 ||
+ xf86NameCmp(val, "off") == 0 ||
+ xf86NameCmp(val, "0") == 0 ||
+ xf86NameCmp(val, "no") == 0 ||
+ xf86NameCmp(val, "false") == 0) {
+ enable = !enable;
+ } else {
+ xf86Msg(X_ERROR,
+ "%s is not a valid value for the Extension option\n",
+ val);
+ return FALSE;
+ }
+
+ if (EnableDisableExtension(name, enable)) {
+ xf86Msg(X_CONFIG, "Extension \"%s\" is %s\n",
+ name, enable ? "enabled" : "disabled");
+ } else {
+ xf86Msg(X_ERROR,
+ "Extension \"%s\" is unrecognized\n", name);
+ return FALSE;
+ }
+ }
+ }
+
+ return TRUE;
+}
+
+static Bool
configInput(IDevPtr inputp, XF86ConfInputPtr conf_input, MessageType from)
{
xf86Msg(from, "|-->Input Device \"%s\"\n", conf_input->inp_identifier);
@@ -2551,7 +2609,8 @@ xf86HandleConfigFile(Bool autoconfig)
if (!configFiles(xf86configptr->conf_files) ||
!configServerFlags(xf86configptr->conf_flags,
- xf86ConfigLayout.options)
+ xf86ConfigLayout.options) ||
+ !configExtensions(xf86configptr->conf_extensions)
#ifdef XF86DRI
|| !configDRI(xf86configptr->conf_dri)
#endif
diff --git a/hw/xfree86/common/xf86Configure.c b/hw/xfree86/common/xf86Configure.c
index 4e1473ef7..be37f53be 100644
--- a/hw/xfree86/common/xf86Configure.c
+++ b/hw/xfree86/common/xf86Configure.c
@@ -1,5 +1,4 @@
/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Configure.c,v 3.80 2003/10/08 14:58:27 dawes Exp $ */
-/* $XdotOrg: xc/programs/Xserver/hw/xfree86/common/xf86Configure.c,v 1.1.4.1.2.1 2004/03/17 20:30:26 ago Exp $ */
/*
* Copyright 2000-2002 by Alan Hourihane, Flint Mountain, North Wales.
*
@@ -258,7 +257,11 @@ configureInputSection (void)
parsePrologue (XF86ConfInputPtr, XF86ConfInputRec)
ptr->inp_identifier = "Keyboard0";
+#ifdef USE_DEPRECATED_KEYBOARD_DRIVER
ptr->inp_driver = "keyboard";
+#else
+ ptr->inp_driver = "kbd";
+#endif
ptr->list.next = NULL;
/* Crude mechanism to auto-detect mouse (os dependent) */
@@ -750,8 +753,8 @@ configureDDCMonitorSection (int screennum)
ptr->mon_vrefresh[ptr->mon_n_hsync].lo =
ConfiguredMonitor->det_mon[i].section.ranges.min_v;
ptr->mon_vrefresh[ptr->mon_n_hsync].hi =
+ ConfiguredMonitor->det_mon[i].section.ranges.max_v;
ptr->mon_n_hsync++;
- ConfiguredMonitor->det_mon[i].section.ranges.max_v;
default:
break;
}
@@ -1004,7 +1007,7 @@ DoConfigure()
}
ErrorF("\nYour %s file is %s\n\n", XF86CONFIGFILE ,filename);
- ErrorF("To test the server, run 'X -xf86config %s'\n\n", filename);
+ ErrorF("To test the server, run 'X -config %s'\n\n", filename);
bail:
OsCleanup(TRUE);
diff --git a/hw/xfree86/common/xf86Cursor.c b/hw/xfree86/common/xf86Cursor.c
index 22b7b00e6..51015e1f4 100644
--- a/hw/xfree86/common/xf86Cursor.c
+++ b/hw/xfree86/common/xf86Cursor.c
@@ -222,7 +222,7 @@ xf86SwitchMode(ScreenPtr pScreen, DisplayModePtr mode)
if (mode == pScr->currentMode)
return TRUE;
- if (mode->HDisplay > pScreen->width || mode->VDisplay > pScreen->height)
+ if (mode->HDisplay > pScr->virtualX || mode->VDisplay > pScr->virtualY)
return FALSE;
pCursorScreen = miPointerCurrentScreen();
diff --git a/hw/xfree86/common/xf86DGA.c b/hw/xfree86/common/xf86DGA.c
index ac57935e0..d57eab6e5 100644
--- a/hw/xfree86/common/xf86DGA.c
+++ b/hw/xfree86/common/xf86DGA.c
@@ -1,4 +1,4 @@
-/* $XdotOrg: xc/programs/Xserver/hw/xfree86/common/xf86DGA.c,v 1.1.4.3.2.3 2004/03/04 20:16:18 kaleb Exp $ */
+/* $XdotOrg: xc/programs/Xserver/hw/xfree86/common/xf86DGA.c,v 1.2 2004/04/23 19:20:32 eich Exp $ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86DGA.c,v 1.46 2002/12/03 18:17:40 tsi Exp $ */
/*
* Copyright (c) 1998-2002 by The XFree86 Project, Inc.
diff --git a/hw/xfree86/common/xf86DPMS.c b/hw/xfree86/common/xf86DPMS.c
index df968797c..82004b953 100644
--- a/hw/xfree86/common/xf86DPMS.c
+++ b/hw/xfree86/common/xf86DPMS.c
@@ -118,6 +118,16 @@ DPMSClose(int i, ScreenPtr pScreen)
pScreen->CloseScreen = pDPMS->CloseScreen;
+ /*
+ * Turn on DPMS when shutting down. If this function can be used
+ * depends on the order the driver wraps things. If this is called
+ * after the driver has shut down everything the driver will have
+ * to deal with this internally.
+ */
+ if (xf86Screens[i]->vtSema && xf86Screens[i]->DPMSSet) {
+ xf86Screens[i]->DPMSSet(xf86Screens[i],DPMSModeOn,0);
+ }
+
xfree((pointer)pDPMS);
pScreen->devPrivates[DPMSIndex].ptr = NULL;
if (--DPMSCount == 0)
diff --git a/hw/xfree86/common/xf86Date.h b/hw/xfree86/common/xf86Date.h
index 7d37ac7ef..15aafb817 100644
--- a/hw/xfree86/common/xf86Date.h
+++ b/hw/xfree86/common/xf86Date.h
@@ -1,4 +1,4 @@
-/* $XdotOrg: xc/programs/Xserver/hw/xfree86/xf86Date.h,v 1.1.4.3 2003/12/20 00:28:26 kaleb Exp $ */
+/* $XdotOrg: xc/programs/Xserver/hw/xfree86/xf86Date.h,v 1.4 2004/08/16 22:48:50 kem Exp $ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/xf86Date.h,v 1.54 2003/12/19 04:52:10 dawes Exp $ */
/*
* Copyright (c) 2003 by The XFree86 Project, Inc.
diff --git a/hw/xfree86/common/xf86Events.c b/hw/xfree86/common/xf86Events.c
index 791fd2673..d61d4d67a 100644
--- a/hw/xfree86/common/xf86Events.c
+++ b/hw/xfree86/common/xf86Events.c
@@ -49,7 +49,7 @@
*/
/* $XConsortium: xf86Events.c /main/46 1996/10/25 11:36:30 kaleb $ */
-/* $XdotOrg: xc/programs/Xserver/hw/xfree86/common/xf86Events.c,v 1.1.4.3 2003/12/06 13:24:24 kaleb Exp $ */
+/* $XdotOrg: xc/programs/Xserver/hw/xfree86/common/xf86Events.c,v 1.3 2004/07/30 20:56:53 eich Exp $ */
/* [JCH-96/01/21] Extended std reverse map to four buttons. */
@@ -95,6 +95,12 @@
extern Bool noXkbExtension;
#endif
+#ifdef DPMSExtension
+#define DPMS_SERVER
+#include "extensions/dpms.h"
+#include "dpmsproc.h"
+#endif
+
#define XE_POINTER 1
#define XE_KEYBOARD 2
@@ -403,7 +409,7 @@ xf86ProcessActionEvent(ActionEvent action, void *arg)
/* */
/* otherwise fallback to sending a key event message to */
/* the current screen's driver: */
- if (*pScr->HandleMessage) {
+ if (*pScr->HandleMessage != NULL) {
(void) (*pScr->HandleMessage)(pScr->scrnIndex,
"KeyEventMessage", message, &retstr);
}
@@ -1348,7 +1354,11 @@ xf86VTSwitch()
#endif /* !__UNIXOS2__ */
xf86EnterServerState(SETUP);
for (i = 0; i < xf86NumScreens; i++) {
- xf86Screens[i]->LeaveVT(i, 0);
+#ifdef DPMSExtension
+ if (xf86Screens[i]->DPMSSet)
+ xf86Screens[i]->DPMSSet(xf86Screens[i],DPMSModeOn,0);
+#endif
+ xf86Screens[i]->LeaveVT(i, 0);
}
for (ih = InputHandlers; ih; ih = ih->next)
xf86DisableInputHandler(ih);
diff --git a/hw/xfree86/common/xf86Globals.c b/hw/xfree86/common/xf86Globals.c
index a2bb3f504..6f2e9135a 100644
--- a/hw/xfree86/common/xf86Globals.c
+++ b/hw/xfree86/common/xf86Globals.c
@@ -157,7 +157,7 @@ xf86InfoRec xf86Info = {
FALSE, /* vidModeAllowNonLocal */
TRUE, /* miscModInDevEnabled */
FALSE, /* miscModInDevAllowNonLocal */
- PCIProbe1, /* pciFlags */
+ PCIOsConfig, /* pciFlags */
Pix24DontCare, /* pixmap24 */
X_DEFAULT, /* pix24From */
#if defined(i386) || defined(__i386__)
diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c
index 076a97f16..822cdfd8b 100644
--- a/hw/xfree86/common/xf86Helper.c
+++ b/hw/xfree86/common/xf86Helper.c
@@ -873,7 +873,6 @@ Bool
xf86SetDefaultVisual(ScrnInfoPtr scrp, int visual)
{
MessageType visualFrom = X_DEFAULT;
- Bool bad = FALSE;
if (defaultColorVisualClass >= 0) {
scrp->defaultVisual = defaultColorVisualClass;
@@ -902,25 +901,6 @@ xf86SetDefaultVisual(ScrnInfoPtr scrp, int visual)
case DirectColor:
xf86DrvMsg(scrp->scrnIndex, visualFrom, "Default visual is %s\n",
xf86VisualNames[scrp->defaultVisual]);
- /* Check if the visual is valid for the depth */
- if (scrp->depth == 1 && scrp->defaultVisual != StaticGray)
- bad = TRUE;
-#if 0
- else if (scrp->depth == 4 &&
- (scrp->defaultVisual == TrueColor ||
- scrp->defaultVisual == DirectColor))
- bad = TRUE;
-#endif
- else if (scrp->depth > MAX_PSEUDO_DEPTH &&
- scrp->defaultVisual != TrueColor &&
- scrp->defaultVisual != DirectColor)
- bad = TRUE;
- if (bad) {
- xf86DrvMsg(scrp->scrnIndex, X_ERROR, "Selected default "
- "visual (%s) is not valid for depth %d\n",
- xf86VisualNames[scrp->defaultVisual], scrp->depth);
- return FALSE;
- } else
return TRUE;
default:
diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index c1918c6ef..f507753fe 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -93,6 +93,11 @@
extern int xtest_command_key;
#endif /* XTESTEXT1 */
+#ifdef DPMSExtension
+#define DPMS_SERVER
+#include "extensions/dpms.h"
+#endif
+
/* forward declarations */
@@ -139,7 +144,7 @@ static int numFormats = 6;
#endif
static Bool formatsDone = FALSE;
-InputDriverRec xf86KEYBOARD = {
+InputDriverRec XF86KEYBOARD = {
1,
"keyboard",
NULL,
@@ -418,8 +423,10 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv)
xfree(modulelist);
}
+#ifdef USE_DEPRECATED_KEYBOARD_DRIVER
/* Setup the builtin input drivers */
- xf86AddInputDriver(&xf86KEYBOARD, NULL, 0);
+ xf86AddInputDriver(&XF86KEYBOARD, NULL, 0);
+#endif
/* Load all input driver modules specified in the config file. */
if ((modulelist = xf86InputDriverlistFromConfig())) {
xf86LoadModules(modulelist, NULL);
@@ -897,6 +904,8 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv)
xf86Screens[i]->DPMSSet = NULL;
xf86Screens[i]->LoadPalette = NULL;
xf86Screens[i]->SetOverscan = NULL;
+ xf86Screens[i]->RRFunc = NULL;
+ xf86Screens[i]->pScreen = NULL;
scr_index = AddScreen(xf86Screens[i]->ScreenInit, argc, argv);
if (scr_index == i) {
/*
@@ -1008,12 +1017,18 @@ InitInput(argc, argv)
if (serverGeneration == 1) {
/* Call the PreInit function for each input device instance. */
for (pDev = xf86ConfigLayout.inputs; pDev && pDev->identifier; pDev++) {
+#ifdef USE_DEPRECATED_KEYBOARD_DRIVER
/* XXX The keyboard driver is a special case for now. */
if (!xf86NameCmp(pDev->driver, "keyboard")) {
- xf86Msg(X_INFO, "Keyboard \"%s\" handled by legacy driver\n",
+ xf86MsgVerb(X_WARNING, 0, "*** WARNING the legacy keyboard driver \"keyboard\" is deprecated\n");
+ xf86MsgVerb(X_WARNING, 0, "*** and will be removed in the next release of the Xorg server.\n");
+ xf86MsgVerb(X_WARNING, 0, "*** Please consider using the the new \"kbd\" driver for \"%s\".\n",
pDev->identifier);
+
continue;
}
+#endif
+
if ((pDrv = MatchInput(pDev)) == NULL) {
xf86Msg(X_ERROR, "No Input driver matching `%s'\n", pDev->driver);
/* XXX For now, just continue. */
@@ -1093,11 +1108,15 @@ InitInput(argc, argv)
xf86Info.kbdEvents = NULL; /* to prevent the internal keybord driver usage*/
}
else {
+#ifdef USE_DEPRECATED_KEYBOARD_DRIVER
+ /* Only set this if we're allowing the old driver. */
xf86Info.pKeyboard = AddInputDevice(xf86Info.kbdProc, TRUE);
+#endif
}
if (corePointer)
xf86Info.pMouse = corePointer->dev;
- RegisterKeyboardDevice(xf86Info.pKeyboard);
+ if (xf86Info.pKeyboard)
+ RegisterKeyboardDevice(xf86Info.pKeyboard);
miRegisterPointerDevice(screenInfo.screens[0], xf86Info.pMouse);
#ifdef XINPUT
@@ -1246,6 +1265,10 @@ AbortDDX()
* screen explicitely.
*/
xf86EnableAccess(xf86Screens[i]);
+#ifdef DPMSExtension
+ if (xf86Screens[i]->DPMSSet)
+ xf86Screens[i]->DPMSSet(xf86Screens[i],DPMSModeOn,0);
+#endif
(xf86Screens[i]->LeaveVT)(i, 0);
}
}
@@ -1344,15 +1367,15 @@ ddxProcessArgument(int argc, char **argv, int i)
return 2;
}
}
- if (!strcmp(argv[i], "-xf86config"))
+ if (!strcmp(argv[i], "-config") || !strcmp(argv[i], "-xf86config"))
{
if (!argv[i + 1])
return 0;
if (getuid() != 0 && !xf86PathIsSafe(argv[i + 1])) {
- FatalError("\nInvalid argument for -xf86config\n"
- "\tFor non-root users, the file specified with -xf86config must be\n"
+ FatalError("\nInvalid argument for -config\n"
+ "\tFor non-root users, the file specified with -config must be\n"
"\ta relative path and must not contain any \"..\" elements.\n"
- "\tUsing default XF86Config search path.\n\n");
+ "\tUsing default "__XCONFIGFILE__" search path.\n\n");
}
xf86ConfigFile = argv[i + 1];
return 2;
@@ -1641,6 +1664,11 @@ ddxProcessArgument(int argc, char **argv, int i)
return xf86ProcessArgument(argc, argv, i);
}
+/* ddxInitGlobals - called by |InitGlobals| from os/util.c */
+void ddxInitGlobals(void)
+{
+}
+
/*
* ddxUseMsg --
* Print out correct use of device dependent commandline options.
@@ -1655,15 +1683,14 @@ ddxUseMsg()
ErrorF("Device Dependent Usage\n");
if (getuid() == 0)
{
- ErrorF("-xf86config file specify a configuration file\n");
ErrorF("-modulepath paths specify the module search path\n");
ErrorF("-logfile file specify a log file name\n");
- ErrorF("-configure probe for devices and write an XF86Config\n");
+ ErrorF("-configure probe for devices and write an "__XCONFIGFILE__"\n");
}
else
{
- ErrorF("-xf86config file specify a configuration file, relative to the\n");
- ErrorF(" XF86Config search path, only root can use absolute\n");
+ ErrorF("-config file specify a configuration file, relative to the\n");
+ ErrorF(" "__XCONFIGFILE__" search path, only root can use absolute\n");
}
ErrorF("-probeonly probe for devices, then exit\n");
ErrorF("-scanpci execute the scanpci module and exit\n");
@@ -1720,16 +1747,19 @@ xf86PrintBanner()
#if PRE_RELEASE
ErrorF("\n"
"This is a pre-release version of the " XVENDORNAME " X11.\n"
- "Portions of this release are based on XFree86 4.4RC2 and selected\n"
- "files from XFree86 4.4RC3. It is not supported in any way.\n"
+ "It is not supported in any way.\n"
"Bugs may be filed in the bugzilla at http://bugs.freedesktop.org/.\n"
"Select the \"xorg\" product for bugs you find in this release.\n"
"Before reporting bugs in pre-release versions please check the\n"
"latest version in the " XVENDORNAME " \"monolithic tree\" CVS\n"
"repository hosted at http://www.freedesktop.org/Software/xorg/");
#endif
+ ErrorF("\nX Window System Version %d.%d.%d",
+ XORG_VERSION_MAJOR,
+ XORG_VERSION_MINOR,
+ XORG_VERSION_PATCH);
#if XORG_VERSION_SNAP > 0
- ErrorF(".%d", XF86_VERSION_SNAP);
+ ErrorF(".%d", XORG_VERSION_SNAP);
#endif
#if XORG_VERSION_SNAP >= 900
@@ -1738,9 +1768,12 @@ xf86PrintBanner()
#endif
#ifdef XORG_CUSTOM_VERSION
- ErrorF(" (%s)", XF86_CUSTOM_VERSION);
+ ErrorF(" (%s)", XORG_CUSTOM_VERSION);
+#endif
+#ifndef XORG_DATE
+#define XORG_DATE XF86_DATE
#endif
- ErrorF("\nRelease Date: %s\n", XF86_DATE);
+ ErrorF("\nRelease Date: %s\n", XORG_DATE);
ErrorF("X Protocol Version %d, Revision %d, %s\n",
X_PROTOCOL, X_PROTOCOL_REVISION, XORG_RELEASE );
ErrorF("Build Operating System:%s%s\n", OSNAME, OSVENDOR);
diff --git a/hw/xfree86/common/xf86Io.c b/hw/xfree86/common/xf86Io.c
index bd44bdeb5..7f9ba6f0e 100644
--- a/hw/xfree86/common/xf86Io.c
+++ b/hw/xfree86/common/xf86Io.c
@@ -49,6 +49,7 @@
*/
/* $XConsortium: xf86Io.c /main/27 1996/10/19 17:58:55 kaleb $ */
+/* $XdotOrg: xc/programs/Xserver/hw/xfree86/common/xf86Io.c,v 1.2 2004/07/28 03:57:19 alanc Exp $ */
#define NEED_EVENTS
#include "X.h"
@@ -148,6 +149,10 @@ xf86KbdLeds ()
if (leds & XLED4) real_leds |= LED_SCR;
#endif
#endif
+#ifdef sun
+ /* Pass through any additional LEDs, such as Kana LED on Sun Japanese kbd */
+ real_leds |= (leds & 0xFFFFFFF0);
+#endif
xf86SetKbdLeds(real_leds);
(void)leds;
}
diff --git a/hw/xfree86/common/xf86Mode.c b/hw/xfree86/common/xf86Mode.c
index ec83f514b..4462322d9 100644
--- a/hw/xfree86/common/xf86Mode.c
+++ b/hw/xfree86/common/xf86Mode.c
@@ -1,4 +1,4 @@
-/* $XdotOrg: xc/programs/Xserver/hw/xfree86/common/xf86Mode.c,v 1.1.4.3.2.1 2004/02/27 21:30:59 eich Exp $ */
+/* $XdotOrg: xc/programs/Xserver/hw/xfree86/common/xf86Mode.c,v 1.2 2004/04/23 19:20:32 eich Exp $ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Mode.c,v 1.69 2003/10/08 14:58:28 dawes Exp $ */
/*
* Copyright (c) 1997-2003 by The XFree86 Project, Inc.
diff --git a/hw/xfree86/common/xf86PciInfo.h b/hw/xfree86/common/xf86PciInfo.h
index 19cc009dd..a14ad1897 100644
--- a/hw/xfree86/common/xf86PciInfo.h
+++ b/hw/xfree86/common/xf86PciInfo.h
@@ -113,6 +113,18 @@
#define PCI_CHIP_QV1280 0x3033
/* ATI */
+#define PCI_CHIP_RV380_3150 0x3150
+#define PCI_CHIP_RV380_3151 0x3151
+#define PCI_CHIP_RV380_3152 0x3152
+#define PCI_CHIP_RV380_3153 0x3153
+#define PCI_CHIP_RV380_3154 0x3154
+#define PCI_CHIP_RV380_3156 0x3156
+#define PCI_CHIP_RV380_3E50 0x3E50
+#define PCI_CHIP_RV380_3E51 0x3E51
+#define PCI_CHIP_RV380_3E52 0x3E52
+#define PCI_CHIP_RV380_3E53 0x3E53
+#define PCI_CHIP_RV380_3E54 0x3E54
+#define PCI_CHIP_RV380_3E56 0x3E56
#define PCI_CHIP_RS100_4136 0x4136
#define PCI_CHIP_RS200_4137 0x4137
#define PCI_CHIP_R300_AD 0x4144
@@ -161,6 +173,14 @@
#define PCI_CHIP_RV250_Ie 0x4965
#define PCI_CHIP_RV250_If 0x4966
#define PCI_CHIP_RV250_Ig 0x4967
+#define PCI_CHIP_R420_JH 0x4A48
+#define PCI_CHIP_R420_JI 0x4A49
+#define PCI_CHIP_R420_JJ 0x4A4A
+#define PCI_CHIP_R420_JK 0x4A4B
+#define PCI_CHIP_R420_JL 0x4A4C
+#define PCI_CHIP_R420_JM 0x4A4D
+#define PCI_CHIP_R420_JN 0x4A4E
+#define PCI_CHIP_R420_JP 0x4A50
#define PCI_CHIP_MACH64LB 0x4C42
#define PCI_CHIP_MACH64LD 0x4C44
#define PCI_CHIP_RAGE128LE 0x4C45
@@ -257,6 +277,21 @@
#define PCI_CHIP_RAGE128TS 0x5453
#define PCI_CHIP_RAGE128TT 0x5454
#define PCI_CHIP_RAGE128TU 0x5455
+#define PCI_CHIP_RV370_5460 0x5460
+#define PCI_CHIP_RV370_5461 0x5461
+#define PCI_CHIP_RV370_5462 0x5462
+#define PCI_CHIP_RV370_5463 0x5463
+#define PCI_CHIP_RV370_5464 0x5464
+#define PCI_CHIP_RV370_5465 0x5465
+#define PCI_CHIP_RV370_5466 0x5466
+#define PCI_CHIP_RV370_5467 0x5467
+#define PCI_CHIP_R423_UH 0x5548
+#define PCI_CHIP_R423_UI 0x5549
+#define PCI_CHIP_R423_UJ 0x554A
+#define PCI_CHIP_R423_UK 0x554B
+#define PCI_CHIP_R423_UQ 0x5551
+#define PCI_CHIP_R423_UR 0x5552
+#define PCI_CHIP_R423_UT 0x5554
#define PCI_CHIP_MACH64VT 0x5654
#define PCI_CHIP_MACH64VU 0x5655
#define PCI_CHIP_MACH64VV 0x5656
@@ -264,12 +299,23 @@
#define PCI_CHIP_RS300_5835 0x5835
#define PCI_CHIP_RS300_5836 0x5836
#define PCI_CHIP_RS300_5837 0x5837
+#define PCI_CHIP_RV370_5B60 0x5B60
+#define PCI_CHIP_RV370_5B61 0x5B61
+#define PCI_CHIP_RV370_5B62 0x5B62
+#define PCI_CHIP_RV370_5B63 0x5B63
+#define PCI_CHIP_RV370_5B64 0x5B64
+#define PCI_CHIP_RV370_5B65 0x5B65
+#define PCI_CHIP_RV370_5B66 0x5B66
+#define PCI_CHIP_RV370_5B67 0x5B67
#define PCI_CHIP_RV280_5960 0x5960
#define PCI_CHIP_RV280_5961 0x5961
#define PCI_CHIP_RV280_5962 0x5962
#define PCI_CHIP_RV280_5964 0x5964
#define PCI_CHIP_RV280_5C61 0x5C61
#define PCI_CHIP_RV280_5C63 0x5C63
+#define PCI_CHIP_R423_5D57 0x5D57
+#define PCI_CHIP_RS350_7834 0x7834
+#define PCI_CHIP_RS350_7835 0x7835
/* Avance Logic */
#define PCI_CHIP_ALG2064 0x2064
diff --git a/hw/xfree86/common/xf86RandR.c b/hw/xfree86/common/xf86RandR.c
index 6f7fac3d3..457793efc 100644
--- a/hw/xfree86/common/xf86RandR.c
+++ b/hw/xfree86/common/xf86RandR.c
@@ -1,4 +1,4 @@
-/* $XdotOrg: xc/programs/Xserver/hw/xfree86/common/xf86RandR.c,v 1.1.4.3.2.2 2004/03/04 17:47:34 eich Exp $ */
+/* $XdotOrg: xc/programs/Xserver/hw/xfree86/common/xf86RandR.c,v 1.5 2004/08/13 18:24:07 sandmann Exp $ */
/*
* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86RandR.c,v 1.7tsi Exp $
*
@@ -38,6 +38,9 @@ typedef struct _xf86RandRInfo {
CloseScreenProcPtr CloseScreen;
int virtualX;
int virtualY;
+ int mmWidth;
+ int mmHeight;
+ Rotation rotation;
} XF86RandRInfoRec, *XF86RandRInfoPtr;
static int xf86RandRIndex;
@@ -72,13 +75,13 @@ xf86RandRGetInfo (ScreenPtr pScreen, Rotation *rotations)
refresh0 = refresh;
pSize = RRRegisterSize (pScreen,
mode->HDisplay, mode->VDisplay,
- pScreen->mmWidth, pScreen->mmHeight);
+ randrp->mmWidth, randrp->mmHeight);
if (!pSize)
return FALSE;
RRRegisterRate (pScreen, pSize, refresh);
if (mode == scrp->currentMode &&
- mode->HDisplay == pScreen->width && mode->VDisplay == pScreen->height)
- RRSetCurrentConfig (pScreen, RR_Rotate_0, refresh, pSize);
+ mode->HDisplay == scrp->virtualX && mode->VDisplay == scrp->virtualY)
+ RRSetCurrentConfig (pScreen, randrp->rotation, refresh, pSize);
if (mode->next == scrp->modes)
break;
}
@@ -88,33 +91,48 @@ xf86RandRGetInfo (ScreenPtr pScreen, Rotation *rotations)
mode = scrp->modes;
pSize = RRRegisterSize (pScreen,
randrp->virtualX, randrp->virtualY,
- pScreen->mmWidth * randrp->virtualX / scrp->currentMode->HDisplay,
- pScreen->mmHeight * randrp->virtualY / scrp->currentMode->VDisplay);
+ randrp->mmWidth,
+ randrp->mmHeight);
if (!pSize)
return FALSE;
RRRegisterRate (pScreen, pSize, refresh0);
- if (pScreen->width == randrp->virtualX &&
- pScreen->height == randrp->virtualY)
+ if (scrp->virtualX == randrp->virtualX &&
+ scrp->virtualY == randrp->virtualY)
{
- RRSetCurrentConfig (pScreen, RR_Rotate_0, refresh0, pSize);
+ RRSetCurrentConfig (pScreen, randrp->rotation, refresh0, pSize);
}
}
+
+ /* If there is driver support for randr, let it set our supported rotations */
+ if(scrp->RRFunc) {
+ xorgRRRotation RRRotation;
+
+ RRRotation.RRRotations = *rotations;
+ if (!(*scrp->RRFunc)(scrp, RR_GET_INFO, &RRRotation))
+ return FALSE;
+ *rotations = RRRotation.RRRotations;
+ }
+
return TRUE;
}
static Bool
xf86RandRSetMode (ScreenPtr pScreen,
DisplayModePtr mode,
- Bool useVirtual)
+ Bool useVirtual,
+ int mmWidth,
+ int mmHeight)
{
ScrnInfoPtr scrp = XF86SCRNINFO(pScreen);
XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen);
int oldWidth = pScreen->width;
int oldHeight = pScreen->height;
+ int oldmmWidth = pScreen->mmWidth;
+ int oldmmHeight = pScreen->mmHeight;
WindowPtr pRoot = WindowTable[pScreen->myNum];
if (pRoot)
- xf86EnableDisableFBAccess (pScreen->myNum, FALSE);
+ (*scrp->EnableDisableFBAccess) (pScreen->myNum, FALSE);
if (useVirtual)
{
scrp->virtualX = randrp->virtualX;
@@ -125,12 +143,27 @@ xf86RandRSetMode (ScreenPtr pScreen,
scrp->virtualX = mode->HDisplay;
scrp->virtualY = mode->VDisplay;
}
- pScreen->width = scrp->virtualX;
- pScreen->height = scrp->virtualY;
+ if(randrp->rotation & (RR_Rotate_90 | RR_Rotate_270))
+ {
+ /* If the screen is rotated 90 or 270 degrees, swap the sizes. */
+ pScreen->width = scrp->virtualY;
+ pScreen->height = scrp->virtualX;
+ pScreen->mmWidth = mmHeight;
+ pScreen->mmHeight = mmWidth;
+ }
+ else
+ {
+ pScreen->width = scrp->virtualX;
+ pScreen->height = scrp->virtualY;
+ pScreen->mmWidth = mmWidth;
+ pScreen->mmHeight = mmHeight;
+ }
if (!xf86SwitchMode (pScreen, mode))
{
scrp->virtualX = pScreen->width = oldWidth;
scrp->virtualY = pScreen->height = oldHeight;
+ pScreen->mmWidth = oldmmWidth;
+ pScreen->mmHeight = oldmmHeight;
return FALSE;
}
/*
@@ -144,7 +177,7 @@ xf86RandRSetMode (ScreenPtr pScreen,
xf86SetViewport (pScreen, pScreen->width, pScreen->height);
xf86SetViewport (pScreen, 0, 0);
if (pRoot)
- xf86EnableDisableFBAccess (pScreen->myNum, TRUE);
+ (*scrp->EnableDisableFBAccess) (pScreen->myNum, TRUE);
return TRUE;
}
@@ -160,6 +193,8 @@ xf86RandRSetConfig (ScreenPtr pScreen,
int px, py;
Bool useVirtual = FALSE;
+ randrp->rotation = rotation;
+
miPointerPosition (&px, &py);
for (mode = scrp->modes; ; mode = mode->next)
{
@@ -179,7 +214,20 @@ xf86RandRSetConfig (ScreenPtr pScreen,
return FALSE;
}
}
- if (!xf86RandRSetMode (pScreen, mode, useVirtual))
+
+ /* Have the driver do its thing. */
+ if (scrp->RRFunc) {
+ xorgRRRotation RRRotation;
+ RRRotation.RRConfig.rotation = rotation;
+ RRRotation.RRConfig.rate = rate;
+ RRRotation.RRConfig.width = pSize->width;
+ RRRotation.RRConfig.height = pSize->height;
+
+ if (!(*scrp->RRFunc)(scrp, RR_SET_CONFIG, &RRRotation))
+ return FALSE;
+ }
+
+ if (!xf86RandRSetMode (pScreen, mode, useVirtual, pSize->mmWidth, pSize->mmHeight))
return FALSE;
/*
* Move the cursor back where it belongs; SwitchMode repositions it
@@ -189,6 +237,7 @@ xf86RandRSetConfig (ScreenPtr pScreen,
if (px < pSize->width && py < pSize->height)
(*pScreen->SetCursorPosition) (pScreen, px, py, FALSE);
}
+
return TRUE;
}
@@ -270,6 +319,8 @@ xf86RandRInit (ScreenPtr pScreen)
randrp->virtualX = scrp->virtualX;
randrp->virtualY = scrp->virtualY;
+ randrp->mmWidth = pScreen->mmWidth;
+ randrp->mmHeight = pScreen->mmHeight;
randrp->CreateScreenResources = pScreen->CreateScreenResources;
pScreen->CreateScreenResources = xf86RandRCreateScreenResources;
@@ -277,6 +328,8 @@ xf86RandRInit (ScreenPtr pScreen)
randrp->CloseScreen = pScreen->CloseScreen;
pScreen->CloseScreen = xf86RandRCloseScreen;
+ randrp->rotation = RR_Rotate_0;
+
pScreen->devPrivates[xf86RandRIndex].ptr = randrp;
return TRUE;
}
diff --git a/hw/xfree86/common/xf86Version.h b/hw/xfree86/common/xf86Version.h
index a044230ed..45746bc90 100644
--- a/hw/xfree86/common/xf86Version.h
+++ b/hw/xfree86/common/xf86Version.h
@@ -1,4 +1,4 @@
-/* $XdotOrg: xc/programs/Xserver/hw/xfree86/xf86Version.h,v 1.1.4.4 2003/12/20 00:28:26 kaleb Exp $ */
+/* $XdotOrg: xc/programs/Xserver/hw/xfree86/xf86Version.h,v 1.2 2004/04/23 19:20:02 eich Exp $ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/xf86Version.h,v 3.566 2003/12/19 04:52:11 dawes Exp $ */
/*
@@ -59,4 +59,4 @@
#endif
/* $XConsortium: xf86Version.h /main/78 1996/10/28 05:42:10 kaleb $ */
-/* $XdotOrg: xc/programs/Xserver/hw/xfree86/xf86Version.h,v 1.1.4.4 2003/12/20 00:28:26 kaleb Exp $ */
+/* $XdotOrg: xc/programs/Xserver/hw/xfree86/xf86Version.h,v 1.2 2004/04/23 19:20:02 eich Exp $ */
diff --git a/hw/xfree86/common/xf86cmap.c b/hw/xfree86/common/xf86cmap.c
index c3b09e361..77d2ed174 100644
--- a/hw/xfree86/common/xf86cmap.c
+++ b/hw/xfree86/common/xf86cmap.c
@@ -1,4 +1,4 @@
-/* $XdotOrg: xc/programs/Xserver/hw/xfree86/common/xf86cmap.c,v 1.1.4.2 2004/02/16 20:19:59 alanc Exp $ */
+/* $XdotOrg: xc/programs/Xserver/hw/xfree86/common/xf86cmap.c,v 1.3 2004/07/30 21:10:46 eich Exp $ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86cmap.c,v 1.25 2003/10/17 20:02:12 alanh Exp $ */
/*
* Copyright (c) 1998-2001 by The XFree86 Project, Inc.
@@ -117,7 +117,7 @@ static int CMapChangeGamma(int, Gamma);
static void ComputeGamma(CMapScreenPtr);
static Bool CMapAllocateColormapPrivate(ColormapPtr);
-static Bool CMapInitDefMap(ColormapPtr);
+static Bool CMapInitDefMap(ColormapPtr,int);
static void CMapRefreshColors(ColormapPtr, int, int*);
static void CMapSetOverscan(ColormapPtr, int, int *);
static void CMapReinstallMap(ColormapPtr);
@@ -211,7 +211,7 @@ Bool xf86HandleColormaps(
/* get the default map */
pDefMap = (ColormapPtr) LookupIDByType(pScreen->defColormap, RT_COLORMAP);
-
+
if(!CMapAllocateColormapPrivate(pDefMap)) {
CMapUnwrapScreen(pScreen);
return FALSE;
@@ -224,7 +224,7 @@ Bool xf86HandleColormaps(
}
static Bool
-CMapInitDefMap(ColormapPtr cmap)
+CMapInitDefMap(ColormapPtr cmap, int index)
{
return TRUE;
}
@@ -433,7 +433,8 @@ CMapInstallColormap(ColormapPtr pmap)
/* Important. We let the lower layers, namely DGA,
overwrite the choice of Colormap to install */
- pmap = miInstalledMaps[index];
+ if (miInstalledMaps[index])
+ pmap = miInstalledMaps[index];
if(!(pScreenPriv->flags & CMAP_PALETTED_TRUECOLOR) &&
(pmap->pVisual->class == TrueColor) &&
diff --git a/hw/xfree86/common/xf86fbman.c b/hw/xfree86/common/xf86fbman.c
index b7c4afa1c..ee286d172 100644
--- a/hw/xfree86/common/xf86fbman.c
+++ b/hw/xfree86/common/xf86fbman.c
@@ -1095,12 +1095,10 @@ localQueryLargestOffscreenLinear(
*size = 0;
- if (!offman->LinearAreas) return FALSE;
-
pLink = offman->LinearAreas;
- pLinkRet = pLink;
- if (!pLink->area) {
+ if (pLink && !pLink->area) {
+ pLinkRet = pLink;
while (pLink) {
if (pLink->free) {
if (pLink->linear.size > pLinkRet->linear.size)
diff --git a/hw/xfree86/common/xf86pciBus.c b/hw/xfree86/common/xf86pciBus.c
index 790bf7409..c5a022bf9 100644
--- a/hw/xfree86/common/xf86pciBus.c
+++ b/hw/xfree86/common/xf86pciBus.c
@@ -424,7 +424,7 @@ FindPCIVideoInfo(void)
if ((pcrp->pci_command & PCI_CMD_MEM_ENABLE) &&
(num == 1 ||
((info->class == PCI_CLASS_DISPLAY) &&
- (info->subclass == PCI_SUBCLASS_DISPLAY_MISC)))) {
+ (info->subclass == PCI_SUBCLASS_DISPLAY_VGA)))) {
if (primaryBus.type == BUS_NONE) {
primaryBus.type = BUS_PCI;
primaryBus.id.pci.bus = pcrp->busnum;
@@ -3230,10 +3230,14 @@ pciVideoPtr
xf86GetPciInfoForEntity(int entityIndex)
{
pciVideoPtr *ppPci;
- EntityPtr p = xf86Entities[entityIndex];
+ EntityPtr p;
- if (entityIndex >= xf86NumEntities
- || p->busType != BUS_PCI) return NULL;
+ if (entityIndex >= xf86NumEntities)
+ return NULL;
+
+ p = xf86Entities[entityIndex];
+ if (p->busType != BUS_PCI)
+ return NULL;
for (ppPci = xf86PciVideoInfo; *ppPci != NULL; ppPci++) {
if (p->pciBusId.bus == (*ppPci)->bus &&
diff --git a/hw/xfree86/common/xf86str.h b/hw/xfree86/common/xf86str.h
index 367cb19a9..770233033 100644
--- a/hw/xfree86/common/xf86str.h
+++ b/hw/xfree86/common/xf86str.h
@@ -476,7 +476,7 @@ typedef struct _confdrirec {
/* These values should be adjusted when new fields are added to ScrnInfoRec */
#define NUM_RESERVED_INTS 16
#define NUM_RESERVED_POINTERS 15
-#define NUM_RESERVED_FUNCS 12
+#define NUM_RESERVED_FUNCS 11
typedef pointer (*funcPointer)(void);
@@ -737,6 +737,24 @@ typedef struct {
PixmapPtr pPix;
} DGADeviceRec, *DGADevicePtr;
+typedef enum {
+ RR_GET_INFO,
+ RR_SET_CONFIG
+} xorgRRFuncFlags;
+
+typedef struct {
+ int rotation;
+ int rate;
+ int width;
+ int height;
+} xorgRRConfig;
+
+typedef union {
+ short RRRotations;
+ xorgRRConfig RRConfig;
+} xorgRRRotation, *xorgRRRotationPtr;
+
+
/*
* Flags for driver Probe() functions.
*/
@@ -767,6 +785,9 @@ typedef int xf86HandleMessageProc (int, const char*, const char*, char**);
typedef void xf86DPMSSetProc (ScrnInfoPtr, int, int);
typedef void xf86LoadPaletteProc (ScrnInfoPtr, int, int *, LOCO *, VisualPtr);
typedef void xf86SetOverscanProc (ScrnInfoPtr, int);
+typedef Bool xorgRRFuncProc (ScrnInfoPtr, xorgRRFuncFlags,
+ xorgRRRotationPtr);
+
/*
* ScrnInfoRec
@@ -921,6 +942,7 @@ typedef struct _ScrnInfoRec {
xf86DPMSSetProc *DPMSSet;
xf86LoadPaletteProc *LoadPalette;
xf86SetOverscanProc *SetOverscan;
+ xorgRRFuncProc *RRFunc;
/*
* This can be used when the minor ABI version is incremented.
diff --git a/hw/xfree86/common/xorgHelper.c b/hw/xfree86/common/xorgHelper.c
index c6364f19e..4b904dc06 100644
--- a/hw/xfree86/common/xorgHelper.c
+++ b/hw/xfree86/common/xorgHelper.c
@@ -1,4 +1,4 @@
-/* $XdotOrg$ */
+/* $XdotOrg: xc/programs/Xserver/hw/xfree86/common/xorgHelper.c,v 1.2 2004/04/23 19:20:32 eich Exp $ */
#include "X.h"
#include "os.h"
diff --git a/hw/xfree86/common/xorgVersion.h b/hw/xfree86/common/xorgVersion.h
index bfc66a59c..47005320a 100644
--- a/hw/xfree86/common/xorgVersion.h
+++ b/hw/xfree86/common/xorgVersion.h
@@ -1,4 +1,4 @@
-/* $XdotOrg: xc/programs/Xserver/hw/xfree86/xf86Version.h,v 1.1.4.3 2003/12/06 13:24:23 kaleb Exp $ */
+/* $XdotOrg: xc/programs/Xserver/hw/xfree86/xorgVersion.h,v 1.3 2004/08/16 02:07:53 kem Exp $ */
/*
* Copyright (c) 2004, X.Org Foundation
@@ -45,7 +45,7 @@
# define XORG_VERSION_MAJOR XORG_GET_MAJOR_VERSION(XORG_VERSION_CURRENT)
# define XORG_VERSION_MINOR XORG_GET_MINOR_VERSION(XORG_VERSION_CURRENT)
# define XORG_VERSION_PATCH XORG_GET_PATCH_VERSION(XORG_VERSION_CURRENT)
-# define XORG_VERSION_SNAP XORG_GET_PATCH_VERSION(XORG_VERSION_CURRENT)
+# define XORG_VERSION_SNAP XORG_GET_SNAP_VERSION(XORG_VERSION_CURRENT)
#endif
-/* $XdotOrg: xc/programs/Xserver/hw/xfree86/xf86Version.h,v 1.1.4.3 2003/12/06 13:24:23 kaleb Exp $ */
+/* $XdotOrg: xc/programs/Xserver/hw/xfree86/xorgVersion.h,v 1.3 2004/08/16 02:07:53 kem Exp $ */
diff --git a/hw/xfree86/ddc/interpret_edid.c b/hw/xfree86/ddc/interpret_edid.c
index bf2509c95..d5a791570 100644
--- a/hw/xfree86/ddc/interpret_edid.c
+++ b/hw/xfree86/ddc/interpret_edid.c
@@ -185,7 +185,9 @@ get_monitor_ranges(Uchar *c, struct monitor_ranges *r)
r->max_v = MAX_V;
r->min_h = MIN_H;
r->max_h = MAX_H;
- r->max_clock = MAX_CLOCK * 10;
+ r->max_clock = 0;
+ if(MAX_CLOCK != 0xff) /* is specified? */
+ r->max_clock = MAX_CLOCK * 10;
}
static void
diff --git a/hw/xfree86/ddc/xf86DDC.c b/hw/xfree86/ddc/xf86DDC.c
index 123bb492e..2cdeacab5 100644
--- a/hw/xfree86/ddc/xf86DDC.c
+++ b/hw/xfree86/ddc/xf86DDC.c
@@ -34,7 +34,7 @@ static XF86ModuleVersionInfo ddcVersRec =
MODULEVENDORSTRING,
MODINFOSTRING1,
MODINFOSTRING2,
- XF86_VERSION_CURRENT,
+ XORG_VERSION_CURRENT,
1, 0, 0,
ABI_CLASS_VIDEODRV, /* needs the video driver ABI */
ABI_VIDEODRV_VERSION,
@@ -83,7 +83,7 @@ ddcSetup(pointer module, pointer opts, int *errmaj, int *errmin)
static unsigned char *EDIDRead_DDC1(
ScrnInfoPtr pScrn,
- void (*)(ScrnInfoPtr,xf86ddcSpeed),
+ DDC1SetSpeedProc,
unsigned int (*)(ScrnInfoPtr)
);
@@ -139,7 +139,7 @@ DDCAvailableOptions(void *unused)
xf86MonPtr
xf86DoEDID_DDC1(
- int scrnIndex, void (*DDC1SetSpeed)(ScrnInfoPtr, xf86ddcSpeed),
+ int scrnIndex, DDC1SetSpeedProc DDC1SetSpeed,
unsigned int (*DDC1Read)(ScrnInfoPtr)
)
{
@@ -227,7 +227,7 @@ xf86DoEDID_DDC2(int scrnIndex, I2CBusPtr pBus)
* function; it will also decide if we need to reread it
*/
static unsigned char *
-EDIDRead_DDC1(ScrnInfoPtr pScrn, void (*DDCSpeed)(ScrnInfoPtr,xf86ddcSpeed),
+EDIDRead_DDC1(ScrnInfoPtr pScrn, DDC1SetSpeedProc DDCSpeed,
unsigned int (*read_DDC)(ScrnInfoPtr))
{
unsigned char *EDID_block = NULL;
diff --git a/hw/xfree86/ddc/xf86DDC.h b/hw/xfree86/ddc/xf86DDC.h
index ae2e26641..3d94fd976 100644
--- a/hw/xfree86/ddc/xf86DDC.h
+++ b/hw/xfree86/ddc/xf86DDC.h
@@ -24,9 +24,11 @@ typedef enum {
DDC_FAST
} xf86ddcSpeed;
+typedef void (* DDC1SetSpeedProc)(ScrnInfoPtr, xf86ddcSpeed);
+
extern xf86MonPtr xf86DoEDID_DDC1(
int scrnIndex,
- void (*DDC1SetSpeed)(ScrnInfoPtr, xf86ddcSpeed),
+ DDC1SetSpeedProc DDC1SetSpeed,
unsigned int (*DDC1Read)(ScrnInfoPtr)
);
diff --git a/hw/xfree86/dixmods/GLcoremodule.c b/hw/xfree86/dixmods/GLcoremodule.c
index 422da4820..a62b33ce4 100644
--- a/hw/xfree86/dixmods/GLcoremodule.c
+++ b/hw/xfree86/dixmods/GLcoremodule.c
@@ -42,7 +42,7 @@ static XF86ModuleVersionInfo VersRec =
MODULEVENDORSTRING,
MODINFOSTRING1,
MODINFOSTRING2,
- XF86_VERSION_CURRENT,
+ XORG_VERSION_CURRENT,
1, 0, 0,
ABI_CLASS_EXTENSION,
ABI_EXTENSION_VERSION,
diff --git a/hw/xfree86/dixmods/afbmodule.c b/hw/xfree86/dixmods/afbmodule.c
index 19f196ad8..ac7049c10 100644
--- a/hw/xfree86/dixmods/afbmodule.c
+++ b/hw/xfree86/dixmods/afbmodule.c
@@ -36,7 +36,7 @@ static XF86ModuleVersionInfo VersRec =
MODULEVENDORSTRING,
MODINFOSTRING1,
MODINFOSTRING2,
- XF86_VERSION_CURRENT,
+ XORG_VERSION_CURRENT,
1, 0, 0,
ABI_CLASS_ANSIC, /* Only need the ansic layer */
ABI_ANSIC_VERSION,
diff --git a/hw/xfree86/dixmods/bitmapmod.c b/hw/xfree86/dixmods/bitmapmod.c
index 27fc23d32..458cc62c9 100644
--- a/hw/xfree86/dixmods/bitmapmod.c
+++ b/hw/xfree86/dixmods/bitmapmod.c
@@ -43,7 +43,7 @@ static XF86ModuleVersionInfo VersRec =
MODULEVENDORSTRING,
MODINFOSTRING1,
MODINFOSTRING2,
- XF86_VERSION_CURRENT,
+ XORG_VERSION_CURRENT,
1, 0, 0,
ABI_CLASS_FONT, /* Font module */
ABI_FONT_VERSION,
diff --git a/hw/xfree86/dixmods/cfb16module.c b/hw/xfree86/dixmods/cfb16module.c
index c8c79b545..ef5c79459 100644
--- a/hw/xfree86/dixmods/cfb16module.c
+++ b/hw/xfree86/dixmods/cfb16module.c
@@ -38,7 +38,7 @@ static XF86ModuleVersionInfo VersRec =
MODULEVENDORSTRING,
MODINFOSTRING1,
MODINFOSTRING2,
- XF86_VERSION_CURRENT,
+ XORG_VERSION_CURRENT,
1, 0, 0,
ABI_CLASS_ANSIC, /* Only need the ansic layer */
ABI_ANSIC_VERSION,
diff --git a/hw/xfree86/dixmods/cfb24module.c b/hw/xfree86/dixmods/cfb24module.c
index cf363f3c7..e7e683ae0 100644
--- a/hw/xfree86/dixmods/cfb24module.c
+++ b/hw/xfree86/dixmods/cfb24module.c
@@ -38,7 +38,7 @@ static XF86ModuleVersionInfo VersRec =
MODULEVENDORSTRING,
MODINFOSTRING1,
MODINFOSTRING2,
- XF86_VERSION_CURRENT,
+ XORG_VERSION_CURRENT,
1, 0, 0,
ABI_CLASS_ANSIC, /* Only need the ansic layer */
ABI_ANSIC_VERSION,
diff --git a/hw/xfree86/dixmods/cfb32module.c b/hw/xfree86/dixmods/cfb32module.c
index 791b64285..2d75763b0 100644
--- a/hw/xfree86/dixmods/cfb32module.c
+++ b/hw/xfree86/dixmods/cfb32module.c
@@ -38,7 +38,7 @@ static XF86ModuleVersionInfo VersRec =
MODULEVENDORSTRING,
MODINFOSTRING1,
MODINFOSTRING2,
- XF86_VERSION_CURRENT,
+ XORG_VERSION_CURRENT,
1, 0, 0,
ABI_CLASS_ANSIC, /* Only need the ansic layer */
ABI_ANSIC_VERSION,
diff --git a/hw/xfree86/dixmods/cfbmodule.c b/hw/xfree86/dixmods/cfbmodule.c
index 87af699db..142442adb 100644
--- a/hw/xfree86/dixmods/cfbmodule.c
+++ b/hw/xfree86/dixmods/cfbmodule.c
@@ -38,7 +38,7 @@ static XF86ModuleVersionInfo VersRec =
MODULEVENDORSTRING,
MODINFOSTRING1,
MODINFOSTRING2,
- XF86_VERSION_CURRENT,
+ XORG_VERSION_CURRENT,
1, 0, 0,
ABI_CLASS_ANSIC, /* Only need the ansic layer */
ABI_ANSIC_VERSION,
diff --git a/hw/xfree86/dixmods/dbemodule.c b/hw/xfree86/dixmods/dbemodule.c
index 914678b71..ff2b7ffbc 100644
--- a/hw/xfree86/dixmods/dbemodule.c
+++ b/hw/xfree86/dixmods/dbemodule.c
@@ -20,7 +20,7 @@ static XF86ModuleVersionInfo VersRec =
MODULEVENDORSTRING,
MODINFOSTRING1,
MODINFOSTRING2,
- XF86_VERSION_CURRENT,
+ XORG_VERSION_CURRENT,
1, 0, 0,
ABI_CLASS_EXTENSION,
ABI_EXTENSION_VERSION,
diff --git a/hw/xfree86/dixmods/extmod/modinit.c b/hw/xfree86/dixmods/extmod/modinit.c
index a27fa5994..56776accf 100644
--- a/hw/xfree86/dixmods/extmod/modinit.c
+++ b/hw/xfree86/dixmods/extmod/modinit.c
@@ -213,7 +213,7 @@ static XF86ModuleVersionInfo VersRec =
MODULEVENDORSTRING,
MODINFOSTRING1,
MODINFOSTRING2,
- XF86_VERSION_CURRENT,
+ XORG_VERSION_CURRENT,
1, 0, 0,
ABI_CLASS_EXTENSION,
ABI_EXTENSION_VERSION,
diff --git a/hw/xfree86/dixmods/extmod/modinit.h b/hw/xfree86/dixmods/extmod/modinit.h
index 71b54866d..73f4d1b14 100644
--- a/hw/xfree86/dixmods/extmod/modinit.h
+++ b/hw/xfree86/dixmods/extmod/modinit.h
@@ -1,4 +1,4 @@
-/* $XdotOrg: xc/programs/Xserver/Xext/extmod/modinit.h,v 1.1.4.2.2.2 2004/03/04 20:16:03 kaleb Exp $ */
+/* $XdotOrg: xc/programs/Xserver/Xext/extmod/modinit.h,v 1.2 2004/04/23 18:44:43 eich Exp $ */
/* $XFree86: xc/programs/Xserver/Xext/extmod/modinit.h,v 1.1 2003/07/16 01:38:33 dawes Exp $ */
#ifndef INITARGS
diff --git a/hw/xfree86/dixmods/extmod/xf86vmode.c b/hw/xfree86/dixmods/extmod/xf86vmode.c
index 74119e4a1..8060aec52 100644
--- a/hw/xfree86/dixmods/extmod/xf86vmode.c
+++ b/hw/xfree86/dixmods/extmod/xf86vmode.c
@@ -29,7 +29,7 @@ or other dealings in this Software without prior written authorization
from Kaleb S. KEITHLEY
*/
-/* $XdotOrg: xc/programs/Xserver/Xext/xf86vmode.c,v 1.1.4.3.4.1 2004/03/04 17:47:20 eich Exp $ */
+/* $XdotOrg: xc/programs/Xserver/Xext/xf86vmode.c,v 1.2 2004/04/23 18:44:41 eich Exp $ */
/* $Xorg: xf86vmode.c,v 1.3 2000/08/17 19:47:59 cpqbld Exp $ */
/* THIS IS NOT AN X CONSORTIUM STANDARD OR AN X PROJECT TEAM SPECIFICATION */
diff --git a/hw/xfree86/dixmods/fbmodule.c b/hw/xfree86/dixmods/fbmodule.c
index 2b9c50408..1b9b665dd 100644
--- a/hw/xfree86/dixmods/fbmodule.c
+++ b/hw/xfree86/dixmods/fbmodule.c
@@ -36,7 +36,7 @@ static XF86ModuleVersionInfo VersRec =
MODULEVENDORSTRING,
MODINFOSTRING1,
MODINFOSTRING2,
- XF86_VERSION_CURRENT,
+ XORG_VERSION_CURRENT,
1, 0, 0,
ABI_CLASS_ANSIC, /* Only need the ansic layer */
ABI_ANSIC_VERSION,
diff --git a/hw/xfree86/dixmods/ftmodule.c b/hw/xfree86/dixmods/ftmodule.c
index ceb5485c0..1f65cefbe 100644
--- a/hw/xfree86/dixmods/ftmodule.c
+++ b/hw/xfree86/dixmods/ftmodule.c
@@ -43,7 +43,7 @@ static XF86ModuleVersionInfo VersRec =
MODULEVENDORSTRING " & the After X-TT Project",
MODINFOSTRING1,
MODINFOSTRING2,
- XF86_VERSION_CURRENT,
+ XORG_VERSION_CURRENT,
2, 1, 0,
ABI_CLASS_FONT, /* Font module */
ABI_FONT_VERSION,
diff --git a/hw/xfree86/dixmods/glxmodule.c b/hw/xfree86/dixmods/glxmodule.c
index eb8e54f26..853d49b0f 100644
--- a/hw/xfree86/dixmods/glxmodule.c
+++ b/hw/xfree86/dixmods/glxmodule.c
@@ -113,6 +113,8 @@ static const char *glcoreSymbols[] = {
"__glTexGeniv_size",
"__glTexParameterfv_size",
"__glTexParameteriv_size",
+ "__glXglDDXExtensionInfo",
+ "__glXglDDXScreenInfo",
"__glXActiveScreens",
"__glXAssociateContext",
"__glXBadContext",
@@ -776,7 +778,6 @@ static const char *glcoreSymbols[] = {
"__glXFogfvReqSize",
"__glXFogivReqSize",
"__glXForceCurrent",
- "__glXFormatGLModes",
"__glXFree",
"__glXFreeBuffers",
"__glXFreeContext",
@@ -1222,7 +1223,7 @@ static XF86ModuleVersionInfo VersRec =
MODULEVENDORSTRING,
MODINFOSTRING1,
MODINFOSTRING2,
- XF86_VERSION_CURRENT,
+ XORG_VERSION_CURRENT,
1, 0, 0,
ABI_CLASS_EXTENSION,
ABI_EXTENSION_VERSION,
diff --git a/hw/xfree86/dixmods/laymodule.c b/hw/xfree86/dixmods/laymodule.c
index 274e68b2e..6d7c4e280 100644
--- a/hw/xfree86/dixmods/laymodule.c
+++ b/hw/xfree86/dixmods/laymodule.c
@@ -43,7 +43,7 @@ static XF86ModuleVersionInfo VersRec =
MODULEVENDORSTRING,
MODINFOSTRING1,
MODINFOSTRING2,
- XF86_VERSION_CURRENT,
+ XORG_VERSION_CURRENT,
1, 0, 0,
ABI_CLASS_ANSIC, /* Only need the ansic layer */
ABI_ANSIC_VERSION,
diff --git a/hw/xfree86/dixmods/mfbmodule.c b/hw/xfree86/dixmods/mfbmodule.c
index 0617226d0..40d884c9e 100644
--- a/hw/xfree86/dixmods/mfbmodule.c
+++ b/hw/xfree86/dixmods/mfbmodule.c
@@ -35,7 +35,7 @@ static XF86ModuleVersionInfo VersRec =
MODULEVENDORSTRING,
MODINFOSTRING1,
MODINFOSTRING2,
- XF86_VERSION_CURRENT,
+ XORG_VERSION_CURRENT,
1, 0, 0,
ABI_CLASS_ANSIC, /* Only need the ansic layer */
ABI_ANSIC_VERSION,
diff --git a/hw/xfree86/dixmods/recordmod.c b/hw/xfree86/dixmods/recordmod.c
index bd1022193..4eebf0ee6 100644
--- a/hw/xfree86/dixmods/recordmod.c
+++ b/hw/xfree86/dixmods/recordmod.c
@@ -21,7 +21,7 @@ static XF86ModuleVersionInfo VersRec = {
MODULEVENDORSTRING,
MODINFOSTRING1,
MODINFOSTRING2,
- XF86_VERSION_CURRENT,
+ XORG_VERSION_CURRENT,
1, 13, 0,
ABI_CLASS_EXTENSION,
ABI_EXTENSION_VERSION,
diff --git a/hw/xfree86/dixmods/shmodule.c b/hw/xfree86/dixmods/shmodule.c
index d24f8a823..f47b03aa9 100644
--- a/hw/xfree86/dixmods/shmodule.c
+++ b/hw/xfree86/dixmods/shmodule.c
@@ -43,7 +43,7 @@ static XF86ModuleVersionInfo VersRec =
MODULEVENDORSTRING,
MODINFOSTRING1,
MODINFOSTRING2,
- XF86_VERSION_CURRENT,
+ XORG_VERSION_CURRENT,
1, 0, 0,
ABI_CLASS_ANSIC, /* Only need the ansic layer */
ABI_ANSIC_VERSION,
diff --git a/hw/xfree86/dixmods/type1mod.c b/hw/xfree86/dixmods/type1mod.c
index 9c25f4c0b..868de3de4 100644
--- a/hw/xfree86/dixmods/type1mod.c
+++ b/hw/xfree86/dixmods/type1mod.c
@@ -43,7 +43,7 @@ static XF86ModuleVersionInfo VersRec =
MODULEVENDORSTRING,
MODINFOSTRING1,
MODINFOSTRING2,
- XF86_VERSION_CURRENT,
+ XORG_VERSION_CURRENT,
1, 0, 2,
ABI_CLASS_FONT, /* Font module */
ABI_FONT_VERSION,
diff --git a/hw/xfree86/dixmods/xf86XTrapModule.c b/hw/xfree86/dixmods/xf86XTrapModule.c
index 65062108e..f6e37b54e 100644
--- a/hw/xfree86/dixmods/xf86XTrapModule.c
+++ b/hw/xfree86/dixmods/xf86XTrapModule.c
@@ -27,7 +27,7 @@ static XF86ModuleVersionInfo xtrapVersRec =
MODULEVENDORSTRING,
MODINFOSTRING1,
MODINFOSTRING2,
- XF86_VERSION_CURRENT,
+ XORG_VERSION_CURRENT,
1, 0, 0,
ABI_CLASS_EXTENSION, /* needs the server extension ABI */
ABI_EXTENSION_VERSION,
diff --git a/hw/xfree86/doc/README.DRI b/hw/xfree86/doc/README.DRI
index 3962a0686..7fc52eb32 100644
--- a/hw/xfree86/doc/README.DRI
+++ b/hw/xfree86/doc/README.DRI
@@ -1253,3 +1253,4 @@ demo programs is available from http://dri.sourceforge.net/res.phtml
Generated from XFree86: xc/programs/Xserver/hw/xfree86/doc/sgml/DRI.sgml,v 1.28 dawes Exp $
+
diff --git a/hw/xfree86/doc/README.fonts b/hw/xfree86/doc/README.fonts
index 26b92cd01..87f264f14 100644
--- a/hw/xfree86/doc/README.fonts
+++ b/hw/xfree86/doc/README.fonts
@@ -1,4 +1,4 @@
- Fonts in X11R6.7
+ Fonts in X11R6.8
Juliusz Chroboczek, <jch@pps.jussieu.fr>
@@ -6,10 +6,9 @@
1. Introduction
-This document describes the support for fonts in X11R6.7. Installing fonts
+This document describes the support for fonts in X11R6.8. Installing fonts
(section 2., page 1) is aimed at the casual user wishing to install fonts in
-X11R6.7 or XFree86; the rest of the document describes the font support in
-more detail.
+X11R6.8 the rest of the document describes the font support in more detail.
We assume some familiarity with digital fonts. If anything is not clear to
you, please consult Appendix: Background (section 5., page 1) at the end of
@@ -19,7 +18,7 @@ this document for background information.
X includes two font systems: the original core X11 fonts system, which is
present in all implementations of X11, and the Xft fonts system, which may
-not be distributed with implementations of X11 that are not based on X116.7.0
+not be distributed with implementations of X11 that are not based on X11R6.8
but will hopefully be included by them in the future
The core X11 fonts system is directly derived from the fonts system included
@@ -49,13 +48,13 @@ access newly-installed fonts.
Xft has no configuration mechanism itself, rather it relies upon the fontcon-
fig library to configure and customize fonts. That library is not specific
-to X11R6.7.0 or indeed on any particular font output mechanism. This discus-
+to X11R6.8 or indeed on any particular font output mechanism. This discus-
sion describes how fontconfig, rather than Xft, works.
2.1.1 Installing fonts in Xft
Fontconfig looks for fonts in a set of well-known directories that include
-all of X11R6.7's standard font directories (`/usr/X11R6/lib/X11/lib/fonts/*')
+all of X11R6.8's standard font directories (`/usr/X11R6/lib/X11/lib/fonts/*')
by default) as well as a directory called `.fonts/' in the user's home direc-
tory. Installing a font for use by Xft applications is as simple as copying
a font file into one of these directories.
@@ -115,9 +114,9 @@ Anti-aliasing can be disabled for all fonts by the following incantation:
</edit>
</match>
-Xft supports sub-pixel rasterisation on LCD displays. X11R67 should automat-
-ically enable this feature on laptops and when using an LCD monitor connected
-with a DVI cable; you can check whether this was done by typing
+Xft supports sub-pixel rasterisation on LCD displays. X11R6.8 should auto-
+matically enable this feature on laptops and when using an LCD monitor con-
+nected with a DVI cable; you can check whether this was done by typing
$ xdpyinfo -ext RENDER | grep sub-pixel
@@ -186,8 +185,8 @@ of this new directory by including it in the font path.
2.2.1 Installing bitmap fonts
-The X11R6.7 server can use bitmap fonts in both the cross-platform BDF format
-and the somewhat more efficient binary PCF format. (X11R6.7 also supports
+The X11R6.8 server can use bitmap fonts in both the cross-platform BDF format
+and the somewhat more efficient binary PCF format. (X11R6.8 also supports
the obsolete SNF format.)
Bitmap fonts are normally distributed in the BDF format. Before installing
@@ -216,7 +215,7 @@ directory; see Setting the server font path (section 2.2.4, page 1) below.
2.2.2 Installing scalable fonts
-The X11R6.7 server supports scalable fonts in four formats: Type 1, Speedo,
+The X11R6.8 server supports scalable fonts in four formats: Type 1, Speedo,
TrueType and CIDFont. This section only applies to the former three; for
information on CIDFonts, please see Installing CIDFonts (section 2.2.3, page
1) later in this document.
@@ -252,7 +251,7 @@ CMap `UniKS-UCS2-H' is called
Munhwa-Regular--UniKS-UCS2-H
-The CIDFont code in X11R6.7 requires a very rigid directory structure. The
+The CIDFont code in X11R6.8 requires a very rigid directory structure. The
main directory must be called `CID' (its location defaults to
`/usr/X11R6/lib/X11/fonts/CID' but it may be located anywhere), and it should
contain a subdirectory for every CID collection. Every subdirectory must
@@ -311,7 +310,7 @@ For best results, scalable fonts should appear in the font path before the
bitmap fonts; this way, the server will prefer bitmap fonts to scalable fonts
when an exact match is possible, but will avoid scaling bitmap fonts when a
scalable font can be used. (The `:unscaled' hack, while still supported,
-should no longer be necessary in X11R6.7.0.)
+should no longer be necessary in X11R6.8.)
You may check the font path of the running server by typing the command
@@ -354,11 +353,11 @@ mounted font directories). If this doesn't help, it is quite possible that
you are trying to use a font in a format that is not supported by your
server.
-X11R6.7 supports the BDF, PCF, SNF, Type 1, Speedo, TrueType, OpenType and
-CIDFont font formats. However, not all X11R6.7 or XFree86 servers come with
-all the font backends configured in.
+X11R6.8 supports the BDF, PCF, SNF, Type 1, Speedo, TrueType, OpenType and
+CIDFont font formats. However, not all X11R6.8 servers come with all the
+font backends configured in.
-On most platforms, the X11R6.7 servers are modular: the font backends are
+On most platforms, the X11R6.8 servers are modular: the font backends are
included in modules that are loaded at runtime. The modules to be loaded are
specified in the `xorg.conf' file using the `Load' directive:
@@ -366,7 +365,7 @@ specified in the `xorg.conf' file using the `Load' directive:
If you have trouble installing fonts in a specific format, you may want to
check the server's log file in order to see whether the relevant modules are
-properly loaded. The list of font modules distributed with X11R6.7 is as
+properly loaded. The list of font modules distributed with X11R6.8 is as
follows:
o "bitmap": bitmap fonts (`*.bdf', `*.pcf' and `*.snf');
@@ -383,7 +382,7 @@ follows:
Please note that the argument of the `Load' directive is case-sensitive.
-3. Fonts included with X11R6.7
+3. Fonts included with X11R6.8
3.1 Standard bitmap fonts
@@ -392,7 +391,7 @@ fonts, including the `fixed' family, and bitmap versions of Courier, Times,
Helvetica and some members of the Lucida family. In the SI, these fonts are
provided in the ISO 8859-1 encoding (ISO Latin Western-European).
-In X11R6.7, a number of these fonts are provided in Unicode-encoded font
+In X11R6.8, a number of these fonts are provided in Unicode-encoded font
files instead. At build time, these fonts are split into font files encoded
according to legacy encodings, a process which allows us to provide the stan-
dard fonts in a number of regional encodings with no duplication of work.
@@ -470,7 +469,7 @@ for improved presentation of text.
3.3 Standard scalable fonts
-X11R6.7 includes all the scalable fonts distributed with X11R6.
+X11R6.8 includes all the scalable fonts distributed with X11R6.
3.3.1 Standard Type 1 fonts
@@ -492,7 +491,7 @@ and reside in the font files
/usr/X11R6/lib/X11/fonts/Type1/UT*.pfa
-Finally, X11R6.7 also comes with Type 1 versions of Bitstream Courier and
+Finally, X11R6.8 also comes with Type 1 versions of Bitstream Courier and
Charter. These fonts have XLFD
-bitstream-courier-*-*-normal--0-0-0-0-m-0-iso8859-1
@@ -504,7 +503,7 @@ and reside in the font files
3.3.2 Standard Speedo fonts
-X11R6.7 includes Speedo versions of the Bitstream Courier and Charter fonts.
+X11R6.8 includes Speedo versions of the Bitstream Courier and Charter fonts.
In order to use these fonts, you should ensure that your X server is loading
the `Speedo' font backend; see Troubleshooting (section 2.2.5, page 1).
@@ -520,7 +519,7 @@ and reside in the font files
3.4 The Bigelow & Holmes Luxi family
-X11R6.7 includes the Luxi family of scalable fonts, in both TrueType and
+X11R6.8 includes the Luxi family of scalable fonts, in both TrueType and
Type 1 format. This family consists of the fonts Luxi Serif, with XLFD
-b&h-luxi serif-medium-*-normal--*-*-*-*-p-*-*-*
@@ -566,11 +565,11 @@ For more information, please contact <design@bigelowandholmes.com> or
An earlier version of the Luxi fonts was made available under the name
Lucidux. This name should no longer be used due to trademark uncertainties,
-and all traces of the Lucidux name have been removed from X11R6.7.
+and all traces of the Lucidux name have been removed from X11R6.8.
4. More about core fonts
-This section describes X11R6.7-specific enhancements to the core X11 fonts
+This section describes X11R6.8-specific enhancements to the core X11 fonts
system.
4.1 Core fonts and internationalisation
@@ -593,11 +592,8 @@ backend) use a common fontenc layer for font re-encoding. This allows these
backends to share their encoding data, and allows simple configuration of new
locales independently of font type.
-Please note: the X-TrueType (X-TT) backend does not use the fontenc layer,
-but instead uses its own method for font reencoding. If you are only inter-
-ested in X-TT you may want to skip to Using Symbol Fonts (section 4.1.5, page
-1), as the intervening information does not apply to X-TT. X-TT itself is
-described in more detail in X-TrueType (section 4.2.2, page 1).
+Please note: the X-TrueType (X-TT) backend is not included in X11R6.8. That
+functionality has been merged into the FreeType backend.>
In the fontenc layer, an encoding is defined by a name (such as iso8859-1),
possibly a number of aliases (alternate names), and an ordered collection of
@@ -656,7 +652,7 @@ option followed by the name of a directory containing encoding files, can be
used to automatically build `encodings.dir' files. Please see the mkfont-
dir(1) manual page for more details.
-A number of encoding files for common encodings are included with X11R6.7.
+A number of encoding files for common encodings are included with X11R6.8.
Information on writing new encoding files can be found in Format of encodings
directory files (section 4.1.3, page 1) and Format of encoding files (section
4.1.4, page 1) later in this document.
@@ -976,8 +972,8 @@ options are indispensable in CJKV. For example,
bw=0.5:ds=y:ai=0.2:mincho.ttc -misc-mincho-bold-i-normal--0-0-0-0-c-0-jisx0201.1976-0
setup the complete combination of jisx0208 and jisx0201 using mincho.ttc
-only. More information on the TTCap syntax is found on the After X-TT
-Project page <URL:http://x-tt.sourceforge.jp/>.
+only. More information on the TTCap syntax is found on the After X-TT Pro-
+ject page <URL:http://x-tt.sourceforge.jp/>.
The FreeType backend uses the fontenc layer in order to support recoding of
fonts; this was described in The fontenc layer (section 4.1.1, page 1) and
@@ -992,7 +988,7 @@ ings, but instead uses its own database of encodings.
Since the functionalities for CJKV support introduced by X-TT have been
merged into the new FreeType backend, the X-TT backend will be removed from
-X11R6.7's tree near the future. Therefore, the use of FreeType backend is
+X11R6.8's tree near the future. Therefore, the use of FreeType backend is
preferred over the X-TT backend.
General information on X-TrueType may be found at the After X-TT Project page
@@ -1120,10 +1116,10 @@ and `cursor' aliases are defined in
5.3 Unicode
-Unicode (<URL:http://www.unicode.org>) is a coded character set with the goal
-of uniquely identifying all characters for all scripts, current and histori-
-cal. While Unicode was explicitly not designed as a glyph encoding scheme,
-it is often possible to use it as such.
+Unicode (urlnam <URL:http://www.unicode.org>) is a coded character set with
+the goal of uniquely identifying all characters for all scripts, current and
+historical. While Unicode was explicitly not designed as a glyph encoding
+scheme, it is often possible to use it as such.
Unicode is an open character set, meaning that codepoint assignments may be
added to Unicode at any time (once specified, though, an assignment can never
@@ -1139,15 +1135,15 @@ last two fields of their XLFD set to `iso10646-1'.
6. References
-X11R6.7 comes with extensive documentation in the form of manual pages and
+X11R6.8 comes with extensive documentation in the form of manual pages and
typeset documents. Before installing fonts, you really should read the font-
config(3) and mkfontdir(1) manual pages; other manual pages of interest
include X(7), Xserver(1), xset(1), Xft(3), xlsfonts(1) and showfont(1). In
addition, you may want to read the X Logical Font Description document, by
Jim Flowers, which is provided in the file `xc/doc/xlfd.PS.Z'.
-The latest released version of the X11R6.7 documentation (including this doc-
-ument and all manual pages) can be found from current X11R6.7 documentation
+The latest released version of the X11R6.8 documentation (including this doc-
+ument and all manual pages) can be found from current X11R6.8 documentation
<URL:http://wiki.x.org/>.
The comp.fonts FAQ <URL:http://www.netmeg.net/faq/computers/fonts/>, which is
@@ -1182,5 +1178,5 @@ The IANA RFC documents, available from a number of sites throughout the
world, often provide interesting information about character set issues; see
for example RFC 373.
- $Id$
+$XdotOrg: xc/programs/Xserver/hw/xfree86/doc/README.fonts,v 1.3 2004/09/03 23:41:21 kem Exp $
diff --git a/hw/xfree86/doc/devel/README.DRIcomp b/hw/xfree86/doc/devel/README.DRIcomp
index aafbd4237..89f40a759 100644
--- a/hw/xfree86/doc/devel/README.DRIcomp
+++ b/hw/xfree86/doc/devel/README.DRIcomp
@@ -553,3 +553,4 @@ trouble shooting and how to use the DRI-enabled X server for 3D applications.
Generated from XFree86: xc/programs/Xserver/hw/xfree86/doc/sgml/DRIcomp.sgml,v 1.19 dawes Exp $
+
diff --git a/hw/xfree86/doc/man/Xorg.man.pre b/hw/xfree86/doc/man/Xorg.man.pre
index d4bb08bc4..3d9466775 100644
--- a/hw/xfree86/doc/man/Xorg.man.pre
+++ b/hw/xfree86/doc/man/Xorg.man.pre
@@ -1,4 +1,4 @@
-.\" $XdotOrg: $
+.\" $XdotOrg: xc/programs/Xserver/hw/xfree86/Xorg.man,v 1.2 2004/04/23 19:20:02 eich Exp $
.TH __xservername__ __appmansuffix__ __vendorversion__
.SH NAME
__xservername__ - X11R6 X server
diff --git a/hw/xfree86/doc/man/xorg.conf.man.pre b/hw/xfree86/doc/man/xorg.conf.man.pre
index e530991e8..a785c29ae 100644
--- a/hw/xfree86/doc/man/xorg.conf.man.pre
+++ b/hw/xfree86/doc/man/xorg.conf.man.pre
@@ -1,4 +1,4 @@
-.\" $XdotOrg: xc/programs/Xserver/hw/xfree86/xorg.conf.man,v 1.1.2.1 2004/03/27 17:01:11 keithp Exp $
+.\" $XdotOrg: xc/programs/Xserver/hw/xfree86/xorg.conf.man,v 1.2 2004/04/23 19:20:02 eich Exp $
.\" shorthand for double quote that works everywhere.
.ds q \N'34'
.TH __xconfigfile__ __filemansuffix__ __vendorversion__
diff --git a/hw/xfree86/dri/dri.c b/hw/xfree86/dri/dri.c
index acef4c54b..4748f17df 100644
--- a/hw/xfree86/dri/dri.c
+++ b/hw/xfree86/dri/dri.c
@@ -34,8 +34,8 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*/
-#ifdef XFree86LOADER
#include "xf86.h"
+#ifdef XFree86LOADER
#include "xf86_ansic.h"
#else
#include <sys/time.h>
@@ -57,6 +57,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define _XF86DRI_SERVER_
#include "xf86dristr.h"
#include "swaprep.h"
+#include "xf86str.h"
#include "dri.h"
#include "sarea.h"
#include "dristruct.h"
@@ -113,11 +114,14 @@ Bool
DRIScreenInit(ScreenPtr pScreen, DRIInfoPtr pDRIInfo, int *pDRMFD)
{
DRIScreenPrivPtr pDRIPriv;
- drmContextPtr reserved;
+ drm_context_t * reserved;
int reserved_count;
int i, fd, drmWasAvailable;
Bool xineramaInCore = FALSE;
int err = 0;
+ char *openbusid;
+ drmVersionPtr drmlibv;
+ int drmlibmajor, drmlibminor, drmdimajor, drmdiminor;
if (DRIGeneration != serverGeneration) {
if ((DRIScreenPrivIndex = AllocateScreenPrivateIndex()) < 0)
@@ -148,8 +152,31 @@ DRIScreenInit(ScreenPtr pScreen, DRIInfoPtr pDRIInfo, int *pDRMFD)
drmWasAvailable = drmAvailable();
+ /* Check the DRM lib version.
+ * drmGetLibVersion was not supported in version 1.0, so check for
+ * symbol first to avoid possible crash or hang.
+ */
+ drmlibmajor = 1;
+ drmlibminor = 0;
+ if (xf86LoaderCheckSymbol("drmGetLibVersion")) {
+ drmlibv = drmGetLibVersion(-1);
+ if (drmlibv != NULL) {
+ drmlibmajor = drmlibv->version_major;
+ drmlibminor = drmlibv->version_minor;
+ drmFreeVersion(drmlibv);
+ }
+ }
+
+ /* Check if the libdrm can handle falling back to loading based on name
+ * if a busid string is passed.
+ */
+ if (drmlibmajor == 1 && drmlibminor >= 2)
+ openbusid = pDRIInfo->busIdString;
+ else
+ openbusid = NULL;
+
/* Note that drmOpen will try to load the kernel module, if needed. */
- fd = drmOpen(pDRIInfo->drmDriverName, NULL );
+ fd = drmOpen(pDRIInfo->drmDriverName, openbusid);
if (fd < 0) {
/* failed to open DRM */
pScreen->devPrivates[DRIScreenPrivIndex].ptr = NULL;
@@ -184,7 +211,40 @@ DRIScreenInit(ScreenPtr pScreen, DRIInfoPtr pDRIInfo, int *pDRMFD)
pDRIPriv->grabbedDRILock = FALSE;
pDRIPriv->drmSIGIOHandlerInstalled = FALSE;
- if ((err = drmSetBusid(pDRIPriv->drmFD, pDRIPriv->pDriverInfo->busIdString)) < 0) {
+ if (drmlibmajor == 1 && drmlibminor >= 2) {
+ drmSetVersion sv;
+
+ /* Get the interface version, asking for 1.1. */
+ sv.drm_di_major = 1;
+ sv.drm_di_minor = 1;
+ sv.drm_dd_major = -1;
+ err = drmSetInterfaceVersion(pDRIPriv->drmFD, &sv);
+ if (err == 0) {
+ drmdimajor = sv.drm_di_major;
+ drmdiminor = sv.drm_di_minor;
+ } else {
+ /* failure, so set it to 1.0.0. */
+ drmdimajor = 1;
+ drmdiminor = 0;
+ }
+ }
+ else {
+ /* We can't check the DI DRM interface version, so set it to 1.0.0. */
+ drmdimajor = 1;
+ drmdiminor = 0;
+ }
+ DRIDrvMsg(pScreen->myNum, X_INFO,
+ "[drm] DRM interface version %d.%d\n", drmdimajor, drmdiminor);
+
+ /* If the interface minor number is 1.1, then we've opened a DRM device
+ * that already had the busid set through drmOpen.
+ */
+ if (drmdimajor == 1 && drmdiminor >= 1)
+ err = 0;
+ else
+ err = drmSetBusid(pDRIPriv->drmFD, pDRIPriv->pDriverInfo->busIdString);
+
+ if (err < 0) {
pDRIPriv->directRenderingSupport = FALSE;
pScreen->devPrivates[DRIScreenPrivIndex].ptr = NULL;
drmClose(pDRIPriv->drmFD);
@@ -235,7 +295,7 @@ DRIScreenInit(ScreenPtr pScreen, DRIInfoPtr pDRIInfo, int *pDRMFD)
pDRIPriv->hSAREA, pDRIPriv->pSAREA);
if (drmAddMap( pDRIPriv->drmFD,
- (drmHandle)pDRIPriv->pDriverInfo->frameBufferPhysicalAddress,
+ (drm_handle_t)pDRIPriv->pDriverInfo->frameBufferPhysicalAddress,
pDRIPriv->pDriverInfo->frameBufferSize,
DRM_FRAME_BUFFER,
0,
@@ -424,7 +484,7 @@ DRICloseScreen(ScreenPtr pScreen)
{
DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen);
DRIInfoPtr pDRIInfo;
- drmContextPtr reserved;
+ drm_context_t * reserved;
int reserved_count;
if (pDRIPriv && pDRIPriv->directRenderingSupport) {
@@ -575,7 +635,7 @@ DRIQueryDirectRenderingCapable(ScreenPtr pScreen, Bool* isCapable)
}
Bool
-DRIOpenConnection(ScreenPtr pScreen, drmHandlePtr hSAREA, char **busIdString)
+DRIOpenConnection(ScreenPtr pScreen, drm_handle_t * hSAREA, char **busIdString)
{
DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen);
@@ -586,7 +646,7 @@ DRIOpenConnection(ScreenPtr pScreen, drmHandlePtr hSAREA, char **busIdString)
}
Bool
-DRIAuthConnection(ScreenPtr pScreen, drmMagic magic)
+DRIAuthConnection(ScreenPtr pScreen, drm_magic_t magic)
{
DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen);
@@ -620,18 +680,18 @@ DRIGetClientDriverName(ScreenPtr pScreen,
/* DRICreateContextPriv and DRICreateContextPrivFromHandle are helper
functions that layer on drmCreateContext and drmAddContextTag.
- DRICreateContextPriv always creates a kernel drmContext and then calls
+ DRICreateContextPriv always creates a kernel drm_context_t and then calls
DRICreateContextPrivFromHandle to create a DRIContextPriv structure for
- DRI tracking. For the SIGIO handler, the drmContext is associated with
+ DRI tracking. For the SIGIO handler, the drm_context_t is associated with
DRIContextPrivPtr. Any special flags are stored in the DRIContextPriv
area and are passed to the kernel (if necessary).
DRICreateContextPriv returns a pointer to newly allocated
- DRIContextPriv, and returns the kernel drmContext in pHWContext. */
+ DRIContextPriv, and returns the kernel drm_context_t in pHWContext. */
DRIContextPrivPtr
DRICreateContextPriv(ScreenPtr pScreen,
- drmContextPtr pHWContext,
+ drm_context_t * pHWContext,
DRIContextFlags flags)
{
DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen);
@@ -645,7 +705,7 @@ DRICreateContextPriv(ScreenPtr pScreen,
DRIContextPrivPtr
DRICreateContextPrivFromHandle(ScreenPtr pScreen,
- drmContext hHWContext,
+ drm_context_t hHWContext,
DRIContextFlags flags)
{
DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen);
@@ -720,8 +780,8 @@ static Bool
DRICreateDummyContext(ScreenPtr pScreen, Bool needCtxPriv)
{
DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen);
- __GLXscreenInfo *pGLXScreen = &__glXActiveScreens[pScreen->myNum];
- __GLXvisualConfig *pGLXVis = pGLXScreen->pGlxVisual;
+ __GLXscreenInfo *pGLXScreen = __glXgetActiveScreen(pScreen->myNum);
+ __GLcontextModes *modes = pGLXScreen->modes;
void **pVisualConfigPriv = pGLXScreen->pVisualPriv;
DRIContextPrivPtr pDRIContextPriv;
void *contextStore;
@@ -734,7 +794,7 @@ DRICreateDummyContext(ScreenPtr pScreen, Bool needCtxPriv)
for (visNum = 0;
visNum < pScreen->numVisuals;
visNum++, visual++) {
- if (pGLXVis->vid == visual->vid)
+ if (modes->visualID == visual->vid)
break;
}
if (visNum == pScreen->numVisuals) return FALSE;
@@ -781,15 +841,14 @@ DRIDestroyDummyContext(ScreenPtr pScreen, Bool hasCtxPriv)
Bool
DRICreateContext(ScreenPtr pScreen, VisualPtr visual,
- XID context, drmContextPtr pHWContext)
+ XID context, drm_context_t * pHWContext)
{
DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen);
- __GLXscreenInfo *pGLXScreen = &__glXActiveScreens[pScreen->myNum];
- __GLXvisualConfig *pGLXVis = pGLXScreen->pGlxVisual;
+ __GLXscreenInfo *pGLXScreen = __glXgetActiveScreen(pScreen->myNum);
+ __GLcontextModes *modes = pGLXScreen->modes;
void **pVisualConfigPriv = pGLXScreen->pVisualPriv;
DRIContextPrivPtr pDRIContextPriv;
void *contextStore;
- int visNum;
if (pDRIPriv->createDummyCtx && !pDRIPriv->dummyCtxPriv) {
if (!DRICreateDummyContext(pScreen, pDRIPriv->createDummyCtxPriv)) {
@@ -800,12 +859,13 @@ DRICreateContext(ScreenPtr pScreen, VisualPtr visual,
}
/* Find the GLX visual associated with the one requested */
- for (visNum = 0;
- visNum < pGLXScreen->numVisuals;
- visNum++, pGLXVis++, pVisualConfigPriv++)
- if (pGLXVis->vid == visual->vid)
+ for (modes = pGLXScreen->modes; modes != NULL; modes = modes->next) {
+ if (modes->visualID == visual->vid)
break;
- if (visNum == pGLXScreen->numVisuals) {
+ pVisualConfigPriv++;
+ }
+
+ if (modes == NULL) {
/* No matching GLX visual found */
return FALSE;
}
@@ -928,7 +988,7 @@ DRITransitionTo2d(ScreenPtr pScreen)
Bool
DRICreateDrawable(ScreenPtr pScreen, Drawable id,
- DrawablePtr pDrawable, drmDrawablePtr hHWDrawable)
+ DrawablePtr pDrawable, drm_drawable_t * hHWDrawable)
{
DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen);
DRIDrawablePrivPtr pDRIDrawablePriv;
@@ -945,7 +1005,7 @@ DRICreateDrawable(ScreenPtr pScreen, Drawable id,
return FALSE;
}
- /* Only create a drmDrawable once */
+ /* Only create a drm_drawable_t once */
if (drmCreateDrawable(pDRIPriv->drmFD, hHWDrawable)) {
xfree(pDRIDrawablePriv);
return FALSE;
@@ -1065,11 +1125,11 @@ DRIGetDrawableInfo(ScreenPtr pScreen,
int* W,
int* H,
int* numClipRects,
- XF86DRIClipRectPtr* pClipRects,
+ drm_clip_rect_t ** pClipRects,
int* backX,
int* backY,
int* numBackClipRects,
- XF86DRIClipRectPtr* pBackClipRects)
+ drm_clip_rect_t ** pBackClipRects)
{
DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen);
DRIDrawablePrivPtr pDRIDrawablePriv, pOldDrawPriv;
@@ -1165,7 +1225,7 @@ DRIGetDrawableInfo(ScreenPtr pScreen,
*W = (int)(pWin->drawable.width);
*H = (int)(pWin->drawable.height);
*numClipRects = REGION_NUM_RECTS(&pWin->clipList);
- *pClipRects = (XF86DRIClipRectPtr)REGION_RECTS(&pWin->clipList);
+ *pClipRects = (drm_clip_rect_t *)REGION_RECTS(&pWin->clipList);
if (!*numClipRects && pDRIPriv->fullscreen) {
/* use fake full-screen clip rect */
@@ -1222,7 +1282,7 @@ DRIGetDrawableInfo(ScreenPtr pScreen,
Bool
DRIGetDeviceInfo(ScreenPtr pScreen,
- drmHandlePtr hFrameBuffer,
+ drm_handle_t * hFrameBuffer,
int* fbOrigin,
int* fbSize,
int* fbStride,
@@ -1870,7 +1930,7 @@ DRIGetSAREAPrivate(ScreenPtr pScreen)
return (void *)(((char*)pDRIPriv->pSAREA)+sizeof(XF86DRISAREARec));
}
-drmContext
+drm_context_t
DRIGetContext(ScreenPtr pScreen)
{
DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen);
@@ -1967,7 +2027,7 @@ DRIOpenFullScreen(ScreenPtr pScreen, DrawablePtr pDrawable)
DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen);
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
WindowPtr pWin = (WindowPtr)pDrawable;
- XF86DRIClipRectPtr pClipRects = (void *)REGION_RECTS(&pWin->clipList);
+ drm_clip_rect_t * pClipRects = (void *)REGION_RECTS(&pWin->clipList);
_DRIAdjustFrame(pScrn, pDRIPriv, pScrn->frameX0, pScrn->frameY0);
@@ -2115,3 +2175,21 @@ DRIMoveBuffersHelper(
} else *xdir = 1;
}
+
+char *
+DRICreatePCIBusID(pciVideoPtr PciInfo)
+{
+ char *busID;
+ int domain;
+ PCITAG tag;
+
+ busID = xalloc(20);
+ if (busID == NULL)
+ return NULL;
+
+ tag = pciTag(PciInfo->bus, PciInfo->device, PciInfo->func);
+ domain = xf86GetPciDomain(tag);
+ snprintf(busID, 20, "pci:%04x:%02x:%02x.%d", domain, PciInfo->bus,
+ PciInfo->device, PciInfo->func);
+ return busID;
+}
diff --git a/hw/xfree86/dri/dri.h b/hw/xfree86/dri/dri.h
index 149534417..f556d261e 100644
--- a/hw/xfree86/dri/dri.h
+++ b/hw/xfree86/dri/dri.h
@@ -105,11 +105,11 @@ typedef struct {
*/
Bool (*CreateContext)(ScreenPtr pScreen,
VisualPtr visual,
- drmContext hHWContext,
+ drm_context_t hHWContext,
void* pVisualConfigPriv,
DRIContextType context);
void (*DestroyContext)(ScreenPtr pScreen,
- drmContext hHWContext,
+ drm_context_t hHWContext,
DRIContextType context);
void (*SwapContext)(ScreenPtr pScreen,
DRISyncType syncType,
@@ -175,10 +175,10 @@ extern Bool DRIQueryDirectRenderingCapable(ScreenPtr pScreen,
Bool *isCapable);
extern Bool DRIOpenConnection(ScreenPtr pScreen,
- drmHandlePtr hSAREA,
+ drm_handle_t * hSAREA,
char **busIdString);
-extern Bool DRIAuthConnection(ScreenPtr pScreen, drmMagic magic);
+extern Bool DRIAuthConnection(ScreenPtr pScreen, drm_magic_t magic);
extern Bool DRICloseConnection(ScreenPtr pScreen);
@@ -191,7 +191,7 @@ extern Bool DRIGetClientDriverName(ScreenPtr pScreen,
extern Bool DRICreateContext(ScreenPtr pScreen,
VisualPtr visual,
XID context,
- drmContextPtr pHWContext);
+ drm_context_t * pHWContext);
extern Bool DRIDestroyContext(ScreenPtr pScreen, XID context);
@@ -200,7 +200,7 @@ extern Bool DRIContextPrivDelete(pointer pResource, XID id);
extern Bool DRICreateDrawable(ScreenPtr pScreen,
Drawable id,
DrawablePtr pDrawable,
- drmDrawablePtr hHWDrawable);
+ drm_drawable_t * hHWDrawable);
extern Bool DRIDestroyDrawable(ScreenPtr pScreen,
Drawable id,
@@ -218,14 +218,14 @@ extern Bool DRIGetDrawableInfo(ScreenPtr pScreen,
int* W,
int* H,
int* numClipRects,
- XF86DRIClipRectPtr* pClipRects,
+ drm_clip_rect_t ** pClipRects,
int* backX,
int* backY,
int* numBackClipRects,
- XF86DRIClipRectPtr* pBackClipRects);
+ drm_clip_rect_t ** pBackClipRects);
extern Bool DRIGetDeviceInfo(ScreenPtr pScreen,
- drmHandlePtr hFrameBuffer,
+ drm_handle_t * hFrameBuffer,
int* fbOrigin,
int* fbSize,
int* fbStride,
@@ -298,16 +298,16 @@ extern unsigned int DRIGetDrawableStamp(ScreenPtr pScreen,
CARD32 drawable_index);
extern DRIContextPrivPtr DRICreateContextPriv(ScreenPtr pScreen,
- drmContextPtr pHWContext,
+ drm_context_t * pHWContext,
DRIContextFlags flags);
extern DRIContextPrivPtr DRICreateContextPrivFromHandle(ScreenPtr pScreen,
- drmContext hHWContext,
+ drm_context_t hHWContext,
DRIContextFlags flags);
extern Bool DRIDestroyContextPriv(DRIContextPrivPtr pDRIContextPriv);
-extern drmContext DRIGetContext(ScreenPtr pScreen);
+extern drm_context_t DRIGetContext(ScreenPtr pScreen);
extern void DRIQueryVersion(int *majorVersion,
int *minorVersion,
@@ -325,6 +325,8 @@ extern void DRIMoveBuffersHelper(ScreenPtr pScreen,
int *ydir,
RegionPtr reg);
+extern char *DRICreatePCIBusID(pciVideoPtr PciInfo);
+
#define _DRI_H_
#endif
diff --git a/hw/xfree86/dri/drimodule.c b/hw/xfree86/dri/drimodule.c
index 1a6a4c696..1fa7a8edc 100644
--- a/hw/xfree86/dri/drimodule.c
+++ b/hw/xfree86/dri/drimodule.c
@@ -1,4 +1,4 @@
-/* $XdotOrg: xc/programs/Xserver/GL/dri/drimodule.c,v 1.1.4.1.4.2 2004/03/04 17:47:18 eich Exp $ */
+/* $XdotOrg: xc/programs/Xserver/GL/dri/drimodule.c,v 1.2 2004/04/23 18:44:36 eich Exp $ */
/**************************************************************************
Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
@@ -44,7 +44,7 @@ static XF86ModuleVersionInfo VersRec =
MODULEVENDORSTRING,
MODINFOSTRING1,
MODINFOSTRING2,
- XF86_VERSION_CURRENT,
+ XORG_VERSION_CURRENT,
1, 0, 0,
ABI_CLASS_EXTENSION,
ABI_EXTENSION_VERSION,
diff --git a/hw/xfree86/dri/dristruct.h b/hw/xfree86/dri/dristruct.h
index 6d90d770a..cf1b1eacf 100644
--- a/hw/xfree86/dri/dristruct.h
+++ b/hw/xfree86/dri/dristruct.h
@@ -50,7 +50,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
typedef struct _DRIDrawablePrivRec
{
- drmDrawable hwDrawable;
+ drm_drawable_t hwDrawable;
int drawableIndex;
ScreenPtr pScreen;
int refCount;
@@ -58,7 +58,7 @@ typedef struct _DRIDrawablePrivRec
struct _DRIContextPrivRec
{
- drmContext hwContext;
+ drm_context_t hwContext;
ScreenPtr pScreen;
Bool valid3D;
DRIContextFlags flags;
@@ -78,19 +78,19 @@ typedef struct _DRIScreenPrivRec
{
Bool directRenderingSupport;
int drmFD; /* File descriptor for /dev/video/? */
- drmHandle hSAREA; /* Handle to SAREA, for mapping */
+ drm_handle_t hSAREA; /* Handle to SAREA, for mapping */
XF86DRISAREAPtr pSAREA; /* Mapped pointer to SAREA */
- drmHandle hFrameBuffer; /* Handle to framebuffer, for mapping */
- drmContext myContext; /* DDX Driver's context */
+ drm_handle_t hFrameBuffer; /* Handle to framebuffer, for mapping */
+ drm_context_t myContext; /* DDX Driver's context */
DRIContextPrivPtr myContextPriv;/* Pointer to server's private area */
DRIContextPrivPtr lastPartial3DContext; /* last one partially saved */
void** hiddenContextStore; /* hidden X context */
void** partial3DContextStore; /* parital 3D context */
DRIInfoPtr pDriverInfo;
int nrWindows;
- XF86DRIClipRectRec private_buffer_rect; /* management of private buffers */
+ drm_clip_rect_t private_buffer_rect; /* management of private buffers */
DrawablePtr fullscreen; /* pointer to fullscreen drawable */
- XF86DRIClipRectRec fullscreen_rect; /* fake rect for fullscreen mode */
+ drm_clip_rect_t fullscreen_rect; /* fake rect for fullscreen mode */
DRIWrappedFuncsRec wrap;
DrawablePtr DRIDrawables[SAREA_MAX_DRAWABLES];
DRIContextPrivPtr dummyCtxPriv; /* Pointer to dummy context */
diff --git a/hw/xfree86/dri/sarea.h b/hw/xfree86/dri/sarea.h
index d4d83df93..77c16e0ef 100644
--- a/hw/xfree86/dri/sarea.h
+++ b/hw/xfree86/dri/sarea.h
@@ -88,7 +88,7 @@ typedef struct _XF86DRISAREA {
drmLock drawable_lock;
XF86DRISAREADrawableRec drawableTable[SAREA_MAX_DRAWABLES];
XF86DRISAREAFrameRec frame;
- drmContext dummy_context;
+ drm_context_t dummy_context;
} XF86DRISAREARec, *XF86DRISAREAPtr;
#endif
diff --git a/hw/xfree86/dri/xf86dri.c b/hw/xfree86/dri/xf86dri.c
index bc8a17ad2..ae5a6d608 100644
--- a/hw/xfree86/dri/xf86dri.c
+++ b/hw/xfree86/dri/xf86dri.c
@@ -35,8 +35,8 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*/
-#ifdef XFree86LOADER
#include "xf86.h"
+#ifdef XFree86LOADER
#include "xf86_ansic.h"
#endif
@@ -54,6 +54,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define _XF86DRI_SERVER_
#include "xf86dristr.h"
#include "swaprep.h"
+#include "xf86str.h"
#include "dri.h"
#include "sarea.h"
#include "dristruct.h"
@@ -184,7 +185,7 @@ ProcXF86DRIOpenConnection(
)
{
xXF86DRIOpenConnectionReply rep;
- drmHandle hSAREA;
+ drm_handle_t hSAREA;
char* busIdString;
REQUEST(xXF86DRIOpenConnectionReq);
@@ -340,7 +341,7 @@ ProcXF86DRICreateContext(
if (!DRICreateContext( pScreen,
visual,
stuff->context,
- (drmContextPtr)&rep.hHWContext)) {
+ (drm_context_t *)&rep.hHWContext)) {
return BadValue;
}
@@ -397,7 +398,7 @@ ProcXF86DRICreateDrawable(
if (!DRICreateDrawable( screenInfo.screens[stuff->screen],
(Drawable)stuff->drawable,
pDrawable,
- (drmDrawablePtr)&rep.hHWDrawable)) {
+ (drm_drawable_t *)&rep.hHWDrawable)) {
return BadValue;
}
@@ -442,8 +443,8 @@ ProcXF86DRIGetDrawableInfo(
xXF86DRIGetDrawableInfoReply rep;
DrawablePtr pDrawable;
int X, Y, W, H;
- XF86DRIClipRectPtr pClipRects;
- XF86DRIClipRectPtr pBackClipRects;
+ drm_clip_rect_t * pClipRects;
+ drm_clip_rect_t * pBackClipRects;
int backX, backY;
REQUEST(xXF86DRIGetDrawableInfoReq);
@@ -492,10 +493,10 @@ ProcXF86DRIGetDrawableInfo(
rep.backY = backY;
if (rep.numBackClipRects)
- rep.length += sizeof(XF86DRIClipRectRec) * rep.numBackClipRects;
+ rep.length += sizeof(drm_clip_rect_t) * rep.numBackClipRects;
if (rep.numClipRects)
- rep.length += sizeof(XF86DRIClipRectRec) * rep.numClipRects;
+ rep.length += sizeof(drm_clip_rect_t) * rep.numClipRects;
rep.length = ((rep.length + 3) & ~3) >> 2;
@@ -503,13 +504,13 @@ ProcXF86DRIGetDrawableInfo(
if (rep.numClipRects) {
WriteToClient(client,
- sizeof(XF86DRIClipRectRec) * rep.numClipRects,
+ sizeof(drm_clip_rect_t) * rep.numClipRects,
(char *)pClipRects);
}
if (rep.numBackClipRects) {
WriteToClient(client,
- sizeof(XF86DRIClipRectRec) * rep.numBackClipRects,
+ sizeof(drm_clip_rect_t) * rep.numBackClipRects,
(char *)pBackClipRects);
}
@@ -522,7 +523,7 @@ ProcXF86DRIGetDeviceInfo(
)
{
xXF86DRIGetDeviceInfoReply rep;
- drmHandle hFrameBuffer;
+ drm_handle_t hFrameBuffer;
void *pDevPrivate;
REQUEST(xXF86DRIGetDeviceInfoReq);
diff --git a/hw/xfree86/fbdevhw/fbdevhw.c b/hw/xfree86/fbdevhw/fbdevhw.c
index 0345aa41f..0ca3c93ef 100644
--- a/hw/xfree86/fbdevhw/fbdevhw.c
+++ b/hw/xfree86/fbdevhw/fbdevhw.c
@@ -14,7 +14,12 @@
#include "fbdevhw.h"
#include "fbpriv.h"
-#include "asm/page.h" /* #define for PAGE_* */
+#if 0
+/* kernel header doesn't work with -ansi */
+# include "asm/page.h" /* #define for PAGE_* */
+#else
+# define PAGE_MASK (~(getpagesize() - 1))
+#endif
#include "globals.h"
#define DPMS_SERVER
@@ -22,6 +27,8 @@
#define DEBUG 0
+#define PAGE_MASK (~(getpagesize() - 1))
+
#if DEBUG
# define TRACE_ENTER(str) ErrorF("fbdevHW: " str " %d\n",pScrn->scrnIndex)
#else
@@ -40,7 +47,7 @@ static XF86ModuleVersionInfo fbdevHWVersRec =
MODULEVENDORSTRING,
MODINFOSTRING1,
MODINFOSTRING2,
- XF86_VERSION_CURRENT,
+ XORG_VERSION_CURRENT,
0, 0, 2,
ABI_CLASS_VIDEODRV,
ABI_VIDEODRV_VERSION,
@@ -724,7 +731,7 @@ fbdevHWLoadPalette(ScrnInfoPtr pScrn, int numColors, int *indices,
unsigned short red,green,blue;
int i;
- TRACE_ENTER("ModeInit");
+ TRACE_ENTER("LoadPalette");
cmap.len = 1;
cmap.red = &red;
cmap.green = &green;
@@ -789,7 +796,6 @@ fbdevHWAdjustFrame(int scrnIndex, int x, int y, int flags)
fbdevHWPtr fPtr = FBDEVHWPTR(pScrn);
TRACE_ENTER("AdjustFrame");
-
if ( x < 0 || x + fPtr->var.xres > fPtr->var.xres_virtual ||
y < 0 || y + fPtr->var.yres > fPtr->var.yres_virtual )
return;
@@ -828,6 +834,7 @@ fbdevHWDPMSSet(ScrnInfoPtr pScrn, int mode, int flags)
fbdevHWPtr fPtr = FBDEVHWPTR(pScrn);
unsigned long fbmode;
+ TRACE_ENTER("DPMSSet");
if (!pScrn->vtSema)
return;
@@ -860,6 +867,7 @@ fbdevHWSaveScreen(ScreenPtr pScreen, int mode)
fbdevHWPtr fPtr = FBDEVHWPTR(pScrn);
unsigned long unblank;
+ TRACE_ENTER("HWSaveScreen");
if (!pScrn->vtSema)
return TRUE;
@@ -873,3 +881,27 @@ fbdevHWSaveScreen(ScreenPtr pScreen, int mode)
return TRUE;
}
+
+xf86SwitchModeProc *
+fbdevHWSwitchModeWeak(void) { return fbdevHWSwitchMode; }
+
+xf86AdjustFrameProc *
+fbdevHWAdjustFrameWeak(void) { return fbdevHWAdjustFrame; }
+
+xf86EnterVTProc *
+fbdevHWEnterVTWeak(void) { return fbdevHWEnterVT; }
+
+xf86LeaveVTProc *
+fbdevHWLeaveVTWeak(void) { return fbdevHWLeaveVT; }
+
+xf86ValidModeProc *
+fbdevHWValidModeWeak(void) { return fbdevHWValidMode; }
+
+xf86DPMSSetProc *
+fbdevHWDPMSSetWeak(void) { return fbdevHWDPMSSet; }
+
+xf86LoadPaletteProc *
+fbdevHWLoadPaletteWeak(void) { return fbdevHWLoadPalette; }
+
+SaveScreenProcPtr
+fbdevHWSaveScreenWeak(void) { return fbdevHWSaveScreen; }
diff --git a/hw/xfree86/fbdevhw/fbdevhw.h b/hw/xfree86/fbdevhw/fbdevhw.h
index 219ca07d3..cfc3fcdb6 100644
--- a/hw/xfree86/fbdevhw/fbdevhw.h
+++ b/hw/xfree86/fbdevhw/fbdevhw.h
@@ -49,4 +49,13 @@ void fbdevHWDPMSSet(ScrnInfoPtr pScrn, int mode, int flags);
Bool fbdevHWSaveScreen(ScreenPtr pScreen, int mode);
+xf86SwitchModeProc *fbdevHWSwitchModeWeak(void);
+xf86AdjustFrameProc *fbdevHWAdjustFrameWeak(void);
+xf86EnterVTProc *fbdevHWEnterVTWeak(void);
+xf86LeaveVTProc *fbdevHWLeaveVTWeak(void);
+xf86ValidModeProc *fbdevHWValidModeWeak(void);
+xf86DPMSSetProc *fbdevHWDPMSSetWeak(void);
+xf86LoadPaletteProc *fbdevHWLoadPaletteWeak(void);
+SaveScreenProcPtr fbdevHWSaveScreenWeak(void);
+
#endif
diff --git a/hw/xfree86/fbdevhw/fbdevhwstub.c b/hw/xfree86/fbdevhw/fbdevhwstub.c
index dc1169362..7869bb31d 100644
--- a/hw/xfree86/fbdevhw/fbdevhwstub.c
+++ b/hw/xfree86/fbdevhw/fbdevhwstub.c
@@ -168,3 +168,27 @@ fbdevHWSaveScreen(ScreenPtr pScreen, int mode)
{
return FALSE;
}
+
+xf86SwitchModeProc *
+fbdevHWSwitchModeWeak(void) { return fbdevHWSwitchMode; }
+
+xf86AdjustFrameProc *
+fbdevHWAdjustFrameWeak(void) { return fbdevHWAdjustFrame; }
+
+xf86EnterVTProc *
+fbdevHWEnterVTWeak(void) { return fbdevHWEnterVT; }
+
+xf86LeaveVTProc *
+fbdevHWLeaveVTWeak(void) { return fbdevHWLeaveVT; }
+
+xf86ValidModeProc *
+fbdevHWValidModeWeak(void) { return fbdevHWValidMode; }
+
+xf86DPMSSetProc *
+fbdevHWDPMSSetWeak(void) { return fbdevHWDPMSSet; }
+
+xf86LoadPaletteProc *
+fbdevHWLoadPaletteWeak(void) { return fbdevHWLoadPalette; }
+
+SaveScreenProcPtr
+fbdevHWSaveScreenWeak(void) { return fbdevHWSaveScreen; }
diff --git a/hw/xfree86/getconfig/cfg.sample b/hw/xfree86/getconfig/cfg.sample
index 8e26fd2e3..93c98e4e2 100644
--- a/hw/xfree86/getconfig/cfg.sample
+++ b/hw/xfree86/getconfig/cfg.sample
@@ -1,4 +1,4 @@
-# $XdotOrg$
+# $DHD: xc/programs/Xserver/hw/xfree86/getconfig/cfg.sample,v 1.2 2003/09/23 05:12:07 dawes Exp $
# Some sample Xorg getconfig rules file.
diff --git a/hw/xfree86/getconfig/getconfig b/hw/xfree86/getconfig/getconfig
index a9e2b3ef2..531125a7f 100644
--- a/hw/xfree86/getconfig/getconfig
+++ b/hw/xfree86/getconfig/getconfig
@@ -1,6 +1,6 @@
#!/bin/sh
-# $XdotOrg$
+# $XdotOrg: xc/programs/Xserver/hw/xfree86/getconfig/getconfig.sh,v 1.2 2004/04/23 19:54:01 eich Exp $
#
# Copyright 2003 by David H. Dawes.
diff --git a/hw/xfree86/getconfig/xorg.cfg b/hw/xfree86/getconfig/xorg.cfg
index 848d5eb90..c164bf77c 100644
--- a/hw/xfree86/getconfig/xorg.cfg
+++ b/hw/xfree86/getconfig/xorg.cfg
@@ -1,4 +1,4 @@
-# $XdotOrg$
+# $XdotOrg: xc/programs/Xserver/hw/xfree86/getconfig/xorg.cfg,v 1.3 2004/05/25 20:33:46 alanc Exp $
# Base Xorg getconfig rules file.
@@ -7,7 +7,7 @@
# first non-blank, non-comment line.
#
-Xorg Project getconfig rules file. Version: 1.0
+Xorg Foundation getconfig rules file. Version: 1.0
#
# Set the weight for the following rules. This should be set, otherwise
diff --git a/hw/xfree86/i2c/xf86i2c.c b/hw/xfree86/i2c/xf86i2c.c
index 55a6cb059..77e3c2634 100644
--- a/hw/xfree86/i2c/xf86i2c.c
+++ b/hw/xfree86/i2c/xf86i2c.c
@@ -818,6 +818,7 @@ xf86I2CBusInit(I2CBusPtr b)
if (b->I2CPutByte == NULL ||
b->I2CGetByte == NULL ||
b->I2CAddress == NULL ||
+ b->I2CStart == NULL ||
b->I2CStop == NULL)
return FALSE;
} else {
@@ -825,6 +826,7 @@ xf86I2CBusInit(I2CBusPtr b)
b->I2CGetByte = I2CGetByte;
b->I2CAddress = I2CAddress;
b->I2CStop = I2CStop;
+ b->I2CStart = I2CStart;
}
}
diff --git a/hw/xfree86/i2c/xf86i2c.h b/hw/xfree86/i2c/xf86i2c.h
index b6ef41feb..099406e8f 100644
--- a/hw/xfree86/i2c/xf86i2c.h
+++ b/hw/xfree86/i2c/xf86i2c.h
@@ -27,6 +27,7 @@ typedef struct _I2CBusRec {
/* Look at the generic routines to see how these functions should behave. */
+ Bool (*I2CStart) (I2CBusPtr b, int timeout);
Bool (*I2CAddress)(I2CDevPtr d, I2CSlaveAddr);
void (*I2CStop) (I2CDevPtr d);
Bool (*I2CPutByte)(I2CDevPtr d, I2CByte data);
diff --git a/hw/xfree86/i2c/xf86i2cmodule.c b/hw/xfree86/i2c/xf86i2cmodule.c
index 8f0c56f59..0058795f0 100644
--- a/hw/xfree86/i2c/xf86i2cmodule.c
+++ b/hw/xfree86/i2c/xf86i2cmodule.c
@@ -17,7 +17,7 @@ static XF86ModuleVersionInfo i2cVersRec =
MODULEVENDORSTRING,
MODINFOSTRING1,
MODINFOSTRING2,
- XF86_VERSION_CURRENT,
+ XORG_VERSION_CURRENT,
1, 2, 0,
ABI_CLASS_VIDEODRV, /* This needs the video driver ABI */
ABI_VIDEODRV_VERSION,
diff --git a/hw/xfree86/int10/xf86int10module.c b/hw/xfree86/int10/xf86int10module.c
index 5857d23d2..2bb49cb0c 100644
--- a/hw/xfree86/int10/xf86int10module.c
+++ b/hw/xfree86/int10/xf86int10module.c
@@ -31,7 +31,7 @@ static XF86ModuleVersionInfo NAME(VersRec) =
MODULEVENDORSTRING,
MODINFOSTRING1,
MODINFOSTRING2,
- XF86_VERSION_CURRENT,
+ XORG_VERSION_CURRENT,
1, 0, 0,
ABI_CLASS_VIDEODRV, /* needs the video driver ABI */
ABI_VIDEODRV_VERSION,
diff --git a/hw/xfree86/loader/dixsym.c b/hw/xfree86/loader/dixsym.c
index fda75b89d..96fed9bbc 100644
--- a/hw/xfree86/loader/dixsym.c
+++ b/hw/xfree86/loader/dixsym.c
@@ -1,4 +1,4 @@
-/* $XdotOrg: xc/programs/Xserver/hw/xfree86/loader/dixsym.c,v 1.1.4.4.4.2 2004/03/04 17:48:07 eich Exp $ */
+/* $XdotOrg: xc/programs/Xserver/hw/xfree86/loader/dixsym.c,v 1.5 2004/08/19 04:08:40 kem Exp $ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/dixsym.c,v 1.63 2003/12/03
* 17:11:29 tsi Exp $ */
@@ -81,6 +81,7 @@
#include "dgaproc.h"
#ifdef RENDER
#include "mipict.h"
+#include "renderedge.h"
#endif
#include "selection.h"
#ifdef XKB
@@ -198,6 +199,7 @@ LOOKUP dixLookupTab[] = {
SYMFUNC(VerifyRectOrder)
SYMFUNC(SetDashes)
/* globals.c */
+#ifdef DPMSExtension
SYMVAR(DPMSEnabled)
SYMVAR(DPMSCapableFlag)
SYMVAR(DPMSOffTime)
@@ -207,6 +209,7 @@ LOOKUP dixLookupTab[] = {
SYMVAR(DPMSEnabledSwitch)
SYMVAR(DPMSDisabledSwitch)
SYMVAR(defaultDPMSEnabled)
+#endif
/* bigreq */
SYMVAR(maxBigRequestSize)
#ifdef XV
@@ -322,6 +325,16 @@ LOOKUP dixLookupTab[] = {
SYMFUNC(AdjustWaitForDelay)
SYMVAR(noTestExtensions)
SYMFUNC(GiveUp)
+#ifdef COMPOSITE
+ SYMVAR(noCompositeExtension)
+#endif
+#ifdef RENDER
+ SYMVAR(noRenderExtension)
+#endif
+#ifdef XEVIE
+ SYMVAR(noXevieExtension)
+#endif
+
/* log.c */
SYMFUNC(LogVWrite)
SYMFUNC(LogWrite)
@@ -345,7 +358,9 @@ LOOKUP dixLookupTab[] = {
SYMFUNC(TimerFree)
SYMFUNC(TimerSet)
SYMFUNC(TimerCancel)
+#ifdef DPMSExtension
SYMFUNC(SetDPMSTimers)
+#endif
/* io.c */
SYMFUNC(WriteToClient)
SYMFUNC(SetCriticalOutputPending)
@@ -400,6 +415,11 @@ LOOKUP dixLookupTab[] = {
SYMFUNC(PictureSetFilterAlias)
SYMFUNC(PictureGetSubpixelOrder)
SYMFUNC(PictureSetSubpixelOrder)
+ SYMFUNC(RenderSampleCeilY)
+ SYMFUNC(RenderSampleFloorY)
+ SYMFUNC(RenderEdgeStep)
+ SYMFUNC(RenderEdgeInit)
+ SYMFUNC(RenderLineFixedEdgeInit)
#endif
{0, 0}
diff --git a/hw/xfree86/loader/elfloader.c b/hw/xfree86/loader/elfloader.c
index 933df1e61..98c51bb44 100644
--- a/hw/xfree86/loader/elfloader.c
+++ b/hw/xfree86/loader/elfloader.c
@@ -1,5 +1,6 @@
-/* $XdotOrg: xc/programs/Xserver/hw/xfree86/loader/elfloader.c,v 1.1.4.1.6.4 2004/03/18 02:18:27 alanc Exp $ */
+/* $XdotOrg: xc/programs/Xserver/hw/xfree86/loader/elfloader.c,v 1.2 2004/04/23 19:54:06 eich Exp $ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/elfloader.c,v 1.61tsi Exp $ */
+
/*
*
* Copyright 1995-1998 by Metro Link, Inc.
diff --git a/hw/xfree86/loader/extsym.c b/hw/xfree86/loader/extsym.c
index bc51e2e0d..bbae6775f 100644
--- a/hw/xfree86/loader/extsym.c
+++ b/hw/xfree86/loader/extsym.c
@@ -1,4 +1,4 @@
-/* $XdotOrg: xc/programs/Xserver/hw/xfree86/loader/extsym.c,v 1.1.4.3.2.1 2004/02/27 21:31:00 eich Exp $ */
+/* $XdotOrg: xc/programs/Xserver/hw/xfree86/loader/extsym.c,v 1.4 2004/08/09 03:40:50 krh Exp $ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/extsym.c,v 1.9 2003/10/15 16:29:03 dawes Exp $ */
/*
diff --git a/hw/xfree86/loader/hash.c b/hw/xfree86/loader/hash.c
index f96bc55b2..559c0d8f3 100644
--- a/hw/xfree86/loader/hash.c
+++ b/hw/xfree86/loader/hash.c
@@ -1,4 +1,4 @@
-/* $XdotOrg: xc/programs/Xserver/hw/xfree86/loader/hash.c,v 1.1.4.2.4.2 2004/03/04 20:16:43 kaleb Exp $ */
+/* $XdotOrg: xc/programs/Xserver/hw/xfree86/loader/hash.c,v 1.2 2004/04/23 19:54:06 eich Exp $ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/hash.c,v 1.24 2003/11/17 22:20:40 dawes Exp $ */
/*
diff --git a/hw/xfree86/loader/loader.c b/hw/xfree86/loader/loader.c
index efa60f20a..14c9a320d 100644
--- a/hw/xfree86/loader/loader.c
+++ b/hw/xfree86/loader/loader.c
@@ -331,6 +331,13 @@ LoaderInit(void)
{
const char *osname = NULL;
+#ifdef DLOPEN_SUPPORT
+ char *ld_bind_now = getenv("LD_BIND_NOW");
+ if (ld_bind_now && *ld_bind_now) {
+ xf86Msg(X_ERROR, "LD_BIND_NOW is set, dlloader will NOT work!\n");
+ }
+#endif
+
LoaderAddSymbols(-1, -1, miLookupTab);
LoaderAddSymbols(-1, -1, xfree86LookupTab);
LoaderAddSymbols(-1, -1, dixLookupTab);
diff --git a/hw/xfree86/loader/loadmod.c b/hw/xfree86/loader/loadmod.c
index 733f6feb1..4bf36a38a 100644
--- a/hw/xfree86/loader/loadmod.c
+++ b/hw/xfree86/loader/loadmod.c
@@ -86,7 +86,7 @@ static char *LoaderGetCanonicalName(const char *, PatternPtr);
static void RemoveChild(ModuleDescPtr);
ModuleVersions LoaderVersionInfo = {
- XF86_VERSION_CURRENT,
+ XORG_VERSION_CURRENT,
ABI_ANSIC_VERSION,
ABI_VIDEODRV_VERSION,
ABI_XINPUT_VERSION,
diff --git a/hw/xfree86/loader/misym.c b/hw/xfree86/loader/misym.c
index 5f2e858e8..048f8996a 100644
--- a/hw/xfree86/loader/misym.c
+++ b/hw/xfree86/loader/misym.c
@@ -1,4 +1,4 @@
-/* $XdotOrg: xc/programs/Xserver/hw/xfree86/loader/misym.c,v 1.1.4.2.4.1 2004/02/27 21:31:00 eich Exp $ */
+/* $XdotOrg: xc/programs/Xserver/hw/xfree86/loader/misym.c,v 1.2 2004/04/23 19:54:06 eich Exp $ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/misym.c,v 1.38 2003/10/15 16:29:04 dawes Exp $ */
/*
diff --git a/hw/xfree86/loader/xf86sym.c b/hw/xfree86/loader/xf86sym.c
index b2823c2e5..a622b505e 100644
--- a/hw/xfree86/loader/xf86sym.c
+++ b/hw/xfree86/loader/xf86sym.c
@@ -75,7 +75,9 @@
#include "xf86cmap.h"
#include "xf86fbman.h"
#include "dgaproc.h"
+#ifdef DPMSExtension
#include "dpmsproc.h"
+#endif
#include "vidmodeproc.h"
#include "xf86miscproc.h"
#include "loader.h"
@@ -233,6 +235,12 @@ extern unsigned long ldl_brx(volatile unsigned char *, int);
extern unsigned short ldw_brx(volatile unsigned char *, int);
#endif
+#ifdef __SSP__
+/* Propolice! */
+extern long __guard[];
+extern void __stack_smash_handler(char [], int);
+#endif
+
/* XFree86 things */
LOOKUP xfree86LookupTab[] = {
@@ -695,9 +703,11 @@ LOOKUP xfree86LookupTab[] = {
SYMFUNC(xf86XInputSetSendCoreEvents)
/* End merged segment */
#endif
+#ifdef DPMSExtension
SYMFUNC(DPMSGet)
SYMFUNC(DPMSSet)
SYMFUNC(DPMSSupported)
+#endif
/* xf86Debug.c */
#ifdef BUILDDEBUG
SYMFUNC(xf86Break1)
@@ -1045,27 +1055,39 @@ LOOKUP xfree86LookupTab[] = {
# endif
#endif
#if defined(__GNUC__)
-#ifndef __UNIXOS2__
+#if !defined(__UNIXOS2__) && !defined(Lynx)
SYMFUNC(__div64)
#endif
+#if !defined(Lynx) /* FIXME: test on others than x86 and !3.1.0a/x86 */
SYMFUNC(__divdf3)
+#endif
SYMFUNC(__divdi3)
+#if !defined(Lynx)
SYMFUNC(__divsf3)
SYMFUNC(__divsi3)
+#endif
SYMFUNC(__moddi3)
+#if !defined(Lynx)
SYMFUNC(__modsi3)
-#ifndef __UNIXOS2__
+#endif
+#if !defined(__UNIXOS2__) && !defined(Lynx)
SYMFUNC(__mul64)
#endif
+#if !defined(Lynx)
SYMFUNC(__muldf3)
+#endif
SYMFUNC(__muldi3)
+#if !defined(Lynx)
SYMFUNC(__mulsf3)
SYMFUNC(__mulsi3)
SYMFUNC(__udivdi3)
SYMFUNC(__udivsi3)
+#endif
SYMFUNC(__umoddi3)
+#if !defined(Lynx)
SYMFUNC(__umodsi3)
#endif
+#endif
#if defined(__ia64__)
SYMFUNC(_outw)
SYMFUNC(_outb)
@@ -1093,6 +1115,12 @@ LOOKUP xfree86LookupTab[] = {
#endif
#endif
+#ifdef __SSP__
+ /* propolice */
+ SYMFUNC(__stack_smash_handler)
+ SYMVAR(__guard)
+#endif
+
/* Some variables. */
SYMVAR(xf86stdin)
diff --git a/hw/xfree86/os-support/bsd/bsd_mouse.c b/hw/xfree86/os-support/bsd/bsd_mouse.c
index bb5936a1e..679f3099a 100644
--- a/hw/xfree86/os-support/bsd/bsd_mouse.c
+++ b/hw/xfree86/os-support/bsd/bsd_mouse.c
@@ -430,6 +430,7 @@ wsconsReadInput(InputInfoPtr pInfo)
default:
xf86Msg(X_WARNING, "%s: bad wsmouse event type=%d\n", pInfo->name,
event->type);
+ ++event;
continue;
}
@@ -472,6 +473,7 @@ wsconsPreInit(InputInfoPtr pInfo, const char *protocol, int flags)
/* Setup the local input proc. */
pInfo->read_input = wsconsReadInput;
+ pMse->xisbscale = sizeof(struct wscons_event);
pInfo->flags |= XI86_CONFIGURED;
return TRUE;
diff --git a/hw/xfree86/os-support/bsd/i386_video.c b/hw/xfree86/os-support/bsd/i386_video.c
index 3c55ee72f..62d063655 100644
--- a/hw/xfree86/os-support/bsd/i386_video.c
+++ b/hw/xfree86/os-support/bsd/i386_video.c
@@ -46,6 +46,11 @@
#include <sys/queue.h>
#endif
+#if defined(__OpenBSD__) && defined(__amd64__)
+#include <machine/mtrr.h>
+#include <machine/sysarch.h>
+#endif
+
#include "xf86_OSlib.h"
#include "xf86OSpriv.h"
@@ -94,7 +99,11 @@ static pointer NetBSDsetWC(int, unsigned long, unsigned long, Bool,
MessageType);
static void NetBSDundoWC(int, pointer);
#endif
-
+#if defined(__amd64__) && defined(__OpenBSD__)
+static pointer amd64setWC(int, unsigned long, unsigned long, Bool,
+ MessageType);
+static void amd64undoWC(int, pointer);
+#endif
/*
* Check if /dev/mem can be mmap'd. If it can't print a warning when
@@ -206,6 +215,10 @@ xf86OSInitVidMem(VidMemInfoPtr pVidMem)
pVidMem->setWC = NetBSDsetWC;
pVidMem->undoWC = NetBSDundoWC;
#endif
+#if defined(__amd64__) && defined(__OpenBSD__)
+ pVidMem->setWC = amd64setWC;
+ pVidMem->undoWC = amd64undoWC;
+#endif
pVidMem->initialised = TRUE;
}
@@ -311,7 +324,6 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf,
return(Len);
}
-
#ifdef USE_I386_IOPL
/***************************************************************************/
/* I/O Permissions section */
@@ -354,6 +366,51 @@ xf86DisableIO()
#endif /* USE_I386_IOPL */
+#ifdef USE_AMD64_IOPL
+/***************************************************************************/
+/* I/O Permissions section */
+/***************************************************************************/
+
+static Bool ExtendedEnabled = FALSE;
+
+void
+xf86EnableIO()
+{
+ if (ExtendedEnabled)
+ return;
+
+ if (amd64_iopl(TRUE) < 0)
+ {
+#ifndef __OpenBSD__
+ FatalError("%s: Failed to set IOPL for extended I/O",
+ "xf86EnableIO");
+#else
+ FatalError("%s: Failed to set IOPL for extended I/O\n%s",
+ "xf86EnableIO", SYSCTL_MSG);
+#endif
+ }
+ ExtendedEnabled = TRUE;
+
+ return;
+}
+
+void
+xf86DisableIO()
+{
+ if (!ExtendedEnabled)
+ return;
+
+ if (amd64_iopl(FALSE) == 0) {
+ ExtendedEnabled = FALSE;
+ }
+ /* Otherwise, the X server has revoqued its root uid,
+ and thus cannot give up IO privileges any more */
+
+ return;
+}
+
+#endif /* USE_AMD64_IOPL */
+
#ifdef USE_DEV_IO
static int IoFd = -1;
@@ -471,7 +528,6 @@ xf86SetRGBOut()
}
#endif
-
#ifdef HAS_MTRR_SUPPORT
/* memory range (MTRR) support for FreeBSD */
@@ -879,3 +935,55 @@ NetBSDundoWC(int screenNum, pointer list)
xfree(mtrrp);
}
#endif
+
+#if defined(__OpenBSD__) && defined(__amd64__)
+static pointer
+amd64setWC(int screenNum, unsigned long base, unsigned long size, Bool enable,
+ MessageType from)
+{
+ struct mtrr *mtrrp;
+ int n;
+
+ xf86DrvMsg(screenNum, X_WARNING,
+ "%s MTRR %lx - %lx\n", enable ? "set" : "remove",
+ base, (base + size));
+
+ mtrrp = xnfalloc(sizeof (struct mtrr));
+ mtrrp->base = base;
+ mtrrp->len = size;
+ mtrrp->type = MTRR_TYPE_WC;
+
+ /*
+ * MTRR_PRIVATE will make this MTRR get reset automatically
+ * if this process exits, so we have no need for an explicit
+ * cleanup operation when starting a new server.
+ */
+
+ if (enable)
+ mtrrp->flags = MTRR_VALID | MTRR_PRIVATE;
+ else
+ mtrrp->flags = 0;
+ n = 1;
+
+ if (amd64_set_mtrr(mtrrp, &n) < 0) {
+ xfree(mtrrp);
+ return NULL;
+ }
+ return mtrrp;
+}
+
+static void
+amd64undoWC(int screenNum, pointer list)
+{
+ struct mtrr *mtrrp = (struct mtrr *)list;
+ int n;
+
+ if (mtrrp == NULL)
+ return;
+ n = 1;
+ mtrrp->flags &= ~MTRR_VALID;
+ amd64_set_mtrr(mtrrp, &n);
+ xfree(mtrrp);
+}
+#endif /* OpenBSD/amd64 */
+
diff --git a/hw/xfree86/os-support/bus/Pci.c b/hw/xfree86/os-support/bus/Pci.c
index 6b36fdaf2..ffa906505 100644
--- a/hw/xfree86/os-support/bus/Pci.c
+++ b/hw/xfree86/os-support/bus/Pci.c
@@ -1203,7 +1203,8 @@ handlePciBIOS(PCITAG Tag, int basereg,
if ((xf86ReadDomainMemory(Tag, hostbase, sizeof(tmp), tmp) !=
sizeof(tmp)) ||
(tmp[0] != 0x55) || (tmp[1] != 0xaa) || !tmp[2] ) {
- /* Restore the base register if it was changed. */
+ /* Restore the base registers if they were changed. */
+ pciWriteLong(Tag, PCI_MAP_ROM_REG, romsave);
if (savebase) pciWriteLong(Tag, PCI_MAP_REG_START + (b_reg << 2),
(CARD32) savebase);
diff --git a/hw/xfree86/os-support/bus/Pci.h b/hw/xfree86/os-support/bus/Pci.h
index b0c767d5c..3e965265b 100644
--- a/hw/xfree86/os-support/bus/Pci.h
+++ b/hw/xfree86/os-support/bus/Pci.h
@@ -112,7 +112,7 @@
/*
* Global Definitions
*/
-#define MAX_PCI_DEVICES 64 /* Max number of devices accomodated */
+#define MAX_PCI_DEVICES 128 /* Max number of devices accomodated */
/* by xf86scanpci */
#if defined(sun) && defined(SVR4) && defined(sparc)
# define MAX_PCI_BUSES 4096 /* Max number of PCI buses */
@@ -280,7 +280,7 @@
# define INCLUDE_XF86_MAP_PCI_MEM
# define INCLUDE_XF86_NO_DOMAIN
# endif
-#elif defined(__powerpc__)
+#elif defined(__powerpc__) || defined(__powerpc64__)
# if defined(linux)
# define ARCH_PCI_INIT linuxPciInit
# define INCLUDE_XF86_MAP_PCI_MEM
@@ -312,7 +312,7 @@
# define INCLUDE_XF86_MAP_PCI_MEM
# define INCLUDE_XF86_NO_DOMAIN
# endif
-#elif defined(__sparc__)
+#elif defined(__sparc__) || defined(sparc)
# if defined(linux)
# define ARCH_PCI_INIT linuxPciInit
# define INCLUDE_XF86_MAP_PCI_MEM
diff --git a/hw/xfree86/os-support/bus/ix86Pci.c b/hw/xfree86/os-support/bus/ix86Pci.c
index b135d0b73..da1aa7d2f 100644
--- a/hw/xfree86/os-support/bus/ix86Pci.c
+++ b/hw/xfree86/os-support/bus/ix86Pci.c
@@ -272,10 +272,16 @@ void ix86PciSelectCfgmech(void)
*/
switch (xf86Info.pciFlags) {
- case PCIProbe1: /* { */
+ case PCIOsConfig:
+#if ARCH_PCI_OS_INIT
+ return;
+#endif
+
+ case PCIProbe1:
- xf86MsgVerb(X_INFO, 2, "PCI: Probing config type using method 1\n");
- oldVal1 = inl(PCI_CFGMECH1_ADDRESS_REG);
+ xf86MsgVerb(X_INFO, 2,
+ "PCI: Probing config type using method 1\n");
+ oldVal1 = inl(PCI_CFGMECH1_ADDRESS_REG);
#ifdef DEBUGPCI
if (xf86Verbose > 2) {
@@ -492,9 +498,6 @@ void ix86PciSelectCfgmech(void)
ix86Pci0.funcs = &ix86Funcs2;
return;
- case PCIOsConfig:
- return;
-
case PCIForceNone:
break;
}
diff --git a/hw/xfree86/os-support/bus/linuxPci.c b/hw/xfree86/os-support/bus/linuxPci.c
index 4846ee0ed..6e33c2550 100644
--- a/hw/xfree86/os-support/bus/linuxPci.c
+++ b/hw/xfree86/os-support/bus/linuxPci.c
@@ -104,6 +104,7 @@ linuxPciOpenFile(PCITAG tag)
static int lbus,ldev,lfunc,fd = -1;
int bus, dev, func;
char file[32];
+ struct stat ignored;
bus = PCI_BUS_FROM_TAG(tag);
dev = PCI_DEV_FROM_TAG(tag);
@@ -111,12 +112,21 @@ linuxPciOpenFile(PCITAG tag)
if (fd == -1 || bus != lbus || dev != ldev || func != lfunc) {
if (fd != -1)
close(fd);
- if (bus < 256)
- sprintf(file, "/proc/bus/pci/%02x/%02x.%1x",
- bus, dev, func);
- else
- sprintf(file, "/proc/bus/pci/%04x/%02x.%1x",
- bus, dev, func);
+ if (bus < 256) {
+ if (stat("/proc/bus/pci/00", &ignored) < 0)
+ sprintf(file, "/proc/bus/pci/0000:%02x/%02x.%1x",
+ bus, dev, func);
+ else
+ sprintf(file, "/proc/bus/pci/%02x/%02x.%1x",
+ bus, dev, func);
+ } else {
+ if (stat("/proc/bus/pci/00", &ignored) < 0)
+ sprintf(file, "/proc/bus/pci/0000:%04x/%02x.%1x",
+ bus, dev, func);
+ else
+ sprintf(file, "/proc/bus/pci/%04x/%02x.%1x",
+ bus, dev, func);
+ }
fd = open(file,O_RDWR);
lbus = bus;
ldev = dev;
diff --git a/hw/xfree86/os-support/drm/drmmodule.c b/hw/xfree86/os-support/drm/drmmodule.c
index 8192e97eb..2fb082c36 100644
--- a/hw/xfree86/os-support/drm/drmmodule.c
+++ b/hw/xfree86/os-support/drm/drmmodule.c
@@ -39,7 +39,7 @@ static XF86ModuleVersionInfo VersRec =
MODULEVENDORSTRING,
MODINFOSTRING1,
MODINFOSTRING2,
- XF86_VERSION_CURRENT,
+ XORG_VERSION_CURRENT,
1, 0, 0,
ABI_CLASS_EXTENSION,
ABI_EXTENSION_VERSION,
diff --git a/hw/xfree86/os-support/linux/int10/linux.c b/hw/xfree86/os-support/linux/int10/linux.c
index 984c79122..b01004931 100644
--- a/hw/xfree86/os-support/linux/int10/linux.c
+++ b/hw/xfree86/os-support/linux/int10/linux.c
@@ -172,6 +172,9 @@ xf86ExtendedInitInt10(int entityIndex, int Flags)
if (errno == ENOSYS)
xf86DrvMsg(screen, X_ERROR, "shmget error\n Please reconfigure"
" your kernel to include System V IPC support\n");
+ else
+ xf86DrvMsg(screen, X_ERROR,
+ "shmget(highmem) error: %s\n",strerror(errno));
goto error1;
}
} else {
@@ -198,16 +201,27 @@ xf86ExtendedInitInt10(int entityIndex, int Flags)
ErrorF("Mapping 640kB area\n");
#endif
if ((low_mem = shmget(counter++, V_RAM,
- IPC_CREAT | SHM_R | SHM_W)) == -1)
+ IPC_CREAT | SHM_R | SHM_W)) == -1) {
+ xf86DrvMsg(screen, X_ERROR,
+ "shmget(lowmem) error: %s\n",strerror(errno));
goto error2;
+ }
((linuxInt10Priv*)pInt->private)->lowMem = low_mem;
base = shmat(low_mem, 0, 0);
- if (base == SHMERRORPTR) goto error4;
+ if (base == SHMERRORPTR) {
+ xf86DrvMsg(screen, X_ERROR,
+ "shmat(low_mem) error: %s\n",strerror(errno));
+ goto error3;
+ }
((linuxInt10Priv *)pInt->private)->base = base;
if (high_mem > -1) {
base_high = shmat(high_mem, 0, 0);
- if (base_high == SHMERRORPTR) goto error4;
+ if (base_high == SHMERRORPTR) {
+ xf86DrvMsg(screen, X_ERROR,
+ "shmat(high_mem) error: %s\n",strerror(errno));
+ goto error3;
+ }
((linuxInt10Priv*)pInt->private)->base_high = base_high;
} else
((linuxInt10Priv*)pInt->private)->base_high = NULL;
@@ -388,8 +402,6 @@ xf86ExtendedInitInt10(int entityIndex, int Flags)
xfree(options);
return pInt;
-error4:
- xf86DrvMsg(screen, X_ERROR, "shmat() call returned errno %d\n", errno);
error3:
if (base_high)
shmdt(base_high);
@@ -429,6 +441,8 @@ MapCurrentInt10(xf86Int10InfoPtr pInt)
addr = shmat(((linuxInt10Priv*)pInt->private)->lowMem, (char*)1, SHM_RND);
if (addr == SHMERRORPTR) {
xf86DrvMsg(pInt->scrnIndex, X_ERROR, "Cannot shmat() low memory\n");
+ xf86DrvMsg(pInt->scrnIndex, X_ERROR,
+ "shmat(low_mem) error: %s\n",strerror(errno));
return FALSE;
}
@@ -438,6 +452,8 @@ MapCurrentInt10(xf86Int10InfoPtr pInt)
if (addr == SHMERRORPTR) {
xf86DrvMsg(pInt->scrnIndex, X_ERROR,
"Cannot shmat() high memory\n");
+ xf86DrvMsg(pInt->scrnIndex, X_ERROR,
+ "shmget error: %s\n",strerror(errno));
return FALSE;
}
} else {
diff --git a/hw/xfree86/os-support/linux/lnx_ia64.c b/hw/xfree86/os-support/linux/lnx_ia64.c
new file mode 100644
index 000000000..8d0976a36
--- /dev/null
+++ b/hw/xfree86/os-support/linux/lnx_ia64.c
@@ -0,0 +1,45 @@
+/*
+ * Copyright 2004, Egbert Eich
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * EGBERT EICH BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CON-
+ * NECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name of Egbert Eich shall not
+ * be used in advertising or otherwise to promote the sale, use or other deal-
+ *ings in this Software without prior written authorization from Egbert Eich.
+ *
+ */
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+
+#include "ia64Pci.h"
+#include "Pci.h"
+
+#if defined OS_PROBE_PCI_CHIPSET
+IA64Chipset OS_PROBE_PCI_CHIPSET(scanpciWrapperOpt flags)
+{
+ struct stat unused;
+
+ if (!stat("/proc/bus/mckinley/zx1",&unused)
+ || !stat("/proc/bus/mckinley/zx2",&unused))
+ return ZX1_CHIPSET;
+
+ return NONE_CHIPSET;
+}
+#endif
diff --git a/hw/xfree86/os-support/linux/lnx_init.c b/hw/xfree86/os-support/linux/lnx_init.c
index 5564f5ab9..da7c0a043 100644
--- a/hw/xfree86/os-support/linux/lnx_init.c
+++ b/hw/xfree86/os-support/linux/lnx_init.c
@@ -1,4 +1,4 @@
-/* $XdotOrg: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_init.c,v 1.1.4.2.4.2 2004/03/04 20:16:46 kaleb Exp $ */
+/* $XdotOrg: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_init.c,v 1.2 2004/04/23 19:54:08 eich Exp $ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_init.c,v 3.14 2001/10/31 22:50:30 tsi Exp $ */
/*
* Copyright 1992 by Orest Zborowski <obz@Kodak.com>
diff --git a/hw/xfree86/os-support/linux/lnx_io.c b/hw/xfree86/os-support/linux/lnx_io.c
index 89afc8d64..dda1ff8ef 100644
--- a/hw/xfree86/os-support/linux/lnx_io.c
+++ b/hw/xfree86/os-support/linux/lnx_io.c
@@ -1,5 +1,4 @@
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_io.c,v 3.25 2003/08/19 17:32:34 tsi Exp $ */
-/* $XdotOrg: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_io.c,v 1.1.4.2.6.2 2004/03/04 17:48:09 eich Exp $ */
/*
* Copyright 1992 by Orest Zborowski <obz@Kodak.com>
* Copyright 1993 by David Dawes <dawes@xfree86.org>
diff --git a/hw/xfree86/os-support/linux/lnx_kbd.c b/hw/xfree86/os-support/linux/lnx_kbd.c
index ab75fce09..68f3af38b 100644
--- a/hw/xfree86/os-support/linux/lnx_kbd.c
+++ b/hw/xfree86/os-support/linux/lnx_kbd.c
@@ -1,5 +1,4 @@
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_kbd.c,v 1.4 2003/11/03 05:11:52 tsi Exp $ */
-/* $XdotOrg: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_kbd.c,v 1.1.4.1.6.2 2004/03/04 17:48:09 eich Exp $ */
/*
* Copyright (c) 2002 by The XFree86 Project, Inc.
diff --git a/hw/xfree86/os-support/linux/lnx_video.c b/hw/xfree86/os-support/linux/lnx_video.c
index 5144cdf3e..4cd8152df 100644
--- a/hw/xfree86/os-support/linux/lnx_video.c
+++ b/hw/xfree86/os-support/linux/lnx_video.c
@@ -450,7 +450,7 @@ mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags)
/* This requires linux-0.99.pl10 or above */
base = mmap((caddr_t)0, Size + alignOff, prot, mapflags, fd,
- (off_t)(off_t)realBase + BUS_BASE);
+ (off_t)realBase + BUS_BASE);
close(fd);
if (base == MAP_FAILED) {
FatalError("xf86MapVidMem: Could not mmap framebuffer"
diff --git a/hw/xfree86/os-support/shared/ia64Pci.c b/hw/xfree86/os-support/shared/ia64Pci.c
new file mode 100644
index 000000000..d0046a7f2
--- /dev/null
+++ b/hw/xfree86/os-support/shared/ia64Pci.c
@@ -0,0 +1,81 @@
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/ia64Pci.c,v 1.3 2003/02/23 20:26:49 tsi Exp $ */
+/*
+ * Copyright (C) 2002-2003 The XFree86 Project, Inc. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name of the XFree86 Project shall
+ * not be used in advertising or otherwise to promote the sale, use or other
+ * dealings in this Software without prior written authorization from the
+ * XFree86 Project.
+ */
+
+/*
+ * This file contains the glue needed to support various IA-64 chipsets.
+ */
+
+#include "460gxPCI.h"
+#include "e8870PCI.h"
+#include "zx1PCI.h"
+#include "Pci.h"
+#include "ia64Pci.h"
+
+void
+ia64ScanPCIWrapper(scanpciWrapperOpt flags)
+{
+ static IA64Chipset chipset = NONE_CHIPSET;
+
+ if (flags == SCANPCI_INIT) {
+
+ /* PCI configuration space probes should be done first */
+ if (xorgProbe460GX(flags)) {
+ chipset = I460GX_CHIPSET;
+ xf86PreScan460GX();
+ return;
+ } else if (xorgProbeE8870(flags)) {
+ chipset = E8870_CHIPSET;
+ xf86PreScanE8870();
+ return;
+ }
+#ifdef OS_PROBE_PCI_CHIPSET
+ chipset = OS_PROBE_PCI_CHIPSET(flags);
+ switch (chipset) {
+ case ZX1_CHIPSET:
+ xf86PreScanZX1();
+ return;
+ default:
+ return;
+ }
+#endif
+ } else /* if (flags == SCANPCI_TERM) */ {
+
+ switch (chipset) {
+ case I460GX_CHIPSET:
+ xf86PostScan460GX();
+ return;
+ case E8870_CHIPSET:
+ xf86PostScanE8870();
+ return;
+ case ZX1_CHIPSET:
+ xf86PostScanZX1();
+ return;
+ default:
+ return;
+ }
+ }
+}
diff --git a/hw/xfree86/os-support/shared/ia64Pci.h b/hw/xfree86/os-support/shared/ia64Pci.h
new file mode 100644
index 000000000..1ee2fc091
--- /dev/null
+++ b/hw/xfree86/os-support/shared/ia64Pci.h
@@ -0,0 +1,41 @@
+/*
+ * Copyright 2004, Egbert Eich
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * EGBERT EICH BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CON-
+ * NECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name of Egbert Eich shall not
+ * be used in advertising or otherwise to promote the sale, use or other deal-
+ *ings in this Software without prior written authorization from Egbert Eich.
+ *
+ */
+#ifndef _IA64_PCI_H
+# define _IA64_PCI_H
+
+#include "Pci.h"
+
+typedef enum {
+ NONE_CHIPSET,
+ I460GX_CHIPSET,
+ E8870_CHIPSET,
+ ZX1_CHIPSET
+} IA64Chipset;
+
+# ifdef OS_PROBE_PCI_CHIPSET
+extern IA64Chipset OS_PROBE_PCI_CHIPSET(scanpciWrapperOpt flags);
+# endif
+#endif
diff --git a/hw/xfree86/os-support/shared/libc_wrapper.c b/hw/xfree86/os-support/shared/libc_wrapper.c
index 34f375f6c..59c08d85a 100644
--- a/hw/xfree86/os-support/shared/libc_wrapper.c
+++ b/hw/xfree86/os-support/shared/libc_wrapper.c
@@ -1884,7 +1884,8 @@ int
xf86shmget(xf86key_t key, int size, int xf86shmflg)
{
int shmflg;
-
+ int ret;
+
/* This copies the permissions (SHM_R, SHM_W for u, g, o). */
shmflg = xf86shmflg & 0777;
@@ -1893,14 +1894,20 @@ xf86shmget(xf86key_t key, int size, int xf86shmflg)
if (xf86shmflg & XF86IPC_CREAT) shmflg |= IPC_CREAT;
if (xf86shmflg & XF86IPC_EXCL) shmflg |= IPC_EXCL;
if (xf86shmflg & XF86IPC_NOWAIT) shmflg |= IPC_NOWAIT;
- return shmget((key_t) key, size, shmflg);
+ ret = shmget((key_t) key, size, shmflg);
+
+ if (ret == -1)
+ xf86errno = xf86GetErrno();
+
+ return ret;
}
char *
xf86shmat(int id, char *addr, int xf86shmflg)
{
int shmflg = 0;
-
+ pointer ret;
+
#ifdef SHM_RDONLY
if (xf86shmflg & XF86SHM_RDONLY) shmflg |= SHM_RDONLY;
#endif
@@ -1911,13 +1918,25 @@ xf86shmat(int id, char *addr, int xf86shmflg)
if (xf86shmflg & XF86SHM_REMAP) shmflg |= SHM_REMAP;
#endif
- return shmat(id,addr,shmflg);
+ ret = shmat(id,addr,shmflg);
+
+ if (ret == (pointer) -1)
+ xf86errno = xf86GetErrno();
+
+ return ret;
}
int
xf86shmdt(char *addr)
{
- return shmdt(addr);
+ int ret;
+
+ ret = shmdt(addr);
+
+ if (ret == -1)
+ xf86errno = xf86GetErrno();
+
+ return ret;
}
/*
@@ -1927,7 +1946,8 @@ int
xf86shmctl(int id, int xf86cmd, pointer buf)
{
int cmd;
-
+ int ret;
+
switch (xf86cmd) {
case XF86IPC_RMID:
cmd = IPC_RMID;
@@ -1936,32 +1956,44 @@ xf86shmctl(int id, int xf86cmd, pointer buf)
return 0;
}
- return shmctl(id, cmd, buf);
+ ret = shmctl(id, cmd, buf);
+
+ if (ret == -1)
+ xf86errno = xf86GetErrno();
+
+ return ret;
}
#else
int
xf86shmget(xf86key_t key, int size, int xf86shmflg)
{
- return -1;
+ xf86errno = ENOSYS;
+ return -1;
}
char *
xf86shmat(int id, char *addr, int xf86shmflg)
{
+ xf86errno = ENOSYS;
+
return (char *)-1;
}
int
xf86shmctl(int id, int xf86cmd, pointer buf)
{
+ xf86errno = ENOSYS;
+
return -1;
}
int
xf86shmdt(char *addr)
{
+ xf86errno = ENOSYS;
+
return -1;
}
#endif /* HAVE_SYSV_IPC */
diff --git a/hw/xfree86/os-support/shared/sigio.c b/hw/xfree86/os-support/shared/sigio.c
index fbab2a517..7bcb93a0b 100644
--- a/hw/xfree86/os-support/shared/sigio.c
+++ b/hw/xfree86/os-support/shared/sigio.c
@@ -259,17 +259,25 @@ int
xf86BlockSIGIO (void)
{
sigset_t set, old;
-
+ int ret;
+
sigemptyset (&set);
sigaddset (&set, SIGIO);
sigprocmask (SIG_BLOCK, &set, &old);
- return sigismember (&old, SIGIO);
+ ret = sigismember (&old, SIGIO);
+#ifdef DEBUG
+ ErrorF("%i = xf86BlockSIGIO()\n",ret);
+#endif
+ return ret;
}
void
xf86UnblockSIGIO (int wasset)
{
sigset_t set;
+#ifdef DEBUG
+ ErrorF("xf86UnblockSIGIO(%i)\n",wasset);
+#endif
if (!wasset)
{
diff --git a/hw/xfree86/os-support/shared/sigiostubs.c b/hw/xfree86/os-support/shared/sigiostubs.c
index 51f98f2a4..5e08d4fbe 100644
--- a/hw/xfree86/os-support/shared/sigiostubs.c
+++ b/hw/xfree86/os-support/shared/sigiostubs.c
@@ -25,6 +25,7 @@
* the sale, use or other dealings in this Software without prior written
* authorization from the copyright holder(s) and author(s).
*/
+/* $XdotOrg: xc/programs/Xserver/hw/xfree86/os-support/shared/sigiostubs.c,v 1.2 2004/06/28 18:08:26 alanc Exp $ */
#ifdef XFree86Server
#ifdef __UNIXOS2__
@@ -32,10 +33,8 @@
#endif
# include "X.h"
# include "xf86.h"
-# include "xf86drm.h"
# include "xf86Priv.h"
# include "xf86_OSlib.h"
-# include "xf86drm.h"
#else
# include <unistd.h>
# include <signal.h>
diff --git a/hw/xfree86/os-support/solaris/sun_init.c b/hw/xfree86/os-support/solaris/sun_init.c
index fe8205e13..c7382e0e1 100644
--- a/hw/xfree86/os-support/solaris/sun_init.c
+++ b/hw/xfree86/os-support/solaris/sun_init.c
@@ -26,6 +26,9 @@
#include "xf86.h"
#include "xf86Priv.h"
#include "xf86_OSlib.h"
+#ifdef __i386
+# include <sys/kd.h>
+#endif
static Bool KeepTty = FALSE;
static Bool Protect0 = FALSE;
@@ -34,7 +37,11 @@ static int VTnum = -1;
static int xf86StartVT = -1;
#endif
+#if defined(__SOL8__) || !defined(__i386)
+static char fb_dev[PATH_MAX] = "/dev/fb";
+#else
static char fb_dev[PATH_MAX] = "/dev/console";
+#endif
void
xf86OpenConsole(void)
@@ -162,12 +169,15 @@ xf86OpenConsole(void)
if (ioctl(xf86Info.consoleFd, VT_SETMODE, &VT) < 0)
FatalError("xf86OpenConsole: VT_SETMODE VT_PROCESS failed\n");
-
+#endif
+#ifdef __i386
if (ioctl(xf86Info.consoleFd, KDSETMODE, KD_GRAPHICS) < 0)
FatalError("xf86OpenConsole: KDSETMODE KD_GRAPHICS failed\n");
+#endif
}
else /* serverGeneration != 1 */
{
+#ifdef HAS_USL_VTS
/*
* Now re-get the VT
*/
@@ -245,6 +255,11 @@ xf86CloseConsole(void)
#endif
+#ifdef __i386
+ /* Reset the display back to text mode */
+ ioctl(xf86Info.consoleFd, KDSETMODE, KD_TEXT);
+#endif
+
#ifdef HAS_USL_VTS
/*
@@ -261,8 +276,6 @@ xf86CloseConsole(void)
* Did the whole thing similarly to the way linux does it
*/
- /* Reset the display back to text mode */
- ioctl(xf86Info.consoleFd, KDSETMODE, KD_TEXT);
if (ioctl(xf86Info.consoleFd, VT_GETMODE, &VT) != -1)
{
VT.mode = VT_AUTO; /* Set default vt handling */
diff --git a/hw/xfree86/os-support/solaris/sun_kbd.c b/hw/xfree86/os-support/solaris/sun_kbd.c
index 0213a0732..56929d69b 100644
--- a/hw/xfree86/os-support/solaris/sun_kbd.c
+++ b/hw/xfree86/os-support/solaris/sun_kbd.c
@@ -23,7 +23,9 @@
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+/* $XdotOrg: xc/programs/Xserver/hw/xfree86/os-support/sunos/sun_kbd.c,v 1.3 2004/06/13 04:50:21 alanc Exp $ */
+#include "xf86.h"
#include "xf86Priv.h"
#include "xf86_OSlib.h"
@@ -55,6 +57,7 @@ void
xf86KbdInit()
{
int klayout;
+ const char *ktype_name;
if (xf86Info.kbdFd < 0) {
xf86Info.kbdFd = open("/dev/kbd", O_RDWR|O_NONBLOCK);
@@ -63,7 +66,7 @@ xf86KbdInit()
}
/*
- * None of the followin should ever fail. If it does, something is
+ * None of the following should ever fail. If it does, something is
* broken (IMO) - DWH 8/21/99
*/
@@ -78,6 +81,21 @@ xf86KbdInit()
if (ioctl(xf86Info.kbdFd, KIOCGDIRECT, &sun_odirect) < 0)
FatalError("Unable to determine keyboard direct setting\n");
+
+ switch (sun_ktype) {
+ case KB_SUN3:
+ ktype_name = "Sun Type 3"; break;
+ case KB_SUN4:
+ ktype_name = "Sun Type 4/5/6"; break;
+ case KB_USB:
+ ktype_name = "USB"; break;
+ case KB_PC:
+ ktype_name = "PC"; break;
+ default:
+ ktype_name = "Unknown"; break;
+ }
+ xf86Msg(X_PROBED, "Keyboard type: %s (%d)\n", ktype_name, sun_ktype);
+ xf86Msg(X_PROBED, "Keyboard layout: %d\n", klayout);
}
int
diff --git a/hw/xfree86/os-support/solaris/sun_kbdEv.c b/hw/xfree86/os-support/solaris/sun_kbdEv.c
index 30cf288ca..c8626a285 100644
--- a/hw/xfree86/os-support/solaris/sun_kbdEv.c
+++ b/hw/xfree86/os-support/solaris/sun_kbdEv.c
@@ -23,6 +23,7 @@
*/
/* [JCH-96/01/21] Extended std reverse map to four buttons. */
+/* $XdotOrg: xc/programs/Xserver/hw/xfree86/os-support/sunos/sun_kbdEv.c,v 1.3 2004/07/28 03:57:19 alanc Exp $ */
#include "xf86.h"
#include "xf86Priv.h"
@@ -107,6 +108,11 @@ static OsTimerPtr sunTimer = NULL;
* This doesn't seem right. It probably needs to be dependent on a keyboard
* type.
*/
+
+/* Additional Sun Japanese Keyboard Keys not defined in common/atKeynames.h */
+#define KEY_Kanji 0x82
+#define KEY_Execute 0x83
+
static unsigned char map[256] = {
#if defined(i386) || defined(__i386) || defined(__i386__)
KEY_NOTUSED, /* 0 */
@@ -519,11 +525,11 @@ static unsigned char usbmap[256] = {
/* 132 */ KEY_NOTUSED,
/* 133 */ KEY_NOTUSED,
/* 134 */ KEY_NOTUSED,
- /* 135 */ KEY_NOTUSED,
- /* 136 */ KEY_NOTUSED,
- /* 137 */ KEY_NOTUSED,
- /* 138 */ KEY_NOTUSED,
- /* 139 */ KEY_NOTUSED,
+ /* 135 */ KEY_BSlash2, /* Sun Japanese Kbd: Backslash / Underscore */
+ /* 136 */ KEY_XFER, /* Sun Japanese Kbd: Henkan Mode */
+ /* 137 */ KEY_Yen, /* Sun Japanese Kbd: Yen / Brokenbar */
+ /* 138 */ KEY_Kanji, /* Sun Japanese Kbd: Kanji */
+ /* 139 */ KEY_Execute, /* Sun Japanese Kbd: Execute */
/* 140 */ KEY_NOTUSED,
/* 141 */ KEY_NOTUSED,
/* 142 */ KEY_NOTUSED,
diff --git a/hw/xfree86/os-support/solaris/sun_mouse.c b/hw/xfree86/os-support/solaris/sun_mouse.c
index 2e9cee2b1..4cbd1cd5e 100644
--- a/hw/xfree86/os-support/solaris/sun_mouse.c
+++ b/hw/xfree86/os-support/solaris/sun_mouse.c
@@ -1,4 +1,5 @@
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/sunos/sun_mouse.c,v 1.4 2002/01/25 21:56:21 tsi Exp $ */
+/* $XdotOrg: xc/programs/Xserver/hw/xfree86/os-support/sunos/sun_mouse.c,v 1.2 2004/04/23 19:54:13 eich Exp $ */
/*
* Copyright 1999-2001 The XFree86 Project, Inc. All Rights Reserved.
*
@@ -24,16 +25,53 @@
* dealings in this Software without prior written authorization from the
* XFree86 Project.
*/
+/* Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, and/or sell copies of the Software, and to permit persons
+ * to whom the Software is furnished to do so, provided that the above
+ * copyright notice(s) and this permission notice appear in all copies of
+ * the Software and that both the above copyright notice(s) and this
+ * permission notice appear in supporting documentation.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+ * OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+ * HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR 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.
+ *
+ * Except as contained in this notice, the name of a copyright holder
+ * shall not be used in advertising or otherwise to promote the sale, use
+ * or other dealings in this Software without prior written authorization
+ * of the copyright holder.
+ */
#include "xf86.h"
#include "xf86_OSlib.h"
#include "xf86OSmouse.h"
-#if defined(__SOL8__) || !defined(i386)
+#if defined(__SOL8__) || !defined(__i386)
#include "xisb.h"
#include "mipointer.h"
+#include <sys/stropts.h>
#include <sys/vuid_event.h>
+#include <sys/msio.h>
+
+/* Wheel mouse support in VUID drivers in Solaris 9 updates & Solaris 10 */
+#ifdef WHEEL_DEVID /* Defined in vuid_event.h if VUID wheel support present */
+# define HAVE_VUID_WHEEL
+#endif
+#ifdef HAVE_VUID_WHEEL
+# include <sys/vuid_wheel.h>
+#endif
/* Names of protocols that are handled internally here. */
@@ -42,21 +80,71 @@ static const char *internalNames[] = {
NULL
};
+static const char *solarisMouseDevs[] = {
+ /* Device file: Protocol: */
+ "/dev/mouse", "VUID", /* USB or SPARC */
+#ifdef __i386
+ "/dev/kdmouse", "PS/2", /* PS/2 */
+#endif
+ NULL
+};
+
typedef struct _VuidMseRec {
Firm_event event;
unsigned char *buffer;
+ char *strmod;
} VuidMseRec, *VuidMsePtr;
static int vuidMouseProc(DeviceIntPtr pPointer, int what);
static void vuidReadInput(InputInfoPtr pInfo);
+/*
+ * Initialize and enable the mouse wheel, if present.
+ *
+ * Returns 1 if mouse wheel was successfully enabled.
+ * Returns 0 if an error occurred or if there is no mouse wheel.
+ */
+static int
+vuidMouseWheelInit(InputInfoPtr pInfo)
+{
+#ifdef HAVE_VUID_WHEEL
+ wheel_state wstate;
+ int nwheel = -1;
+
+ wstate.vers = VUID_WHEEL_STATE_VERS;
+ wstate.id = 0;
+ wstate.stateflags = -1;
+
+ if (ioctl(pInfo->fd, VUIDGWHEELCOUNT, &nwheel) != 0)
+ return (0);
+
+ if (ioctl(pInfo->fd, VUIDGWHEELSTATE, &wstate) != 0) {
+ xf86Msg(X_WARNING, "%s: couldn't get wheel state\n", pInfo->name);
+ return (0);
+ }
+
+ wstate.stateflags |= VUID_WHEEL_STATE_ENABLED;
+
+ if (ioctl(pInfo->fd, VUIDSWHEELSTATE, &wstate) != 0) {
+ xf86Msg(X_WARNING, "%s: couldn't enable wheel\n", pInfo->name);
+ return (0);
+ }
+
+ return (1);
+#else
+ return (0);
+#endif
+}
+
+
/* This function is called when the protocol is "VUID". */
static Bool
vuidPreInit(InputInfoPtr pInfo, const char *protocol, int flags)
{
MouseDevPtr pMse = pInfo->private;
VuidMsePtr pVuidMse;
+ int buttons;
pVuidMse = xalloc(sizeof(VuidMseRec));
if (pVuidMse == NULL) {
@@ -84,7 +172,40 @@ vuidPreInit(InputInfoPtr pInfo, const char *protocol, int flags)
return FALSE;
}
}
+
pVuidMse->buffer = (unsigned char *)&pVuidMse->event;
+
+ pVuidMse->strmod = xf86SetStrOption(pInfo->options, "StreamsModule", NULL);
+ if (pVuidMse->strmod &&
+ (ioctl(pInfo->fd, I_PUSH, pVuidMse->strmod) == -1)) {
+ xf86Msg(X_ERROR,
+ "%s: cannot push module '%s' onto mouse device: %s\n",
+ pInfo->name, pVuidMse->strmod, strerror(errno));
+ xf86CloseSerial(pInfo->fd);
+ pInfo->fd = -1;
+ xfree(pVuidMse);
+ xfree(pMse);
+ return FALSE;
+ }
+
+ buttons = xf86SetIntOption(pInfo->options, "Buttons", 0);
+ if (buttons == 0) {
+ if(ioctl(pInfo->fd, MSIOBUTTONS, &buttons) == 0) {
+ pInfo->conf_idev->commonOptions =
+ xf86ReplaceIntOption(pInfo->conf_idev->commonOptions,
+ "Buttons", buttons);
+ xf86Msg(X_INFO, "%s: Setting Buttons option to \"%d\"\n",
+ pInfo->name, buttons);
+ }
+ }
+
+ if (pVuidMse->strmod &&
+ (ioctl(pInfo->fd, I_POP, pVuidMse->strmod) == -1)) {
+ xf86Msg(X_WARNING,
+ "%s: cannot pop module '%s' off mouse device: %s\n",
+ pInfo->name, pVuidMse->strmod, strerror(errno));
+ }
+
xf86CloseSerial(pInfo->fd);
pInfo->fd = -1;
@@ -112,6 +233,7 @@ vuidReadInput(InputInfoPtr pInfo)
unsigned int n;
int c;
unsigned char *pBuf;
+ int wmask;
pMse = pInfo->private;
pVuidMse = pMse->mousePriv;
@@ -154,7 +276,15 @@ vuidReadInput(InputInfoPtr pInfo)
dy -= delta;
break;
}
+ }
+#ifdef HAVE_VUID_WHEEL
+ else if (vuid_in_range(VUID_WHEEL, pVuidMse->event.id)) {
+ if (vuid_id_offset(pVuidMse->event.id) == 0)
+ dz -= VUID_WHEEL_GETDELTA(pVuidMse->event.value);
+ else
+ dw -= VUID_WHEEL_GETDELTA(pVuidMse->event.value);
}
+#endif
n = 0;
if ((c = XisbRead(pMse->buffer)) >= 0) {
@@ -219,9 +349,20 @@ vuidMouseProc(DeviceIntPtr pPointer, int what)
pInfo->fd = -1;
} else {
int fmt = VUID_FIRM_EVENT;
- ioctl(pInfo->fd, VUIDSFORMAT, &fmt);
- xf86FlushInput(pInfo->fd);
- AddEnabledDevice(pInfo->fd);
+
+ if (pVuidMse->strmod &&
+ (ioctl(pInfo->fd, I_PUSH, pVuidMse->strmod) == -1)) {
+ xf86Msg(X_ERROR,
+ "%s: cannot push module '%s' onto mouse device: %s\n",
+ pInfo->name, pVuidMse->strmod, strerror(errno));
+ xf86CloseSerial(pInfo->fd);
+ pInfo->fd = -1;
+ } else {
+ ioctl(pInfo->fd, VUIDSFORMAT, &fmt);
+ vuidMouseWheelInit(pInfo);
+ xf86FlushInput(pInfo->fd);
+ AddEnabledDevice(pInfo->fd);
+ }
}
}
pMse->lastButtons = 0;
@@ -237,6 +378,12 @@ vuidMouseProc(DeviceIntPtr pPointer, int what)
XisbFree(pMse->buffer);
pMse->buffer = NULL;
}
+ if (pVuidMse->strmod &&
+ (ioctl(pInfo->fd, I_POP, pVuidMse->strmod) == -1)) {
+ xf86Msg(X_WARNING,
+ "%s: cannot pop module '%s' off mouse device: %s\n",
+ pInfo->name, pVuidMse->strmod, strerror(errno));
+ }
xf86CloseSerial(pInfo->fd);
pInfo->fd = -1;
}
@@ -278,21 +425,98 @@ CheckProtocol(const char *protocol)
static const char *
DefaultProtocol(void)
{
- return "VUID";
+ return "Auto";
+}
+
+static Bool
+solarisMouseAutoProbe(InputInfoPtr pInfo, const char **protocol,
+ const char **device)
+{
+ const char **pdev, **pproto, *dev = NULL;
+ int fd = -1;
+ Bool found;
+
+ for (pdev = solarisMouseDevs; *pdev; pdev += 2) {
+ pproto = pdev + 1;
+ if ((*protocol != NULL) && (strcmp(*protocol, "Auto") != 0) &&
+ (*pproto != NULL) && (strcmp(*pproto, *protocol) != 0)) {
+ continue;
+ }
+ if ((*device != NULL) && (strcmp(*device, *pdev) != 0)) {
+ continue;
+ }
+ SYSCALL (fd = open(*pdev, O_RDWR | O_NONBLOCK));
+ if (fd == -1) {
+#ifdef DEBUG
+ ErrorF("Cannot open %s (%s)\n", pdev, strerror(errno));
+#endif
+ } else {
+ found = TRUE;
+ if ((*pproto != NULL) && (strcmp(*pproto, "VUID") == 0)) {
+ int i;
+ if (ioctl(fd, VUIDGFORMAT, &i) < 0) {
+ found = FALSE;
+ }
+ }
+ close(fd);
+ if (found == TRUE) {
+ if (*pproto != NULL) {
+ *protocol = *pproto;
+ }
+ *device = *pdev;
+ return TRUE;
+ }
+ }
+ }
+ return FALSE;
}
static const char *
SetupAuto(InputInfoPtr pInfo, int *protoPara)
{
- return DefaultProtocol();
+ const char *pdev = NULL;
+ const char *pproto = NULL;
+ MouseDevPtr pMse = pInfo->private;
+
+ if (pInfo->fd == -1) {
+ /* probe to find device/protocol to use */
+ if (solarisMouseAutoProbe(pInfo, &pproto, &pdev) != FALSE) {
+ /* Set the Device option. */
+ pInfo->conf_idev->commonOptions =
+ xf86AddNewOption(pInfo->conf_idev->commonOptions, "Device", pdev);
+ xf86Msg(X_INFO, "%s: Setting Device option to \"%s\"\n",
+ pInfo->name, pdev);
+ }
+ } else if (pMse->protocolID == PROT_AUTO) {
+ pdev = xf86CheckStrOption(pInfo->conf_idev->commonOptions,
+ "Device", NULL);
+ solarisMouseAutoProbe(pInfo, &pproto, &pdev);
+ }
+ return pproto;
+}
+
+static const char *
+FindDevice(InputInfoPtr pInfo, const char *protocol, int flags)
+{
+ const char *pdev = NULL;
+ const char *pproto = protocol;
+
+ if (solarisMouseAutoProbe(pInfo, &pproto, &pdev) != FALSE) {
+ /* Set the Device option. */
+ pInfo->conf_idev->commonOptions =
+ xf86AddNewOption(pInfo->conf_idev->commonOptions, "Device", pdev);
+ xf86Msg(X_INFO, "%s: Setting Device option to \"%s\"\n",
+ pInfo->name, pdev);
+ }
+ return pdev;
}
-#else /* __SOL8__ || !i386 */
+#else /* __SOL8__ || !__i386 */
#undef MSE_MISC
#define MSE_MISC 0
-#endif /* !__SOL8__ && i386 */
+#endif /* !__SOL8__ && __i386 */
static int
SupportedInterfaces(void)
@@ -310,12 +534,13 @@ xf86OSMouseInit(int flags)
if (!p)
return NULL;
p->SupportedInterfaces = SupportedInterfaces;
-#if defined(__SOL8__) || !defined(i386)
+#if defined(__SOL8__) || !defined(__i386)
p->BuiltinNames = BuiltinNames;
p->CheckProtocol = CheckProtocol;
p->PreInit = sunMousePreInit;
p->DefaultProtocol = DefaultProtocol;
p->SetupAuto = SetupAuto;
+ p->FindDevice = FindDevice;
#endif
return p;
}
diff --git a/hw/xfree86/os-support/xf86OSmouse.h b/hw/xfree86/os-support/xf86OSmouse.h
index ee6313a3b..87d742d5e 100644
--- a/hw/xfree86/os-support/xf86OSmouse.h
+++ b/hw/xfree86/os-support/xf86OSmouse.h
@@ -169,11 +169,12 @@ extern OSMouseInfoPtr xf86OSMouseInit(int flags);
*
* 1.0.0 - Everything up to when versioning was started.
* 1.1.0 - FindDevice and GuessProtocol added to OSMouseInfoRec
+ * 1.2.0 - xisbscale added to MouseDevRec
*
*/
#define OS_MOUSE_VERSION_MAJOR 1
-#define OS_MOUSE_VERSION_MINOR 1
+#define OS_MOUSE_VERSION_MINOR 2
#define OS_MOUSE_VERSION_PATCH 0
#define OS_MOUSE_VERSION_CURRENT \
@@ -267,6 +268,7 @@ typedef struct _MouseDevRec {
dataGoodProc dataGood;
int angleOffset;
pointer pDragLock; /* drag lock area */
+ int xisbscale; /* buffer size for 1 event */
} MouseDevRec, *MouseDevPtr;
/* Z axis mapping */
diff --git a/hw/xfree86/os-support/xf86_OSlib.h b/hw/xfree86/os-support/xf86_OSlib.h
index 4df2d502a..5a9c9b1ff 100644
--- a/hw/xfree86/os-support/xf86_OSlib.h
+++ b/hw/xfree86/os-support/xf86_OSlib.h
@@ -67,6 +67,7 @@
*/
/* $XConsortium: xf86_OSlib.h /main/22 1996/10/27 11:06:31 kaleb $ */
+/* $XdotOrg: xc/programs/Xserver/hw/xfree86/os-support/xf86_OSlib.h,v 1.4 2004/07/28 03:57:19 alanc Exp $ */
/*
* This is private, and should not be included by any drivers. Drivers
@@ -260,6 +261,7 @@ typedef signed long xf86ssize_t;
# define LED_CAP LED_CAPS_LOCK
# define LED_NUM LED_NUM_LOCK
# define LED_SCR LED_SCROLL_LOCK
+# define LED_COMP LED_COMPOSE
# include <signal.h>
@@ -532,7 +534,7 @@ extern int errno;
# endif
# endif /* __bsdi__ */
-#ifdef USE_I386_IOPL
+#if defined(USE_I386_IOPL) || defined(USE_AMD64_IOPL)
#include <machine/sysarch.h>
#endif
diff --git a/hw/xfree86/os-support/xf86_libc.h b/hw/xfree86/os-support/xf86_libc.h
index ca54e480e..9579a6611 100644
--- a/hw/xfree86/os-support/xf86_libc.h
+++ b/hw/xfree86/os-support/xf86_libc.h
@@ -1,4 +1,4 @@
-/* $XdotOrg: xc/programs/Xserver/hw/xfree86/os-support/xf86_libc.h,v 1.1.4.3 2003/12/20 00:28:30 kaleb Exp $ */
+/* $XdotOrg: xc/programs/Xserver/hw/xfree86/os-support/xf86_libc.h,v 1.2 2004/04/23 19:54:07 eich Exp $ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/xf86_libc.h,v 3.63 2003/12/08 21:46:55 alanh Exp $ */
/*
* Copyright (c) 1997-2003 by The XFree86 Project, Inc.
diff --git a/hw/xfree86/parser/configProcs.h b/hw/xfree86/parser/configProcs.h
index 522cf5c2f..cc694666f 100644
--- a/hw/xfree86/parser/configProcs.h
+++ b/hw/xfree86/parser/configProcs.h
@@ -116,6 +116,10 @@ void xf86freeBuffersList (XF86ConfBuffersPtr ptr);
XF86ConfDRIPtr xf86parseDRISection (void);
void xf86printDRISection (FILE * cf, XF86ConfDRIPtr ptr);
void xf86freeDRI (XF86ConfDRIPtr ptr);
+/* Extensions.c */
+XF86ConfExtensionsPtr xf86parseExtensionsSection (void);
+void xf86printExtensionsSection (FILE * cf, XF86ConfExtensionsPtr ptr);
+void xf86freeExtensions (XF86ConfExtensionsPtr ptr);
#ifndef IN_XSERVER
/* Externally provided functions */
diff --git a/hw/xfree86/parser/read.c b/hw/xfree86/parser/read.c
index 2a5afeb27..2946dc8b1 100644
--- a/hw/xfree86/parser/read.c
+++ b/hw/xfree86/parser/read.c
@@ -191,6 +191,12 @@ xf86readConfigFile (void)
val.str = NULL;
HANDLE_RETURN (conf_dri, xf86parseDRISection ());
}
+ else if (xf86nameCompare (val.str, "extensions") == 0)
+ {
+ xf86conffree(val.str);
+ val.str = NULL;
+ HANDLE_RETURN (conf_extensions, xf86parseExtensionsSection ());
+ }
else
{
Error (INVALID_SECTION_MSG, xf86tokenString ());
@@ -304,6 +310,7 @@ xf86freeConfig (XF86ConfigPtr p)
xf86freeInputList (p->conf_input_lst);
xf86freeVendorList (p->conf_vendor_lst);
xf86freeDRI (p->conf_dri);
+ xf86freeExtensions (p->conf_extensions);
TestFree(p->conf_comment);
xf86conffree (p);
diff --git a/hw/xfree86/parser/write.c b/hw/xfree86/parser/write.c
index e096c6247..499b6a11e 100644
--- a/hw/xfree86/parser/write.c
+++ b/hw/xfree86/parser/write.c
@@ -130,6 +130,8 @@ doWriteConfigFile (const char *filename, XF86ConfigPtr cptr)
xf86printDRISection (cf, cptr->conf_dri);
+ xf86printExtensionsSection (cf, cptr->conf_extensions);
+
fclose(cf);
return 1;
}
diff --git a/hw/xfree86/parser/xf86Parser.h b/hw/xfree86/parser/xf86Parser.h
index 1a30d17a8..b6a974d3c 100644
--- a/hw/xfree86/parser/xf86Parser.h
+++ b/hw/xfree86/parser/xf86Parser.h
@@ -416,6 +416,13 @@ XF86ConfDRIRec, *XF86ConfDRIPtr;
typedef struct
{
+ XF86OptionPtr ext_option_lst;
+ char *extensions_comment;
+}
+XF86ConfExtensionsRec, *XF86ConfExtensionsPtr;
+
+typedef struct
+{
XF86ConfFilesPtr conf_files;
XF86ConfModulePtr conf_modules;
XF86ConfFlagsPtr conf_flags;
@@ -428,6 +435,7 @@ typedef struct
XF86ConfLayoutPtr conf_layout_lst;
XF86ConfVendorPtr conf_vendor_lst;
XF86ConfDRIPtr conf_dri;
+ XF86ConfExtensionsPtr conf_extensions;
char *conf_comment;
}
XF86ConfigRec, *XF86ConfigPtr;
diff --git a/hw/xfree86/rac/xf86RACmodule.c b/hw/xfree86/rac/xf86RACmodule.c
index fd436ef85..83c60e3fd 100644
--- a/hw/xfree86/rac/xf86RACmodule.c
+++ b/hw/xfree86/rac/xf86RACmodule.c
@@ -8,7 +8,7 @@ static XF86ModuleVersionInfo racVersRec =
MODULEVENDORSTRING,
MODINFOSTRING1,
MODINFOSTRING2,
- XF86_VERSION_CURRENT,
+ XORG_VERSION_CURRENT,
1, 0, 0,
ABI_CLASS_VIDEODRV, /* requires the video driver ABI */
ABI_VIDEODRV_VERSION,
diff --git a/hw/xfree86/ramdac/IBM.c b/hw/xfree86/ramdac/IBM.c
index 69207c2e2..4fede5720 100644
--- a/hw/xfree86/ramdac/IBM.c
+++ b/hw/xfree86/ramdac/IBM.c
@@ -374,6 +374,10 @@ IBMramdac526SetBpp(ScrnInfoPtr pScrn, RamDacRegRecPtr ramdacReg)
}
}
+IBMramdac526SetBppProc *IBMramdac526SetBppWeak(void) {
+ return IBMramdac526SetBpp;
+}
+
void
IBMramdac640SetBpp(ScrnInfoPtr pScrn, RamDacRegRecPtr ramdacReg)
{
diff --git a/hw/xfree86/ramdac/IBM.h b/hw/xfree86/ramdac/IBM.h
index 00d039031..eb211883c 100644
--- a/hw/xfree86/ramdac/IBM.h
+++ b/hw/xfree86/ramdac/IBM.h
@@ -18,6 +18,9 @@ unsigned long IBMramdac640CalculateMNPCForClock(unsigned long RefClock,
void IBMramdac526HWCursorInit(xf86CursorInfoPtr infoPtr);
void IBMramdac640HWCursorInit(xf86CursorInfoPtr infoPtr);
+typedef void IBMramdac526SetBppProc(ScrnInfoPtr, RamDacRegRecPtr);
+IBMramdac526SetBppProc *IBMramdac526SetBppWeak(void);
+
#define IBM524_RAMDAC ((VENDOR_IBM << 16) | 0x00)
#define IBM524A_RAMDAC ((VENDOR_IBM << 16) | 0x01)
#define IBM525_RAMDAC ((VENDOR_IBM << 16) | 0x02)
diff --git a/hw/xfree86/ramdac/TI.c b/hw/xfree86/ramdac/TI.c
index ce6dd9a04..024cb49eb 100644
--- a/hw/xfree86/ramdac/TI.c
+++ b/hw/xfree86/ramdac/TI.c
@@ -711,3 +711,7 @@ void TIramdacLoadPalette(
}
}
}
+
+TIramdacLoadPaletteProc *TIramdacLoadPaletteWeak(void) {
+ return TIramdacLoadPalette;
+}
diff --git a/hw/xfree86/ramdac/TI.h b/hw/xfree86/ramdac/TI.h
index f87ebd13f..f33247cfc 100644
--- a/hw/xfree86/ramdac/TI.h
+++ b/hw/xfree86/ramdac/TI.h
@@ -19,6 +19,9 @@ void TIramdacHWCursorInit(xf86CursorInfoPtr infoPtr);
void TIramdacLoadPalette( ScrnInfoPtr pScrn, int numColors, int *indices,
LOCO *colors, VisualPtr pVisual);
+typedef void TIramdacLoadPaletteProc(ScrnInfoPtr, int, int *, LOCO *,
+ VisualPtr);
+TIramdacLoadPaletteProc *TIramdacLoadPaletteWeak(void);
#define TI3030_RAMDAC (VENDOR_TI << 16) | 0x00
#define TI3026_RAMDAC (VENDOR_TI << 16) | 0x01
diff --git a/hw/xfree86/ramdac/xf86RamDacMod.c b/hw/xfree86/ramdac/xf86RamDacMod.c
index cb100d7bb..0fe5ce6aa 100644
--- a/hw/xfree86/ramdac/xf86RamDacMod.c
+++ b/hw/xfree86/ramdac/xf86RamDacMod.c
@@ -33,7 +33,7 @@ static XF86ModuleVersionInfo VersRec = {
MODULEVENDORSTRING,
MODINFOSTRING1,
MODINFOSTRING2,
- XF86_VERSION_CURRENT,
+ XORG_VERSION_CURRENT,
0, 1, 0,
ABI_CLASS_VIDEODRV,
ABI_VIDEODRV_VERSION,
diff --git a/hw/xfree86/scanpci/extrapci.ids b/hw/xfree86/scanpci/extrapci.ids
index a65732072..71664cbee 100644
--- a/hw/xfree86/scanpci/extrapci.ids
+++ b/hw/xfree86/scanpci/extrapci.ids
@@ -14,7 +14,7 @@
# changes/additions that aren't XFree86-specific to the pciids
# project (http://pciids.sf.net/).
#
-# $XdotOrg: xc/programs/Xserver/hw/xfree86/etc/extrapci.ids,v 1.1.4.2.4.2 2004/03/04 20:16:34 kaleb Exp $
+# $XdotOrg: xc/programs/Xserver/hw/xfree86/etc/extrapci.ids,v 1.2 2004/04/23 19:53:57 eich Exp $
# $XFree86: xc/programs/Xserver/hw/xfree86/etc/extrapci.ids,v 1.11 2003/12/18 16:22:27 dawes Exp $
#
diff --git a/hw/xfree86/scanpci/xf86ScanPci.c b/hw/xfree86/scanpci/xf86ScanPci.c
index cf12c42cc..8231ea05a 100644
--- a/hw/xfree86/scanpci/xf86ScanPci.c
+++ b/hw/xfree86/scanpci/xf86ScanPci.c
@@ -96,7 +96,7 @@ static XF86ModuleVersionInfo pciDataVersRec = {
MODULEVENDORSTRING,
MODINFOSTRING1,
MODINFOSTRING2,
- XF86_VERSION_CURRENT,
+ XORG_VERSION_CURRENT,
1, 0, 0,
ABI_CLASS_VIDEODRV,
ABI_VIDEODRV_VERSION,
@@ -113,7 +113,7 @@ static XF86ModuleVersionInfo scanPciVersRec = {
MODULEVENDORSTRING,
MODINFOSTRING1,
MODINFOSTRING2,
- XF86_VERSION_CURRENT,
+ XORG_VERSION_CURRENT,
1, 0, 0,
ABI_CLASS_VIDEODRV,
ABI_VIDEODRV_VERSION,
diff --git a/hw/xfree86/shadowfb/sfbmodule.c b/hw/xfree86/shadowfb/sfbmodule.c
index ad090d43c..6793c8f95 100644
--- a/hw/xfree86/shadowfb/sfbmodule.c
+++ b/hw/xfree86/shadowfb/sfbmodule.c
@@ -11,7 +11,7 @@ static XF86ModuleVersionInfo VersRec =
MODULEVENDORSTRING,
MODINFOSTRING1,
MODINFOSTRING2,
- XF86_VERSION_CURRENT,
+ XORG_VERSION_CURRENT,
1, 0, 0,
ABI_CLASS_ANSIC, /* Only need the ansic layer */
ABI_ANSIC_VERSION,
diff --git a/hw/xfree86/utils/gtf/gtf.c b/hw/xfree86/utils/gtf/gtf.c
index 3535300fc..fbc620709 100644
--- a/hw/xfree86/utils/gtf/gtf.c
+++ b/hw/xfree86/utils/gtf/gtf.c
@@ -1,4 +1,4 @@
-/* $XdotOrg: xc/programs/Xserver/hw/xfree86/etc/gtf.c,v 1.1.10.1.4.1 2004/03/19 17:09:00 eich Exp $ */
+/* $XdotOrg: xc/programs/Xserver/hw/xfree86/etc/gtf.c,v 1.2 2004/04/23 19:53:57 eich Exp $ */
/* gtf.c Generate mode timings using the GTF Timing Standard
*
* gcc gtf.c -o gtf -lm -Wall
diff --git a/hw/xfree86/utils/gtf/gtf.man.pre b/hw/xfree86/utils/gtf/gtf.man.pre
index 4dc228d2c..fd0c406d3 100644
--- a/hw/xfree86/utils/gtf/gtf.man.pre
+++ b/hw/xfree86/utils/gtf/gtf.man.pre
@@ -1,5 +1,4 @@
.\" $XFree86$
-.\" $XdotOrg: xc/programs/Xserver/hw/xfree86/etc/gtf.man,v 1.1.10.1.4.2 2004/03/27 16:56:43 keithp Exp $
.TH GTF 1 __vendorversion__
.SH NAME
gtf - calculate VESA GTF mode lines
diff --git a/hw/xfree86/utils/xorgcfg/loader.c b/hw/xfree86/utils/xorgcfg/loader.c
index 138b77778..ad928c4d8 100644
--- a/hw/xfree86/utils/xorgcfg/loader.c
+++ b/hw/xfree86/utils/xorgcfg/loader.c
@@ -26,7 +26,7 @@
*
* Author: Paulo César Pereira de Andrade <pcpa@conectiva.com.br>
*
- * $XdotOrg: xc/programs/Xserver/hw/xfree86/xf86cfg/loader.c,v 1.1.4.1.4.2.4.1 2004/03/23 13:54:01 eich Exp $
+ * $XdotOrg: xc/programs/Xserver/hw/xfree86/xf86cfg/loader.c,v 1.2 2004/04/23 19:54:18 eich Exp $
* $XFree86: xc/programs/Xserver/hw/xfree86/xf86cfg/loader.c,v 1.19 2002/06/06 21:03:32 paulo Exp $
*/
diff --git a/hw/xfree86/utils/xorgconfig/cards.c b/hw/xfree86/utils/xorgconfig/cards.c
index d5f405f4a..29c1c0e2b 100644
--- a/hw/xfree86/utils/xorgconfig/cards.c
+++ b/hw/xfree86/utils/xorgconfig/cards.c
@@ -1,3 +1,4 @@
+/* $XdotOrg: xc/programs/Xserver/hw/xfree86/xf86config/cards.c,v 1.3 2004/08/13 23:57:38 alanc Exp $ */
/* $XConsortium: cards.c /main/9 1996/10/19 18:15:32 kaleb $ */
@@ -16,6 +17,19 @@
#include "cards.h"
+/* Some vars to make path names in texts more flexible. */
+#ifndef PROJECTROOT
+# define PROJECTROOT "/usr/X11R6"
+#endif
+#define TREEROOT PROJECTROOT
+#define TREEROOTLX TREEROOT "/lib/X11"
+#define TREEROOTCFG TREEROOT "/etc/X11"
+#ifdef XDOCDIR
+# define TREEROOTDOC XDOCDIR
+#else
+# define TREEROOTDOC TREEROOTLX "/doc"
+#endif
+
/*
* Database format:
*
@@ -92,12 +106,12 @@ static char *s3_comment =
"# (this avoids the linear framebuffer probe). If that fails try\n"
"# option \"nomemaccess\".\n"
"#\n"
-"# Refer to /usr/X11R6/lib/doc/README.S3, and the XF86_S3 man page.\n";
+"# Refer to " TREEROOTDOC "/README.S3, and the XF86_S3 man page.\n";
static char *cirrus_comment =
"# Use Option \"no_bitblt\" if you have graphics problems. If that fails\n"
"# try Option \"noaccel\".\n"
-"# Refer to /usr/X11R6/lib/doc/README.cirrus.\n"
+"# Refer to " TREEROOTDOC "/README.cirrus.\n"
"# To allow linear addressing, uncomment the Option line and the\n"
"# address that the card maps the framebuffer to.\n";
diff --git a/hw/xfree86/utils/xorgconfig/xorgconfig.c b/hw/xfree86/utils/xorgconfig/xorgconfig.c
index 7f4c18d6a..a8fef000b 100644
--- a/hw/xfree86/utils/xorgconfig/xorgconfig.c
+++ b/hw/xfree86/utils/xorgconfig/xorgconfig.c
@@ -94,6 +94,7 @@
* Chisato Yamauchi(cyamauch@phyas.aichi-edu.ac.jp)
*/
/* $XConsortium: xf86config.c /main/21 1996/10/28 05:43:57 kaleb $ */
+/* $XdotOrg: xc/programs/Xserver/hw/xfree86/xf86config/xorgconfig.c,v 1.6 2004/08/13 23:57:38 alanc Exp $ */
#include <stdlib.h>
#include <stdio.h>
@@ -169,6 +170,11 @@ static int getuid() { return 0; }
#define TREEROOT PROJECTROOT
#define TREEROOTLX TREEROOT "/lib/X11"
#define TREEROOTCFG TREEROOT "/etc/X11"
+#ifdef XDOCDIR
+# define TREEROOTDOC XDOCDIR
+#else
+# define TREEROOTDOC TREEROOTLX "/doc"
+#endif
#define MODULEPATH TREEROOT "/lib/modules"
#ifndef XCONFIGFILE
@@ -256,7 +262,7 @@ CONFIGNAME " file is supplied with "__XSERVERNAME__"; it is configured for a sta
"configuration, or let this program produce a base " CONFIGNAME " file for your\n"
"configuration and fine-tune it.\n"
#if 0
-" Refer to " TREEROOTLX "/doc/README.Config\n"
+" Refer to " TREEROOTDOC "/README.Config\n"
"for a detailed overview of the configuration process.\n"
"\n"
"(what should we change this section to?)\n"
@@ -372,7 +378,7 @@ int M_OSMOUSE, M_WSMOUSE, M_AUTO,
M_NETMOUSE_PS2, M_NETSCROLL_PS2, M_THINKINGMOUSE_PS2,
M_ACECAD, M_GLIDEPOINT, M_INTELLIMOUSE,
M_LOGITECH, M_MMHITTAB, M_MMSERIES,
- M_MOUSEMAN, M_THINKINGMOUSE;
+ M_MOUSEMAN, M_THINKINGMOUSE, M_VUID;
struct {
char *name;
@@ -398,6 +404,11 @@ struct {
{"Auto", &M_AUTO,
"Auto detect"
},
+#ifdef sun
+ {"VUID", &M_VUID,
+ "Solaris VUID"
+ },
+#endif
{"SysMouse", &M_SYSMOUSE,
"SysMouse"
},
@@ -464,6 +475,14 @@ struct {
},
};
+#ifdef WSCONS_SUPPORT
+# define DEF_MOUSEDEV "/dev/wsmouse";
+#elif defined(__FreeBSD__)
+# define DEF_MOUSEDEV "/dev/sysmouse";
+#else
+# define DEF_MOUSEDEV "/dev/mouse";
+#endif
+
#ifndef __UNIXOS2__
static char *mouseintro_text =
"First specify a mouse protocol type. Choose one from the following list:\n"
@@ -471,13 +490,7 @@ static char *mouseintro_text =
static char *mousedev_text =
"Now give the full device name that the mouse is connected to, for example\n"
-"/dev/tty00. Just pressing enter will use the default, /dev/mouse.\n"
-#ifdef WSCONS_SUPPORT
-"On systems with wscons, the default is /dev/wsmouse.\n"
-#endif
-#ifdef __FreeBSD__
-"On FreeBSD, the default is /dev/sysmouse.\n"
-#endif
+"/dev/tty00. Just pressing enter will use the default, %s.\n"
"\n";
static char *mousecomment_text =
@@ -529,6 +542,7 @@ mouse_configuration(void) {
#if !defined(__UNIXOS2__) && !defined(QNX4)
int i, j;
char s[80];
+ char *def_mousedev = DEF_MOUSEDEV;
#define MOUSETYPE_COUNT sizeof(mouse_info)/sizeof(mouse_info[0])
for (i = 0; i < MOUSETYPE_COUNT; i++)
@@ -621,22 +635,24 @@ mouse_configuration(void) {
config_emulate3buttons = 0;
printf("\n");
- printf("%s", mousedev_text);
+#if (defined(sun) && defined(__i386))
+ /* SPARC & USB mice (VUID or AUTO protocols) default to /dev/mouse,
+ but PS/2 mice default to /dev/kdmouse */
+ if ((config_mousetype != M_AUTO) && (config_mousetype != M_VUID)) {
+ def_mousedev = "/dev/kdmouse";
+ }
+#endif
+
+ printf(mousedev_text, def_mousedev);
printf("Mouse device: ");
getstring(s);
- if (strlen(s) == 0)
-#ifdef WSCONS_SUPPORT
- config_pointerdevice = "/dev/wsmouse";
-#elif defined(__FreeBSD__)
- config_pointerdevice = "/dev/sysmouse";
-#else
- config_pointerdevice = "/dev/mouse";
-#endif
- else {
+ if (strlen(s) == 0) {
+ config_pointerdevice = def_mousedev;
+ } else {
config_pointerdevice = Malloc(strlen(s) + 1);
strcpy(config_pointerdevice, s);
- }
- printf("\n");
+ }
+ printf("\n");
#else /* __UNIXOS2__ */
/* set some reasonable defaults for OS/2 */
@@ -706,7 +722,7 @@ keyboard_configuration(void)
rulesfile = XKB_RULES_DIR "/xfree98";
#else
config_xkbrules = __XKBDEFRULES__; /* static */
- rulesfile = XKB_RULES_DIR "/";
+ rulesfile = XKB_RULES_DIR "/" __XKBDEFRULES__;
#endif
rules = XkbRF_Load(rulesfile, "", True, False);
@@ -839,7 +855,7 @@ static char *monitorintro_text =
"\n"
"The valid range for horizontal sync and vertical sync should be documented\n"
"in the manual of your monitor. If in doubt, check the monitor database\n"
-TREEROOTLX "/doc/Monitors to see if your monitor is there.\n"
+TREEROOTDOC "/Monitors to see if your monitor is there.\n"
"\n";
static char *hsyncintro_text =
@@ -1852,10 +1868,10 @@ depth_configuration(void)
*/
static char *XF86Config_firstchunk_text =
-"# File generated by xf86config.\n"
+"# File generated by xorgconfig.\n"
"\n"
"#\n"
-"# Copyright (c) 2004, by the "XVENDORNAMESHORT"\n"
+"# Copyright 2004 "XVENDORNAME"\n"
"#\n"
"# Permission is hereby granted, free of charge, to any person obtaining a\n"
"# copy of this software and associated documentation files (the \"Software\"),\n"
@@ -1870,19 +1886,19 @@ static char *XF86Config_firstchunk_text =
"# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n"
"# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n"
"# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\n"
-"# THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n"
+"# "XVENDORNAME" BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n"
"# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF\n"
"# OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n"
"# SOFTWARE.\n"
"# \n"
-"# Except as contained in this notice, the name of "XVENDORNAMESHORT" shall\n"
+"# Except as contained in this notice, the name of "XVENDORNAME" shall\n"
"# not be used in advertising or otherwise to promote the sale, use or other\n"
-"# dealings in this Software without prior written authorization from the\n"
-"# "XVENDORNAMESHORT".\n"
+"# dealings in this Software without prior written authorization from\n"
+"# "XVENDORNAME".\n"
"#\n"
"\n"
"# **********************************************************************\n"
-"# Refer to the XF86Config(4/5) man page for details about the format of \n"
+"# Refer to the " CONFIGNAME "(" FILEMANSUFFIX ") man page for details about the format of \n"
"# this file.\n"
"# **********************************************************************\n"
"\n"
@@ -1903,9 +1919,17 @@ static char *XF86Config_firstchunk_text =
" Option \"omit xfree86-dga\" # don't initialise the DGA extension\n"
" EndSubSection\n"
"\n"
-"# This loads the Type1 and FreeType font modules\n"
+"# This loads the font modules\n"
+#ifdef HAS_TYPE1
" Load \"type1\"\n"
+#else
+"# Load \"type1\"\n"
+#endif
+#ifdef HAS_SPEEDO
" Load \"speedo\"\n"
+#else
+"# Load \"speedo\"\n"
+#endif
" Load \"freetype\"\n"
"# Load \"xtt\"\n"
"\n"
@@ -1932,9 +1956,11 @@ static char *XF86Config_firstchunk_text =
"# as well as specifying multiple comma-separated entries in one FontPath\n"
"# command (or a combination of both methods)\n"
"# \n"
+#if 0
"# If you don't have a floating point coprocessor and emacs, Mosaic or other\n"
"# programs take long to start up, try moving the Type1 and Speedo directory\n"
"# to the end of this list (or comment them out).\n"
+#endif
"# \n"
"\n";
@@ -2025,7 +2051,11 @@ static char *XF86Config_fontpathchunk_text =
"Section \"InputDevice\"\n"
"\n"
" Identifier \"Keyboard1\"\n"
+#ifdef USE_DEPRECATED_KEYBOARD_DRIVER
" Driver \"Keyboard\"\n"
+#else
+" Driver \"kbd\"\n"
+#endif
"\n"
"# For most OSs the protocol can be omitted (it defaults to \"Standard\").\n"
"# When using XQUEUE (only for SVR3 and SVR4, but not Solaris),\n"
@@ -2061,8 +2091,8 @@ static char *keyboardchunk3_text =
"# control keys, use:\n"
"# Option \"XkbOptions\" \"ctrl:swapcaps\"\n"
"\n"
-"# These are the default XKB settings for "XVENDORNAMESHORT"\n"
-"# Option \"XkbRules\" \"__XKBDEFRULES__\"\n"
+"# These are the default XKB settings for "__XSERVERNAME__"\n"
+"# Option \"XkbRules\" \""__XKBDEFRULES__"\"\n"
"# Option \"XkbModel\" \"pc101\"\n"
"# Option \"XkbLayout\" \"us\"\n"
"# Option \"XkbVariant\" \"\"\n"
@@ -2114,7 +2144,7 @@ static char *xinputsection_text =
"# Other input device sections \n"
"# this is optional and is required only if you\n"
"# are using extended input devices. This is for example only. Refer\n"
-"# to the XF86Config man page for a description of the options.\n"
+"# to the " CONFIGNAME " man page for a description of the options.\n"
"# **********************************************************************\n"
"#\n"
"# Section \"InputDevice\" \n"
@@ -2384,7 +2414,7 @@ static char *devicesection_text =
"\n"
"EndSection\n"
"\n"
-"# Device configured by xf86config:\n"
+"# Device configured by xorgconfig:\n"
"\n";
static char *screensection_text1 =
@@ -2448,12 +2478,43 @@ write_fontpath_section(FILE *f)
int i;
char cur[256+20],*colon, *hash;
+#ifdef COMPILEDDEFAULTFONTPATH
+ static const char dfp[] = COMPILEDDEFAULTFONTPATH;
+ const char *thisdir;
+ const char *nextdir;
+ int len;
+
+ for (thisdir = dfp; thisdir != NULL; thisdir = nextdir) {
+ nextdir = strchr(thisdir, ',');
+ if (nextdir == NULL) {
+ len = strlen(thisdir);
+ } else {
+ len = nextdir - thisdir;
+ nextdir++;
+ }
+ if (len > sizeof(cur))
+ continue;
+ strncpy(cur, thisdir, len);
+ cur[len] = '\0';
+ colon = strchr(cur+2,':'); /* OS/2: C:/...:scaled */
+ if (colon) *colon = 0;
+ hash = exists_dir(cur) ? "" : "#";
+ if (colon) *colon = ':';
+ fprintf(f,"%s FontPath \"%s\"\n", hash, cur);
+ }
+#endif
+
for (i=0; XF86Config_fontpaths[i]; i++) {
strcpy(cur,TREEROOTLX);
strcat(cur,XF86Config_fontpaths[i]);
/* remove a ':' */
colon = strchr(cur+2,':'); /* OS/2: C:/...:scaled */
if (colon) *colon = 0;
+#ifdef COMPILEDDEFAULTFONTPATH
+ /* skip if we already added it as part of the default font path */
+ if (strstr(dfp, cur) != NULL)
+ continue;
+#endif
hash = exists_dir(cur) ? "" : "#";
fprintf(f,"%s FontPath \"%s%s\"\n",
hash,
@@ -2701,7 +2762,7 @@ ask_XF86Config_location(void) {
char *filename = NULL;
printf(
-"I am going to write the XF86Config file now. Make sure you don't accidently\n"
+"I am going to write the " CONFIGNAME " file now. Make sure you don't accidently\n"
"overwrite a previously configured one.\n\n");
#ifndef __EMX__
@@ -2778,22 +2839,23 @@ ask_XF86Config_location(void) {
static char *notinstalled_text =
"The directory " TREEROOT " does not exist. This probably means that you have\n"
-"not yet installed an X11R6-based version of "__XSERVERNAME__". Please install\n"
-"XFree86 3.1+ before running this program, following the instructions in\n"
-"the INSTALL or README that comes with the "__XSERVERNAME__" distribution for your OS.\n"
+"not yet installed the version of "__XSERVERNAME__" that this program was built\n"
+"to configure. Please install "__XSERVERNAME__" "XVERSIONSTRING" before running this program,\n"
+"following the instructions in the INSTALL or README that comes with the\n"
+__XSERVERNAME__" distribution for your OS.\n"
"For a minimal installation it is sufficient to only install base binaries,\n"
"libraries, configuration files and a server that you want to use.\n"
"\n";
#ifndef __UNIXOS2__
static char *oldxfree86_text =
-"The directory '/usr/X386/bin' exists. You probably have an old version of\n"
-"__XSERVERNAME__ installed (XFree86 3.1 installs in '" TREEROOT "' instead of\n"
-"'/usr/X386').\n"
+"The directory '/usr/X386/bin' exists. You probably have a very old version of\n"
+"XFree86 installed, but this program was built to configure "__XSERVERNAME__" "XVERSIONSTRING"\n"
+"installed in '" TREEROOT "' instead of '/usr/X386'.\n"
"\n"
"It is important that the directory '" TREEROOT "' is present in your\n"
"search path, *before* any occurrence of '/usr/X386/bin'. If you have installed\n"
-"X program binaries that are not in the base __XSERVERNAME__ distribution in\n"
+"X program binaries that are not in the base "__XSERVERNAME__" distribution in\n"
"'/usr/X386/bin', you can keep the directory in your path as long as it is\n"
"after '" TREEROOT "'.\n"
"\n";
diff --git a/hw/xfree86/vbe/vbe.c b/hw/xfree86/vbe/vbe.c
index 9cc8be74d..0513b8758 100644
--- a/hw/xfree86/vbe/vbe.c
+++ b/hw/xfree86/vbe/vbe.c
@@ -57,14 +57,17 @@ VBEExtendedInit(xf86Int10InfoPtr pInt, int entityIndex, int Flags)
vbeControllerInfoPtr vbe = NULL;
Bool init_int10 = FALSE;
vbeInfoPtr vip = NULL;
- int screen = pScrn->scrnIndex;
+ int screen;
+ if (!pScrn) return NULL;
+ screen = pScrn->scrnIndex;
+
if (!pInt) {
if (!xf86LoadSubModule(pScrn, "int10"))
goto error;
xf86DrvMsg(screen,X_INFO,"initializing int10\n");
- pInt = xf86InitInt10(entityIndex);
+ pInt = xf86ExtendedInitInt10(entityIndex,Flags);
if (!pInt)
goto error;
init_int10 = TRUE;
@@ -336,6 +339,8 @@ vbeDoEDID(vbeInfoPtr pVbe, pointer pDDCModule)
return pMonitor;
}
+#define GET_UNALIGNED2(x) \
+ ((*(CARD16*)(x)) | (*(((CARD16*)(x) + 1))) << 16)
VbeInfoBlock *
VBEGetVBEInfo(vbeInfoPtr pVbe)
@@ -381,7 +386,7 @@ VBEGetVBEInfo(vbeInfoPtr pVbe)
block->VESAVersion = *(CARD16*)(((char*)pVbe->memory) + 4);
major = (unsigned)block->VESAVersion >> 8;
- pStr = *(CARD32*)(((char*)pVbe->memory) + 6);
+ pStr = GET_UNALIGNED2((((char*)pVbe->memory) + 6));
str = xf86int10Addr(pVbe->pInt10, FARP(pStr));
block->OEMStringPtr = strdup(str);
@@ -390,7 +395,7 @@ VBEGetVBEInfo(vbeInfoPtr pVbe)
block->Capabilities[2] = ((char*)pVbe->memory)[12];
block->Capabilities[3] = ((char*)pVbe->memory)[13];
- pModes = *(CARD32*)(((char*)pVbe->memory) + 14);
+ pModes = GET_UNALIGNED2((((char*)pVbe->memory) + 14));
modes = xf86int10Addr(pVbe->pInt10, FARP(pModes));
i = 0;
while (modes[i] != 0xffff)
@@ -405,13 +410,13 @@ VBEGetVBEInfo(vbeInfoPtr pVbe)
memcpy(&block->OemSoftwareRev, ((char*)pVbe->memory) + 20, 236);
else {
block->OemSoftwareRev = *(CARD16*)(((char*)pVbe->memory) + 20);
- pStr = *(CARD32*)(((char*)pVbe->memory) + 22);
+ pStr = GET_UNALIGNED2((((char*)pVbe->memory) + 22));
str = xf86int10Addr(pVbe->pInt10, FARP(pStr));
block->OemVendorNamePtr = strdup(str);
- pStr = *(CARD32*)(((char*)pVbe->memory) + 26);
+ pStr = GET_UNALIGNED2((((char*)pVbe->memory) + 26));
str = xf86int10Addr(pVbe->pInt10, FARP(pStr));
block->OemProductNamePtr = strdup(str);
- pStr = *(CARD32*)(((char*)pVbe->memory) + 30);
+ pStr = GET_UNALIGNED2((((char*)pVbe->memory) + 30));
str = xf86int10Addr(pVbe->pInt10, FARP(pStr));
block->OemProductRevPtr = strdup(str);
memcpy(&block->Reserved, ((char*)pVbe->memory) + 34, 222);
diff --git a/hw/xfree86/vbe/vbe_module.c b/hw/xfree86/vbe/vbe_module.c
index 0347f7fb7..d6f49a5c8 100644
--- a/hw/xfree86/vbe/vbe_module.c
+++ b/hw/xfree86/vbe/vbe_module.c
@@ -16,7 +16,7 @@ static XF86ModuleVersionInfo vbeVersRec =
MODULEVENDORSTRING,
MODINFOSTRING1,
MODINFOSTRING2,
- XF86_VERSION_CURRENT,
+ XORG_VERSION_CURRENT,
1, 1, 0,
ABI_CLASS_VIDEODRV, /* needs the video driver ABI */
ABI_VIDEODRV_VERSION,
diff --git a/hw/xfree86/vgahw/vgaHW.c b/hw/xfree86/vgahw/vgaHW.c
index b8bcbdba9..2e12f00ac 100644
--- a/hw/xfree86/vgahw/vgaHW.c
+++ b/hw/xfree86/vgahw/vgaHW.c
@@ -596,6 +596,9 @@ vgaHWProtect(ScrnInfoPtr pScrn, Bool on)
}
}
+vgaHWProtectProc *vgaHWProtectWeak(void) {
+ return vgaHWProtect;
+}
/*
* vgaHWBlankScreen -- blank the screen.
@@ -620,6 +623,9 @@ vgaHWBlankScreen(ScrnInfoPtr pScrn, Bool on)
vgaHWSeqReset(hwp, FALSE);
}
+vgaHWBlankScreenProc *vgaHWBlankScreenWeak(void) {
+ return vgaHWBlankScreen;
+}
/*
* vgaHWSaveScreen -- blank the screen.
@@ -1988,3 +1994,7 @@ vgaHWddc1SetSpeed(ScrnInfoPtr pScrn, xf86ddcSpeed speed)
break;
}
}
+
+DDC1SetSpeedProc vgaHWddc1SetSpeedWeak(void) { return vgaHWddc1SetSpeed; }
+
+SaveScreenProcPtr vgaHWSaveScreenWeak(void) { return vgaHWSaveScreen; }
diff --git a/hw/xfree86/vgahw/vgaHW.h b/hw/xfree86/vgahw/vgaHW.h
index 9a51f1046..2874c2cfb 100644
--- a/hw/xfree86/vgahw/vgaHW.h
+++ b/hw/xfree86/vgahw/vgaHW.h
@@ -190,11 +190,16 @@ typedef struct _vgaHWRec {
/* vgaHW.c */
+typedef void vgaHWProtectProc(ScrnInfoPtr, Bool);
+typedef void vgaHWBlankScreenProc(ScrnInfoPtr, Bool);
+
void vgaHWSetStdFuncs(vgaHWPtr hwp);
void vgaHWSetMmioFuncs(vgaHWPtr hwp, CARD8 *base, int offset);
void vgaHWProtect(ScrnInfoPtr pScrn, Bool on);
+vgaHWProtectProc *vgaHWProtectWeak(void);
Bool vgaHWSaveScreen(ScreenPtr pScreen, int mode);
void vgaHWBlankScreen(ScrnInfoPtr pScrn, Bool on);
+vgaHWBlankScreenProc *vgaHWBlankScreenWeak(void);
void vgaHWSeqReset(vgaHWPtr hwp, Bool start);
void vgaHWRestoreFonts(ScrnInfoPtr scrninfp, vgaRegPtr restore);
void vgaHWRestoreMode(ScrnInfoPtr scrninfp, vgaRegPtr restore);
@@ -225,4 +230,8 @@ CARD32 vgaHWHBlankKGA(DisplayModePtr mode, vgaRegPtr regp, int nBits,
CARD32 vgaHWVBlankKGA(DisplayModePtr mode, vgaRegPtr regp, int nBits,
unsigned int Flags);
Bool vgaHWAllocDefaultRegs(vgaRegPtr regp);
+
+DDC1SetSpeedProc vgaHWddc1SetSpeedWeak(void);
+SaveScreenProcPtr vgaHWSaveScreenWeak(void);
+
#endif /* _VGAHW_H */
diff --git a/hw/xfree86/vgahw/vgaHWmodule.c b/hw/xfree86/vgahw/vgaHWmodule.c
index 409e7b511..d6044bbb7 100644
--- a/hw/xfree86/vgahw/vgaHWmodule.c
+++ b/hw/xfree86/vgahw/vgaHWmodule.c
@@ -14,7 +14,7 @@ static XF86ModuleVersionInfo VersRec = {
MODULEVENDORSTRING,
MODINFOSTRING1,
MODINFOSTRING2,
- XF86_VERSION_CURRENT,
+ XORG_VERSION_CURRENT,
0, 1, 0,
ABI_CLASS_VIDEODRV,
ABI_VIDEODRV_VERSION,
diff --git a/hw/xfree86/x86emu/debug.c b/hw/xfree86/x86emu/debug.c
index 481374d53..6fd7f11cf 100644
--- a/hw/xfree86/x86emu/debug.c
+++ b/hw/xfree86/x86emu/debug.c
@@ -36,12 +36,9 @@
* emulator.
*
****************************************************************************/
-/* $XFree86: xc/extras/x86emu/src/x86emu/debug.c,v 1.2 2000/04/05 18:13:14 dawes Exp $ */
#include "x86emu/x86emui.h"
-#ifdef IN_MODULE
-#include "xf86_ansic.h"
-#else
+#ifndef NO_SYS_HEADERS
#include <stdarg.h>
#include <stdlib.h>
#endif
@@ -307,7 +304,8 @@ void x86emu_single_step (void)
}
break;
case 'q':
- exit(1);
+ M.x86.debug |= DEBUG_EXIT;
+ return;
case 'P':
noDecode = (noDecode)?0:1;
printk("Toggled decoding to %s\n",(noDecode)?"FALSE":"TRUE");
diff --git a/hw/xfree86/x86emu/decode.c b/hw/xfree86/x86emu/decode.c
index 1294640df..25415d9fa 100644
--- a/hw/xfree86/x86emu/decode.c
+++ b/hw/xfree86/x86emu/decode.c
@@ -37,8 +37,6 @@
*
****************************************************************************/
-/* $XdotOrg: xc/extras/x86emu/src/x86emu/decode.c,v 1.1.4.1.4.2 2004/03/05 12:46:30 eich Exp $ */
-/* $XFree86: xc/extras/x86emu/src/x86emu/decode.c,v 1.11 2002/07/23 20:20:43 tsi Exp $ */
#include "x86emu/x86emui.h"
@@ -105,8 +103,14 @@ DB( if (CHECK_IP_FETCH())
INC_DECODED_INST_LEN(1);
if (M.x86.intr) {
if (M.x86.intr & INTR_HALTED) {
-DB( printk("halted\n");
- X86EMU_trace_regs();)
+DB( if (M.x86.R_SP != 0) {
+ printk("halted\n");
+ X86EMU_trace_regs();
+ }
+ else {
+ if (M.x86.debug)
+ printk("Service completed successfully\n");
+ })
return;
}
if (((M.x86.intr & INTR_SYNCH) && (M.x86.intno == 0 || M.x86.intno == 2)) ||
@@ -116,6 +120,10 @@ DB( printk("halted\n");
}
op1 = (*sys_rdb)(((u32)M.x86.R_CS << 4) + (M.x86.R_IP++));
(*x86emu_optab[op1])(op1);
+ if (M.x86.debug & DEBUG_EXIT) {
+ M.x86.debug &= ~DEBUG_EXIT;
+ return;
+ }
}
}
@@ -834,6 +842,7 @@ u32 decode_rm00_address(
int sib;
if (M.x86.mode & SYSMODE_PREFIX_ADDR) {
+ /* 32-bit addressing */
switch (rm) {
case 0:
DECODE_PRINTF("[EAX]");
@@ -863,21 +872,22 @@ u32 decode_rm00_address(
}
HALT_SYS();
} else {
+ /* 16-bit addressing */
switch (rm) {
case 0:
DECODE_PRINTF("[BX+SI]");
- return M.x86.R_BX + M.x86.R_SI;
+ return (M.x86.R_BX + M.x86.R_SI) & 0xffff;
case 1:
DECODE_PRINTF("[BX+DI]");
- return M.x86.R_BX + M.x86.R_DI;
+ return (M.x86.R_BX + M.x86.R_DI) & 0xffff;
case 2:
DECODE_PRINTF("[BP+SI]");
M.x86.mode |= SYSMODE_SEG_DS_SS;
- return M.x86.R_BP + M.x86.R_SI;
+ return (M.x86.R_BP + M.x86.R_SI) & 0xffff;
case 3:
DECODE_PRINTF("[BP+DI]");
M.x86.mode |= SYSMODE_SEG_DS_SS;
- return M.x86.R_BP + M.x86.R_DI;
+ return (M.x86.R_BP + M.x86.R_DI) & 0xffff;
case 4:
DECODE_PRINTF("[SI]");
return M.x86.R_SI;
@@ -919,6 +929,7 @@ u32 decode_rm01_address(
displacement = (s8)fetch_byte_imm();
if (M.x86.mode & SYSMODE_PREFIX_ADDR) {
+ /* 32-bit addressing */
switch (rm) {
case 0:
DECODE_PRINTF2("%d[EAX]", displacement);
@@ -949,34 +960,35 @@ u32 decode_rm01_address(
}
HALT_SYS();
} else {
+ /* 16-bit addressing */
switch (rm) {
case 0:
DECODE_PRINTF2("%d[BX+SI]", displacement);
- return M.x86.R_BX + M.x86.R_SI + displacement;
+ return (M.x86.R_BX + M.x86.R_SI + displacement) & 0xffff;
case 1:
DECODE_PRINTF2("%d[BX+DI]", displacement);
- return M.x86.R_BX + M.x86.R_DI + displacement;
+ return (M.x86.R_BX + M.x86.R_DI + displacement) & 0xffff;
case 2:
DECODE_PRINTF2("%d[BP+SI]", displacement);
M.x86.mode |= SYSMODE_SEG_DS_SS;
- return M.x86.R_BP + M.x86.R_SI + displacement;
+ return (M.x86.R_BP + M.x86.R_SI + displacement) & 0xffff;
case 3:
DECODE_PRINTF2("%d[BP+DI]", displacement);
M.x86.mode |= SYSMODE_SEG_DS_SS;
- return M.x86.R_BP + M.x86.R_DI + displacement;
+ return (M.x86.R_BP + M.x86.R_DI + displacement) & 0xffff;
case 4:
DECODE_PRINTF2("%d[SI]", displacement);
- return M.x86.R_SI + displacement;
+ return (M.x86.R_SI + displacement) & 0xffff;
case 5:
DECODE_PRINTF2("%d[DI]", displacement);
- return M.x86.R_DI + displacement;
+ return (M.x86.R_DI + displacement) & 0xffff;
case 6:
DECODE_PRINTF2("%d[BP]", displacement);
M.x86.mode |= SYSMODE_SEG_DS_SS;
- return M.x86.R_BP + displacement;
+ return (M.x86.R_BP + displacement) & 0xffff;
case 7:
DECODE_PRINTF2("%d[BX]", displacement);
- return M.x86.R_BX + displacement;
+ return (M.x86.R_BX + displacement) & 0xffff;
}
HALT_SYS();
}
@@ -1010,6 +1022,7 @@ u32 decode_rm10_address(
}
if (M.x86.mode & SYSMODE_PREFIX_ADDR) {
+ /* 32-bit addressing */
switch (rm) {
case 0:
DECODE_PRINTF2("%08x[EAX]", displacement);
@@ -1042,34 +1055,35 @@ u32 decode_rm10_address(
}
HALT_SYS();
} else {
+ /* 16-bit addressing */
switch (rm) {
case 0:
- DECODE_PRINTF2("%04x[BX+SI]", displacement);
- return M.x86.R_BX + M.x86.R_SI + displacement;
+ DECODE_PRINTF2("%04x[BX+SI]", displacement);
+ return (M.x86.R_BX + M.x86.R_SI + displacement) & 0xffff;
case 1:
- DECODE_PRINTF2("%04x[BX+DI]", displacement);
- return M.x86.R_BX + M.x86.R_DI + displacement;
+ DECODE_PRINTF2("%04x[BX+DI]", displacement);
+ return (M.x86.R_BX + M.x86.R_DI + displacement) & 0xffff;
case 2:
DECODE_PRINTF2("%04x[BP+SI]", displacement);
M.x86.mode |= SYSMODE_SEG_DS_SS;
- return M.x86.R_BP + M.x86.R_SI + displacement;
+ return (M.x86.R_BP + M.x86.R_SI + displacement) & 0xffff;
case 3:
DECODE_PRINTF2("%04x[BP+DI]", displacement);
M.x86.mode |= SYSMODE_SEG_DS_SS;
- return M.x86.R_BP + M.x86.R_DI + displacement;
+ return (M.x86.R_BP + M.x86.R_DI + displacement) & 0xffff;
case 4:
- DECODE_PRINTF2("%04x[SI]", displacement);
- return M.x86.R_SI + displacement;
+ DECODE_PRINTF2("%04x[SI]", displacement);
+ return (M.x86.R_SI + displacement) & 0xffff;
case 5:
- DECODE_PRINTF2("%04x[DI]", displacement);
- return M.x86.R_DI + displacement;
+ DECODE_PRINTF2("%04x[DI]", displacement);
+ return (M.x86.R_DI + displacement) & 0xffff;
case 6:
DECODE_PRINTF2("%04x[BP]", displacement);
M.x86.mode |= SYSMODE_SEG_DS_SS;
- return M.x86.R_BP + displacement;
+ return (M.x86.R_BP + displacement) & 0xffff;
case 7:
- DECODE_PRINTF2("%04x[BX]", displacement);
- return M.x86.R_BX + displacement;
+ DECODE_PRINTF2("%04x[BX]", displacement);
+ return (M.x86.R_BX + displacement) & 0xffff;
}
HALT_SYS();
}
diff --git a/hw/xfree86/x86emu/fpu.c b/hw/xfree86/x86emu/fpu.c
index 4b801dc94..b72de1ee5 100644
--- a/hw/xfree86/x86emu/fpu.c
+++ b/hw/xfree86/x86emu/fpu.c
@@ -36,7 +36,6 @@
* emulation of the FPU instructions.
*
****************************************************************************/
-/* $XFree86$ */
#include "x86emu/x86emui.h"
diff --git a/hw/xfree86/x86emu/ops.c b/hw/xfree86/x86emu/ops.c
index 88ee7e108..37ae2c9c9 100644
--- a/hw/xfree86/x86emu/ops.c
+++ b/hw/xfree86/x86emu/ops.c
@@ -70,8 +70,6 @@
*
****************************************************************************/
-/* $XFree86: xc/extras/x86emu/src/x86emu/ops.c,v 1.8tsi Exp $ */
-
#include "x86emu/x86emui.h"
/*----------------------------- Implementation ----------------------------*/
@@ -87,11 +85,22 @@ static void x86emuOp_illegal_op(
u8 op1)
{
START_OF_INSTR();
+ if (M.x86.R_SP != 0) {
DECODE_PRINTF("ILLEGAL X86 OPCODE\n");
TRACE_REGS();
- printk("%04x:%04x: %02X ILLEGAL X86 OPCODE!\n",
- M.x86.R_CS, M.x86.R_IP-1,op1);
+ DB( printk("%04x:%04x: %02X ILLEGAL X86 OPCODE!\n",
+ M.x86.R_CS, M.x86.R_IP-1,op1));
HALT_SYS();
+ }
+ else {
+ /* If we get here, it means the stack pointer is back to zero
+ * so we are just returning from an emulator service call
+ * so therte is no need to display an error message. We trap
+ * the emulator with an 0xF1 opcode to finish the service
+ * call.
+ */
+ X86EMU_halt_sys();
+ }
END_OF_INSTR();
}
@@ -9404,6 +9413,8 @@ static void x86emuOp_aam(u8 X86EMU_UNUSED(op1))
DECODE_PRINTF("AAM\n");
a = fetch_byte_imm(); /* this is a stupid encoding. */
if (a != 10) {
+ /* fix: add base decoding
+ aam_word(u8 val, int base a) */
DECODE_PRINTF("ERROR DECODING AAM\n");
TRACE_REGS();
HALT_SYS();
@@ -9421,9 +9432,18 @@ Handles opcode 0xd5
****************************************************************************/
static void x86emuOp_aad(u8 X86EMU_UNUSED(op1))
{
+ u8 a;
+
START_OF_INSTR();
DECODE_PRINTF("AAD\n");
- (void) fetch_byte_imm();
+ a = fetch_byte_imm();
+ if (a != 10) {
+ /* fix: add base decoding
+ aad_word(u16 val, int base a) */
+ DECODE_PRINTF("ERROR DECODING AAM\n");
+ TRACE_REGS();
+ HALT_SYS();
+ }
TRACE_AND_STEP();
M.x86.R_AX = aad_word(M.x86.R_AX);
DECODE_CLEAR_SEGOVR();
diff --git a/hw/xfree86/x86emu/ops2.c b/hw/xfree86/x86emu/ops2.c
index 7cb585bc8..d9e5de9c5 100644
--- a/hw/xfree86/x86emu/ops2.c
+++ b/hw/xfree86/x86emu/ops2.c
@@ -37,7 +37,6 @@
* instructions.
*
****************************************************************************/
-/* $XFree86: xc/extras/x86emu/src/x86emu/ops2.c,v 1.6tsi Exp $ */
#include "x86emu/x86emui.h"
diff --git a/hw/xfree86/x86emu/prim_ops.c b/hw/xfree86/x86emu/prim_ops.c
index ba4ffdeda..56ab8cc9a 100644
--- a/hw/xfree86/x86emu/prim_ops.c
+++ b/hw/xfree86/x86emu/prim_ops.c
@@ -102,8 +102,6 @@
/*------------------------- Global Variables ------------------------------*/
-#ifndef __HAVE_INLINE_ASSEMBLER__
-
static u32 x86emu_parity_tab[8] =
{
0x96696996,
@@ -116,15 +114,11 @@ static u32 x86emu_parity_tab[8] =
0x69969669,
};
-#endif
-
#define PARITY(x) (((x86emu_parity_tab[(x) / 32] >> ((x) % 32)) & 1) == 0)
#define XOR2(x) (((x) ^ ((x)>>1)) & 0x1)
/*----------------------------- Implementation ----------------------------*/
-#ifndef __HAVE_INLINE_ASSEMBLER__
-
/****************************************************************************
REMARKS:
Implements the AAA instruction and side effects.
@@ -2454,8 +2448,6 @@ void div_long(u32 s)
M.x86.R_EDX = (u32)mod;
}
-#endif /* __HAVE_INLINE_ASSEMBLER__ */
-
/****************************************************************************
REMARKS:
Implements the IN string instruction and side effects.
@@ -2660,255 +2652,3 @@ DB( if (CHECK_SP_ACCESS())
return res;
}
-#ifdef __HAVE_INLINE_ASSEMBLER__
-
-u16 aaa_word (u16 d)
-{ return aaa_word_asm(&M.x86.R_EFLG,d); }
-
-u16 aas_word (u16 d)
-{ return aas_word_asm(&M.x86.R_EFLG,d); }
-
-u16 aad_word (u16 d)
-{ return aad_word_asm(&M.x86.R_EFLG,d); }
-
-u16 aam_word (u8 d)
-{ return aam_word_asm(&M.x86.R_EFLG,d); }
-
-u8 adc_byte (u8 d, u8 s)
-{ return adc_byte_asm(&M.x86.R_EFLG,d,s); }
-
-u16 adc_word (u16 d, u16 s)
-{ return adc_word_asm(&M.x86.R_EFLG,d,s); }
-
-u32 adc_long (u32 d, u32 s)
-{ return adc_long_asm(&M.x86.R_EFLG,d,s); }
-
-u8 add_byte (u8 d, u8 s)
-{ return add_byte_asm(&M.x86.R_EFLG,d,s); }
-
-u16 add_word (u16 d, u16 s)
-{ return add_word_asm(&M.x86.R_EFLG,d,s); }
-
-u32 add_long (u32 d, u32 s)
-{ return add_long_asm(&M.x86.R_EFLG,d,s); }
-
-u8 and_byte (u8 d, u8 s)
-{ return and_byte_asm(&M.x86.R_EFLG,d,s); }
-
-u16 and_word (u16 d, u16 s)
-{ return and_word_asm(&M.x86.R_EFLG,d,s); }
-
-u32 and_long (u32 d, u32 s)
-{ return and_long_asm(&M.x86.R_EFLG,d,s); }
-
-u8 cmp_byte (u8 d, u8 s)
-{ return cmp_byte_asm(&M.x86.R_EFLG,d,s); }
-
-u16 cmp_word (u16 d, u16 s)
-{ return cmp_word_asm(&M.x86.R_EFLG,d,s); }
-
-u32 cmp_long (u32 d, u32 s)
-{ return cmp_long_asm(&M.x86.R_EFLG,d,s); }
-
-u8 daa_byte (u8 d)
-{ return daa_byte_asm(&M.x86.R_EFLG,d); }
-
-u8 das_byte (u8 d)
-{ return das_byte_asm(&M.x86.R_EFLG,d); }
-
-u8 dec_byte (u8 d)
-{ return dec_byte_asm(&M.x86.R_EFLG,d); }
-
-u16 dec_word (u16 d)
-{ return dec_word_asm(&M.x86.R_EFLG,d); }
-
-u32 dec_long (u32 d)
-{ return dec_long_asm(&M.x86.R_EFLG,d); }
-
-u8 inc_byte (u8 d)
-{ return inc_byte_asm(&M.x86.R_EFLG,d); }
-
-u16 inc_word (u16 d)
-{ return inc_word_asm(&M.x86.R_EFLG,d); }
-
-u32 inc_long (u32 d)
-{ return inc_long_asm(&M.x86.R_EFLG,d); }
-
-u8 or_byte (u8 d, u8 s)
-{ return or_byte_asm(&M.x86.R_EFLG,d,s); }
-
-u16 or_word (u16 d, u16 s)
-{ return or_word_asm(&M.x86.R_EFLG,d,s); }
-
-u32 or_long (u32 d, u32 s)
-{ return or_long_asm(&M.x86.R_EFLG,d,s); }
-
-u8 neg_byte (u8 s)
-{ return neg_byte_asm(&M.x86.R_EFLG,s); }
-
-u16 neg_word (u16 s)
-{ return neg_word_asm(&M.x86.R_EFLG,s); }
-
-u32 neg_long (u32 s)
-{ return neg_long_asm(&M.x86.R_EFLG,s); }
-
-u8 not_byte (u8 s)
-{ return not_byte_asm(&M.x86.R_EFLG,s); }
-
-u16 not_word (u16 s)
-{ return not_word_asm(&M.x86.R_EFLG,s); }
-
-u32 not_long (u32 s)
-{ return not_long_asm(&M.x86.R_EFLG,s); }
-
-u8 rcl_byte (u8 d, u8 s)
-{ return rcl_byte_asm(&M.x86.R_EFLG,d,s); }
-
-u16 rcl_word (u16 d, u8 s)
-{ return rcl_word_asm(&M.x86.R_EFLG,d,s); }
-
-u32 rcl_long (u32 d, u8 s)
-{ return rcl_long_asm(&M.x86.R_EFLG,d,s); }
-
-u8 rcr_byte (u8 d, u8 s)
-{ return rcr_byte_asm(&M.x86.R_EFLG,d,s); }
-
-u16 rcr_word (u16 d, u8 s)
-{ return rcr_word_asm(&M.x86.R_EFLG,d,s); }
-
-u32 rcr_long (u32 d, u8 s)
-{ return rcr_long_asm(&M.x86.R_EFLG,d,s); }
-
-u8 rol_byte (u8 d, u8 s)
-{ return rol_byte_asm(&M.x86.R_EFLG,d,s); }
-
-u16 rol_word (u16 d, u8 s)
-{ return rol_word_asm(&M.x86.R_EFLG,d,s); }
-
-u32 rol_long (u32 d, u8 s)
-{ return rol_long_asm(&M.x86.R_EFLG,d,s); }
-
-u8 ror_byte (u8 d, u8 s)
-{ return ror_byte_asm(&M.x86.R_EFLG,d,s); }
-
-u16 ror_word (u16 d, u8 s)
-{ return ror_word_asm(&M.x86.R_EFLG,d,s); }
-
-u32 ror_long (u32 d, u8 s)
-{ return ror_long_asm(&M.x86.R_EFLG,d,s); }
-
-u8 shl_byte (u8 d, u8 s)
-{ return shl_byte_asm(&M.x86.R_EFLG,d,s); }
-
-u16 shl_word (u16 d, u8 s)
-{ return shl_word_asm(&M.x86.R_EFLG,d,s); }
-
-u32 shl_long (u32 d, u8 s)
-{ return shl_long_asm(&M.x86.R_EFLG,d,s); }
-
-u8 shr_byte (u8 d, u8 s)
-{ return shr_byte_asm(&M.x86.R_EFLG,d,s); }
-
-u16 shr_word (u16 d, u8 s)
-{ return shr_word_asm(&M.x86.R_EFLG,d,s); }
-
-u32 shr_long (u32 d, u8 s)
-{ return shr_long_asm(&M.x86.R_EFLG,d,s); }
-
-u8 sar_byte (u8 d, u8 s)
-{ return sar_byte_asm(&M.x86.R_EFLG,d,s); }
-
-u16 sar_word (u16 d, u8 s)
-{ return sar_word_asm(&M.x86.R_EFLG,d,s); }
-
-u32 sar_long (u32 d, u8 s)
-{ return sar_long_asm(&M.x86.R_EFLG,d,s); }
-
-u16 shld_word (u16 d, u16 fill, u8 s)
-{ return shld_word_asm(&M.x86.R_EFLG,d,fill,s); }
-
-u32 shld_long (u32 d, u32 fill, u8 s)
-{ return shld_long_asm(&M.x86.R_EFLG,d,fill,s); }
-
-u16 shrd_word (u16 d, u16 fill, u8 s)
-{ return shrd_word_asm(&M.x86.R_EFLG,d,fill,s); }
-
-u32 shrd_long (u32 d, u32 fill, u8 s)
-{ return shrd_long_asm(&M.x86.R_EFLG,d,fill,s); }
-
-u8 sbb_byte (u8 d, u8 s)
-{ return sbb_byte_asm(&M.x86.R_EFLG,d,s); }
-
-u16 sbb_word (u16 d, u16 s)
-{ return sbb_word_asm(&M.x86.R_EFLG,d,s); }
-
-u32 sbb_long (u32 d, u32 s)
-{ return sbb_long_asm(&M.x86.R_EFLG,d,s); }
-
-u8 sub_byte (u8 d, u8 s)
-{ return sub_byte_asm(&M.x86.R_EFLG,d,s); }
-
-u16 sub_word (u16 d, u16 s)
-{ return sub_word_asm(&M.x86.R_EFLG,d,s); }
-
-u32 sub_long (u32 d, u32 s)
-{ return sub_long_asm(&M.x86.R_EFLG,d,s); }
-
-void test_byte (u8 d, u8 s)
-{ test_byte_asm(&M.x86.R_EFLG,d,s); }
-
-void test_word (u16 d, u16 s)
-{ test_word_asm(&M.x86.R_EFLG,d,s); }
-
-void test_long (u32 d, u32 s)
-{ test_long_asm(&M.x86.R_EFLG,d,s); }
-
-u8 xor_byte (u8 d, u8 s)
-{ return xor_byte_asm(&M.x86.R_EFLG,d,s); }
-
-u16 xor_word (u16 d, u16 s)
-{ return xor_word_asm(&M.x86.R_EFLG,d,s); }
-
-u32 xor_long (u32 d, u32 s)
-{ return xor_long_asm(&M.x86.R_EFLG,d,s); }
-
-void imul_byte (u8 s)
-{ imul_byte_asm(&M.x86.R_EFLG,&M.x86.R_AX,M.x86.R_AL,s); }
-
-void imul_word (u16 s)
-{ imul_word_asm(&M.x86.R_EFLG,&M.x86.R_AX,&M.x86.R_DX,M.x86.R_AX,s); }
-
-void imul_long (u32 s)
-{ imul_long_asm(&M.x86.R_EFLG,&M.x86.R_EAX,&M.x86.R_EDX,M.x86.R_EAX,s); }
-
-void imul_long_direct(u32 *res_lo, u32* res_hi,u32 d, u32 s)
-{ imul_long_asm(&M.x86.R_EFLG,res_lo,res_hi,d,s); }
-
-void mul_byte (u8 s)
-{ mul_byte_asm(&M.x86.R_EFLG,&M.x86.R_AX,M.x86.R_AL,s); }
-
-void mul_word (u16 s)
-{ mul_word_asm(&M.x86.R_EFLG,&M.x86.R_AX,&M.x86.R_DX,M.x86.R_AX,s); }
-
-void mul_long (u32 s)
-{ mul_long_asm(&M.x86.R_EFLG,&M.x86.R_EAX,&M.x86.R_EDX,M.x86.R_EAX,s); }
-
-void idiv_byte (u8 s)
-{ idiv_byte_asm(&M.x86.R_EFLG,&M.x86.R_AL,&M.x86.R_AH,M.x86.R_AX,s); }
-
-void idiv_word (u16 s)
-{ idiv_word_asm(&M.x86.R_EFLG,&M.x86.R_AX,&M.x86.R_DX,M.x86.R_AX,M.x86.R_DX,s); }
-
-void idiv_long (u32 s)
-{ idiv_long_asm(&M.x86.R_EFLG,&M.x86.R_EAX,&M.x86.R_EDX,M.x86.R_EAX,M.x86.R_EDX,s); }
-
-void div_byte (u8 s)
-{ div_byte_asm(&M.x86.R_EFLG,&M.x86.R_AL,&M.x86.R_AH,M.x86.R_AX,s); }
-
-void div_word (u16 s)
-{ div_word_asm(&M.x86.R_EFLG,&M.x86.R_AX,&M.x86.R_DX,M.x86.R_AX,M.x86.R_DX,s); }
-
-void div_long (u32 s)
-{ div_long_asm(&M.x86.R_EFLG,&M.x86.R_EAX,&M.x86.R_EDX,M.x86.R_EAX,M.x86.R_EDX,s); }
-
-#endif
diff --git a/hw/xfree86/x86emu/sys.c b/hw/xfree86/x86emu/sys.c
index 39941360d..4d90ea315 100644
--- a/hw/xfree86/x86emu/sys.c
+++ b/hw/xfree86/x86emu/sys.c
@@ -39,16 +39,13 @@
* user library.
*
****************************************************************************/
-/* $XFree86: xc/extras/x86emu/src/x86emu/sys.c,v 1.6 2002/09/16 18:05:18 eich Exp $ */
#include "x86emu.h"
#include "x86emu/x86emui.h"
#include "x86emu/regs.h"
#include "x86emu/debug.h"
#include "x86emu/prim_ops.h"
-#ifdef IN_MODULE
-#include "xf86_ansic.h"
-#else
+#ifndef NO_SYS_HEADERS
#include <string.h>
#endif
/*------------------------- Global Variables ------------------------------*/
@@ -60,6 +57,7 @@ X86EMU_intrFuncs _X86EMU_intrTab[256];
#if defined(__alpha__) || defined(__alpha)
/* to cope with broken egcs-1.1.2 :-(((( */
+#define ALPHA_UALOADS
/*
* inline functions to do unaligned accesses
* from linux/include/asm-alpha/unaligned.h
@@ -211,6 +209,60 @@ static __inline__ void stw_u(unsigned long r5, unsigned short * r11)
:"r" (r5), "r" (r11));
#endif
}
+
+#elif defined(__GNUC__) && ((__GNUC__ < 3)) && \
+ (defined (__ia64__) || defined (ia64__))
+#define IA64_UALOADS
+/*
+ * EGCS 1.1 knows about arbitrary unaligned loads. Define some
+ * packed structures to talk about such things with.
+ */
+struct __una_u64 { unsigned long x __attribute__((packed)); };
+struct __una_u32 { unsigned int x __attribute__((packed)); };
+struct __una_u16 { unsigned short x __attribute__((packed)); };
+
+static __inline__ unsigned long
+__uldq (const unsigned long * r11)
+{
+ const struct __una_u64 *ptr = (const struct __una_u64 *) r11;
+ return ptr->x;
+}
+
+static __inline__ unsigned long
+uldl (const unsigned int * r11)
+{
+ const struct __una_u32 *ptr = (const struct __una_u32 *) r11;
+ return ptr->x;
+}
+
+static __inline__ unsigned long
+uldw (const unsigned short * r11)
+{
+ const struct __una_u16 *ptr = (const struct __una_u16 *) r11;
+ return ptr->x;
+}
+
+static __inline__ void
+ustq (unsigned long r5, unsigned long * r11)
+{
+ struct __una_u64 *ptr = (struct __una_u64 *) r11;
+ ptr->x = r5;
+}
+
+static __inline__ void
+ustl (unsigned long r5, unsigned int * r11)
+{
+ struct __una_u32 *ptr = (struct __una_u32 *) r11;
+ ptr->x = r5;
+}
+
+static __inline__ void
+ustw (unsigned long r5, unsigned short * r11)
+{
+ struct __una_u16 *ptr = (struct __una_u16 *) r11;
+ ptr->x = r5;
+}
+
#endif
/****************************************************************************
@@ -264,8 +316,10 @@ u16 X86API rdw(
}
else
#endif
-#if defined(__alpha__) || defined(__alpha)
+#if defined(ALPHA_UALOADS)
val = ldw_u((u16*)(M.mem_base + addr));
+#elif defined(IA64_UALOADS)
+ val = uldw((u16*)(M.mem_base + addr));
#else
val = *(u16*)(M.mem_base + addr);
#endif
@@ -301,8 +355,10 @@ u32 X86API rdl(
}
else
#endif
-#if defined(__alpha__) || defined(__alpha)
+#if defined(ALPHA_UALOADS)
val = ldl_u((u32*)(M.mem_base + addr));
+#elif defined(IA64_UALOADS)
+ val = uldl((u32*)(M.mem_base + addr));
#else
val = *(u32*)(M.mem_base + addr);
#endif
@@ -357,8 +413,10 @@ DB( if (DEBUG_MEM_TRACE())
}
else
#endif
-#if defined(__alpha__) || defined(__alpha)
+#if defined(ALPHA_UALOADS)
stw_u(val,(u16*)(M.mem_base + addr));
+#elif defined(IA64_UALOADS)
+ ustw(val,(u16*)(M.mem_base + addr));
#else
*(u16*)(M.mem_base + addr) = val;
#endif
@@ -391,8 +449,10 @@ DB( if (DEBUG_MEM_TRACE())
}
else
#endif
-#if defined(__alpha__) || defined(__alpha)
+#if defined(ALPHA_UALOADS)
stl_u(val,(u32*)(M.mem_base + addr));
+#elif defined(IA64_UALOADS)
+ ustl(val,(u32*)(M.mem_base + addr));
#else
*(u32*)(M.mem_base + addr) = val;
#endif
diff --git a/hw/xfree86/x86emu/x86emu.h b/hw/xfree86/x86emu/x86emu.h
index 1df9ac50d..795e2d688 100644
--- a/hw/xfree86/x86emu/x86emu.h
+++ b/hw/xfree86/x86emu/x86emu.h
@@ -37,7 +37,6 @@
* include this header
*
****************************************************************************/
-/* $XFree86$ */
#ifndef __X86EMU_X86EMU_H
#define __X86EMU_X86EMU_H
@@ -56,7 +55,9 @@ typedef int X86EMU_pioAddr;
/*---------------------- Macros and type definitions ----------------------*/
-/* #pragma pack(1) */ /* Don't pack structs with function pointers! */
+#ifdef PACK
+# pragma PACK /* Don't pack structs with function pointers! */
+#endif
/****************************************************************************
REMARKS:
@@ -129,8 +130,10 @@ extern u32 X86API rdl(u32 addr);
extern void X86API wrb(u32 addr, u8 val);
extern void X86API wrw(u32 addr, u16 val);
extern void X86API wrl(u32 addr, u32 val);
-
-/* #pragma pack() */
+
+#ifdef END_PACK
+# pragma END_PACK
+#endif
/*--------------------- type definitions -----------------------------------*/
@@ -169,6 +172,7 @@ void X86EMU_halt_sys(void);
#define DEBUG_DISASSEMBLE_F 0x000008
#define DEBUG_BREAK_F 0x000010
#define DEBUG_SVC_F 0x000020
+#define DEBUG_SAVE_IP_CS_F 0x000040
#define DEBUG_FS_F 0x000080
#define DEBUG_PROC_F 0x000100
#define DEBUG_SYSINT_F 0x000200 /* bios system interrupts. */
@@ -178,7 +182,7 @@ void X86EMU_halt_sys(void);
#define DEBUG_IO_TRACE_F 0x002000
#define DEBUG_TRACECALL_REGS_F 0x004000
#define DEBUG_DECODE_NOPRINT_F 0x008000
-#define DEBUG_SAVE_IP_CS_F 0x010000
+#define DEBUG_EXIT 0x010000
#define DEBUG_SYS_F (DEBUG_SVC_F|DEBUG_FS_F|DEBUG_PROC_F)
void X86EMU_trace_regs(void);
diff --git a/hw/xfree86/x86emu/x86emu/debug.h b/hw/xfree86/x86emu/x86emu/debug.h
index 8abedf616..47aacb6c3 100644
--- a/hw/xfree86/x86emu/x86emu/debug.h
+++ b/hw/xfree86/x86emu/x86emu/debug.h
@@ -35,7 +35,6 @@
* Description: Header file for debug definitions.
*
****************************************************************************/
-/* $XFree86: xc/extras/x86emu/src/x86emu/x86emu/debug.h,v 1.3 2000/04/19 15:48:15 tsi Exp $ */
#ifndef __X86EMU_DEBUG_H
#define __X86EMU_DEBUG_H
diff --git a/hw/xfree86/x86emu/x86emu/decode.h b/hw/xfree86/x86emu/x86emu/decode.h
index bb2bc0bee..61cd4dc10 100644
--- a/hw/xfree86/x86emu/x86emu/decode.h
+++ b/hw/xfree86/x86emu/x86emu/decode.h
@@ -35,7 +35,6 @@
* Description: Header file for instruction decoding logic.
*
****************************************************************************/
-/* $XFree86$ */
#ifndef __X86EMU_DECODE_H
#define __X86EMU_DECODE_H
diff --git a/hw/xfree86/x86emu/x86emu/fpu_regs.h b/hw/xfree86/x86emu/x86emu/fpu_regs.h
index a125075b7..e59b80783 100644
--- a/hw/xfree86/x86emu/x86emu/fpu_regs.h
+++ b/hw/xfree86/x86emu/x86emu/fpu_regs.h
@@ -35,13 +35,16 @@
* Description: Header file for FPU register definitions.
*
****************************************************************************/
-/* $XFree86: xc/extras/x86emu/include/x86emu/fpu_regs.h,v 1.2 2003/10/22 20:03:05 tsi Exp $ */
#ifndef __X86EMU_FPU_REGS_H
#define __X86EMU_FPU_REGS_H
#ifdef X86_FPU_SUPPORT
+#ifdef PACK
+# pragma PACK
+#endif
+
/* Basic 8087 register can hold any of the following values: */
union x86_fpu_reg_u {
@@ -86,6 +89,10 @@ struct x86_fpu_registers {
short x86_fpu_tos, x86_fpu_bos;
};
+#ifdef END_PACK
+# pragma END_PACK
+#endif
+
/*
* There are two versions of the following macro.
*
diff --git a/hw/xfree86/x86emu/x86emu/prim_asm.h b/hw/xfree86/x86emu/x86emu/prim_asm.h
index 041255f18..e023cf88d 100644
--- a/hw/xfree86/x86emu/x86emu/prim_asm.h
+++ b/hw/xfree86/x86emu/x86emu/prim_asm.h
@@ -39,7 +39,6 @@
* platform.
*
****************************************************************************/
-/* $XFree86$ */
#ifndef __X86EMU_PRIM_ASM_H
#define __X86EMU_PRIM_ASM_H
diff --git a/hw/xfree86/x86emu/x86emu/prim_ops.h b/hw/xfree86/x86emu/x86emu/prim_ops.h
index 1633fe1fa..bea8357e4 100644
--- a/hw/xfree86/x86emu/x86emu/prim_ops.h
+++ b/hw/xfree86/x86emu/x86emu/prim_ops.h
@@ -39,8 +39,6 @@
#ifndef __X86EMU_PRIM_OPS_H
#define __X86EMU_PRIM_OPS_H
-#include "x86emu/prim_asm.h"
-
#ifdef __cplusplus
extern "C" { /* Use "C" linkage when in C++ mode */
#endif
@@ -136,94 +134,6 @@ void push_long (u32 w);
u16 pop_word (void);
u32 pop_long (void);
-#if defined(__HAVE_INLINE_ASSEMBLER__) && !defined(PRIM_OPS_NO_REDEFINE_ASM)
-
-#define aaa_word(d) aaa_word_asm(&M.x86.R_EFLG,d)
-#define aas_word(d) aas_word_asm(&M.x86.R_EFLG,d)
-#define aad_word(d) aad_word_asm(&M.x86.R_EFLG,d)
-#define aam_word(d) aam_word_asm(&M.x86.R_EFLG,d)
-#define adc_byte(d,s) adc_byte_asm(&M.x86.R_EFLG,d,s)
-#define adc_word(d,s) adc_word_asm(&M.x86.R_EFLG,d,s)
-#define adc_long(d,s) adc_long_asm(&M.x86.R_EFLG,d,s)
-#define add_byte(d,s) add_byte_asm(&M.x86.R_EFLG,d,s)
-#define add_word(d,s) add_word_asm(&M.x86.R_EFLG,d,s)
-#define add_long(d,s) add_long_asm(&M.x86.R_EFLG,d,s)
-#define and_byte(d,s) and_byte_asm(&M.x86.R_EFLG,d,s)
-#define and_word(d,s) and_word_asm(&M.x86.R_EFLG,d,s)
-#define and_long(d,s) and_long_asm(&M.x86.R_EFLG,d,s)
-#define cmp_byte(d,s) cmp_byte_asm(&M.x86.R_EFLG,d,s)
-#define cmp_word(d,s) cmp_word_asm(&M.x86.R_EFLG,d,s)
-#define cmp_long(d,s) cmp_long_asm(&M.x86.R_EFLG,d,s)
-#define daa_byte(d) daa_byte_asm(&M.x86.R_EFLG,d)
-#define das_byte(d) das_byte_asm(&M.x86.R_EFLG,d)
-#define dec_byte(d) dec_byte_asm(&M.x86.R_EFLG,d)
-#define dec_word(d) dec_word_asm(&M.x86.R_EFLG,d)
-#define dec_long(d) dec_long_asm(&M.x86.R_EFLG,d)
-#define inc_byte(d) inc_byte_asm(&M.x86.R_EFLG,d)
-#define inc_word(d) inc_word_asm(&M.x86.R_EFLG,d)
-#define inc_long(d) inc_long_asm(&M.x86.R_EFLG,d)
-#define or_byte(d,s) or_byte_asm(&M.x86.R_EFLG,d,s)
-#define or_word(d,s) or_word_asm(&M.x86.R_EFLG,d,s)
-#define or_long(d,s) or_long_asm(&M.x86.R_EFLG,d,s)
-#define neg_byte(s) neg_byte_asm(&M.x86.R_EFLG,s)
-#define neg_word(s) neg_word_asm(&M.x86.R_EFLG,s)
-#define neg_long(s) neg_long_asm(&M.x86.R_EFLG,s)
-#define not_byte(s) not_byte_asm(&M.x86.R_EFLG,s)
-#define not_word(s) not_word_asm(&M.x86.R_EFLG,s)
-#define not_long(s) not_long_asm(&M.x86.R_EFLG,s)
-#define rcl_byte(d,s) rcl_byte_asm(&M.x86.R_EFLG,d,s)
-#define rcl_word(d,s) rcl_word_asm(&M.x86.R_EFLG,d,s)
-#define rcl_long(d,s) rcl_long_asm(&M.x86.R_EFLG,d,s)
-#define rcr_byte(d,s) rcr_byte_asm(&M.x86.R_EFLG,d,s)
-#define rcr_word(d,s) rcr_word_asm(&M.x86.R_EFLG,d,s)
-#define rcr_long(d,s) rcr_long_asm(&M.x86.R_EFLG,d,s)
-#define rol_byte(d,s) rol_byte_asm(&M.x86.R_EFLG,d,s)
-#define rol_word(d,s) rol_word_asm(&M.x86.R_EFLG,d,s)
-#define rol_long(d,s) rol_long_asm(&M.x86.R_EFLG,d,s)
-#define ror_byte(d,s) ror_byte_asm(&M.x86.R_EFLG,d,s)
-#define ror_word(d,s) ror_word_asm(&M.x86.R_EFLG,d,s)
-#define ror_long(d,s) ror_long_asm(&M.x86.R_EFLG,d,s)
-#define shl_byte(d,s) shl_byte_asm(&M.x86.R_EFLG,d,s)
-#define shl_word(d,s) shl_word_asm(&M.x86.R_EFLG,d,s)
-#define shl_long(d,s) shl_long_asm(&M.x86.R_EFLG,d,s)
-#define shr_byte(d,s) shr_byte_asm(&M.x86.R_EFLG,d,s)
-#define shr_word(d,s) shr_word_asm(&M.x86.R_EFLG,d,s)
-#define shr_long(d,s) shr_long_asm(&M.x86.R_EFLG,d,s)
-#define sar_byte(d,s) sar_byte_asm(&M.x86.R_EFLG,d,s)
-#define sar_word(d,s) sar_word_asm(&M.x86.R_EFLG,d,s)
-#define sar_long(d,s) sar_long_asm(&M.x86.R_EFLG,d,s)
-#define shld_word(d,fill,s) shld_word_asm(&M.x86.R_EFLG,d,fill,s)
-#define shld_long(d,fill,s) shld_long_asm(&M.x86.R_EFLG,d,fill,s)
-#define shrd_word(d,fill,s) shrd_word_asm(&M.x86.R_EFLG,d,fill,s)
-#define shrd_long(d,fill,s) shrd_long_asm(&M.x86.R_EFLG,d,fill,s)
-#define sbb_byte(d,s) sbb_byte_asm(&M.x86.R_EFLG,d,s)
-#define sbb_word(d,s) sbb_word_asm(&M.x86.R_EFLG,d,s)
-#define sbb_long(d,s) sbb_long_asm(&M.x86.R_EFLG,d,s)
-#define sub_byte(d,s) sub_byte_asm(&M.x86.R_EFLG,d,s)
-#define sub_word(d,s) sub_word_asm(&M.x86.R_EFLG,d,s)
-#define sub_long(d,s) sub_long_asm(&M.x86.R_EFLG,d,s)
-#define test_byte(d,s) test_byte_asm(&M.x86.R_EFLG,d,s)
-#define test_word(d,s) test_word_asm(&M.x86.R_EFLG,d,s)
-#define test_long(d,s) test_long_asm(&M.x86.R_EFLG,d,s)
-#define xor_byte(d,s) xor_byte_asm(&M.x86.R_EFLG,d,s)
-#define xor_word(d,s) xor_word_asm(&M.x86.R_EFLG,d,s)
-#define xor_long(d,s) xor_long_asm(&M.x86.R_EFLG,d,s)
-#define imul_byte(s) imul_byte_asm(&M.x86.R_EFLG,&M.x86.R_AX,M.x86.R_AL,s)
-#define imul_word(s) imul_word_asm(&M.x86.R_EFLG,&M.x86.R_AX,&M.x86.R_DX,M.x86.R_AX,s)
-#define imul_long(s) imul_long_asm(&M.x86.R_EFLG,&M.x86.R_EAX,&M.x86.R_EDX,M.x86.R_EAX,s)
-#define imul_long_direct(res_lo,res_hi,d,s) imul_long_asm(&M.x86.R_EFLG,res_lo,res_hi,d,s)
-#define mul_byte(s) mul_byte_asm(&M.x86.R_EFLG,&M.x86.R_AX,M.x86.R_AL,s)
-#define mul_word(s) mul_word_asm(&M.x86.R_EFLG,&M.x86.R_AX,&M.x86.R_DX,M.x86.R_AX,s)
-#define mul_long(s) mul_long_asm(&M.x86.R_EFLG,&M.x86.R_EAX,&M.x86.R_EDX,M.x86.R_EAX,s)
-#define idiv_byte(s) idiv_byte_asm(&M.x86.R_EFLG,&M.x86.R_AL,&M.x86.R_AH,M.x86.R_AX,s)
-#define idiv_word(s) idiv_word_asm(&M.x86.R_EFLG,&M.x86.R_AX,&M.x86.R_DX,M.x86.R_AX,M.x86.R_DX,s)
-#define idiv_long(s) idiv_long_asm(&M.x86.R_EFLG,&M.x86.R_EAX,&M.x86.R_EDX,M.x86.R_EAX,M.x86.R_EDX,s)
-#define div_byte(s) div_byte_asm(&M.x86.R_EFLG,&M.x86.R_AL,&M.x86.R_AH,M.x86.R_AX,s)
-#define div_word(s) div_word_asm(&M.x86.R_EFLG,&M.x86.R_AX,&M.x86.R_DX,M.x86.R_AX,M.x86.R_DX,s)
-#define div_long(s) div_long_asm(&M.x86.R_EFLG,&M.x86.R_EAX,&M.x86.R_EDX,M.x86.R_EAX,M.x86.R_EDX,s)
-
-#endif
-
#ifdef __cplusplus
} /* End of "C" linkage for C++ */
#endif
diff --git a/hw/xfree86/x86emu/x86emu/regs.h b/hw/xfree86/x86emu/x86emu/regs.h
index fba2991d4..52cf8e41b 100644
--- a/hw/xfree86/x86emu/x86emu/regs.h
+++ b/hw/xfree86/x86emu/x86emu/regs.h
@@ -35,13 +35,16 @@
* Description: Header file for x86 register definitions.
*
****************************************************************************/
-/* $XFree86: xc/extras/x86emu/include/x86emu/regs.h,v 1.5 2003/10/22 20:03:05 tsi Exp $ */
#ifndef __X86EMU_REGS_H
#define __X86EMU_REGS_H
/*---------------------- Macros and type definitions ----------------------*/
+#ifdef PACK
+# pragma PACK
+#endif
+
/*
* General EAX, EBX, ECX, EDX type registers. Note that for
* portability, and speed, the issue of byte swapping is not addressed
@@ -303,6 +306,10 @@ typedef struct {
X86EMU_regs x86;
} X86EMU_sysEnv;
+#ifdef END_PACK
+# pragma END_PACK
+#endif
+
/*----------------------------- Global Variables --------------------------*/
#ifdef __cplusplus
diff --git a/hw/xfree86/x86emu/x86emu/types.h b/hw/xfree86/x86emu/x86emu/types.h
index 5232d10ac..c0c09c1b0 100644
--- a/hw/xfree86/x86emu/x86emu/types.h
+++ b/hw/xfree86/x86emu/x86emu/types.h
@@ -36,12 +36,11 @@
*
****************************************************************************/
-/* $XFree86: xc/extras/x86emu/include/x86emu/types.h,v 1.6 2003/06/12 14:12:26 eich Exp $ */
#ifndef __X86EMU_TYPES_H
#define __X86EMU_TYPES_H
-#ifndef IN_MODULE
+#ifndef NO_SYS_HEADERS
#include <sys/types.h>
#endif
diff --git a/hw/xfree86/x86emu/x86emu/x86emui.h b/hw/xfree86/x86emu/x86emu/x86emui.h
index 3adf61ec6..112ee366f 100644
--- a/hw/xfree86/x86emu/x86emu/x86emui.h
+++ b/hw/xfree86/x86emu/x86emu/x86emui.h
@@ -38,7 +38,6 @@
*
****************************************************************************/
-/* $XFree86: xc/extras/x86emu/src/x86emu/x86emu/x86emui.h,v 1.3 2000/04/17 16:29:47 eich Exp $ */
#ifndef __X86EMU_X86EMUI_H
#define __X86EMU_X86EMUI_H
@@ -71,9 +70,7 @@
#include "x86emu/fpu.h"
#include "x86emu/fpu_regs.h"
-#ifdef IN_MODULE
-#include <xf86_ansic.h>
-#else
+#ifndef NO_SYS_HEADERS
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/hw/xfree86/xaa/xaa.h b/hw/xfree86/xaa/xaa.h
index 98db3cf50..d4ff7bbd8 100644
--- a/hw/xfree86/xaa/xaa.h
+++ b/hw/xfree86/xaa/xaa.h
@@ -1278,6 +1278,10 @@ typedef struct _XAAInfoRec {
GlyphPtr *glyphs
);
+ /* The old SetupForCPUToScreenAlphaTexture function is no longer used because
+ * it doesn't pass in enough information to write a conforming
+ * implementation. See SetupForCPUToScreenAlphaTexture2.
+ */
Bool (*SetupForCPUToScreenAlphaTexture) (
ScrnInfoPtr pScrn,
int op,
@@ -1304,6 +1308,10 @@ typedef struct _XAAInfoRec {
int CPUToScreenAlphaTextureFlags;
CARD32 * CPUToScreenAlphaTextureFormats;
+ /* The old SetupForCPUToScreenTexture function is no longer used because
+ * it doesn't pass in enough information to write a conforming
+ * implementation. See SetupForCPUToScreenTexture2.
+ */
Bool (*SetupForCPUToScreenTexture) (
ScrnInfoPtr pScrn,
int op,
@@ -1333,6 +1341,38 @@ typedef struct _XAAInfoRec {
BoxRec SolidLineLimits;
BoxRec DashedLineLimits;
+#ifdef RENDER
+ /* These were added for X.Org 6.8.0 */
+ Bool (*SetupForCPUToScreenAlphaTexture2) (
+ ScrnInfoPtr pScrn,
+ int op,
+ CARD16 red,
+ CARD16 green,
+ CARD16 blue,
+ CARD16 alpha,
+ CARD32 maskFormat,
+ CARD32 dstFormat,
+ CARD8 *alphaPtr,
+ int alphaPitch,
+ int width,
+ int height,
+ int flags
+ );
+ CARD32 *CPUToScreenAlphaTextureDstFormats;
+
+ Bool (*SetupForCPUToScreenTexture2) (
+ ScrnInfoPtr pScrn,
+ int op,
+ CARD32 srcFormat,
+ CARD32 dstFormat,
+ CARD8 *texPtr,
+ int texPitch,
+ int width,
+ int height,
+ int flags
+ );
+ CARD32 *CPUToScreenTextureDstFormats;
+#endif /* RENDER */
} XAAInfoRec, *XAAInfoRecPtr;
#define SET_SYNC_FLAG(infoRec) (infoRec)->NeedToSync = TRUE
diff --git a/hw/xfree86/xaa/xaaFallback.c b/hw/xfree86/xaa/xaaFallback.c
index 6bc7bfed3..df67342ff 100644
--- a/hw/xfree86/xaa/xaaFallback.c
+++ b/hw/xfree86/xaa/xaaFallback.c
@@ -347,6 +347,7 @@ GCOps XAAFallbackOps = {
{NULL} /* devPrivate */
};
-
-
-
+GCOps *XAAGetFallbackOps(void)
+{
+ return &XAAFallbackOps;
+}
diff --git a/hw/xfree86/xaa/xaaInit.c b/hw/xfree86/xaa/xaaInit.c
index 186711e3f..f6f2d491e 100644
--- a/hw/xfree86/xaa/xaaInit.c
+++ b/hw/xfree86/xaa/xaaInit.c
@@ -40,11 +40,29 @@ static int XAASetDGAMode(int index, int num, DGADevicePtr devRet);
static void XAAEnableDisableFBAccess (int index, Bool enable);
static Bool XAAChangeWindowAttributes (WindowPtr pWin, unsigned long mask);
+/*
+ * XXX These three should be static, but that breaks ABI compat with XF4.4
+ * and Xorg 6.7.0 modules. DO NOT use them in new code, you should never
+ * be setting them, and you've got Get functions below.
+ */
int XAAScreenIndex = -1;
int XAAGCIndex = -1;
int XAAPixmapIndex = -1;
+
static unsigned long XAAGeneration = 0;
+int XAAGetScreenIndex(void) {
+ return XAAScreenIndex;
+}
+
+int XAAGetGCIndex(void) {
+ return XAAGCIndex;
+}
+
+int XAAGetPixmapIndex(void) {
+ return XAAPixmapIndex;
+}
+
/* temp kludge */
static Bool SwitchedOut = FALSE;
diff --git a/hw/xfree86/xaa/xaaInitAccel.c b/hw/xfree86/xaa/xaaInitAccel.c
index 7233e215c..9d3764506 100644
--- a/hw/xfree86/xaa/xaaInitAccel.c
+++ b/hw/xfree86/xaa/xaaInitAccel.c
@@ -101,8 +101,8 @@ static XF86ModuleVersionInfo xaaVersRec =
MODULEVENDORSTRING,
MODINFOSTRING1,
MODINFOSTRING2,
- XF86_VERSION_CURRENT,
- 1, 1, 0,
+ XORG_VERSION_CURRENT,
+ 1, 2, 0,
ABI_CLASS_VIDEODRV, /* requires the video driver ABI */
ABI_VIDEODRV_VERSION,
MOD_CLASS_NONE,
@@ -1269,10 +1269,12 @@ XAAInitAccel(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
#ifdef RENDER
{
Bool haveTexture = infoRec->CPUToScreenTextureFormats &&
- infoRec->SetupForCPUToScreenTexture &&
+ infoRec->CPUToScreenTextureDstFormats &&
+ infoRec->SetupForCPUToScreenTexture2 &&
infoRec->SubsequentCPUToScreenTexture;
Bool haveAlphaTexture = infoRec->CPUToScreenAlphaTextureFormats &&
- infoRec->SetupForCPUToScreenAlphaTexture &&
+ infoRec->CPUToScreenAlphaTextureDstFormats &&
+ infoRec->SetupForCPUToScreenAlphaTexture2 &&
infoRec->SubsequentCPUToScreenAlphaTexture;
if(!infoRec->Composite && (haveTexture || haveAlphaTexture))
diff --git a/hw/xfree86/xaa/xaaOverlay.c b/hw/xfree86/xaa/xaaOverlay.c
index 42a9428c4..f0505a8b6 100644
--- a/hw/xfree86/xaa/xaaOverlay.c
+++ b/hw/xfree86/xaa/xaaOverlay.c
@@ -1,4 +1,4 @@
-/* $XdotOrg: xc/programs/Xserver/hw/xfree86/xaa/xaaOverlay.c,v 1.1.4.3.2.3 2004/03/04 20:16:48 kaleb Exp $ */
+/* $XdotOrg: xc/programs/Xserver/hw/xfree86/xaa/xaaOverlay.c,v 1.2 2004/04/23 19:54:16 eich Exp $ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/xaa/xaaOverlay.c,v 1.14tsi Exp $ */
#include "misc.h"
diff --git a/hw/xfree86/xaa/xaaPCache.c b/hw/xfree86/xaa/xaaPCache.c
index 25f8bd486..94790d21c 100644
--- a/hw/xfree86/xaa/xaaPCache.c
+++ b/hw/xfree86/xaa/xaaPCache.c
@@ -1653,7 +1653,8 @@ XAACachePlanarMonoStipple(ScrnInfoPtr pScrn, PixmapPtr pPix)
return pCache;
}
-
+XAACachePlanarMonoStippleProc
+XAAGetCachePlanarMonoStipple(void) { return XAACachePlanarMonoStipple; }
XAACacheInfoPtr
XAACacheStipple(ScrnInfoPtr pScrn, PixmapPtr pPix, int fg, int bg)
diff --git a/hw/xfree86/xaa/xaaPaintWin.c b/hw/xfree86/xaa/xaaPaintWin.c
index 1cf6c3422..351d0e85f 100644
--- a/hw/xfree86/xaa/xaaPaintWin.c
+++ b/hw/xfree86/xaa/xaaPaintWin.c
@@ -1,4 +1,4 @@
-/* $XdotOrg: xc/programs/Xserver/hw/xfree86/xaa/xaaPaintWin.c,v 1.1.4.2.2.3 2004/03/04 20:16:48 kaleb Exp $ */
+/* $XdotOrg: xc/programs/Xserver/hw/xfree86/xaa/xaaPaintWin.c,v 1.2 2004/04/23 19:54:16 eich Exp $ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/xaa/xaaPaintWin.c,v 1.10 2001/10/28 03:34:04 tsi Exp $ */
#include "misc.h"
diff --git a/hw/xfree86/xaa/xaaPict.c b/hw/xfree86/xaa/xaaPict.c
index af3380231..12523e85f 100644
--- a/hw/xfree86/xaa/xaaPict.c
+++ b/hw/xfree86/xaa/xaaPict.c
@@ -172,6 +172,10 @@ XAA_888_plus_PICT_a8_to_8888 (
}
}
+#define DRAWABLE_IS_ON_CARD(pDraw) \
+ (pDraw->type == DRAWABLE_WINDOW || \
+ (pDraw->type == DRAWABLE_PIXMAP && IS_OFFSCREEN_PIXMAP(pDraw)))
+
Bool
XAADoComposite (
CARD8 op,
@@ -190,7 +194,7 @@ XAADoComposite (
ScreenPtr pScreen = pDst->pDrawable->pScreen;
XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_SCREEN(pScreen);
RegionRec region;
- CARD32 *formats;
+ CARD32 *formats, *dstformats;
int flags = 0;
BoxPtr pbox;
int nbox, w, h;
@@ -198,13 +202,10 @@ XAADoComposite (
if(!REGION_NUM_RECTS(pDst->pCompositeClip))
return TRUE;
- if(!infoRec->pScrn->vtSema ||
- ((pDst->pDrawable->type != DRAWABLE_WINDOW) &&
- !IS_OFFSCREEN_PIXMAP(pDst->pDrawable)))
+ if(!infoRec->pScrn->vtSema || !DRAWABLE_IS_ON_CARD(pDst->pDrawable))
return FALSE;
- if((pSrc->pDrawable->type != DRAWABLE_PIXMAP) ||
- IS_OFFSCREEN_PIXMAP(pSrc->pDrawable))
+ if(DRAWABLE_IS_ON_CARD(pSrc->pDrawable))
return FALSE;
if (pSrc->transform || (pMask && pMask->transform))
@@ -279,7 +280,9 @@ XAADoComposite (
return TRUE;
}
- if(!(formats = infoRec->CPUToScreenAlphaTextureFormats))
+ formats = infoRec->CPUToScreenAlphaTextureFormats;
+ dstformats = infoRec->CPUToScreenAlphaTextureDstFormats;
+ if(!formats || !dstformats)
return FALSE;
w = pMask->pDrawable->width;
@@ -304,6 +307,11 @@ XAADoComposite (
if(!(*formats)) return FALSE;
formats++;
}
+ while(*dstformats != pDst->format) {
+ if(!(*dstformats))
+ return FALSE;
+ dstformats++;
+ }
if (!miComputeCompositeRegion (&region, pSrc, pMask, pDst,
xSrc, ySrc, xMask, yMask, xDst, yDst,
@@ -318,8 +326,9 @@ XAADoComposite (
return TRUE;
}
- if(!(infoRec->SetupForCPUToScreenAlphaTexture)(infoRec->pScrn,
- op, red, green, blue, alpha, pMask->format,
+ if(!(infoRec->SetupForCPUToScreenAlphaTexture2)(infoRec->pScrn,
+ op, red, green, blue, alpha, pMask->format,
+ pDst->format,
((PixmapPtr)(pMask->pDrawable))->devPrivate.ptr,
((PixmapPtr)(pMask->pDrawable))->devKind,
w, h, flags))
@@ -343,8 +352,10 @@ XAADoComposite (
REGION_UNINIT(pScreen, &region);
return TRUE;
}
- } else {
- if(!(formats = infoRec->CPUToScreenTextureFormats))
+ } else {
+ formats = infoRec->CPUToScreenTextureFormats;
+ dstformats = infoRec->CPUToScreenTextureDstFormats;
+ if(!formats || !dstformats)
return FALSE;
w = pSrc->pDrawable->width;
@@ -361,11 +372,15 @@ XAADoComposite (
flags |= XAA_RENDER_REPEAT;
}
-
while(*formats != pSrc->format) {
if(!(*formats)) return FALSE;
formats++;
}
+ while(*dstformats != pDst->format) {
+ if(!(*dstformats))
+ return FALSE;
+ dstformats++;
+ }
if (!miComputeCompositeRegion (&region, pSrc, pMask, pDst,
xSrc, ySrc, xMask, yMask, xDst, yDst,
@@ -380,8 +395,8 @@ XAADoComposite (
return TRUE;
}
- if(!(infoRec->SetupForCPUToScreenTexture)(infoRec->pScrn,
- op, pSrc->format,
+ if(!(infoRec->SetupForCPUToScreenTexture2)(infoRec->pScrn,
+ op, pSrc->format, pDst->format,
((PixmapPtr)(pSrc->pDrawable))->devPrivate.ptr,
((PixmapPtr)(pSrc->pDrawable))->devKind,
w, h, flags))
@@ -411,6 +426,63 @@ XAADoComposite (
return FALSE;
}
+static void
+XAACompositeSrcCopy (PicturePtr pSrc,
+ PicturePtr pDst,
+ INT16 xSrc,
+ INT16 ySrc,
+ INT16 xDst,
+ INT16 yDst,
+ CARD16 width,
+ CARD16 height)
+{
+ ScreenPtr pScreen = pDst->pDrawable->pScreen;
+ XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_SCREEN(pScreen);
+ int i, nbox;
+ int xoff, yoff;
+ BoxPtr pbox;
+ DDXPointPtr pptSrc;
+ RegionRec region;
+
+ xDst += pDst->pDrawable->x;
+ yDst += pDst->pDrawable->y;
+ xSrc += pSrc->pDrawable->x;
+ ySrc += pSrc->pDrawable->y;
+
+ if (!miComputeCompositeRegion (&region, pSrc, NULL, pDst,
+ xSrc, ySrc, 0, 0, xDst, yDst,
+ width, height))
+ return;
+
+ nbox = REGION_NUM_RECTS(&region);
+ pbox = REGION_RECTS(&region);
+
+ if(!nbox) {
+ REGION_UNINIT(pScreen, &region);
+ return;
+ }
+ pptSrc = ALLOCATE_LOCAL(sizeof(DDXPointRec) * nbox);
+ if (!pptSrc) {
+ REGION_UNINIT(pScreen, &region);
+ return;
+ }
+ xoff = xSrc - xDst;
+ yoff = ySrc - yDst;
+ for (i = 0; i < nbox; i++) {
+ pptSrc[i].x = pbox[i].x1 + xoff;
+ pptSrc[i].y = pbox[i].y1 + yoff;
+ }
+
+ infoRec->ScratchGC.planemask = ~0L;
+ infoRec->ScratchGC.alu = GXcopy;
+
+ XAADoBitBlt(pSrc->pDrawable, pDst->pDrawable, &infoRec->ScratchGC, &region,
+ pptSrc);
+
+ DEALLOCATE_LOCAL(pptSrc);
+ REGION_UNINIT(pScreen, &region);
+ return;
+}
void
XAAComposite (CARD8 op,
@@ -430,7 +502,14 @@ XAAComposite (CARD8 op,
XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_SCREEN(pScreen);
XAA_RENDER_PROLOGUE(pScreen, Composite);
- if(!infoRec->Composite ||
+ if((op == PictOpSrc) && !pMask && infoRec->pScrn->vtSema &&
+ infoRec->ScreenToScreenBitBlt &&
+ DRAWABLE_IS_ON_CARD(pSrc->pDrawable) &&
+ DRAWABLE_IS_ON_CARD(pDst->pDrawable) &&
+ !pSrc->transform && !pSrc->repeat && (pSrc->format == pDst->format))
+ {
+ XAACompositeSrcCopy(pSrc, pDst, xSrc, ySrc, xDst, yDst, width, height);
+ } else if(!infoRec->Composite ||
!(*infoRec->Composite)(op, pSrc, pMask, pDst,
xSrc, ySrc, xMask, yMask, xDst, yDst,
width, height))
diff --git a/hw/xfree86/xaa/xaaROP.c b/hw/xfree86/xaa/xaaROP.c
index 70a7b1d7d..931740159 100644
--- a/hw/xfree86/xaa/xaaROP.c
+++ b/hw/xfree86/xaa/xaaROP.c
@@ -94,6 +94,25 @@ int XAAPatternROP_PM[16] =
ROP_DPo
};
+int XAAGetCopyROP(int i)
+{
+ return XAACopyROP[i];
+}
+
+int XAAGetCopyROP_PM(int i)
+{
+ return XAACopyROP_PM[i];
+}
+
+int XAAGetPatternROP(int i)
+{
+ return XAAPatternROP[i];
+}
+
+int XAAGetPatternROP_PM(int i)
+{
+ return XAAPatternROP_PM[i];
+}
int
XAAHelpPatternROP(ScrnInfoPtr pScrn, int *fg, int *bg, int pm, int *rop)
diff --git a/hw/xfree86/xaa/xaaStipple.c b/hw/xfree86/xaa/xaaStipple.c
index 8b111d1cf..66d3a81e3 100644
--- a/hw/xfree86/xaa/xaaStipple.c
+++ b/hw/xfree86/xaa/xaaStipple.c
@@ -15,8 +15,10 @@ static CARD32* StippleOver32_Inverted(CARD32*, CARD32*, int, int, int);
#ifdef TRIPLE_BITS
#define stipple_scanline_func EXPNAME(XAAStippleScanlineFunc3)
+#define stipple_get_scanline_func EXPNAME(XAAGetStippleScanlineFunc3)
#else
#define stipple_scanline_func EXPNAME(XAAStippleScanlineFunc)
+#define stipple_get_scanline_func EXPNAME(XAAGetStippleScanlineFunc)
#endif
StippleScanlineProcPtr stipple_scanline_func[6] = {
@@ -28,6 +30,9 @@ StippleScanlineProcPtr stipple_scanline_func[6] = {
StippleOver32_Inverted
};
+StippleScanlineProcPtr *stipple_get_scanline_func(void) {
+ return stipple_scanline_func;
+}
#ifdef FIXEDBASE
# define DEST(i) *dest
diff --git a/hw/xfree86/xaa/xaaTEGlyph.c b/hw/xfree86/xaa/xaaTEGlyph.c
index 0fd572617..7a699fd1f 100644
--- a/hw/xfree86/xaa/xaaTEGlyph.c
+++ b/hw/xfree86/xaa/xaaTEGlyph.c
@@ -74,7 +74,7 @@ static CARD32 *DrawTETextScanlineWidth9(CARD32 *base, unsigned int **glyphp,
#endif
#define glyph_scanline_func EXPNAME(XAAGlyphScanlineFunc)
-
+#define glyph_get_scanline_func EXPNAME(XAAGetGlyphScanlineFunc)
GlyphScanlineFuncPtr glyph_scanline_func[32] = {
@@ -125,6 +125,10 @@ GlyphScanlineFuncPtr glyph_scanline_func[32] = {
DrawTETextScanlineGeneric, DrawTETextScanlineGeneric
};
+GlyphScanlineFuncPtr *glyph_get_scanline_func(void) {
+ return glyph_scanline_func;
+}
+
/********************************************************************
diff --git a/hw/xfree86/xaa/xaaWideLine.c b/hw/xfree86/xaa/xaaWideLine.c
index fedd8f44d..cbe5fe70f 100644
--- a/hw/xfree86/xaa/xaaWideLine.c
+++ b/hw/xfree86/xaa/xaaWideLine.c
@@ -1,5 +1,5 @@
/* $XFree86: xc/programs/Xserver/hw/xfree86/xaa/xaaWideLine.c,v 1.10 2001/11/16 16:47:56 dawes Exp $ */
-
+/* $XdotOrg: xc/programs/Xserver/hw/xfree86/xaa/xaaWideLine.c,v 1.3 2004/08/29 00:48:17 alanc Exp $ */
/*
XAAPolylinesWideSolid does not maintain a span list and subsequently does
@@ -15,7 +15,8 @@ Original mi code written by Keith Packard.
*/
#ifndef XFree86LOADER
-#if defined(_XOPEN_SOURCE) || defined(__QNXNTO__)
+#if defined(_XOPEN_SOURCE) || defined(__QNXNTO__) \
+ || (defined(sun) && defined(__SVR4))
#include <math.h>
#else
#define _XOPEN_SOURCE /* to get prototype for hypot on some systems */
diff --git a/hw/xfree86/xaa/xaalocal.h b/hw/xfree86/xaa/xaalocal.h
index 04d8d154a..883e64d5b 100644
--- a/hw/xfree86/xaa/xaalocal.h
+++ b/hw/xfree86/xaa/xaalocal.h
@@ -727,6 +727,11 @@ extern CARD32 *(*XAAGlyphScanlineFuncLSBFirst[32])(
CARD32 *base, unsigned int **glyphp, int line, int nglyph, int width
);
+GlyphScanlineFuncPtr *XAAGetGlyphScanlineFuncMSBFirstFixedBase(void);
+GlyphScanlineFuncPtr *XAAGetGlyphScanlineFuncMSBFirst(void);
+GlyphScanlineFuncPtr *XAAGetGlyphScanlineFuncLSBFirstFixedBase(void);
+GlyphScanlineFuncPtr *XAAGetGlyphScanlineFuncLSBFirst(void);
+
void
XAAFillColorExpandRectsLSBFirst(
ScrnInfoPtr pScrn,
@@ -1046,6 +1051,11 @@ extern CARD32 *(*XAAStippleScanlineFuncLSBFirst[6])(
CARD32* base, CARD32* src, int offset, int width, int dwords
);
+StippleScanlineProcPtr *XAAGetStippleScanlineFuncMSBFirstFixedBase(void);
+StippleScanlineProcPtr *XAAGetStippleScanlineFuncMSBFirst(void);
+StippleScanlineProcPtr *XAAGetStippleScanlineFuncLSBFirstFixedBase(void);
+StippleScanlineProcPtr *XAAGetStippleScanlineFuncLSBFirst(void);
+
int
XAAPolyText8TEColorExpansion(
DrawablePtr pDraw,
@@ -1506,6 +1516,9 @@ XAACacheMonoStipple(ScrnInfoPtr Scrn, PixmapPtr pPix);
XAACacheInfoPtr
XAACachePlanarMonoStipple(ScrnInfoPtr Scrn, PixmapPtr pPix);
+typedef XAACacheInfoPtr (*XAACachePlanarMonoStippleProc)(ScrnInfoPtr, PixmapPtr);
+XAACachePlanarMonoStippleProc XAAGetCachePlanarMonoStipple(void);
+
XAACacheInfoPtr
XAACacheStipple(ScrnInfoPtr Scrn, PixmapPtr pPix, int fg, int bg);
@@ -1623,13 +1636,17 @@ XAAGetPixelFromRGBA (
);
#endif
-
+/* XXX should be static */
extern GCOps XAAFallbackOps;
+extern GCOps *XAAGetFallbackOps(void);
extern GCFuncs XAAGCFuncs;
-extern int XAAScreenIndex;
-extern int XAAGCIndex;
-extern int XAAPixmapIndex;
+extern int XAAScreenIndex; /* XXX DONTUSE */
+extern int XAAGCIndex; /* XXX DONTUSE */
+extern int XAAPixmapIndex; /* XXX DONTUSE */
+extern int XAAGetScreenIndex(void);
+extern int XAAGetGCIndex(void);
+extern int XAAGetPixmapIndex(void);
extern unsigned int XAAShiftMasks[32];
@@ -1638,28 +1655,28 @@ extern unsigned int byte_expand3[256], byte_reversed_expand3[256];
CARD32 XAAReverseBitOrder(CARD32 data);
#define GET_XAASCREENPTR_FROM_SCREEN(pScreen)\
- (pScreen)->devPrivates[XAAScreenIndex].ptr
+ (pScreen)->devPrivates[XAAGetScreenIndex()].ptr
#define GET_XAASCREENPTR_FROM_GC(pGC)\
- (pGC)->pScreen->devPrivates[XAAScreenIndex].ptr
+ (pGC)->pScreen->devPrivates[XAAGetScreenIndex()].ptr
#define GET_XAASCREENPTR_FROM_DRAWABLE(pDraw)\
- (pDraw)->pScreen->devPrivates[XAAScreenIndex].ptr
+ (pDraw)->pScreen->devPrivates[XAAGetScreenIndex()].ptr
#define GET_XAAINFORECPTR_FROM_SCREEN(pScreen)\
- ((XAAScreenPtr)((pScreen)->devPrivates[XAAScreenIndex].ptr))->AccelInfoRec
+ ((XAAScreenPtr)((pScreen)->devPrivates[XAAGetScreenIndex()].ptr))->AccelInfoRec
#define GET_XAAINFORECPTR_FROM_GC(pGC)\
-((XAAScreenPtr)((pGC)->pScreen->devPrivates[XAAScreenIndex].ptr))->AccelInfoRec
+((XAAScreenPtr)((pGC)->pScreen->devPrivates[XAAGetScreenIndex()].ptr))->AccelInfoRec
#define GET_XAAINFORECPTR_FROM_DRAWABLE(pDraw)\
-((XAAScreenPtr)((pDraw)->pScreen->devPrivates[XAAScreenIndex].ptr))->AccelInfoRec
+((XAAScreenPtr)((pDraw)->pScreen->devPrivates[XAAGetScreenIndex()].ptr))->AccelInfoRec
#define GET_XAAINFORECPTR_FROM_SCRNINFOPTR(pScrn)\
-((XAAScreenPtr)((pScrn)->pScreen->devPrivates[XAAScreenIndex].ptr))->AccelInfoRec
+((XAAScreenPtr)((pScrn)->pScreen->devPrivates[XAAGetScreenIndex()].ptr))->AccelInfoRec
#define XAA_GET_PIXMAP_PRIVATE(pix)\
- (XAAPixmapPtr)((pix)->devPrivates[XAAPixmapIndex].ptr)
+ (XAAPixmapPtr)((pix)->devPrivates[XAAGetPixmapIndex()].ptr)
#define CHECK_RGB_EQUAL(c) (!((((c) >> 8) ^ (c)) & 0xffff))
diff --git a/hw/xfree86/xaa/xaarop.h b/hw/xfree86/xaa/xaarop.h
index 048ed00fc..1c95727b3 100644
--- a/hw/xfree86/xaa/xaarop.h
+++ b/hw/xfree86/xaa/xaarop.h
@@ -299,9 +299,15 @@
int XAAHelpSolidROP(ScrnInfoPtr pScrn, int *fg, int pm, int *rop);
int XAAHelpPatternROP(ScrnInfoPtr pScrn, int *fg, int *bg, int pm, int *rop);
+/* XXX These four should be static, but it breaks the 6.7.0 ABI. */
extern int XAACopyROP[16];
extern int XAACopyROP_PM[16];
extern int XAAPatternROP[16];
extern int XAAPatternROP_PM[16];
+extern int XAAGetCopyROP(int i);
+extern int XAAGetCopyROP_PM(int i);
+extern int XAAGetPatternROP(int i);
+extern int XAAGetPatternROP_PM(int i);
+
#endif /* _XAAROP_H */
diff --git a/hw/xfree86/xaa/xaawrap.h b/hw/xfree86/xaa/xaawrap.h
index 59f0a2cc7..5e3e0e683 100644
--- a/hw/xfree86/xaa/xaawrap.h
+++ b/hw/xfree86/xaa/xaawrap.h
@@ -2,14 +2,14 @@
#define XAA_SCREEN_PROLOGUE(pScreen, field)\
((pScreen)->field = \
- ((XAAScreenPtr) (pScreen)->devPrivates[XAAScreenIndex].ptr)->field)
+ ((XAAScreenPtr) (pScreen)->devPrivates[XAAGetScreenIndex()].ptr)->field)
#define XAA_SCREEN_EPILOGUE(pScreen, field, wrapper)\
((pScreen)->field = wrapper)
#define XAA_GC_FUNC_PROLOGUE(pGC)\
- XAAGCPtr pGCPriv = (XAAGCPtr) (pGC)->devPrivates[XAAGCIndex].ptr;\
+ XAAGCPtr pGCPriv = (XAAGCPtr) (pGC)->devPrivates[XAAGetGCIndex()].ptr;\
(pGC)->funcs = pGCPriv->wrapFuncs;\
if(pGCPriv->flags)\
(pGC)->ops = pGCPriv->wrapOps
@@ -25,13 +25,13 @@
#define XAA_GC_OP_PROLOGUE(pGC)\
- XAAGCPtr pGCPriv = (XAAGCPtr)(pGC->devPrivates[XAAGCIndex].ptr);\
+ XAAGCPtr pGCPriv = (XAAGCPtr)(pGC->devPrivates[XAAGetGCIndex()].ptr);\
GCFuncs *oldFuncs = pGC->funcs;\
pGC->funcs = pGCPriv->wrapFuncs;\
pGC->ops = pGCPriv->wrapOps
#define XAA_GC_OP_PROLOGUE_WITH_RETURN(pGC)\
- XAAGCPtr pGCPriv = (XAAGCPtr)(pGC->devPrivates[XAAGCIndex].ptr);\
+ XAAGCPtr pGCPriv = (XAAGCPtr)(pGC->devPrivates[XAAGetGCIndex()].ptr);\
GCFuncs *oldFuncs = pGC->funcs;\
if(!REGION_NUM_RECTS(pGC->pCompositeClip)) return; \
pGC->funcs = pGCPriv->wrapFuncs;\
@@ -45,7 +45,7 @@
#define XAA_PIXMAP_OP_PROLOGUE(pGC, pDraw)\
- XAAGCPtr pGCPriv = (XAAGCPtr)(pGC->devPrivates[XAAGCIndex].ptr);\
+ XAAGCPtr pGCPriv = (XAAGCPtr)(pGC->devPrivates[XAAGetGCIndex()].ptr);\
XAAPixmapPtr pixPriv = XAA_GET_PIXMAP_PRIVATE((PixmapPtr)(pDraw));\
GCFuncs *oldFuncs = pGC->funcs;\
pGC->funcs = pGCPriv->wrapFuncs;\
@@ -61,7 +61,7 @@
#ifdef RENDER
#define XAA_RENDER_PROLOGUE(pScreen,field)\
(GetPictureScreen(pScreen)->field = \
- ((XAAScreenPtr) (pScreen)->devPrivates[XAAScreenIndex].ptr)->field)
+ ((XAAScreenPtr) (pScreen)->devPrivates[XAAGetScreenIndex()].ptr)->field)
#define XAA_RENDER_EPILOGUE(pScreen, field, wrapper)\
(GetPictureScreen(pScreen)->field = wrapper)
@@ -71,7 +71,7 @@
#define SYNC_CHECK(pGC) {\
XAAInfoRecPtr infoRec =\
-((XAAScreenPtr)((pGC)->pScreen->devPrivates[XAAScreenIndex].ptr))->AccelInfoRec;\
+((XAAScreenPtr)((pGC)->pScreen->devPrivates[XAAGetScreenIndex()].ptr))->AccelInfoRec;\
if(infoRec->NeedToSync) {\
(*infoRec->Sync)(infoRec->pScrn);\
infoRec->NeedToSync = FALSE;\
diff --git a/hw/xfree86/xf1bpp/mfbmap.h b/hw/xfree86/xf1bpp/mfbmap.h
index a29332497..bf04b7320 100644
--- a/hw/xfree86/xf1bpp/mfbmap.h
+++ b/hw/xfree86/xf1bpp/mfbmap.h
@@ -34,13 +34,21 @@
#define mfbDoBitbltGeneral xf1bppDoBitbltGeneral
#define mfbDoBitbltOr xf1bppDoBitbltOr
#define mfbDoBitbltXor xf1bppDoBitbltXor
+#define mfbFillInScreen xf1bppFillInScreen
#define mfbFillPolyBlack xf1bppFillPolyBlack
#define mfbFillPolyInvert xf1bppFillPolyInvert
#define mfbFillPolyWhite xf1bppFillPolyWhite
#define mfbGCPrivateIndex xf1bppGCPrivateIndex
+#define mfbGetGCPrivateIndex xf1bppGetGCPrivateIndex
#define mfbGetImage xf1bppGetImage
#define mfbGetSpans xf1bppGetSpans
#define mfbGetWindowPixmap xf1bppGetWindowPixmap
+#define mfbGetWindowPrivateIndex xf1bppGetWindowPrivateIndex
+#define mfbGetmask xf1bppGetmask
+#define mfbGetpartmasks xf1bppGetpartmasks
+#define mfbGetrmask xf1bppGetrmask
+#define mfbGetstarttab xf1bppGetstarttab
+#define mfbGetendtab xf1bppGetendtab
#define mfbHorzS xf1bppHorzS
#define mfbImageGlyphBltBlack xf1bppImageGlyphBltBlack
#define mfbImageGlyphBltWhite xf1bppImageGlyphBltWhite
diff --git a/hw/xfree86/xf1bpp/mfbmodule.c b/hw/xfree86/xf1bpp/mfbmodule.c
index 4fb795152..81baf5d7e 100644
--- a/hw/xfree86/xf1bpp/mfbmodule.c
+++ b/hw/xfree86/xf1bpp/mfbmodule.c
@@ -35,7 +35,7 @@ static XF86ModuleVersionInfo VersRec =
MODULEVENDORSTRING,
MODINFOSTRING1,
MODINFOSTRING2,
- XF86_VERSION_CURRENT,
+ XORG_VERSION_CURRENT,
1, 0, 0,
ABI_CLASS_ANSIC, /* Only need ansic layer */
ABI_ANSIC_VERSION,
diff --git a/hw/xfree86/xf4bpp/mfbbres.c b/hw/xfree86/xf4bpp/mfbbres.c
index 82b17e59e..ae9df6e10 100644
--- a/hw/xfree86/xf4bpp/mfbbres.c
+++ b/hw/xfree86/xf4bpp/mfbbres.c
@@ -79,8 +79,8 @@ int len; /* length of line */
register PixelType *addrl; /* bitmask long pointer
*dont* * cast to char pointer */
register PixelType bit; /* current bit being set/cleared/etc. */
- PixelType leftbit = mask[0]; /* leftmost bit to process in new word */
- PixelType rightbit = mask[PPW-1]; /* rightmost bit to process in new word */
+ PixelType leftbit = mfbGetmask(0); /* leftmost bit to process in new word */
+ PixelType rightbit = mfbGetmask(PPW-1); /* rightmost bit to process in new word */
register int e3 = e2-e1;
@@ -88,7 +88,7 @@ int len; /* length of line */
addrl = mfbScanline(addrlbase, x1, y1, nlwidth);
yinc = signdy * nlwidth;
e = e-e1; /* to make looping easier */
- bit = mask[x1 & PIM];
+ bit = mfbGetmask(x1 & PIM);
if (!len)
return;
diff --git a/hw/xfree86/xf4bpp/mfbbresd.c b/hw/xfree86/xf4bpp/mfbbresd.c
index 29b816a3a..0f320ebc6 100644
--- a/hw/xfree86/xf4bpp/mfbbresd.c
+++ b/hw/xfree86/xf4bpp/mfbbresd.c
@@ -102,8 +102,8 @@ int len; /* length of line */
register PixelType *addrl;
register int e3 = e2-e1;
register unsigned long bit;
- PixelType leftbit = mask[0]; /* leftmost bit to process in new word */
- PixelType rightbit = mask[PPW-1]; /* rightmost bit to process in new word */
+ PixelType leftbit = mfbGetmask(0); /* leftmost bit to process in new word */
+ PixelType rightbit = mfbGetmask(PPW-1); /* rightmost bit to process in new word */
int dashIndex;
int dashOffset;
int dashRemaining;
@@ -125,7 +125,7 @@ int len; /* length of line */
addrl = mfbScanline(addrlbase, x1, y1, nlwidth);
yinc = signdy * nlwidth;
e = e-e1; /* to make looping easier */
- bit = mask[x1 & PIM];
+ bit = mfbGetmask(x1 & PIM);
if (axis == X_AXIS)
{
if (signdx > 0)
diff --git a/hw/xfree86/xf4bpp/mfbfillarc.c b/hw/xfree86/xf4bpp/mfbfillarc.c
index 5d677174d..c3f62cb64 100644
--- a/hw/xfree86/xf4bpp/mfbfillarc.c
+++ b/hw/xfree86/xf4bpp/mfbfillarc.c
@@ -252,7 +252,7 @@ xf4bppPolyFillArcSolid
mfbPrivGC *priv;
int rop;
- priv = (mfbPrivGC *) pGC->devPrivates[mfbGCPrivateIndex].ptr;
+ priv = (mfbPrivGC *) pGC->devPrivates[mfbGetGCPrivateIndex()].ptr;
rop = priv->rop;
if ((rop == RROP_NOP) || !(pGC->planemask & 1))
#else
diff --git a/hw/xfree86/xf4bpp/mfbhrzvert.c b/hw/xfree86/xf4bpp/mfbhrzvert.c
index c53edd19d..0e5594356 100644
--- a/hw/xfree86/xf4bpp/mfbhrzvert.c
+++ b/hw/xfree86/xf4bpp/mfbhrzvert.c
@@ -128,6 +128,6 @@ register int len; /* length of line */
len = -len;
}
- bitmask = mask[x1 & PIM];
+ bitmask = mfbGetmask(x1 & PIM);
Duff(len, UPDRW(addrl,bitmask); addrl += nlwidth);
}
diff --git a/hw/xfree86/xf4bpp/mfbimggblt.c b/hw/xfree86/xf4bpp/mfbimggblt.c
index b4f5bd014..95d7a7fcb 100644
--- a/hw/xfree86/xf4bpp/mfbimggblt.c
+++ b/hw/xfree86/xf4bpp/mfbimggblt.c
@@ -148,7 +148,7 @@ xf4bppImageGlyphBlt(pDrawable, pGC, x, y, nglyph, ppci, pglyphBase)
backrect.height = FONTASCENT(pGC->font) + FONTDESCENT(pGC->font);
- pPrivGC = pGC->devPrivates[mfbGCPrivateIndex].ptr;
+ pPrivGC = pGC->devPrivates[mfbGetGCPrivateIndex()].ptr;
oldfillStyle = pPrivGC->colorRrop.fillStyle; /* GJA */
oldfg = pPrivGC->colorRrop.fgPixel; /* GJA */
oldalu = pPrivGC->colorRrop.alu; /* GJA */
@@ -243,7 +243,7 @@ doImageGlyphBlt(pDrawable, pGC, x, y, nglyph, ppci, pglyphBase,infop)
/* UNCLEAN CODE
we know the mfbPolyFillRect uses only three fields in
- devPrivate[mfbGCPrivateIndex].ptr, two of which (the rotated
+ devPrivate[mfbGetGCPrivateIndex()].ptr, two of which (the rotated
tile/stipple and the ropFillArea) are
irrelevant for solid filling, so we just poke the FillArea
field. the GC is now in an inconsistent state, but we'll fix
@@ -253,7 +253,7 @@ doImageGlyphBlt(pDrawable, pGC, x, y, nglyph, ppci, pglyphBase,infop)
NOTE:
if you are not using the standard mfbFillRectangle code, you
need to poke any fields in the GC the rectangle stuff need
- (probably alu, fgPixel, and fillStyle) and in devPrivate[mfbGCPrivateIndex].ptr
+ (probably alu, fgPixel, and fillStyle) and in devPrivate[mfbGetGCPrivateIndex()].ptr
(probably rop or ropFillArea.) You could just call ValidateGC,
but that is usually not a cheap thing to do.
*/
diff --git a/hw/xfree86/xf4bpp/mfbline.c b/hw/xfree86/xf4bpp/mfbline.c
index b200a611e..356028b8c 100644
--- a/hw/xfree86/xf4bpp/mfbline.c
+++ b/hw/xfree86/xf4bpp/mfbline.c
@@ -466,9 +466,9 @@ DoV16LineSS (pDrawable, pGC, mode, npt, pptInit)
PixelType _mask;
if (alu == RROP_BLACK)
- _mask = rmask[x2 & PIM];
+ _mask = mfbGetrmask(x2 & PIM);
else
- _mask = mask[x2 & PIM];
+ _mask = mfbGetmask(x2 & PIM);
nbox = nboxInit;
pbox = pboxInit;
@@ -797,7 +797,7 @@ dontStep: ;
{
unsigned long _mask;
- _mask = mask[x2 & PIM];
+ _mask = mfbGetmask(x2 & PIM);
addrl = mfbScanline(addrl, x2, y2, nlwidth);
UPDRW(addrl,_mask);
break;
diff --git a/hw/xfree86/xf4bpp/mfbzerarc.c b/hw/xfree86/xf4bpp/mfbzerarc.c
index 106fc6ae5..4853f8807 100644
--- a/hw/xfree86/xf4bpp/mfbzerarc.c
+++ b/hw/xfree86/xf4bpp/mfbzerarc.c
@@ -108,7 +108,7 @@ v16ZeroArcSS
int pmask;
register int *paddr;
- if (((mfbPrivGC *)(pGC->devPrivates[mfbGCPrivateIndex].ptr))->rop ==
+ if (((mfbPrivGC *)(pGC->devPrivates[mfbGetGCPrivateIndex()].ptr))->rop ==
RROP_BLACK)
pixel = 0;
else
diff --git a/hw/xfree86/xf4bpp/ppcArea.c b/hw/xfree86/xf4bpp/ppcArea.c
index 0d1a2075b..663672878 100644
--- a/hw/xfree86/xf4bpp/ppcArea.c
+++ b/hw/xfree86/xf4bpp/ppcArea.c
@@ -47,7 +47,7 @@ int alu ;
unsigned long int fg, bg, pm ;
int xSrc, ySrc ;
PixmapPtr pPixmap ;
-ppcPrivGC *pPrivGC = pGC->devPrivates[mfbGCPrivateIndex].ptr;
+ppcPrivGC *pPrivGC = pGC->devPrivates[mfbGetGCPrivateIndex()].ptr;
TRACE( ( "xf4bppFillArea(0x%x,%d,0x%x,0x%x)\n", pWin, nboxes, pBox, pGC ) ) ;
diff --git a/hw/xfree86/xf4bpp/ppcGC.c b/hw/xfree86/xf4bpp/ppcGC.c
index bbc64c97c..881dfbf05 100644
--- a/hw/xfree86/xf4bpp/ppcGC.c
+++ b/hw/xfree86/xf4bpp/ppcGC.c
@@ -184,7 +184,7 @@ register GCPtr pGC ;
* a pointer to a ppcPrivGC in its slot.
*/
*pPriv = vgaPrototypeGCPriv;
- (pGC->devPrivates[mfbGCPrivateIndex].ptr) = (pointer) pPriv;
+ (pGC->devPrivates[mfbGetGCPrivateIndex()].ptr) = (pointer) pPriv;
/* Set the vgaGCOps */
*pOps = vgaGCOps;
@@ -210,7 +210,7 @@ xf4bppDestroyGC( pGC )
if ( pGC->freeCompClip && pGC->pCompositeClip )
REGION_DESTROY(pGC->pScreen, pGC->pCompositeClip);
if(pGC->ops->devPrivate.val) xfree( pGC->ops );
- xfree( pGC->devPrivates[mfbGCPrivateIndex].ptr ) ;
+ xfree( pGC->devPrivates[mfbGetGCPrivateIndex()].ptr ) ;
return ;
}
@@ -221,7 +221,7 @@ ppcChangePixmapGC
register Mask changes
)
{
-register ppcPrivGCPtr devPriv = (ppcPrivGCPtr) (pGC->devPrivates[mfbGCPrivateIndex].ptr ) ;
+register ppcPrivGCPtr devPriv = (ppcPrivGCPtr) (pGC->devPrivates[mfbGetGCPrivateIndex()].ptr ) ;
register unsigned long int idx ; /* used for stepping through bitfields */
#define LOWBIT( x ) ( x & - x ) /* Two's complement */
@@ -303,7 +303,7 @@ xf4bppValidateGC( pGC, changes, pDrawable )
register ppcPrivGCPtr devPriv ;
WindowPtr pWin ;
- devPriv = (ppcPrivGCPtr) (pGC->devPrivates[mfbGCPrivateIndex].ptr ) ;
+ devPriv = (ppcPrivGCPtr) (pGC->devPrivates[mfbGetGCPrivateIndex()].ptr ) ;
if ( pDrawable->type != devPriv->lastDrawableType ) {
devPriv->lastDrawableType = pDrawable->type ;
diff --git a/hw/xfree86/xf4bpp/ppcIO.c b/hw/xfree86/xf4bpp/ppcIO.c
index 02019b19a..6b6fb1c09 100644
--- a/hw/xfree86/xf4bpp/ppcIO.c
+++ b/hw/xfree86/xf4bpp/ppcIO.c
@@ -209,22 +209,16 @@ xf4bppScreenInit( pScreen, pbits, virtx, virty, dpix, dpiy, width )
pScreen-> CreateWindow = xf4bppCreateWindowForXYhardware;
pScreen-> DestroyWindow = xf4bppDestroyWindow;
pScreen-> PositionWindow = xf4bppPositionWindow;
- pScreen-> ChangeWindowAttributes = mfbChangeWindowAttributes;
- pScreen-> RealizeWindow = mfbMapWindow;
- pScreen-> UnrealizeWindow = mfbUnmapWindow;
pScreen-> PaintWindowBackground = xf4bppPaintWindow;
pScreen-> PaintWindowBorder = xf4bppPaintWindow;
pScreen-> CopyWindow = xf4bppCopyWindow;
pScreen-> CreatePixmap = xf4bppCreatePixmap;
- pScreen-> DestroyPixmap = mfbDestroyPixmap;
pScreen-> SaveDoomedAreas = (SaveDoomedAreasProcPtr)NoopDDA;
pScreen-> RestoreAreas = (RestoreAreasProcPtr)NoopDDA;
pScreen-> ExposeCopy = (ExposeCopyProcPtr)NoopDDA;
pScreen-> TranslateBackingStore = (TranslateBackingStoreProcPtr)NoopDDA;
pScreen-> ClearBackingStore = (ClearBackingStoreProcPtr)NoopDDA;
pScreen-> DrawGuarantee = (DrawGuaranteeProcPtr)NoopDDA;
- pScreen-> RealizeFont = mfbRealizeFont;
- pScreen-> UnrealizeFont = mfbUnrealizeFont;
pScreen-> CreateGC = xf4bppCreateGC;
pScreen-> CreateColormap = xf4bppInitializeColormap;
pScreen-> DestroyColormap = (DestroyColormapProcPtr)NoopDDA;
@@ -233,7 +227,7 @@ xf4bppScreenInit( pScreen, pbits, virtx, virty, dpix, dpiy, width )
pScreen-> ListInstalledColormaps = miListInstalledColormaps;
pScreen-> StoreColors = (StoreColorsProcPtr)NoopDDA;
pScreen-> ResolveColor = xf4bppResolveColor;
- pScreen-> BitmapToRegion = mfbPixmapToRegion;
+ mfbFillInScreen(pScreen);
if (!mfbAllocatePrivates(pScreen, (int*)NULL, (int*)NULL))
return FALSE;
diff --git a/hw/xfree86/xf4bpp/ppcPixFS.c b/hw/xfree86/xf4bpp/ppcPixFS.c
index 66b547e59..957a88135 100644
--- a/hw/xfree86/xf4bpp/ppcPixFS.c
+++ b/hw/xfree86/xf4bpp/ppcPixFS.c
@@ -122,7 +122,7 @@ xf4bppSolidPixmapFS( pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted )
return ;
}
- if ( ( alu = ( (ppcPrivGC *) pGC->devPrivates[mfbGCPrivateIndex].ptr )->colorRrop.alu ) == GXnoop )
+ if ( ( alu = ( (ppcPrivGC *) pGC->devPrivates[mfbGetGCPrivateIndex()].ptr )->colorRrop.alu ) == GXnoop )
return ;
n = nInit * miFindMaxBand(pGC->pCompositeClip) ;
@@ -140,8 +140,8 @@ xf4bppSolidPixmapFS( pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted )
n = miClipSpans( pGC->pCompositeClip, pptInit, pwidthInit, nInit,
ppt, pwidth, fSorted ) ;
- pm = ( (ppcPrivGC *) pGC->devPrivates[mfbGCPrivateIndex].ptr )->colorRrop.planemask ;
- fg = ( (ppcPrivGC *) pGC->devPrivates[mfbGCPrivateIndex].ptr )->colorRrop.fgPixel ;
+ pm = ( (ppcPrivGC *) pGC->devPrivates[mfbGetGCPrivateIndex()].ptr )->colorRrop.planemask ;
+ fg = ( (ppcPrivGC *) pGC->devPrivates[mfbGetGCPrivateIndex()].ptr )->colorRrop.fgPixel ;
npm = ( ~ pm ) & ( ( 1 << pDrawable->depth ) - 1 ) ;
for ( ; n-- ; ppt++, pwidth++ ) {
@@ -257,14 +257,14 @@ int fSorted ;
return ;
}
- if ( ( alu = ( (ppcPrivGC *) pGC->devPrivates[mfbGCPrivateIndex].ptr )->colorRrop.alu ) == GXnoop )
+ if ( ( alu = ( (ppcPrivGC *) pGC->devPrivates[mfbGetGCPrivateIndex()].ptr )->colorRrop.alu ) == GXnoop )
return ;
SETSPANPTRS( nInit, n, pwidthInit, pwidthFree, pptInit,
pptFree, pwidth, ppt, fSorted ) ;
- pm = ( (ppcPrivGC *) pGC->devPrivates[mfbGCPrivateIndex].ptr )->colorRrop.planemask ;
- fg = ( (ppcPrivGC *) pGC->devPrivates[mfbGCPrivateIndex].ptr )->colorRrop.fgPixel ;
+ pm = ( (ppcPrivGC *) pGC->devPrivates[mfbGetGCPrivateIndex()].ptr )->colorRrop.planemask ;
+ fg = ( (ppcPrivGC *) pGC->devPrivates[mfbGetGCPrivateIndex()].ptr )->colorRrop.fgPixel ;
pTile = pGC->stipple ;
tlwidth = pTile->devKind ;
@@ -356,15 +356,15 @@ int fSorted ;
return ;
}
- if ( ( alu = ( (ppcPrivGC *) pGC->devPrivates[mfbGCPrivateIndex].ptr )->colorRrop.alu ) == GXnoop )
+ if ( ( alu = ( (ppcPrivGC *) pGC->devPrivates[mfbGetGCPrivateIndex()].ptr )->colorRrop.alu ) == GXnoop )
return ;
SETSPANPTRS( nInit, n, pwidthInit, pwidthFree, pptInit,
pptFree, pwidth, ppt, fSorted ) ;
- fg = ( (ppcPrivGC *) pGC->devPrivates[mfbGCPrivateIndex].ptr )->colorRrop.fgPixel ;
- bg = ( (ppcPrivGC *) pGC->devPrivates[mfbGCPrivateIndex].ptr )->colorRrop.bgPixel ;
- pm = ( (ppcPrivGC *) pGC->devPrivates[mfbGCPrivateIndex].ptr )->colorRrop.planemask ;
+ fg = ( (ppcPrivGC *) pGC->devPrivates[mfbGetGCPrivateIndex()].ptr )->colorRrop.fgPixel ;
+ bg = ( (ppcPrivGC *) pGC->devPrivates[mfbGetGCPrivateIndex()].ptr )->colorRrop.bgPixel ;
+ pm = ( (ppcPrivGC *) pGC->devPrivates[mfbGetGCPrivateIndex()].ptr )->colorRrop.planemask ;
npm = ( ~ pm ) & ( ( 1 << pDrawable->depth ) - 1 ) ;
pTile = pGC->stipple ;
@@ -459,14 +459,14 @@ int fSorted ;
return ;
}
- if ( ( alu = ( (ppcPrivGC *) pGC->devPrivates[mfbGCPrivateIndex].ptr )->colorRrop.alu ) == GXnoop )
+ if ( ( alu = ( (ppcPrivGC *) pGC->devPrivates[mfbGetGCPrivateIndex()].ptr )->colorRrop.alu ) == GXnoop )
return ;
SETSPANPTRS( nInit, n, pwidthInit, pwidthFree, pptInit,
pptFree, pwidth, ppt, fSorted ) ;
/* the following code is for 8 bits per pixel addressable memory only */
- pm = ( (ppcPrivGC *) pGC->devPrivates[mfbGCPrivateIndex].ptr )->colorRrop.planemask ;
+ pm = ( (ppcPrivGC *) pGC->devPrivates[mfbGetGCPrivateIndex()].ptr )->colorRrop.planemask ;
npm = ( ~ pm ) & ( ( 1 << pDrawable->depth ) - 1 ) ;
pTile = pGC->tile.pixmap ;
tileWidth = pTile->drawable.width ;
diff --git a/hw/xfree86/xf4bpp/ppcPntWin.c b/hw/xfree86/xf4bpp/ppcPntWin.c
index 65ff055d2..f68dbdc19 100644
--- a/hw/xfree86/xf4bpp/ppcPntWin.c
+++ b/hw/xfree86/xf4bpp/ppcPntWin.c
@@ -98,7 +98,7 @@ xf4bppPaintWindow(pWin, pRegion, what)
{
register mfbPrivWin *pPrivWin;
- pPrivWin = (mfbPrivWin *)(pWin->devPrivates[mfbWindowPrivateIndex].ptr);
+ pPrivWin = (mfbPrivWin *)(pWin->devPrivates[mfbGetWindowPrivateIndex()].ptr);
TRACE(("xf4bppPaintWindow( pWin= 0x%x, pRegion= 0x%x, what= %d )\n",
pWin,pRegion,what));
diff --git a/hw/xfree86/xf4bpp/ppcPolyPnt.c b/hw/xfree86/xf4bpp/ppcPolyPnt.c
index 736d128c6..568902925 100644
--- a/hw/xfree86/xf4bpp/ppcPolyPnt.c
+++ b/hw/xfree86/xf4bpp/ppcPolyPnt.c
@@ -100,7 +100,7 @@ if ( pDrawable->type == DRAWABLE_PIXMAP ) {
return ;
}
-devPriv = (ppcPrivGC *) ( pGC->devPrivates[mfbGCPrivateIndex].ptr ) ;
+devPriv = (ppcPrivGC *) ( pGC->devPrivates[mfbGetGCPrivateIndex()].ptr ) ;
if ( ( alu = devPriv->colorRrop.alu ) == GXnoop )
return ;
diff --git a/hw/xfree86/xf4bpp/ppcWinFS.c b/hw/xfree86/xf4bpp/ppcWinFS.c
index ff59fccff..d7fd6b790 100644
--- a/hw/xfree86/xf4bpp/ppcWinFS.c
+++ b/hw/xfree86/xf4bpp/ppcWinFS.c
@@ -94,7 +94,7 @@ xf4bppSolidWindowFS( pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted )
return ;
}
- if ( ( alu = ( (ppcPrivGC *) pGC->devPrivates[mfbGCPrivateIndex].ptr )->colorRrop.alu ) == GXnoop )
+ if ( ( alu = ( (ppcPrivGC *) pGC->devPrivates[mfbGetGCPrivateIndex()].ptr )->colorRrop.alu ) == GXnoop )
return ;
n = nInit * miFindMaxBand( pGC->pCompositeClip ) ;
@@ -112,8 +112,8 @@ xf4bppSolidWindowFS( pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted )
n = miClipSpans( pGC->pCompositeClip, pptInit, pwidthInit, nInit,
ppt, pwidth, fSorted ) ;
- pm = ( (ppcPrivGC *) pGC->devPrivates[mfbGCPrivateIndex].ptr )->colorRrop.planemask ;
- fg = ( (ppcPrivGC *) pGC->devPrivates[mfbGCPrivateIndex].ptr )->colorRrop.fgPixel ;
+ pm = ( (ppcPrivGC *) pGC->devPrivates[mfbGetGCPrivateIndex()].ptr )->colorRrop.planemask ;
+ fg = ( (ppcPrivGC *) pGC->devPrivates[mfbGetGCPrivateIndex()].ptr )->colorRrop.fgPixel ;
for ( ; n-- ; ppt++, pwidth++ )
if ( *pwidth )
@@ -161,14 +161,14 @@ int fSorted ;
return ;
}
- if ( ( alu = ( (ppcPrivGC *) pGC->devPrivates[mfbGCPrivateIndex].ptr )->colorRrop.alu ) == GXnoop )
+ if ( ( alu = ( (ppcPrivGC *) pGC->devPrivates[mfbGetGCPrivateIndex()].ptr )->colorRrop.alu ) == GXnoop )
return ;
SETSPANPTRS( nInit, n, pwidthInit, pwidthFree, pptInit,
pptFree, pwidth, ppt, fSorted ) ;
- pm = ( (ppcPrivGC *) pGC->devPrivates[mfbGCPrivateIndex].ptr )->colorRrop.planemask ;
- fg = ( (ppcPrivGC *) pGC->devPrivates[mfbGCPrivateIndex].ptr )->colorRrop.fgPixel ;
+ pm = ( (ppcPrivGC *) pGC->devPrivates[mfbGetGCPrivateIndex()].ptr )->colorRrop.planemask ;
+ fg = ( (ppcPrivGC *) pGC->devPrivates[mfbGetGCPrivateIndex()].ptr )->colorRrop.fgPixel ;
xSrc = pGC->patOrg.x + pDrawable->x ;
ySrc = pGC->patOrg.y + pDrawable->y ;
@@ -213,15 +213,15 @@ int fSorted ;
return ;
}
- if ( ( alu = ( (ppcPrivGC *) pGC->devPrivates[mfbGCPrivateIndex].ptr )->colorRrop.alu ) == GXnoop )
+ if ( ( alu = ( (ppcPrivGC *) pGC->devPrivates[mfbGetGCPrivateIndex()].ptr )->colorRrop.alu ) == GXnoop )
return ;
SETSPANPTRS( nInit, n, pwidthInit, pwidthFree, pptInit,
pptFree, pwidth, ppt, fSorted ) ;
- pm = ( (ppcPrivGC *) pGC->devPrivates[mfbGCPrivateIndex].ptr )->colorRrop.planemask ;
- fg = ( (ppcPrivGC *) pGC->devPrivates[mfbGCPrivateIndex].ptr )->colorRrop.fgPixel ;
- bg = ( (ppcPrivGC *) pGC->devPrivates[mfbGCPrivateIndex].ptr )->colorRrop.bgPixel ;
+ pm = ( (ppcPrivGC *) pGC->devPrivates[mfbGetGCPrivateIndex()].ptr )->colorRrop.planemask ;
+ fg = ( (ppcPrivGC *) pGC->devPrivates[mfbGetGCPrivateIndex()].ptr )->colorRrop.fgPixel ;
+ bg = ( (ppcPrivGC *) pGC->devPrivates[mfbGetGCPrivateIndex()].ptr )->colorRrop.bgPixel ;
xSrc = pGC->patOrg.x + pDrawable->x ;
ySrc = pGC->patOrg.y + pDrawable->y ;
@@ -258,7 +258,7 @@ int fSorted ;
TRACE( ( "xf4bppTileWindowFS(pDrawable=0x%x,pGC=0x%x,nInit=%d,pptInit=0x%x,pwidthInit=0x%x,fSorted=%d)\n",
pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted ) ) ;
- if ( ( alu = ( (ppcPrivGC *) pGC->devPrivates[mfbGCPrivateIndex].ptr )->colorRrop.alu ) == GXnoop )
+ if ( ( alu = ( (ppcPrivGC *) pGC->devPrivates[mfbGetGCPrivateIndex()].ptr )->colorRrop.alu ) == GXnoop )
return ;
SETSPANPTRS( nInit, n, pwidthInit, pwidthFree, pptInit,
@@ -266,7 +266,7 @@ int fSorted ;
xSrc = pGC->patOrg.x + pDrawable->x ;
ySrc = pGC->patOrg.y + pDrawable->y ;
- pm = ( (ppcPrivGC *) pGC->devPrivates[mfbGCPrivateIndex].ptr )->colorRrop.planemask ;
+ pm = ( (ppcPrivGC *) pGC->devPrivates[mfbGetGCPrivateIndex()].ptr )->colorRrop.planemask ;
for ( ; n-- ; ppt++, pwidth++ )
xf4bppTileRect( (WindowPtr)pDrawable, pGC->tile.pixmap, alu, pm,
diff --git a/hw/xfree86/xf4bpp/ppcWindow.c b/hw/xfree86/xf4bpp/ppcWindow.c
index a1c7afd9d..c15962aaf 100644
--- a/hw/xfree86/xf4bpp/ppcWindow.c
+++ b/hw/xfree86/xf4bpp/ppcWindow.c
@@ -214,7 +214,7 @@ register WindowPtr pWin ;
TRACE(("xf4bppCreateWindowForXYhardware (pWin= 0x%x)\n", pWin));
- pPrivWin = (mfbPrivWin *)(pWin->devPrivates[mfbWindowPrivateIndex].ptr);
+ pPrivWin = (mfbPrivWin *)(pWin->devPrivates[mfbGetWindowPrivateIndex()].ptr);
pPrivWin->pRotatedBorder = NullPixmap;
pPrivWin->pRotatedBackground = NullPixmap;
pPrivWin->fastBackground = 0;
diff --git a/hw/xfree86/xf4bpp/vgaGC.c b/hw/xfree86/xf4bpp/vgaGC.c
index 39597d268..a1aecafbb 100644
--- a/hw/xfree86/xf4bpp/vgaGC.c
+++ b/hw/xfree86/xf4bpp/vgaGC.c
@@ -106,7 +106,7 @@ xf4bppChangeWindowGC( pGC, changes )
register GC *pGC ;
register Mask changes ;
{
-register ppcPrivGCPtr devPriv = (ppcPrivGCPtr) (pGC->devPrivates[mfbGCPrivateIndex].ptr) ;
+register ppcPrivGCPtr devPriv = (ppcPrivGCPtr) (pGC->devPrivates[mfbGetGCPrivateIndex()].ptr) ;
register unsigned long int idx ; /* used for stepping through bitfields */
#define LOWBIT( x ) ( x & - x ) /* Two's complement */
diff --git a/hw/xfree86/xf4bpp/vgamodule.c b/hw/xfree86/xf4bpp/vgamodule.c
index c7cf1b7d3..828989dd5 100644
--- a/hw/xfree86/xf4bpp/vgamodule.c
+++ b/hw/xfree86/xf4bpp/vgamodule.c
@@ -36,7 +36,7 @@ static XF86ModuleVersionInfo VersRec =
MODULEVENDORSTRING,
MODINFOSTRING1,
MODINFOSTRING2,
- XF86_VERSION_CURRENT,
+ XORG_VERSION_CURRENT,
1, 0, 0,
ABI_CLASS_ANSIC, /* Only need ansic layer */
ABI_ANSIC_VERSION,
diff --git a/hw/xfree86/xf8_16bpp/cfb8_16.h b/hw/xfree86/xf8_16bpp/cfb8_16.h
index a4a3bda22..97586ba01 100644
--- a/hw/xfree86/xf8_16bpp/cfb8_16.h
+++ b/hw/xfree86/xf8_16bpp/cfb8_16.h
@@ -14,7 +14,8 @@ typedef struct {
unsigned char key;
} cfb8_16ScreenRec, *cfb8_16ScreenPtr;
-extern int cfb8_16ScreenPrivateIndex;
+extern int cfb8_16ScreenPrivateIndex; /* XXX */
+extern int cfb8_16GetScreenPrivateIndex(void);
Bool
cfb8_16ScreenInit (
@@ -64,6 +65,6 @@ cfb8_16WindowExposures(
);
#define CFB8_16_GET_SCREEN_PRIVATE(pScreen)\
- (cfb8_16ScreenPtr)((pScreen)->devPrivates[cfb8_16ScreenPrivateIndex].ptr)
+ (cfb8_16ScreenPtr)((pScreen)->devPrivates[cfb8_16GetScreenPrivateIndex()].ptr)
#endif /* _CFB8_16_H */
diff --git a/hw/xfree86/xf8_16bpp/cfb8_16module.c b/hw/xfree86/xf8_16bpp/cfb8_16module.c
index b2b126d95..1a034980a 100644
--- a/hw/xfree86/xf8_16bpp/cfb8_16module.c
+++ b/hw/xfree86/xf8_16bpp/cfb8_16module.c
@@ -12,7 +12,7 @@ static XF86ModuleVersionInfo VersRec =
MODULEVENDORSTRING,
MODINFOSTRING1,
MODINFOSTRING2,
- XF86_VERSION_CURRENT,
+ XORG_VERSION_CURRENT,
1, 0, 0,
ABI_CLASS_ANSIC, /* Only need the ansic layer */
ABI_ANSIC_VERSION,
diff --git a/hw/xfree86/xf8_16bpp/cfbscrinit.c b/hw/xfree86/xf8_16bpp/cfbscrinit.c
index cb4b8d726..e8d911db4 100644
--- a/hw/xfree86/xf8_16bpp/cfbscrinit.c
+++ b/hw/xfree86/xf8_16bpp/cfbscrinit.c
@@ -34,6 +34,8 @@
int cfb8_16ScreenPrivateIndex;
+int cfb8_16GetScreenPrivateIndex(void) { return cfb8_16ScreenPrivateIndex; }
+
static unsigned long cfb8_16Generation = 0;
static PixmapPtr cfb8_16GetWindowPixmap(WindowPtr pWin);
diff --git a/hw/xfree86/xf8_32bpp/cfb8_32.h b/hw/xfree86/xf8_32bpp/cfb8_32.h
index 98a50f810..d992b77c5 100644
--- a/hw/xfree86/xf8_32bpp/cfb8_32.h
+++ b/hw/xfree86/xf8_32bpp/cfb8_32.h
@@ -19,8 +19,10 @@ typedef struct {
} cfb8_32ScreenRec, *cfb8_32ScreenPtr;
-extern int cfb8_32GCPrivateIndex;
-extern int cfb8_32ScreenPrivateIndex;
+extern int cfb8_32GCPrivateIndex; /* XXX */
+extern int cfb8_32GetGCPrivateIndex(void);
+extern int cfb8_32ScreenPrivateIndex; /* XXX */
+extern int cfb8_32GetScreenPrivateIndex(void);
void
cfb8_32SaveAreas(
@@ -212,10 +214,10 @@ cfb8_32ChangeWindowAttributes(
#define CFB8_32_GET_GC_PRIVATE(pGC)\
- (cfb8_32GCPtr)((pGC)->devPrivates[cfb8_32GCPrivateIndex].ptr)
+ (cfb8_32GCPtr)((pGC)->devPrivates[cfb8_32GetGCPrivateIndex()].ptr)
#define CFB8_32_GET_SCREEN_PRIVATE(pScreen)\
- (cfb8_32ScreenPtr)((pScreen)->devPrivates[cfb8_32ScreenPrivateIndex].ptr)
+ (cfb8_32ScreenPtr)((pScreen)->devPrivates[cfb8_32GetScreenPrivateIndex()].ptr)
Bool xf86Overlay8Plus32Init (ScreenPtr pScreen);
diff --git a/hw/xfree86/xf8_32bpp/cfb8_32module.c b/hw/xfree86/xf8_32bpp/cfb8_32module.c
index 2c8f203f8..7b27e498a 100644
--- a/hw/xfree86/xf8_32bpp/cfb8_32module.c
+++ b/hw/xfree86/xf8_32bpp/cfb8_32module.c
@@ -13,7 +13,7 @@ static XF86ModuleVersionInfo VersRec =
MODULEVENDORSTRING,
MODINFOSTRING1,
MODINFOSTRING2,
- XF86_VERSION_CURRENT,
+ XORG_VERSION_CURRENT,
1, 0, 0,
ABI_CLASS_ANSIC, /* Only need the ansic layer */
ABI_ANSIC_VERSION,
diff --git a/hw/xfree86/xf8_32bpp/cfbpntwin.c b/hw/xfree86/xf8_32bpp/cfbpntwin.c
index 62026768e..31e66ced5 100644
--- a/hw/xfree86/xf8_32bpp/cfbpntwin.c
+++ b/hw/xfree86/xf8_32bpp/cfbpntwin.c
@@ -1,4 +1,4 @@
-/* $XdotOrg: xc/programs/Xserver/hw/xfree86/xf8_32bpp/cfbpntwin.c,v 1.1.4.2.2.3 2004/03/04 20:16:51 kaleb Exp $ */
+/* $XdotOrg: xc/programs/Xserver/hw/xfree86/xf8_32bpp/cfbpntwin.c,v 1.2 2004/04/23 19:54:21 eich Exp $ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/xf8_32bpp/cfbpntwin.c,v 1.1 1999/01/03 03:58:56 dawes Exp $ */
#include "X.h"
diff --git a/hw/xfree86/xf8_32bpp/cfbscrinit.c b/hw/xfree86/xf8_32bpp/cfbscrinit.c
index 93323d487..dc23d912c 100644
--- a/hw/xfree86/xf8_32bpp/cfbscrinit.c
+++ b/hw/xfree86/xf8_32bpp/cfbscrinit.c
@@ -38,7 +38,9 @@ static BSFuncRec cfb8_32BSFuncRec = {
int cfb8_32GCPrivateIndex;
+int cfb8_32GetGCPrivateIndex(void) { return cfb8_32GCPrivateIndex; }
int cfb8_32ScreenPrivateIndex;
+int cfb8_32GetScreenPrivateIndex(void) { return cfb8_32ScreenPrivateIndex; }
static unsigned long cfb8_32Generation = 0;
static Bool
diff --git a/hw/xfree86/xf8_32wid/cfb8_32wid.h b/hw/xfree86/xf8_32wid/cfb8_32wid.h
index 2168054d9..1d1093e54 100644
--- a/hw/xfree86/xf8_32wid/cfb8_32wid.h
+++ b/hw/xfree86/xf8_32wid/cfb8_32wid.h
@@ -27,7 +27,8 @@ typedef struct {
cfb8_32WidOps *WIDOps;
} cfb8_32WidScreenRec, *cfb8_32WidScreenPtr;
-extern int cfb8_32WidScreenPrivateIndex;
+extern int cfb8_32WidScreenPrivateIndex; /* XXX */
+extern int cfb8_32WidGetScreenPrivateIndex(void);
Bool
cfb8_32WidScreenInit (
@@ -88,6 +89,6 @@ Bool
cfb8_32WidGenericOpsInit(cfb8_32WidScreenPtr pScreenPriv);
#define CFB8_32WID_GET_SCREEN_PRIVATE(pScreen)\
- (cfb8_32WidScreenPtr)((pScreen)->devPrivates[cfb8_32WidScreenPrivateIndex].ptr)
+ (cfb8_32WidScreenPtr)((pScreen)->devPrivates[cfb8_32WidGetScreenPrivateIndex()].ptr)
#endif /* _CFB8_32WID_H */
diff --git a/hw/xfree86/xf8_32wid/cfb8_32widmodule.c b/hw/xfree86/xf8_32wid/cfb8_32widmodule.c
index 83b6118bb..95f8c9d02 100644
--- a/hw/xfree86/xf8_32wid/cfb8_32widmodule.c
+++ b/hw/xfree86/xf8_32wid/cfb8_32widmodule.c
@@ -12,7 +12,7 @@ static XF86ModuleVersionInfo VersRec =
MODULEVENDORSTRING,
MODINFOSTRING1,
MODINFOSTRING2,
- XF86_VERSION_CURRENT,
+ XORG_VERSION_CURRENT,
1, 0, 0,
ABI_CLASS_ANSIC, /* Only need the ansic layer */
ABI_ANSIC_VERSION,
diff --git a/hw/xfree86/xf8_32wid/cfbscrinit.c b/hw/xfree86/xf8_32wid/cfbscrinit.c
index 8f307034f..02f6cd21f 100644
--- a/hw/xfree86/xf8_32wid/cfbscrinit.c
+++ b/hw/xfree86/xf8_32wid/cfbscrinit.c
@@ -36,6 +36,10 @@
compiled with CFB_NEED_SCREEN_PRIVATE */
int cfb8_32WidScreenPrivateIndex;
+int cfb8_32WidGetScreenPrivateIndex(void)
+{
+ return cfb8_32WidScreenPrivateIndex;
+}
static unsigned long cfb8_32WidGeneration = 0;
extern WindowPtr *WindowTable;
diff --git a/hw/xfree86/xorgconf.cpp b/hw/xfree86/xorgconf.cpp
index c94c1e5a4..71b6dea98 100644
--- a/hw/xfree86/xorgconf.cpp
+++ b/hw/xfree86/xorgconf.cpp
@@ -1,4 +1,4 @@
-XCOMM $XdotOrg$
+XCOMM $XdotOrg: xc/programs/Xserver/hw/xfree86/xorgconf.cpp,v 1.2 2004/04/23 19:20:02 eich Exp $
XCOMM
XCOMM Copyright (c) 1994-1998 by The XFree86 Project, Inc.
XCOMM