]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
drm/i915/sdvo: Always add a 30ms delay to make SDVO TV detection reliable
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 24 Nov 2010 17:37:17 +0000 (17:37 +0000)
committerAndi Kleen <ak@linux.intel.com>
Tue, 14 Dec 2010 22:40:11 +0000 (23:40 +0100)
commit ba84cd1f2b5dd49bda9300c5a11373f7e14c3c66 upstream.

Commit d09c23de intended to add a 30ms delay to give the ADD time to
detect any TVs connected. However, it used the sdvo->is_tv flag to do so
which is dependent upon the previous detection result and not whether the
output supports TVs.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
drivers/gpu/drm/i915/intel_sdvo.c

index 76993ac16cc1b1b84ca4c4ff102458ae47f76c80..b7485d080cce4a1e6b52033a1fcc49278e1fc5b8 100644 (file)
@@ -1580,10 +1580,10 @@ static enum drm_connector_status intel_sdvo_detect(struct drm_connector *connect
 
        intel_sdvo_write_cmd(intel_encoder,
                             SDVO_CMD_GET_ATTACHED_DISPLAYS, NULL, 0);
-       if (sdvo_priv->is_tv) {
-               /* add 30ms delay when the output type is SDVO-TV */
-               mdelay(30);
-       }
+       /* add 30ms delay when the output type might be TV */
+       if (sdvo_priv->caps.output_flags &
+           (SDVO_OUTPUT_SVID0 | SDVO_OUTPUT_CVBS0))
+               mdelay(30);
        status = intel_sdvo_read_response(intel_encoder, &response, 2);
 
        DRM_DEBUG_KMS("SDVO response %d %d\n", response & 0xff, response >> 8);