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 <[email protected]>
---
 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

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to