drm/radeon/kms: fix analog load detection on DVI-I connectors
authorAlex Deucher <alexander.deucher@amd.com>
Fri, 16 Mar 2012 16:22:09 +0000 (12:22 -0400)
committerDave Airlie <airlied@redhat.com>
Tue, 20 Mar 2012 08:45:39 +0000 (08:45 +0000)
We digital encoders have a detect function as well (for
DP to VGA bridges), so we make sure we choose the analog
one here.

Fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=47007

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/radeon/radeon_connectors.c

index 8c9a8115b632b255f3ad5deb2a88c1aee5dfffc6..d2e614479e6fb0b1301ab9f049cbe7077b909b86 100644 (file)
@@ -946,6 +946,10 @@ radeon_dvi_detect(struct drm_connector *connector, bool force)
 
                        encoder = obj_to_encoder(obj);
 
+                       if (encoder->encoder_type != DRM_MODE_ENCODER_DAC ||
+                           encoder->encoder_type != DRM_MODE_ENCODER_TVDAC)
+                               continue;
+
                        encoder_funcs = encoder->helper_private;
                        if (encoder_funcs->detect) {
                                if (ret != connector_status_connected) {