drm/radeon/kms: don't poll dac load detect.
authorDave Airlie <airlied@redhat.com>
Tue, 26 Oct 2010 02:55:52 +0000 (12:55 +1000)
committerDave Airlie <airlied@redhat.com>
Tue, 26 Oct 2010 02:55:52 +0000 (12:55 +1000)
This is slightly destructive, cpu intensive and can cause lockups.

Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/radeon/radeon_connectors.c

index 64c3ddf02167cb97ffdf8e0a06fdee4ebdd16a2d..4dac4b0a02eea1928837c7009f88e84f227a81f5 100644 (file)
@@ -663,6 +663,11 @@ radeon_vga_detect(struct drm_connector *connector, bool force)
                                ret = connector_status_connected;
                }
        } else {
+
+               /* if we aren't forcing don't do destructive polling */
+               if (!force)
+                       return connector->status;
+
                if (radeon_connector->dac_load_detect && encoder) {
                        encoder_funcs = encoder->helper_private;
                        ret = encoder_funcs->detect(encoder, connector);
@@ -850,6 +855,11 @@ radeon_dvi_detect(struct drm_connector *connector, bool force)
        if ((ret == connector_status_connected) && (radeon_connector->use_digital == true))
                goto out;
 
+       if (!force) {
+               ret = connector->status;
+               goto out;
+       }
+
        /* find analog encoder */
        if (radeon_connector->dac_load_detect) {
                for (i = 0; i < DRM_CONNECTOR_MAX_ENCODER; i++) {