drm: extract drm_kms_helper_hotplug_event
[deliverable/linux.git] / drivers / gpu / drm / drm_crtc_helper.c
index b04cf5332599a2d019f5da08e17050ffadde2903..760a67534c6cfb562af3953d92aa07b0a27a7950 100644 (file)
@@ -936,6 +936,15 @@ int drm_helper_resume_force_mode(struct drm_device *dev)
 }
 EXPORT_SYMBOL(drm_helper_resume_force_mode);
 
+void drm_kms_helper_hotplug_event(struct drm_device *dev)
+{
+       /* send a uevent + call fbdev */
+       drm_sysfs_hotplug_event(dev);
+       if (dev->mode_config.funcs->output_poll_changed)
+               dev->mode_config.funcs->output_poll_changed(dev);
+}
+EXPORT_SYMBOL(drm_kms_helper_hotplug_event);
+
 #define DRM_OUTPUT_POLL_PERIOD (10*HZ)
 static void output_poll_execute(struct work_struct *work)
 {
@@ -978,12 +987,8 @@ static void output_poll_execute(struct work_struct *work)
 
        mutex_unlock(&dev->mode_config.mutex);
 
-       if (changed) {
-               /* send a uevent + call fbdev */
-               drm_sysfs_hotplug_event(dev);
-               if (dev->mode_config.funcs->output_poll_changed)
-                       dev->mode_config.funcs->output_poll_changed(dev);
-       }
+       if (changed)
+               drm_kms_helper_hotplug_event(dev);
 
        if (repoll)
                schedule_delayed_work(delayed_work, DRM_OUTPUT_POLL_PERIOD);
This page took 0.027658 seconds and 5 git commands to generate.