summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Hopf <mhopf@suse.de>2007-10-24 20:31:51 +0200
committerMatthias Hopf <mhopf@suse.de>2007-10-24 20:31:51 +0200
commit48ca5961caee62f2980017a6bdc96a1b4c747727 (patch)
tree08829216c49793d07727e47a14630d8c680e2f1a
parentd502521c3669f3f22b94c39a64ab63bfd92c6a97 (diff)
Prefer configured DisplaySize to probed DDC data, if available.
Based on patch by Hong Liu <hong.liu@intel.com>.
-rw-r--r--hw/xfree86/modes/xf86RandR12.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/hw/xfree86/modes/xf86RandR12.c b/hw/xfree86/modes/xf86RandR12.c
index 38435c924..7169f74c8 100644
--- a/hw/xfree86/modes/xf86RandR12.c
+++ b/hw/xfree86/modes/xf86RandR12.c
@@ -426,8 +426,18 @@ xf86RandR12CreateScreenResources (ScreenPtr pScreen)
426 xf86OutputPtr output = config->output[config->compat_output]; 426 xf86OutputPtr output = config->output[config->compat_output];
427 xf86CrtcPtr crtc = output->crtc; 427 xf86CrtcPtr crtc = output->crtc;
428 428
429 if (crtc && crtc->mode.HDisplay && 429 if (output->conf_monitor &&
430 output->mm_width && output->mm_height) 430 (output->conf_monitor->mon_width > 0 &&
431 output->conf_monitor->mon_height > 0))
432 {
433 /*
434 * Prefer user configured DisplaySize
435 */
436 mmWidth = output->conf_monitor->mon_width;
437 mmHeight = output->conf_monitor->mon_height;
438 }
439 else if (crtc && crtc->mode.HDisplay &&
440 output->mm_width && output->mm_height)
431 { 441 {
432 /* 442 /*
433 * If the output has a mode and a declared size, use that 443 * If the output has a mode and a declared size, use that