summaryrefslogtreecommitdiff
path: root/hw/xfree86/modes
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2010-02-08 15:23:04 -0500
committerAdam Jackson <ajax@redhat.com>2011-02-23 13:39:22 -0500
commitdc498b433f36af5d2de3065e7c64cdb575385d81 (patch)
treeecf8bb0dbeca46a4b18398b1ea95f673b39ebdd7 /hw/xfree86/modes
parent303977fbcf9c641b7e19dfde192cef585f5b455c (diff)
xfree86: If the driver found modes on an output, don't add more
Inferring modes from sync ranges is only valid if the monitor says it's valid. If the monitor says it's valid, then we'll have already added those modes during EDID block parse. If it doesn't, then we should believe it. If there's no EDID for an output, but sync ranges from the config, we'll still add default modes as normal. Reviewed-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
Diffstat (limited to 'hw/xfree86/modes')
-rw-r--r--hw/xfree86/modes/xf86Crtc.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index b5e9dc26f..0ae63ba97 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -1595,7 +1595,7 @@ xf86ProbeOutputModes (ScrnInfoPtr scrn, int maxX, int maxY)
int min_clock = 0;
int max_clock = 0;
double clock;
- Bool add_default_modes = xf86ReturnOptValBool(output->options, OPTION_DEFAULT_MODES, TRUE);
+ Bool add_default_modes;
Bool debug_modes = config->debug_modes ||
xf86Initialising;
enum det_monrec_source sync_source = sync_default;
@@ -1641,6 +1641,14 @@ xf86ProbeOutputModes (ScrnInfoPtr scrn, int maxX, int maxY)
}
output_modes = (*output->funcs->get_modes) (output);
+
+ /*
+ * If the user has a preference, respect it.
+ * Otherwise, don't second-guess the driver.
+ */
+ if (!xf86GetOptValBool(output->options, OPTION_DEFAULT_MODES,
+ &add_default_modes))
+ add_default_modes = (output_modes == NULL);
edid_monitor = output->MonInfo;