042ccf
From: Adam Jackson <ajax@redhat.com>
042ccf
Date: Sun, 28 Oct 2007 09:37:52 +0100
042ccf
Subject: [PATCH] Honor the Monitor section's DisplaySize directive.
042ccf
042ccf
---
896a35
diff -up xorg-server-1.3.0.0/hw/xfree86/modes/xf86EdidModes.c.da xorg-server-1.3.0.0/hw/xfree86/modes/xf86EdidModes.c
896a35
--- xorg-server-1.3.0.0/hw/xfree86/modes/xf86EdidModes.c.da	2007-09-26 17:04:02.000000000 +1000
896a35
+++ xorg-server-1.3.0.0/hw/xfree86/modes/xf86EdidModes.c	2007-09-26 17:04:27.000000000 +1000
896a35
@@ -401,8 +401,10 @@ xf86DDCMonitorSet(int scrnIndex, MonPtr 
896a35
 
896a35
     Monitor->DDC = DDC;
896a35
 
896a35
-    Monitor->widthmm = 10 * DDC->features.hsize;
896a35
-    Monitor->heightmm = 10 * DDC->features.vsize;
896a35
+    if (Monitor->widthmm <= 0 && Monitor->heightmm <= 0) {
896a35
+        Monitor->widthmm = 10 * DDC->features.hsize;
896a35
+        Monitor->heightmm = 10 * DDC->features.vsize;
896a35
+    }
896a35
 
896a35
     /* If this is a digital display, then we can use reduced blanking */
896a35
     if (DDC->features.input_type)