summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorAlan Hourihane <alanh@fairlite.demon.co.uk>2006-08-18 09:13:52 +0100
committerAlan Hourihane <alanh@fairlite.demon.co.uk>2006-08-18 09:13:52 +0100
commit708b225689b5a4ba9ffe3372b584b715ef9eacdc (patch)
treedf52f91b74b36def891a8dd16e0cb3ded0abf30b /hw
parente1f4565be5ce80be4655e81f77f4073fa3fbf8d0 (diff)
parentee5e2cbd2bee610a95facc6b486c4a5070973099 (diff)
Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver
Diffstat (limited to 'hw')
-rw-r--r--hw/xfree86/common/xf86Configure.c3
-rw-r--r--hw/xfree86/common/xf86Mode.c78
2 files changed, 25 insertions, 56 deletions
diff --git a/hw/xfree86/common/xf86Configure.c b/hw/xfree86/common/xf86Configure.c
index f0efa625e..cb091080c 100644
--- a/hw/xfree86/common/xf86Configure.c
+++ b/hw/xfree86/common/xf86Configure.c
@@ -87,6 +87,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/xf86Mode.c b/hw/xfree86/common/xf86Mode.c
index 72dd1cabb..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);
}
}
@@ -1796,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");
@@ -2023,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;