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