summaryrefslogtreecommitdiff
path: root/hw/xfree86/common
diff options
context:
space:
mode:
authorIan Romanick <idr@umwelt.(none)>2006-08-25 09:34:21 -0700
committerIan Romanick <idr@umwelt.(none)>2006-08-25 09:34:21 -0700
commit21291d6ca7188e5733ed0c93215ee0f1f0f90cc9 (patch)
tree164ae681be0cfee5fc239a999e296547d3343312 /hw/xfree86/common
parent1a5561c4ecccaf32b03c41373adf376100d457aa (diff)
parentcd2da4e41eae233b50f8830d9a8f5d1d916a5a1b (diff)
Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into pci-rework
Diffstat (limited to 'hw/xfree86/common')
-rw-r--r--hw/xfree86/common/xf86Bus.c2
-rw-r--r--hw/xfree86/common/xf86Config.c9
-rw-r--r--hw/xfree86/common/xf86Configure.c3
-rw-r--r--hw/xfree86/common/xf86Cursor.c36
-rw-r--r--hw/xfree86/common/xf86Init.c8
-rw-r--r--hw/xfree86/common/xf86Mode.c81
-rw-r--r--hw/xfree86/common/xf86Privstr.h1
-rw-r--r--hw/xfree86/common/xf86str.h7
8 files changed, 86 insertions, 61 deletions
diff --git a/hw/xfree86/common/xf86Bus.c b/hw/xfree86/common/xf86Bus.c
index 14d52bf32..edcc6b0c7 100644
--- a/hw/xfree86/common/xf86Bus.c
+++ b/hw/xfree86/common/xf86Bus.c
@@ -3023,7 +3023,7 @@ static void
CheckGenericGA()
{
/* This needs to be changed for multiple domains */
-#if !defined(__sparc__) && !defined(__powerpc__) && !defined(__mips__) && !defined(__ia64__)
+#if !defined(__sparc__) && !defined(__powerpc__) && !defined(__mips__) && !defined(__ia64__) && !defined(__arm__) && !defined(__s390__)
IOADDRESS GenericIOBase = VGAHW_GET_IOBASE();
CARD8 CurrentValue, TestValue;
diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index 4d933aa9d..87b8a0b72 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -761,7 +761,8 @@ typedef enum {
FLAG_RENDER_COLORMAP_MODE,
FLAG_HANDLE_SPECIAL_KEYS,
FLAG_RANDR,
- FLAG_AIGLX
+ FLAG_AIGLX,
+ FLAG_IGNORE_ABI
} FlagValues;
static OptionInfoRec FlagOptions[] = {
@@ -833,6 +834,8 @@ static OptionInfoRec FlagOptions[] = {
{0}, FALSE },
{ FLAG_AIGLX, "AIGLX", OPTV_BOOLEAN,
{0}, FALSE },
+ { FLAG_IGNORE_ABI, "IgnoreABI", OPTV_BOOLEAN,
+ {0}, FALSE },
{ -1, NULL, OPTV_NONE,
{0}, FALSE },
};
@@ -891,6 +894,10 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts)
&(xf86Info.grabInfo.allowDeactivate));
xf86GetOptValBool(FlagOptions, FLAG_ALLOW_CLOSEDOWN_GRABS,
&(xf86Info.grabInfo.allowClosedown));
+ xf86GetOptValBool(FlagOptions, FLAG_IGNORE_ABI, &xf86Info.ignoreABI);
+ if (&xf86Info.ignoreABI) {
+ xf86Msg(X_CONFIG, "Ignoring ABI Version\n");
+ }
/*
* Set things up based on the config file information. Some of these
diff --git a/hw/xfree86/common/xf86Configure.c b/hw/xfree86/common/xf86Configure.c
index 3158a967d..5b786e8c6 100644
--- a/hw/xfree86/common/xf86Configure.c
+++ b/hw/xfree86/common/xf86Configure.c
@@ -88,6 +88,9 @@ static char *DFLT_MOUSE_DEV = "/dev/devi/mouse0";
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
static char *DFLT_MOUSE_DEV = "/dev/sysmouse";
static char *DFLT_MOUSE_PROTO = "auto";
+#elif defined(linux)
+static char DFLT_MOUSE_DEV[] = "/dev/input/mice";
+static char DFLT_MOUSE_PROTO[] = "auto";
#else
static char *DFLT_MOUSE_DEV = "/dev/mouse";
static char *DFLT_MOUSE_PROTO = "auto";
diff --git a/hw/xfree86/common/xf86Cursor.c b/hw/xfree86/common/xf86Cursor.c
index 14e0fcd91..61f0ce55e 100644
--- a/hw/xfree86/common/xf86Cursor.c
+++ b/hw/xfree86/common/xf86Cursor.c
@@ -576,24 +576,40 @@ xf86InitOrigins(void)
/* force edge lists */
if(screen->left) {
ref = screen->left->screennum;
+ if (! xf86Screens[ref] || ! xf86Screens[ref]->pScreen) {
+ ErrorF("Referenced uninitialized screen in Layout!\n");
+ break;
+ }
pLayout->left = AddEdge(pLayout->left,
0, xf86Screens[i]->pScreen->height,
xf86Screens[ref]->pScreen->width, 0, ref);
}
if(screen->right) {
ref = screen->right->screennum;
+ if (! xf86Screens[ref] || ! xf86Screens[ref]->pScreen) {
+ ErrorF("Referenced uninitialized screen in Layout!\n");
+ break;
+ }
pScreen = xf86Screens[i]->pScreen;
pLayout->right = AddEdge(pLayout->right,
0, pScreen->height, -pScreen->width, 0, ref);
}
if(screen->top) {
ref = screen->top->screennum;
+ if (! xf86Screens[ref] || ! xf86Screens[ref]->pScreen) {
+ ErrorF("Referenced uninitialized screen in Layout!\n");
+ break;
+ }
pLayout->up = AddEdge(pLayout->up,
0, xf86Screens[i]->pScreen->width,
0, xf86Screens[ref]->pScreen->height, ref);
}
if(screen->bottom) {
ref = screen->bottom->screennum;
+ if (! xf86Screens[ref] || ! xf86Screens[ref]->pScreen) {
+ ErrorF("Referenced uninitialized screen in Layout!\n");
+ break;
+ }
pScreen = xf86Screens[i]->pScreen;
pLayout->down = AddEdge(pLayout->down,
0, pScreen->width, 0, -pScreen->height, ref);
@@ -609,6 +625,10 @@ xf86InitOrigins(void)
break;
case PosRelative:
ref = screen->refscreen->screennum;
+ if (! xf86Screens[ref] || ! xf86Screens[ref]->pScreen) {
+ ErrorF("Referenced uninitialized screen in Layout!\n");
+ break;
+ }
if(screensLeft & (1 << ref)) break;
dixScreenOrigins[i].x = dixScreenOrigins[ref].x + screen->x;
dixScreenOrigins[i].y = dixScreenOrigins[ref].y + screen->y;
@@ -616,6 +636,10 @@ xf86InitOrigins(void)
break;
case PosRightOf:
ref = screen->refscreen->screennum;
+ if (! xf86Screens[ref] || ! xf86Screens[ref]->pScreen) {
+ ErrorF("Referenced uninitialized screen in Layout!\n");
+ break;
+ }
if(screensLeft & (1 << ref)) break;
pScreen = xf86Screens[ref]->pScreen;
dixScreenOrigins[i].x =
@@ -625,6 +649,10 @@ xf86InitOrigins(void)
break;
case PosLeftOf:
ref = screen->refscreen->screennum;
+ if (! xf86Screens[ref] || ! xf86Screens[ref]->pScreen) {
+ ErrorF("Referenced uninitialized screen in Layout!\n");
+ break;
+ }
if(screensLeft & (1 << ref)) break;
pScreen = xf86Screens[i]->pScreen;
dixScreenOrigins[i].x =
@@ -634,6 +662,10 @@ xf86InitOrigins(void)
break;
case PosBelow:
ref = screen->refscreen->screennum;
+ if (! xf86Screens[ref] || ! xf86Screens[ref]->pScreen) {
+ ErrorF("Referenced uninitialized screen in Layout!\n");
+ break;
+ }
if(screensLeft & (1 << ref)) break;
pScreen = xf86Screens[ref]->pScreen;
dixScreenOrigins[i].x = dixScreenOrigins[ref].x;
@@ -643,6 +675,10 @@ xf86InitOrigins(void)
break;
case PosAbove:
ref = screen->refscreen->screennum;
+ if (! xf86Screens[ref] || ! xf86Screens[ref]->pScreen) {
+ ErrorF("Referenced uninitialized screen in Layout!\n");
+ break;
+ }
if(screensLeft & (1 << ref)) break;
pScreen = xf86Screens[i]->pScreen;
dixScreenOrigins[i].x = dixScreenOrigins[ref].x;
diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index b2857bbf3..334754da1 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -137,7 +137,8 @@ static int numFormats = 6;
#endif
static Bool formatsDone = FALSE;
-InputDriverRec XF86KEYBOARD = {
+#ifdef USE_DEPRECATED_KEYBOARD_DRIVER
+static InputDriverRec XF86KEYBOARD = {
1,
"keyboard",
NULL,
@@ -146,6 +147,7 @@ InputDriverRec XF86KEYBOARD = {
NULL,
0
};
+#endif
static Bool
xf86CreateRootWindow(WindowPtr pWin)
@@ -562,6 +564,10 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv)
/* Tell the loader the default module search path */
LoaderSetPath(xf86ModulePath);
+ if (xf86Info.ignoreABI) {
+ LoaderSetOptions(LDR_OPT_ABI_MISMATCH_NONFATAL);
+ }
+
#ifdef TESTING
{
char **list, **l;
diff --git a/hw/xfree86/common/xf86Mode.c b/hw/xfree86/common/xf86Mode.c
index b892e3e6a..cd57e9916 100644
--- a/hw/xfree86/common/xf86Mode.c
+++ b/hw/xfree86/common/xf86Mode.c
@@ -47,6 +47,22 @@
#include "xf86Priv.h"
#include "xf86DDC.h"
+static void
+printModeRejectMessage(int index, DisplayModePtr p, int status)
+{
+ char *type;
+
+ if (p->type & M_T_BUILTIN)
+ type = "built-in ";
+ else if (p->type & M_T_DEFAULT)
+ type = "default ";
+ else
+ type = "";
+
+ xf86DrvMsg(index, X_INFO, "Not using %smode \"%s\" (%s)\n", type, p->name,
+ xf86ModeStatusToString(status));
+}
+
/*
* xf86GetNearestClock --
* Find closest clock to given frequency (in kHz). This assumes the
@@ -1644,18 +1660,7 @@ xf86ValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes,
q->name = xnfstrdup(p->name);
q->status = MODE_OK;
} else {
- if (p->type & M_T_BUILTIN)
- xf86DrvMsg(scrp->scrnIndex, X_INFO,
- "Not using built-in mode \"%s\" (%s)\n",
- p->name, xf86ModeStatusToString(status));
- else if (p->type & M_T_DEFAULT)
- xf86DrvMsg(scrp->scrnIndex, X_INFO,
- "Not using default mode \"%s\" (%s)\n", p->name,
- xf86ModeStatusToString(status));
- else
- xf86DrvMsg(scrp->scrnIndex, X_INFO,
- "Not using mode \"%s\" (%s)\n", p->name,
- xf86ModeStatusToString(status));
+ printModeRejectMessage(scrp->scrnIndex, p, status);
}
}
@@ -1758,7 +1763,8 @@ xf86ValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes,
* horizontal timing parameters that CRTs may have
* problems with.
*/
- if ((q->type & M_T_DEFAULT) &&
+ if (!scrp->monitor->reducedblanking &&
+ (q->type & M_T_DEFAULT) &&
((double)q->HTotal / (double)q->HDisplay) < 1.15)
continue;
@@ -1795,39 +1801,14 @@ xf86ValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes,
repeat = FALSE;
lookupNext:
- if (repeat && ((status = p->status) != MODE_OK)) {
- if (p->type & M_T_BUILTIN)
- xf86DrvMsg(scrp->scrnIndex, X_INFO,
- "Not using built-in mode \"%s\" (%s)\n",
- p->name, xf86ModeStatusToString(status));
- else if (p->type & M_T_DEFAULT)
- xf86DrvMsg(scrp->scrnIndex, X_INFO,
- "Not using default mode \"%s\" (%s)\n", p->name,
- xf86ModeStatusToString(status));
- else
- xf86DrvMsg(scrp->scrnIndex, X_INFO,
- "Not using mode \"%s\" (%s)\n", p->name,
- xf86ModeStatusToString(status));
- }
+ if (repeat && ((status = p->status) != MODE_OK))
+ printModeRejectMessage(scrp->scrnIndex, p, status);
saveType = p->type;
status = xf86LookupMode(scrp, p, clockRanges, strategy);
- if (repeat && status == MODE_NOMODE) {
+ if (repeat && status == MODE_NOMODE)
continue;
- }
- if (status != MODE_OK) {
- if (p->type & M_T_BUILTIN)
- xf86DrvMsg(scrp->scrnIndex, X_INFO,
- "Not using built-in mode \"%s\" (%s)\n",
- p->name, xf86ModeStatusToString(status));
- else if (p->type & M_T_DEFAULT)
- xf86DrvMsg(scrp->scrnIndex, X_INFO,
- "Not using default mode \"%s\" (%s)\n", p->name,
- xf86ModeStatusToString(status));
- else
- xf86DrvMsg(scrp->scrnIndex, X_INFO,
- "Not using mode \"%s\" (%s)\n", p->name,
- xf86ModeStatusToString(status));
- }
+ if (status != MODE_OK)
+ printModeRejectMessage(scrp->scrnIndex, p, status);
if (status == MODE_ERROR) {
ErrorF("xf86ValidateModes: "
"unexpected result from xf86LookupMode()\n");
@@ -2022,20 +2003,6 @@ xf86PruneDriverModes(ScrnInfoPtr scrp)
return;
n = p->next;
if (p->status != MODE_OK) {
-#if 0
- if (p->type & M_T_BUILTIN)
- xf86DrvMsg(scrp->scrnIndex, X_INFO,
- "Not using built-in mode \"%s\" (%s)\n", p->name,
- xf86ModeStatusToString(p->status));
- else if (p->type & M_T_DEFAULT)
- xf86DrvMsg(scrp->scrnIndex, X_INFO,
- "Not using default mode \"%s\" (%s)\n", p->name,
- xf86ModeStatusToString(p->status));
- else
- xf86DrvMsg(scrp->scrnIndex, X_INFO,
- "Not using mode \"%s\" (%s)\n", p->name,
- xf86ModeStatusToString(p->status));
-#endif
xf86DeleteMode(&(scrp->modes), p);
}
p = n;
diff --git a/hw/xfree86/common/xf86Privstr.h b/hw/xfree86/common/xf86Privstr.h
index a01b07fd7..67d4304c9 100644
--- a/hw/xfree86/common/xf86Privstr.h
+++ b/hw/xfree86/common/xf86Privstr.h
@@ -166,6 +166,7 @@ typedef struct {
MessageType randRFrom;
Bool aiglx;
MessageType aiglxFrom;
+ Bool ignoreABI;
struct {
Bool disabled; /* enable/disable deactivating
* grabs or closing the
diff --git a/hw/xfree86/common/xf86str.h b/hw/xfree86/common/xf86str.h
index 0dc176e04..1c78bd341 100644
--- a/hw/xfree86/common/xf86str.h
+++ b/hw/xfree86/common/xf86str.h
@@ -129,14 +129,19 @@ typedef enum {
MODE_ERROR = -1 /* error condition */
} ModeStatus;
+/*
+ * The mode sets are, from best to worst: USERDEF, DRIVER, and DEFAULT/BUILTIN.
+ * Preferred will bubble a mode to the top within a set.
+ */
# define M_T_BUILTIN 0x01 /* built-in mode */
# define M_T_CLOCK_C (0x02 | M_T_BUILTIN) /* built-in mode - configure clock */
# define M_T_CRTC_C (0x04 | M_T_BUILTIN) /* built-in mode - configure CRTC */
# define M_T_CLOCK_CRTC_C (M_T_CLOCK_C | M_T_CRTC_C)
/* built-in mode - configure CRTC and clock */
+# define M_T_PREFERRED 0x08 /* preferred mode within a set */
# define M_T_DEFAULT 0x10 /* (VESA) default modes */
# define M_T_USERDEF 0x20 /* One of the modes from the config file */
-# define M_T_EDID 0x40 /* Mode from the EDID info from the monitor */
+# define M_T_DRIVER 0x40 /* Supplied by the driver (EDID, etc) */
/* Video mode */
typedef struct _DisplayModeRec {