diff options
Diffstat (limited to 'hw/xfree86/common')
-rw-r--r-- | hw/xfree86/common/xf86Bus.c | 2 | ||||
-rw-r--r-- | hw/xfree86/common/xf86Configure.c | 3 | ||||
-rw-r--r-- | hw/xfree86/common/xf86Mode.c | 81 | ||||
-rw-r--r-- | hw/xfree86/common/xf86str.h | 7 |
4 files changed, 34 insertions, 59 deletions
diff --git a/hw/xfree86/common/xf86Bus.c b/hw/xfree86/common/xf86Bus.c index e5c9615d3..e20837851 100644 --- a/hw/xfree86/common/xf86Bus.c +++ b/hw/xfree86/common/xf86Bus.c @@ -3018,7 +3018,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/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 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/xf86str.h b/hw/xfree86/common/xf86str.h index 0c33afba2..ae9d9aef4 100644 --- a/hw/xfree86/common/xf86str.h +++ b/hw/xfree86/common/xf86str.h @@ -119,14 +119,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 { |