summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2009-09-28 13:59:25 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2009-09-30 10:04:45 +1000
commit857ec3e6fff571398dfcd9b4728b5c38cbcd3fcb (patch)
tree33c173eadd17c5f504767bdd8e6fb1e224d8a107
parent2d4bab18c0d894619f044f29769c67c2f63b540a (diff)
xfree86: use the DDC size if either width or height of DisplaySize is bogus.
If either width or height of DisplaySize is invalid, assume that the configuration is invalid and use the DDC-reported values instead. See Comment 9, Bug 9758. http://bugs.freedesktop.org/show_bug.cgi?id=9758#c9 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Dave Airlie <airlied@redhat.com> (cherry picked from commit 83023ffd09a84ff48e6b99f57ebad101a00478db)
-rw-r--r--hw/xfree86/modes/xf86EdidModes.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/xfree86/modes/xf86EdidModes.c b/hw/xfree86/modes/xf86EdidModes.c
index 6e11f9a3d..2f80070cf 100644
--- a/hw/xfree86/modes/xf86EdidModes.c
+++ b/hw/xfree86/modes/xf86EdidModes.c
@@ -957,7 +957,7 @@ xf86EdidMonitorSet(int scrnIndex, MonPtr Monitor, xf86MonPtr DDC)
quirks = xf86DDCDetectQuirks(scrnIndex, DDC, FALSE);
- if (Monitor->widthmm <= 0 && Monitor->heightmm <= 0) {
+ if (Monitor->widthmm <= 0 || Monitor->heightmm <= 0) {
Monitor->widthmm = 10 * DDC->features.hsize;
Monitor->heightmm = 10 * DDC->features.vsize;
}