xserver: Branch 'server-1.9-branch' - 2 commits

Jeremy Huddleston jeremyhu at kemper.freedesktop.org
Fri Mar 4 13:47:48 PST 2011


 hw/xfree86/modes/xf86Crtc.c |   12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

New commits:
commit 8a18d18bb31933d8dd0fe63cd293d7ae6711abcc
Author: Evan Broder <ebroder at mokafive.com>
Date:   Tue Feb 1 16:09:50 2011 -0800

    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 at mokafive.com>
    Reviewed-by: Adam Jackson <ajax at redhat.com>
    Signed-off-by: Keith Packard <keithp at keithp.com>
    (cherry picked from commit 12b0f7df2caa78d68b453aaa91248bb3577fd724)

diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index dd8ccad..30742ff 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -2976,6 +2976,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",
commit 11bf10e22cefe661f5650d49316bbd938a40094c
Author: Adam Jackson <ajax at redhat.com>
Date:   Mon Feb 8 15:23:04 2010 -0500

    xfree86: If the driver found modes on an output, don't add more
    
    Inferring modes from sync ranges is only valid if the monitor says it's
    valid.  If the monitor says it's valid, then we'll have already added
    those modes during EDID block parse.  If it doesn't, then we should
    believe it.
    
    If there's no EDID for an output, but sync ranges from the config, we'll
    still add default modes as normal.
    
    Reviewed-by: Alex Deucher <alexdeucher at gmail.com>
    Signed-off-by: Adam Jackson <ajax at redhat.com>
    (cherry picked from commit dc498b433f36af5d2de3065e7c64cdb575385d81)

diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index b2daec7..dd8ccad 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -1566,7 +1566,7 @@ xf86ProbeOutputModes (ScrnInfoPtr scrn, int maxX, int maxY)
 	int		    min_clock = 0;
 	int		    max_clock = 0;
 	double		    clock;
-	Bool		    add_default_modes = xf86ReturnOptValBool(output->options, OPTION_DEFAULT_MODES, TRUE);
+	Bool		    add_default_modes;
 	Bool		    debug_modes = config->debug_modes ||
 					  xf86Initialising;
 	enum det_monrec_source sync_source = sync_default;
@@ -1612,6 +1612,14 @@ xf86ProbeOutputModes (ScrnInfoPtr scrn, int maxX, int maxY)
 	}
 	
 	output_modes = (*output->funcs->get_modes) (output);
+
+	/*
+	 * If the user has a preference, respect it.
+	 * Otherwise, don't second-guess the driver.
+	 */
+	if (!xf86GetOptValBool(output->options, OPTION_DEFAULT_MODES,
+			       &add_default_modes))
+	    add_default_modes = (output_modes == NULL);
 	
 	edid_monitor = output->MonInfo;
 	


More information about the xorg-commit mailing list