--- hw/xfree86/ddc/interpret_edid.c~ 2013-10-03 07:25:56.000000000 +0100 +++ hw/xfree86/ddc/interpret_edid.c 2013-10-03 07:48:55.168972224 +0100 @@ -144,6 +144,15 @@ xf86ForEachDetailedBlock(m, handle_detailed_hvsize, &p); + if ((p.real_hsize != m->features.hsize ) || + (p.real_vsize != m->features.vsize)) { + xf86Msg(X_INFO, "Inconsistency in detected Display Size:\n"); + xf86Msg(X_INFO, "Monitor features physical dimensions %dx%d mm\n", + m->features.hsize, m->features.vsize); + xf86Msg(X_INFO, "Detailed timings physical dimensions %dx%d mm\n", + p.real_hsize, p.real_vsize); + } + if (!p.real_hsize || !p.real_vsize) { m->features.hsize = m->features.vsize = 0; } --- hw/xfree86/modes/xf86Crtc.c.orig 2013-11-01 16:59:03.904169898 +0000 +++ hw/xfree86/modes/xf86Crtc.c 2013-11-01 17:06:28.387359579 +0000 @@ -3052,8 +3052,15 @@ (det_mon->section.d_timings.v_size * 12)) && ((det_mon->section.d_timings.v_size * 5) < (det_mon->section.d_timings.h_size * 12))) { - p->output->mm_width = det_mon->section.d_timings.h_size; - p->output->mm_height = det_mon->section.d_timings.v_size; + if (!(p->output->conf_monitor && + (p->output->conf_monitor->mon_width > 0 && + p->output->conf_monitor->mon_height > 0))) { + /* + * Do not update size if user configured DisplaySize + */ + p->output->mm_width = det_mon->section.d_timings.h_size; + p->output->mm_height = det_mon->section.d_timings.v_size; + } p->ret = TRUE; } else xf86DrvMsg(p->output->scrn->scrnIndex, X_WARNING, @@ -3109,6 +3116,15 @@ xf86OutputSetEDIDProperty(output, edid_mon ? edid_mon->rawData : NULL, size); #endif + if (output->conf_monitor && + (output->conf_monitor->mon_width > 0 && + output->conf_monitor->mon_height > 0)) { + /* + * Prefer user configured DisplaySize + */ + output->mm_width = output->conf_monitor->mon_width; + output->mm_height = output->conf_monitor->mon_height; + } if (edid_mon) {