summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2014-08-04 16:25:36 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2014-08-05 06:26:06 +0100
commit5926da0ab3339bbfd55a27ac84a8306b8d931181 (patch)
tree801c5cd13b33fba30adfa8e367d5608e07181660
parentab3f1526f19ec405dca8ab3094a626096dc30358 (diff)
sna: Mark the current mode as preferred if no other mode is
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/sna_display.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c
index 80a5bb16..e0a16101 100644
--- a/src/sna/sna_display.c
+++ b/src/sna/sna_display.c
@@ -2801,8 +2801,10 @@ sna_output_get_modes(xf86OutputPtr output)
if (mode.mode_valid && mode.mode.clock) {
current = calloc(1, sizeof(DisplayModeRec));
- if (current)
+ if (current) {
mode_from_kmode(output->scrn, &mode.mode, current);
+ current->type |= M_T_DRIVER | M_T_PREFERRED;
+ }
}
}
}
@@ -2825,6 +2827,8 @@ sna_output_get_modes(xf86OutputPtr output)
free(current);
current = NULL;
}
+ if (current && mode->type & M_T_PREFERRED)
+ current->type &= ~M_T_PREFERRED;
}
if (current)