This is a note to let you know that I've just added the patch titled

    drm/i915/sdvo: Defer detection of output capabilities until probing

to the 2.6.37-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     drm-i915-sdvo-defer-detection-of-output-capabilities-until-probing.patch
and it can be found in the queue-2.6.37 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <sta...@kernel.org> know about it.


>From 97aaf910731b03b27b1c4c8a58006a1dc99dcd9a Mon Sep 17 00:00:00 2001
From: Chris Wilson <ch...@chris-wilson.co.uk>
Date: Tue, 4 Jan 2011 20:10:52 +0000
Subject: drm/i915/sdvo: Defer detection of output capabilities until probing

From: Chris Wilson <ch...@chris-wilson.co.uk>

commit 97aaf910731b03b27b1c4c8a58006a1dc99dcd9a upstream.

Alex Fiestas reported an issue with his HDMI connector being misdetected
as DVI unless he had something connected upon boot. By moving the
decision as to whether to use HDMI or DVI encoding for the HDMI capable
output until we probe the monitor means that we should avoid sending a
HDMI signal to a DVI monitor and also correctly detect hardware like
Alex's.

However, to really determine what connector is soldered onto the wire we
need to inspect the VBT sdvo child devices - but can we trust it?

Reported-by: Alex Fiestas <a...@eyeos.org>
Tested-by: Alex Fiestas <a...@eyeos.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=32828
Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk>
Signed-off-by: Greg Kroah-Hartman <gre...@suse.de>

---
 drivers/gpu/drm/i915/intel_sdvo.c |   33 +++++++++++----------------------
 1 file changed, 11 insertions(+), 22 deletions(-)

--- a/drivers/gpu/drm/i915/intel_sdvo.c
+++ b/drivers/gpu/drm/i915/intel_sdvo.c
@@ -1024,9 +1024,13 @@ static void intel_sdvo_mode_set(struct d
        if (!intel_sdvo_set_target_input(intel_sdvo))
                return;
 
-       if (intel_sdvo->has_hdmi_monitor &&
-           !intel_sdvo_set_avi_infoframe(intel_sdvo))
-               return;
+       if (intel_sdvo->has_hdmi_monitor) {
+               intel_sdvo_set_encode(intel_sdvo, SDVO_ENCODE_HDMI);
+               intel_sdvo_set_colorimetry(intel_sdvo,
+                                          SDVO_COLORIMETRY_RGB256);
+               intel_sdvo_set_avi_infoframe(intel_sdvo);
+       } else
+               intel_sdvo_set_encode(intel_sdvo, SDVO_ENCODE_DVI);
 
        if (intel_sdvo->is_tv &&
            !intel_sdvo_set_tv_format(intel_sdvo))
@@ -1395,6 +1399,9 @@ intel_sdvo_detect(struct drm_connector *
 
        intel_sdvo->attached_output = response;
 
+       intel_sdvo->has_hdmi_monitor = false;
+       intel_sdvo->has_hdmi_audio = false;
+
        if ((intel_sdvo_connector->output_flag & response) == 0)
                ret = connector_status_disconnected;
        else if (response & SDVO_TMDS_MASK)
@@ -1919,20 +1926,7 @@ intel_sdvo_select_i2c_bus(struct drm_i91
 static bool
 intel_sdvo_is_hdmi_connector(struct intel_sdvo *intel_sdvo, int device)
 {
-       int is_hdmi;
-
-       if (!intel_sdvo_check_supp_encode(intel_sdvo))
-               return false;
-
-       if (!intel_sdvo_set_target_output(intel_sdvo,
-                                         device == 0 ? SDVO_OUTPUT_TMDS0 : 
SDVO_OUTPUT_TMDS1))
-               return false;
-
-       is_hdmi = 0;
-       if (!intel_sdvo_get_value(intel_sdvo, SDVO_CMD_GET_ENCODE, &is_hdmi, 1))
-               return false;
-
-       return !!is_hdmi;
+       return intel_sdvo_check_supp_encode(intel_sdvo);
 }
 
 static u8
@@ -2034,12 +2028,7 @@ intel_sdvo_dvi_init(struct intel_sdvo *i
        connector->connector_type = DRM_MODE_CONNECTOR_DVID;
 
        if (intel_sdvo_is_hdmi_connector(intel_sdvo, device)) {
-               /* enable hdmi encoding mode if supported */
-               intel_sdvo_set_encode(intel_sdvo, SDVO_ENCODE_HDMI);
-               intel_sdvo_set_colorimetry(intel_sdvo,
-                                          SDVO_COLORIMETRY_RGB256);
                connector->connector_type = DRM_MODE_CONNECTOR_HDMIA;
-
                intel_sdvo->is_hdmi = true;
        }
        intel_sdvo->base.clone_mask = ((1 << INTEL_SDVO_NON_TV_CLONE_BIT) |


Patches currently in stable-queue which might be from ch...@chris-wilson.co.uk 
are

queue-2.6.37/drm-i915-add-dependency-on-config_tmpfs.patch
queue-2.6.37/drm-restore-the-old_fb-upon-modeset-failure.patch
queue-2.6.37/drm-i915-panel-only-record-the-backlight-level-when-it-is-enabled.patch
queue-2.6.37/drm-i915-sdvo-defer-detection-of-output-capabilities-until-probing.patch
queue-2.6.37/drm-i915-check-edp-encoder-correctly-when-setting-modes.patch
queue-2.6.37/drm-i915-recognise-non-vga-display-devices.patch
queue-2.6.37/drm-i915-lvds-add-aopen-i915gmm-hfs-to-the-list-of-false-positive-lvds.patch
queue-2.6.37/drm-i915-panel-the-backlight-is-enabled-if-the-current-value-is-non-zero.patch
queue-2.6.37/drm-i915-crt-check-for-a-analog-monitor-in-case-of-dvi-i.patch
queue-2.6.37/drm-i915-fix-calculation-of-edp-signal-levels-on-sandybridge.patch

_______________________________________________
stable mailing list
stable@linux.kernel.org
http://linux.kernel.org/mailman/listinfo/stable

Reply via email to