--- drivers/gpu/drm/drm_crtc_helper.c 2010-08-02 00:11:14.000000000 +0200 +++ drivers/gpu/drm/drm_crtc_helper.c 2010-08-19 12:40:45.435465241 +0200 @@ -34,6 +34,9 @@ #include "drm_crtc_helper.h" #include "drm_fb_helper.h" +static bool drm_kms_helper_poll = true; +module_param_named(poll, drm_kms_helper_poll, bool, 0600); + static void drm_mode_validate_flag(struct drm_connector *connector, int flags) { @@ -98,8 +101,10 @@ connector->status = connector_status_disconnected; if (connector->funcs->force) connector->funcs->force(connector); - } else + } else { connector->status = connector->funcs->detect(connector); + drm_helper_hpd_irq_event(dev); + } if (connector->status == connector_status_disconnected) { DRM_DEBUG_KMS("%s is disconnected\n", @@ -820,6 +825,9 @@ bool repoll = false, changed = false; int ret; + if (!drm_kms_helper_poll) + return; + mutex_lock(&dev->mode_config.mutex); list_for_each_entry(connector, &dev->mode_config.connector_list, head) { @@ -874,6 +882,9 @@ struct drm_connector *connector; int ret; + if (!dev->mode_config.poll_enabled || !drm_kms_helper_poll) + return; + list_for_each_entry(connector, &dev->mode_config.connector_list, head) { if (connector->polled) poll = true; @@ -909,9 +920,11 @@ { if (!dev->mode_config.poll_enabled) return; + delayed_slow_work_cancel(&dev->mode_config.output_poll_slow_work); /* schedule a slow work asap */ - delayed_slow_work_enqueue(&dev->mode_config.output_poll_slow_work, 0); + if (drm_kms_helper_poll) + delayed_slow_work_enqueue(&dev->mode_config.output_poll_slow_work, 0); } EXPORT_SYMBOL(drm_helper_hpd_irq_event);