[PATCH 2/4] xfree86: Override physical output size only if EDID is available

Thierry Reding thierry.reding at avionic-design.de
Thu Nov 8 05:50:30 PST 2012


The output's physical dimensions may be set by the driver, which is the
case at least for xf86-video-modesetting. It makes no sense to overwrite
it with 0 if EDID is unavailable because it will cause the only source
of this information to be lost.

Signed-off-by: Thierry Reding <thierry.reding at avionic-design.de>
---
 hw/xfree86/modes/xf86Crtc.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index 177f7ac..93c741c 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -2960,8 +2960,10 @@ xf86OutputSetEDID(xf86OutputPtr output, xf86MonPtr edid_mon)
     free(output->MonInfo);
 
     output->MonInfo = edid_mon;
-    output->mm_width = 0;
-    output->mm_height = 0;
+    if (edid_mon) {
+        output->mm_width = 0;
+        output->mm_height = 0;
+    }
 
     if (debug_modes) {
         xf86DrvMsg(scrn->scrnIndex, X_INFO, "EDID for output %s\n",
-- 
1.8.0



More information about the xorg-devel mailing list