summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Broder <ebroder@mokafive.com>2011-02-01 16:09:50 -0800
committerKeith Packard <keithp@keithp.com>2011-02-02 14:58:45 -0800
commit12b0f7df2caa78d68b453aaa91248bb3577fd724 (patch)
tree7542f595ebe7dfe32e2fbd4b3d3789575f2fe29a
parent0b15033031d78836582bd1b641c3160c3803a708 (diff)
xfree86/modes: Be sure to only use new EDID for physical output dimensions
The EDID processing regards physical dimensions of 0mm x 0mm as invalid. Previously the old values for height and width would be preserved if none of the physical dimension specifications in the new EDID were considered valid. This will come up in particular if first a monitor is connected to an output, and then a projector is connected. Since projectors generally report physical dimensions of 0mm x 0mm, this would result in the projector claiming to have the physical dimensions of the monitor. Signed-off-by: Evan Broder <ebroder@mokafive.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r--hw/xfree86/modes/xf86Crtc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index c4470c353..47d3ad14c 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -3016,6 +3016,8 @@ xf86OutputSetEDID (xf86OutputPtr output, xf86MonPtr edid_mon)
free(output->MonInfo);
output->MonInfo = edid_mon;
+ output->mm_width = 0;
+ output->mm_height = 0;
if (debug_modes) {
xf86DrvMsg(scrn->scrnIndex, X_INFO, "EDID for output %s\n",