summaryrefslogtreecommitdiff
path: root/hw/xfree86/common
diff options
context:
space:
mode:
Diffstat (limited to 'hw/xfree86/common')
-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
23 files changed, 372 insertions, 97 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 $ */