xf86-video-intel: src/sna/sna_display.c
Chris Wilson
ickle at kemper.freedesktop.org
Wed Jul 3 13:58:42 PDT 2013
src/sna/sna_display.c | 44 ++++++++++++++++++++++++++++++--------------
1 file changed, 30 insertions(+), 14 deletions(-)
New commits:
commit 4def5ecf6ebc2c6dc05e60d4595fa3dd4b7e38d2
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Wed Jul 3 21:56:54 2013 +0100
sna: Tidy up the user override enums
Since we have a second place dependent upon the hidden ordering of the
output options, simplify by copying the complete enum block from
hw/xfree86/modes/xf86Crtc.c
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c
index ecc8f7e..c124c22 100644
--- a/src/sna/sna_display.c
+++ b/src/sna/sna_display.c
@@ -2924,20 +2924,39 @@ static void set_size_range(struct sna *sna)
xf86CrtcSetSizeRange(sna->scrn, 320, 200, INT16_MAX, INT16_MAX);
}
+enum { /* XXX copied from hw/xfree86/modes/xf86Crtc.c */
+ OPTION_PREFERRED_MODE,
+#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,14,99,1,0)
+ OPTION_ZOOM_MODES,
+#endif
+ OPTION_POSITION,
+ OPTION_BELOW,
+ OPTION_RIGHT_OF,
+ OPTION_ABOVE,
+ OPTION_LEFT_OF,
+ OPTION_ENABLE,
+ OPTION_DISABLE,
+ OPTION_MIN_CLOCK,
+ OPTION_MAX_CLOCK,
+ OPTION_IGNORE,
+ OPTION_ROTATE,
+ OPTION_PANNING,
+ OPTION_PRIMARY,
+ OPTION_DEFAULT_MODES,
+};
+
static bool sna_probe_initial_configuration(struct sna *sna)
{
ScrnInfoPtr scrn = sna->scrn;
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn);
- const int user_overrides[] = { /* XXX fugly! */
-#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,14,99,1,0)
- 2, 3, 4, 5, 6, /* position */
- 11, /* rotate */
- 12, /* panning */
-#else
- 1, 2, 3, 4, 5, /* position */
- 10, /* rotate */
- 11, /* panning */
-#endif
+ const int user_overrides[] = {
+ OPTION_POSITION,
+ OPTION_BELOW,
+ OPTION_RIGHT_OF,
+ OPTION_ABOVE,
+ OPTION_LEFT_OF,
+ OPTION_ROTATE,
+ OPTION_PANNING,
};
int width, height;
int i, j;
@@ -3045,14 +3064,11 @@ static bool sna_probe_initial_configuration(struct sna *sna)
for (i = 0; i < config->num_output; i++) {
xf86OutputPtr output = config->output[i];
uint32_t crtc_id;
- Bool disable;
crtc_id = (uintptr_t)output->crtc;
output->crtc = NULL;
- if (xf86GetOptValBool(output->options,
- 8 /* OPTION_DISABLE */,
- &disable) && disable)
+ if (xf86ReturnOptValBool(output->options, OPTION_DISABLE, 0))
continue;
for (j = 0; j < config->num_crtc; j++) {
More information about the xorg-commit
mailing list