xserver: Branch 'master' - 2 commits
Adam Jackson
ajax at kemper.freedesktop.org
Fri Jul 17 12:17:53 PDT 2009
hw/xfree86/doc/man/xorg.conf.man.pre | 4 ++++
hw/xfree86/modes/xf86Crtc.c | 26 +++++++++++++++++++++-----
2 files changed, 25 insertions(+), 5 deletions(-)
New commits:
commit a98acb290737ac6b0776f2ea8128a4613c0f778b
Author: Adam Jackson <ajax at redhat.com>
Date: Wed Jul 15 13:56:19 2009 -0400
s/xf86EnableOutputs/xf86CollectEnabledOutputs/ for clarity
diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index af980c4..69f687b 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -1923,7 +1923,8 @@ xf86SetScrnInfoModes (ScrnInfoPtr scrn)
}
static void
-xf86EnableOutputs(ScrnInfoPtr scrn, xf86CrtcConfigPtr config, Bool *enabled)
+xf86CollectEnabledOutputs(ScrnInfoPtr scrn, xf86CrtcConfigPtr config,
+ Bool *enabled)
{
Bool any_enabled = FALSE;
int o;
@@ -2362,7 +2363,7 @@ xf86InitialConfiguration (ScrnInfoPtr scrn, Bool canGrow)
modes = xnfcalloc (config->num_output, sizeof (DisplayModePtr));
enabled = xnfcalloc (config->num_output, sizeof (Bool));
- xf86EnableOutputs(scrn, config, enabled);
+ xf86CollectEnabledOutputs(scrn, config, enabled);
if (xf86TargetUserpref(scrn, config, modes, enabled, width, height))
xf86DrvMsg(i, X_INFO, "Using user preference for initial modes\n");
commit 8fab7f72f2cc4ac5ca415c95ccbd05d3084f10c4
Author: Adam Jackson <ajax at redhat.com>
Date: Wed Jul 15 14:09:08 2009 -0400
randr: Add Option "Primary" to Monitor sections
diff --git a/hw/xfree86/doc/man/xorg.conf.man.pre b/hw/xfree86/doc/man/xorg.conf.man.pre
index 943009c..634805a 100644
--- a/hw/xfree86/doc/man/xorg.conf.man.pre
+++ b/hw/xfree86/doc/man/xorg.conf.man.pre
@@ -1389,6 +1389,10 @@ This option controls whether the video card should drive the sync signal
on the green color pin. Not all cards support this option, and most
monitors do not require it. The default is off.
.TP 7
+.BI "Option " "\*qPrimary\*q " \*qbool\*q
+This optional entry specifies that the monitor should be treated as the primary
+monitor. (RandR 1.2-supporting drivers only)
+.TP7
.BI "Option " "\*qPreferredMode\*q " \*qstring\*q
This optional entry specifies a mode to be marked as the preferred initial mode
of the monitor.
diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index c46b826..af980c4 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -439,6 +439,7 @@ typedef enum {
OPTION_IGNORE,
OPTION_ROTATE,
OPTION_PANNING,
+ OPTION_PRIMARY,
} OutputOpts;
static OptionInfoRec xf86OutputOptions[] = {
@@ -455,6 +456,7 @@ static OptionInfoRec xf86OutputOptions[] = {
{OPTION_IGNORE, "Ignore", OPTV_BOOLEAN, {0}, FALSE },
{OPTION_ROTATE, "Rotate", OPTV_STRING, {0}, FALSE },
{OPTION_PANNING, "Panning", OPTV_STRING, {0}, FALSE },
+ {OPTION_PRIMARY, "Primary", OPTV_BOOLEAN, {0}, FALSE },
{-1, NULL, OPTV_NONE, {0}, FALSE },
};
@@ -587,6 +589,7 @@ xf86OutputCreate (ScrnInfoPtr scrn,
xf86OutputPtr output, *outputs;
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
int len;
+ Bool primary;
if (name)
len = strlen (name) + 1;
@@ -632,10 +635,22 @@ xf86OutputCreate (ScrnInfoPtr scrn,
xfree (output);
return NULL;
}
-
+
xf86_config->output = outputs;
- xf86_config->output[xf86_config->num_output++] = output;
-
+
+ if (xf86GetOptValBool (output->options, OPTION_PRIMARY, &primary) && primary)
+ {
+ memmove(xf86_config->output + 1, xf86_config->output,
+ xf86_config->num_output * sizeof (xf86OutputPtr));
+ xf86_config->output[0] = output;
+ }
+ else
+ {
+ xf86_config->output[xf86_config->num_output] = output;
+ }
+
+ xf86_config->num_output++;
+
return output;
}
More information about the xorg-commit
mailing list