Jesse Keating 7a32965
From 5b904034b0ab5195d971b139d0c0b67ab21b063c Mon Sep 17 00:00:00 2001
Jesse Keating 7a32965
From: Kyle McMartin <kyle@dreadnought.i.jkkm.org>
Jesse Keating 7a32965
Date: Mon, 21 Jun 2010 20:33:16 +0100
Jesse Keating 7a32965
Subject: Revert "drm/fbdev: rework output polling to be back in the core. (v4)"
Jesse Keating 7a32965
Jesse Keating 7a32965
This reverts commit eb1f8e4f3be898df808e2dfc131099f5831d491d.
Jesse Keating 7a32965
Jesse Keating 7a32965
Conflicts:
Jesse Keating 7a32965
Jesse Keating 7a32965
	drivers/gpu/drm/drm_crtc_helper.c
Jesse Keating 7a32965
	drivers/gpu/drm/i915/i915_dma.c
Jesse Keating 7a32965
	drivers/gpu/drm/i915/intel_fb.c
Jesse Keating 7a32965
	drivers/gpu/drm/nouveau/nouveau_fbcon.c
Jesse Keating 7a32965
	drivers/gpu/drm/radeon/radeon_fb.c
Jesse Keating 7a32965
	include/drm/drm_crtc_helper.h
Jesse Keating 7a32965
---
Jesse Keating 7a32965
 drivers/gpu/drm/Kconfig                     |    2 +-
Jesse Keating 7a32965
 drivers/gpu/drm/drm_crtc_helper.c           |  111 ------------------------
Jesse Keating 7a32965
 drivers/gpu/drm/drm_fb_helper.c             |  123 +++++++++++++++++++++++----
Jesse Keating 7a32965
 drivers/gpu/drm/i915/i915_dma.c             |    1 -
Jesse Keating 7a32965
 drivers/gpu/drm/i915/i915_irq.c             |    3 +-
Jesse Keating 7a32965
 drivers/gpu/drm/i915/intel_crt.c            |    5 -
Jesse Keating 7a32965
 drivers/gpu/drm/i915/intel_display.c        |    2 -
Jesse Keating 7a32965
 drivers/gpu/drm/i915/intel_dp.c             |    2 -
Jesse Keating 7a32965
 drivers/gpu/drm/i915/intel_drv.h            |    2 +-
Jesse Keating 7a32965
 drivers/gpu/drm/i915/intel_fb.c             |   14 ++--
Jesse Keating 7a32965
 drivers/gpu/drm/i915/intel_hdmi.c           |    1 -
Jesse Keating 7a32965
 drivers/gpu/drm/i915/intel_sdvo.c           |    2 -
Jesse Keating 7a32965
 drivers/gpu/drm/nouveau/nouveau_connector.c |   12 ---
Jesse Keating 7a32965
 drivers/gpu/drm/nouveau/nouveau_display.c   |    1 -
Jesse Keating 7a32965
 drivers/gpu/drm/nouveau/nouveau_fbcon.c     |   13 ++-
Jesse Keating 7a32965
 drivers/gpu/drm/nouveau/nouveau_fbcon.h     |    2 +-
Jesse Keating 7a32965
 drivers/gpu/drm/nouveau/nouveau_state.c     |    5 +-
Jesse Keating 7a32965
 drivers/gpu/drm/nouveau/nv50_display.c      |    2 +-
Jesse Keating 7a32965
 drivers/gpu/drm/radeon/radeon_connectors.c  |   13 ---
Jesse Keating 7a32965
 drivers/gpu/drm/radeon/radeon_display.c     |   10 --
Jesse Keating 7a32965
 drivers/gpu/drm/radeon/radeon_fb.c          |   15 +++-
Jesse Keating 7a32965
 drivers/gpu/drm/radeon/radeon_irq_kms.c     |    5 +-
Jesse Keating 7a32965
 drivers/gpu/drm/radeon/radeon_mode.h        |    3 +-
Jesse Keating 7a32965
 include/drm/drm_crtc.h                      |   17 ----
Jesse Keating 7a32965
 include/drm/drm_crtc_helper.h               |    6 --
Jesse Keating 7a32965
 include/drm/drm_fb_helper.h                 |   13 +++-
Jesse Keating 7a32965
 26 files changed, 155 insertions(+), 230 deletions(-)
Jesse Keating 7a32965
Jesse Keating 7a32965
diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
Jesse Keating 7a32965
index c2711c6..a51a1e4 100644
Jesse Keating 7a32965
--- a/drivers/gpu/drm/Kconfig
Jesse Keating 7a32965
+++ b/drivers/gpu/drm/Kconfig
Jesse Keating 7a32965
@@ -9,7 +9,6 @@ menuconfig DRM
Jesse Keating 7a32965
 	depends on (AGP || AGP=n) && PCI && !EMULATED_CMPXCHG && MMU
Jesse Keating 7a32965
 	select I2C
Jesse Keating 7a32965
 	select I2C_ALGOBIT
Jesse Keating 7a32965
-	select SLOW_WORK
Jesse Keating 7a32965
 	help
Jesse Keating 7a32965
 	  Kernel-level support for the Direct Rendering Infrastructure (DRI)
Jesse Keating 7a32965
 	  introduced in XFree86 4.0. If you say Y here, you need to select
Jesse Keating 7a32965
@@ -24,6 +23,7 @@ config DRM_KMS_HELPER
Jesse Keating 7a32965
 	depends on DRM
Jesse Keating 7a32965
 	select FB
Jesse Keating 7a32965
 	select FRAMEBUFFER_CONSOLE if !EMBEDDED
Jesse Keating 7a32965
+	select SLOW_WORK
Jesse Keating 7a32965
 	help
Jesse Keating 7a32965
 	  FB and CRTC helpers for KMS drivers.
Jesse Keating 7a32965
 
Jesse Keating 7a32965
diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c
Jesse Keating 7a32965
index 9b2a541..b142ac2 100644
Jesse Keating 7a32965
--- a/drivers/gpu/drm/drm_crtc_helper.c
Jesse Keating 7a32965
+++ b/drivers/gpu/drm/drm_crtc_helper.c
Jesse Keating 7a32965
@@ -807,114 +807,3 @@ int drm_helper_resume_force_mode(struct drm_device *dev)
Jesse Keating 7a32965
 	return 0;
Jesse Keating 7a32965
 }
Jesse Keating 7a32965
 EXPORT_SYMBOL(drm_helper_resume_force_mode);
Jesse Keating 7a32965
-
Jesse Keating 7a32965
-static struct slow_work_ops output_poll_ops;
Jesse Keating 7a32965
-
Jesse Keating 7a32965
-#define DRM_OUTPUT_POLL_PERIOD (10*HZ)
Jesse Keating 7a32965
-static void output_poll_execute(struct slow_work *work)
Jesse Keating 7a32965
-{
Jesse Keating 7a32965
-	struct delayed_slow_work *delayed_work = container_of(work, struct delayed_slow_work, work);
Jesse Keating 7a32965
-	struct drm_device *dev = container_of(delayed_work, struct drm_device, mode_config.output_poll_slow_work);
Jesse Keating 7a32965
-	struct drm_connector *connector;
Jesse Keating 7a32965
-	enum drm_connector_status old_status, status;
Jesse Keating 7a32965
-	bool repoll = false, changed = false;
Jesse Keating 7a32965
-	int ret;
Jesse Keating 7a32965
-
Jesse Keating 7a32965
-	mutex_lock(&dev->mode_config.mutex);
Jesse Keating 7a32965
-	list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
Jesse Keating 7a32965
-
Jesse Keating 7a32965
-		/* if this is HPD or polled don't check it -
Jesse Keating 7a32965
-		   TV out for instance */
Jesse Keating 7a32965
-		if (!connector->polled)
Jesse Keating 7a32965
-			continue;
Jesse Keating 7a32965
-
Jesse Keating 7a32965
-		else if (connector->polled & (DRM_CONNECTOR_POLL_CONNECT | DRM_CONNECTOR_POLL_DISCONNECT))
Jesse Keating 7a32965
-			repoll = true;
Jesse Keating 7a32965
-
Jesse Keating 7a32965
-		old_status = connector->status;
Jesse Keating 7a32965
-		/* if we are connected and don't want to poll for disconnect
Jesse Keating 7a32965
-		   skip it */
Jesse Keating 7a32965
-		if (old_status == connector_status_connected &&
Jesse Keating 7a32965
-		    !(connector->polled & DRM_CONNECTOR_POLL_DISCONNECT) &&
Jesse Keating 7a32965
-		    !(connector->polled & DRM_CONNECTOR_POLL_HPD))
Jesse Keating 7a32965
-			continue;
Jesse Keating 7a32965
-
Jesse Keating 7a32965
-		status = connector->funcs->detect(connector);
Jesse Keating 7a32965
-		if (old_status != status)
Jesse Keating 7a32965
-			changed = true;
Jesse Keating 7a32965
-	}
Jesse Keating 7a32965
-
Jesse Keating 7a32965
-	mutex_unlock(&dev->mode_config.mutex);
Jesse Keating 7a32965
-
Jesse Keating 7a32965
-	if (changed) {
Jesse Keating 7a32965
-		/* send a uevent + call fbdev */
Jesse Keating 7a32965
-		drm_sysfs_hotplug_event(dev);
Jesse Keating 7a32965
-		if (dev->mode_config.funcs->output_poll_changed)
Jesse Keating 7a32965
-			dev->mode_config.funcs->output_poll_changed(dev);
Jesse Keating 7a32965
-	}
Jesse Keating 7a32965
-
Jesse Keating 7a32965
-	if (repoll) {
Jesse Keating 7a32965
-		ret = delayed_slow_work_enqueue(delayed_work, DRM_OUTPUT_POLL_PERIOD);
Jesse Keating 7a32965
-		if (ret)
Jesse Keating 7a32965
-			DRM_ERROR("delayed enqueue failed %d\n", ret);
Jesse Keating 7a32965
-	}
Jesse Keating 7a32965
-}
Jesse Keating 7a32965
-
Jesse Keating 7a32965
-void drm_kms_helper_poll_disable(struct drm_device *dev)
Jesse Keating 7a32965
-{
Jesse Keating 7a32965
-	if (!dev->mode_config.poll_enabled)
Jesse Keating 7a32965
-		return;
Jesse Keating 7a32965
-	delayed_slow_work_cancel(&dev->mode_config.output_poll_slow_work);
Jesse Keating 7a32965
-}
Jesse Keating 7a32965
-EXPORT_SYMBOL(drm_kms_helper_poll_disable);
Jesse Keating 7a32965
-
Jesse Keating 7a32965
-void drm_kms_helper_poll_enable(struct drm_device *dev)
Jesse Keating 7a32965
-{
Jesse Keating 7a32965
-	bool poll = false;
Jesse Keating 7a32965
-	struct drm_connector *connector;
Jesse Keating 7a32965
-	int ret;
Jesse Keating 7a32965
-
Jesse Keating 7a32965
-	list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
Jesse Keating 7a32965
-		if (connector->polled)
Jesse Keating 7a32965
-			poll = true;
Jesse Keating 7a32965
-	}
Jesse Keating 7a32965
-
Jesse Keating 7a32965
-	if (poll) {
Jesse Keating 7a32965
-		ret = delayed_slow_work_enqueue(&dev->mode_config.output_poll_slow_work, DRM_OUTPUT_POLL_PERIOD);
Jesse Keating 7a32965
-		if (ret)
Jesse Keating 7a32965
-			DRM_ERROR("delayed enqueue failed %d\n", ret);
Jesse Keating 7a32965
-	}
Jesse Keating 7a32965
-}
Jesse Keating 7a32965
-EXPORT_SYMBOL(drm_kms_helper_poll_enable);
Jesse Keating 7a32965
-
Jesse Keating 7a32965
-void drm_kms_helper_poll_init(struct drm_device *dev)
Jesse Keating 7a32965
-{
Jesse Keating 7a32965
-	slow_work_register_user(THIS_MODULE);
Jesse Keating 7a32965
-	delayed_slow_work_init(&dev->mode_config.output_poll_slow_work,
Jesse Keating 7a32965
-			       &output_poll_ops);
Jesse Keating 7a32965
-	dev->mode_config.poll_enabled = true;
Jesse Keating 7a32965
-
Jesse Keating 7a32965
-	drm_kms_helper_poll_enable(dev);
Jesse Keating 7a32965
-}
Jesse Keating 7a32965
-EXPORT_SYMBOL(drm_kms_helper_poll_init);
Jesse Keating 7a32965
-
Jesse Keating 7a32965
-void drm_kms_helper_poll_fini(struct drm_device *dev)
Jesse Keating 7a32965
-{
Jesse Keating 7a32965
-	drm_kms_helper_poll_disable(dev);
Jesse Keating 7a32965
-	slow_work_unregister_user(THIS_MODULE);
Jesse Keating 7a32965
-}
Jesse Keating 7a32965
-EXPORT_SYMBOL(drm_kms_helper_poll_fini);
Jesse Keating 7a32965
-
Jesse Keating 7a32965
-void drm_helper_hpd_irq_event(struct drm_device *dev)
Jesse Keating 7a32965
-{
Jesse Keating 7a32965
-	if (!dev->mode_config.poll_enabled)
Jesse Keating 7a32965
-		return;
Jesse Keating 7a32965
-	delayed_slow_work_cancel(&dev->mode_config.output_poll_slow_work);
Jesse Keating 7a32965
-	/* schedule a slow work asap */
Jesse Keating 7a32965
-	delayed_slow_work_enqueue(&dev->mode_config.output_poll_slow_work, 0);
Jesse Keating 7a32965
-}
Jesse Keating 7a32965
-EXPORT_SYMBOL(drm_helper_hpd_irq_event);
Jesse Keating 7a32965
-
Jesse Keating 7a32965
-static struct slow_work_ops output_poll_ops = {
Jesse Keating 7a32965
-	.execute = output_poll_execute,
Jesse Keating 7a32965
-};
Jesse Keating 7a32965
diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
Jesse Keating 7a32965
index 08c4c92..dcc6601 100644
Jesse Keating 7a32965
--- a/drivers/gpu/drm/drm_fb_helper.c
Jesse Keating 7a32965
+++ b/drivers/gpu/drm/drm_fb_helper.c
Jesse Keating 7a32965
@@ -42,6 +42,8 @@ MODULE_LICENSE("GPL and additional rights");
Jesse Keating 7a32965
 
Jesse Keating 7a32965
 static LIST_HEAD(kernel_fb_helper_list);
Jesse Keating 7a32965
 
Jesse Keating 7a32965
+static struct slow_work_ops output_status_change_ops;
Jesse Keating 7a32965
+
Jesse Keating 7a32965
 /* simple single crtc case helper function */
Jesse Keating 7a32965
 int drm_fb_helper_single_add_all_connectors(struct drm_fb_helper *fb_helper)
Jesse Keating 7a32965
 {
Jesse Keating 7a32965
@@ -423,13 +425,19 @@ static void drm_fb_helper_crtc_free(struct drm_fb_helper *helper)
Jesse Keating 7a32965
 
Jesse Keating 7a32965
 int drm_fb_helper_init(struct drm_device *dev,
Jesse Keating 7a32965
 		       struct drm_fb_helper *fb_helper,
Jesse Keating 7a32965
-		       int crtc_count, int max_conn_count)
Jesse Keating 7a32965
+		       int crtc_count, int max_conn_count,
Jesse Keating 7a32965
+		       bool polled)
Jesse Keating 7a32965
 {
Jesse Keating 7a32965
 	struct drm_crtc *crtc;
Jesse Keating 7a32965
 	int ret = 0;
Jesse Keating 7a32965
 	int i;
Jesse Keating 7a32965
 
Jesse Keating 7a32965
 	fb_helper->dev = dev;
Jesse Keating 7a32965
+	fb_helper->poll_enabled = polled;
Jesse Keating 7a32965
+
Jesse Keating 7a32965
+	slow_work_register_user(THIS_MODULE);
Jesse Keating 7a32965
+	delayed_slow_work_init(&fb_helper->output_status_change_slow_work,
Jesse Keating 7a32965
+			       &output_status_change_ops);
Jesse Keating 7a32965
 
Jesse Keating 7a32965
 	INIT_LIST_HEAD(&fb_helper->kernel_fb_list);
Jesse Keating 7a32965
 
Jesse Keating 7a32965
@@ -486,6 +494,8 @@ void drm_fb_helper_fini(struct drm_fb_helper *fb_helper)
Jesse Keating 7a32965
 
Jesse Keating 7a32965
 	drm_fb_helper_crtc_free(fb_helper);
Jesse Keating 7a32965
 
Jesse Keating 7a32965
+	delayed_slow_work_cancel(&fb_helper->output_status_change_slow_work);
Jesse Keating 7a32965
+	slow_work_unregister_user(THIS_MODULE);
Jesse Keating 7a32965
 }
Jesse Keating 7a32965
 EXPORT_SYMBOL(drm_fb_helper_fini);
Jesse Keating 7a32965
 
Jesse Keating 7a32965
@@ -703,7 +713,7 @@ int drm_fb_helper_set_par(struct fb_info *info)
Jesse Keating 7a32965
 
Jesse Keating 7a32965
 	if (fb_helper->delayed_hotplug) {
Jesse Keating 7a32965
 		fb_helper->delayed_hotplug = false;
Jesse Keating 7a32965
-		drm_fb_helper_hotplug_event(fb_helper);
Jesse Keating 7a32965
+		delayed_slow_work_enqueue(&fb_helper->output_status_change_slow_work, 0);
Jesse Keating 7a32965
 	}
Jesse Keating 7a32965
 	return 0;
Jesse Keating 7a32965
 }
Jesse Keating 7a32965
@@ -816,7 +826,7 @@ int drm_fb_helper_single_fb_probe(struct drm_fb_helper *fb_helper,
Jesse Keating 7a32965
 	if (crtc_count == 0 || sizes.fb_width == -1 || sizes.fb_height == -1) {
Jesse Keating 7a32965
 		/* hmm everyone went away - assume VGA cable just fell out
Jesse Keating 7a32965
 		   and will come back later. */
Jesse Keating 7a32965
-		DRM_INFO("Cannot find any crtc or sizes - going 1024x768\n");
Jesse Keating 7a32965
+		DRM_ERROR("Cannot find any crtc or sizes - going 1024x768\n");
Jesse Keating 7a32965
 		sizes.fb_width = sizes.surface_width = 1024;
Jesse Keating 7a32965
 		sizes.fb_height = sizes.surface_height = 768;
Jesse Keating 7a32965
 	}
Jesse Keating 7a32965
@@ -1362,7 +1372,12 @@ bool drm_fb_helper_initial_config(struct drm_fb_helper *fb_helper, int bpp_sel)
Jesse Keating 7a32965
 	 * we shouldn't end up with no modes here.
Jesse Keating 7a32965
 	 */
Jesse Keating 7a32965
 	if (count == 0) {
Jesse Keating 7a32965
-		printk(KERN_INFO "No connectors reported connected with modes\n");
Jesse Keating 7a32965
+		if (fb_helper->poll_enabled) {
Jesse Keating 7a32965
+			delayed_slow_work_enqueue(&fb_helper->output_status_change_slow_work,
Jesse Keating 7a32965
+						  5*HZ);
Jesse Keating 7a32965
+			printk(KERN_INFO "No connectors reported connected with modes - started polling\n");
Jesse Keating 7a32965
+		} else
Jesse Keating 7a32965
+			printk(KERN_INFO "No connectors reported connected with modes\n");
Jesse Keating 7a32965
 	}
Jesse Keating 7a32965
 	drm_setup_crtcs(fb_helper);
Jesse Keating 7a32965
 
Jesse Keating 7a32965
@@ -1370,16 +1385,71 @@ bool drm_fb_helper_initial_config(struct drm_fb_helper *fb_helper, int bpp_sel)
Jesse Keating 7a32965
 }
Jesse Keating 7a32965
 EXPORT_SYMBOL(drm_fb_helper_initial_config);
Jesse Keating 7a32965
 
Jesse Keating 7a32965
-bool drm_fb_helper_hotplug_event(struct drm_fb_helper *fb_helper)
Jesse Keating 7a32965
+/* we got a hotplug irq - need to update fbcon */
Jesse Keating 7a32965
+void drm_helper_fb_hpd_irq_event(struct drm_fb_helper *fb_helper)
Jesse Keating 7a32965
+{
Jesse Keating 7a32965
+	/* if we don't have the fbdev registered yet do nothing */
Jesse Keating 7a32965
+	if (!fb_helper->fbdev)
Jesse Keating 7a32965
+		return;
Jesse Keating 7a32965
+
Jesse Keating 7a32965
+	/* schedule a slow work asap */
Jesse Keating 7a32965
+	delayed_slow_work_enqueue(&fb_helper->output_status_change_slow_work, 0);
Jesse Keating 7a32965
+}
Jesse Keating 7a32965
+EXPORT_SYMBOL(drm_helper_fb_hpd_irq_event);
Jesse Keating 7a32965
+
Jesse Keating 7a32965
+bool drm_helper_fb_hotplug_event(struct drm_fb_helper *fb_helper, bool polled)
Jesse Keating 7a32965
 {
Jesse Keating 7a32965
 	int count = 0;
Jesse Keating 7a32965
+	int ret;
Jesse Keating 7a32965
 	u32 max_width, max_height, bpp_sel;
Jesse Keating 7a32965
-	bool bound = false, crtcs_bound = false;
Jesse Keating 7a32965
-	struct drm_crtc *crtc;
Jesse Keating 7a32965
 
Jesse Keating 7a32965
 	if (!fb_helper->fb)
Jesse Keating 7a32965
 		return false;
Jesse Keating 7a32965
+	DRM_DEBUG_KMS("\n");
Jesse Keating 7a32965
+
Jesse Keating 7a32965
+	max_width = fb_helper->fb->width;
Jesse Keating 7a32965
+	max_height = fb_helper->fb->height;
Jesse Keating 7a32965
+	bpp_sel = fb_helper->fb->bits_per_pixel;
Jesse Keating 7a32965
+
Jesse Keating 7a32965
+	count = drm_fb_helper_probe_connector_modes(fb_helper, max_width,
Jesse Keating 7a32965
+						    max_height);
Jesse Keating 7a32965
+	if (fb_helper->poll_enabled && !polled) {
Jesse Keating 7a32965
+		if (count) {
Jesse Keating 7a32965
+			delayed_slow_work_cancel(&fb_helper->output_status_change_slow_work);
Jesse Keating 7a32965
+		} else {
Jesse Keating 7a32965
+			ret = delayed_slow_work_enqueue(&fb_helper->output_status_change_slow_work, 5*HZ);
Jesse Keating 7a32965
+		}
Jesse Keating 7a32965
+	}
Jesse Keating 7a32965
+	drm_setup_crtcs(fb_helper);
Jesse Keating 7a32965
+
Jesse Keating 7a32965
+	return drm_fb_helper_single_fb_probe(fb_helper, bpp_sel);
Jesse Keating 7a32965
+}
Jesse Keating 7a32965
+EXPORT_SYMBOL(drm_helper_fb_hotplug_event);
Jesse Keating 7a32965
+
Jesse Keating 7a32965
+/*
Jesse Keating 7a32965
+ * delayed work queue execution function
Jesse Keating 7a32965
+ * - check if fbdev is actually in use on the gpu
Jesse Keating 7a32965
+ *   - if not set delayed flag and repoll if necessary
Jesse Keating 7a32965
+ * - check for connector status change
Jesse Keating 7a32965
+ * - repoll if 0 modes found
Jesse Keating 7a32965
+ *- call driver output status changed notifier
Jesse Keating 7a32965
+ */
Jesse Keating 7a32965
+static void output_status_change_execute(struct slow_work *work)
Jesse Keating 7a32965
+{
Jesse Keating 7a32965
+	struct delayed_slow_work *delayed_work = container_of(work, struct delayed_slow_work, work);
Jesse Keating 7a32965
+	struct drm_fb_helper *fb_helper = container_of(delayed_work, struct drm_fb_helper, output_status_change_slow_work);
Jesse Keating 7a32965
+	struct drm_connector *connector;
Jesse Keating 7a32965
+	enum drm_connector_status old_status, status;
Jesse Keating 7a32965
+	bool repoll, changed = false;
Jesse Keating 7a32965
+	int ret;
Jesse Keating 7a32965
+	int i;
Jesse Keating 7a32965
+	bool bound = false, crtcs_bound = false;
Jesse Keating 7a32965
+	struct drm_crtc *crtc;
Jesse Keating 7a32965
 
Jesse Keating 7a32965
+	repoll = fb_helper->poll_enabled;
Jesse Keating 7a32965
+
Jesse Keating 7a32965
+	/* first of all check the fbcon framebuffer is actually bound to any crtc */
Jesse Keating 7a32965
+	/* take into account that no crtc at all maybe bound */
Jesse Keating 7a32965
 	list_for_each_entry(crtc, &fb_helper->dev->mode_config.crtc_list, head) {
Jesse Keating 7a32965
 		if (crtc->fb)
Jesse Keating 7a32965
 			crtcs_bound = true;
Jesse Keating 7a32965
@@ -1387,21 +1457,38 @@ bool drm_fb_helper_hotplug_event(struct drm_fb_helper *fb_helper)
Jesse Keating 7a32965
 			bound = true;
Jesse Keating 7a32965
 	}
Jesse Keating 7a32965
 
Jesse Keating 7a32965
-	if (!bound && crtcs_bound) {
Jesse Keating 7a32965
+	if (bound == false && crtcs_bound) {
Jesse Keating 7a32965
 		fb_helper->delayed_hotplug = true;
Jesse Keating 7a32965
-		return false;
Jesse Keating 7a32965
+		goto requeue;
Jesse Keating 7a32965
 	}
Jesse Keating 7a32965
-	DRM_DEBUG_KMS("\n");
Jesse Keating 7a32965
 
Jesse Keating 7a32965
-	max_width = fb_helper->fb->width;
Jesse Keating 7a32965
-	max_height = fb_helper->fb->height;
Jesse Keating 7a32965
-	bpp_sel = fb_helper->fb->bits_per_pixel;
Jesse Keating 7a32965
+	for (i = 0; i < fb_helper->connector_count; i++) {
Jesse Keating 7a32965
+		connector = fb_helper->connector_info[i]->connector;
Jesse Keating 7a32965
+		old_status = connector->status;
Jesse Keating 7a32965
+		status = connector->funcs->detect(connector);
Jesse Keating 7a32965
+		if (old_status != status) {
Jesse Keating 7a32965
+			changed = true;
Jesse Keating 7a32965
+		}
Jesse Keating 7a32965
+		if (status == connector_status_connected && repoll) {
Jesse Keating 7a32965
+			DRM_DEBUG("%s is connected - stop polling\n", drm_get_connector_name(connector));
Jesse Keating 7a32965
+			repoll = false;
Jesse Keating 7a32965
+		}
Jesse Keating 7a32965
+	}
Jesse Keating 7a32965
 
Jesse Keating 7a32965
-	count = drm_fb_helper_probe_connector_modes(fb_helper, max_width,
Jesse Keating 7a32965
-						    max_height);
Jesse Keating 7a32965
-	drm_setup_crtcs(fb_helper);
Jesse Keating 7a32965
+	if (changed) {
Jesse Keating 7a32965
+		if (fb_helper->funcs->fb_output_status_changed)
Jesse Keating 7a32965
+			fb_helper->funcs->fb_output_status_changed(fb_helper);
Jesse Keating 7a32965
+	}
Jesse Keating 7a32965
 
Jesse Keating 7a32965
-	return drm_fb_helper_single_fb_probe(fb_helper, bpp_sel);
Jesse Keating 7a32965
+requeue:
Jesse Keating 7a32965
+	if (repoll) {
Jesse Keating 7a32965
+		ret = delayed_slow_work_enqueue(delayed_work, 5*HZ);
Jesse Keating 7a32965
+		if (ret)
Jesse Keating 7a32965
+			DRM_ERROR("delayed enqueue failed %d\n", ret);
Jesse Keating 7a32965
+	}
Jesse Keating 7a32965
 }
Jesse Keating 7a32965
-EXPORT_SYMBOL(drm_fb_helper_hotplug_event);
Jesse Keating 7a32965
+
Jesse Keating 7a32965
+static struct slow_work_ops output_status_change_ops = {
Jesse Keating 7a32965
+	.execute = output_status_change_execute,
Jesse Keating 7a32965
+};
Jesse Keating 7a32965
 
Jesse Keating 7a32965
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
Jesse Keating 7a32965
index 59a2bf8..76ace2d 100644
Jesse Keating 7a32965
--- a/drivers/gpu/drm/i915/i915_dma.c
Jesse Keating 7a32965
+++ b/drivers/gpu/drm/i915/i915_dma.c
Jesse Keating 7a32965
@@ -1430,7 +1430,6 @@ static int i915_load_modeset_init(struct drm_device *dev,
Jesse Keating 7a32965
 	if (ret)
Jesse Keating 7a32965
 		goto cleanup_irq;
Jesse Keating 7a32965
 
Jesse Keating 7a32965
-	drm_kms_helper_poll_init(dev);
Jesse Keating 7a32965
 	return 0;
Jesse Keating 7a32965
 
Jesse Keating 7a32965
 cleanup_irq:
Jesse Keating 7a32965
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
Jesse Keating 7a32965
index 2479be0..6350bd3 100644
Jesse Keating 7a32965
--- a/drivers/gpu/drm/i915/i915_irq.c
Jesse Keating 7a32965
+++ b/drivers/gpu/drm/i915/i915_irq.c
Jesse Keating 7a32965
@@ -271,7 +271,8 @@ static void i915_hotplug_work_func(struct work_struct *work)
Jesse Keating 7a32965
 		}
Jesse Keating 7a32965
 	}
Jesse Keating 7a32965
 	/* Just fire off a uevent and let userspace tell us what to do */
Jesse Keating 7a32965
-	drm_helper_hpd_irq_event(dev);
Jesse Keating 7a32965
+	intelfb_hotplug(dev, false);
Jesse Keating 7a32965
+	drm_sysfs_hotplug_event(dev);
Jesse Keating 7a32965
 }
Jesse Keating 7a32965
 
Jesse Keating 7a32965
 static void i915_handle_rps_change(struct drm_device *dev)
Jesse Keating 7a32965
diff --git a/drivers/gpu/drm/i915/intel_crt.c b/drivers/gpu/drm/i915/intel_crt.c
Jesse Keating 7a32965
index 22ff384..125eded 100644
Jesse Keating 7a32965
--- a/drivers/gpu/drm/i915/intel_crt.c
Jesse Keating 7a32965
+++ b/drivers/gpu/drm/i915/intel_crt.c
Jesse Keating 7a32965
@@ -584,10 +584,5 @@ void intel_crt_init(struct drm_device *dev)
Jesse Keating 7a32965
 
Jesse Keating 7a32965
 	drm_sysfs_connector_add(connector);
Jesse Keating 7a32965
 
Jesse Keating 7a32965
-	if (I915_HAS_HOTPLUG(dev))
Jesse Keating 7a32965
-		connector->polled = DRM_CONNECTOR_POLL_HPD;
Jesse Keating 7a32965
-	else
Jesse Keating 7a32965
-		connector->polled = DRM_CONNECTOR_POLL_CONNECT;
Jesse Keating 7a32965
-
Jesse Keating 7a32965
 	dev_priv->hotplug_supported_mask |= CRT_HOTPLUG_INT_STATUS;
Jesse Keating 7a32965
 }
Jesse Keating 7a32965
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
Jesse Keating 7a32965
index d753257..70537cf 100644
Jesse Keating 7a32965
--- a/drivers/gpu/drm/i915/intel_display.c
Jesse Keating 7a32965
+++ b/drivers/gpu/drm/i915/intel_display.c
Jesse Keating 7a32965
@@ -5036,7 +5036,6 @@ intel_user_framebuffer_create(struct drm_device *dev,
Jesse Keating 7a32965
 
Jesse Keating 7a32965
 static const struct drm_mode_config_funcs intel_mode_funcs = {
Jesse Keating 7a32965
 	.fb_create = intel_user_framebuffer_create,
Jesse Keating 7a32965
-	.output_poll_changed = intel_fb_output_poll_changed,
Jesse Keating 7a32965
 };
Jesse Keating 7a32965
 
Jesse Keating 7a32965
 static struct drm_gem_object *
Jesse Keating 7a32965
@@ -5538,7 +5537,6 @@ void intel_modeset_cleanup(struct drm_device *dev)
Jesse Keating 7a32965
 
Jesse Keating 7a32965
 	mutex_lock(&dev->struct_mutex);
Jesse Keating 7a32965
 
Jesse Keating 7a32965
-	drm_kms_helper_poll_fini(dev);
Jesse Keating 7a32965
 	intel_fbdev_fini(dev);
Jesse Keating 7a32965
 
Jesse Keating 7a32965
 	list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
Jesse Keating 7a32965
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
Jesse Keating 7a32965
index 49b54f0..1815df5 100644
Jesse Keating 7a32965
--- a/drivers/gpu/drm/i915/intel_dp.c
Jesse Keating 7a32965
+++ b/drivers/gpu/drm/i915/intel_dp.c
Jesse Keating 7a32965
@@ -1393,8 +1393,6 @@ intel_dp_init(struct drm_device *dev, int output_reg)
Jesse Keating 7a32965
 			   DRM_MODE_CONNECTOR_DisplayPort);
Jesse Keating 7a32965
 	drm_connector_helper_add(connector, &intel_dp_connector_helper_funcs);
Jesse Keating 7a32965
 
Jesse Keating 7a32965
-	connector->polled = DRM_CONNECTOR_POLL_HPD;
Jesse Keating 7a32965
-
Jesse Keating 7a32965
 	if (output_reg == DP_A)
Jesse Keating 7a32965
 		intel_encoder->type = INTEL_OUTPUT_EDP;
Jesse Keating 7a32965
 	else
Jesse Keating 7a32965
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
Jesse Keating 7a32965
index df931f7..3230e8d 100644
Jesse Keating 7a32965
--- a/drivers/gpu/drm/i915/intel_drv.h
Jesse Keating 7a32965
+++ b/drivers/gpu/drm/i915/intel_drv.h
Jesse Keating 7a32965
@@ -235,5 +235,5 @@ extern int intel_overlay_put_image(struct drm_device *dev, void *data,
Jesse Keating 7a32965
 extern int intel_overlay_attrs(struct drm_device *dev, void *data,
Jesse Keating 7a32965
 			       struct drm_file *file_priv);
Jesse Keating 7a32965
 
Jesse Keating 7a32965
-extern void intel_fb_output_poll_changed(struct drm_device *dev);
Jesse Keating 7a32965
+void intelfb_hotplug(struct drm_device *dev, bool polled);
Jesse Keating 7a32965
 #endif /* __INTEL_DRV_H__ */
Jesse Keating 7a32965
diff --git a/drivers/gpu/drm/i915/intel_fb.c b/drivers/gpu/drm/i915/intel_fb.c
Jesse Keating 7a32965
index c3c5052..79098b3 100644
Jesse Keating 7a32965
--- a/drivers/gpu/drm/i915/intel_fb.c
Jesse Keating 7a32965
+++ b/drivers/gpu/drm/i915/intel_fb.c
Jesse Keating 7a32965
@@ -211,6 +211,12 @@ static int intel_fb_find_or_create_single(struct drm_fb_helper *helper,
Jesse Keating 7a32965
 	return new_fb;
Jesse Keating 7a32965
 }
Jesse Keating 7a32965
 
Jesse Keating 7a32965
+void intelfb_hotplug(struct drm_device *dev, bool polled)
Jesse Keating 7a32965
+{
Jesse Keating 7a32965
+	drm_i915_private_t *dev_priv = dev->dev_private;
Jesse Keating 7a32965
+	drm_helper_fb_hpd_irq_event(&dev_priv->fbdev->helper);
Jesse Keating 7a32965
+}
Jesse Keating 7a32965
+
Jesse Keating 7a32965
 static struct drm_fb_helper_funcs intel_fb_helper_funcs = {
Jesse Keating 7a32965
 	.gamma_set = intel_crtc_fb_gamma_set,
Jesse Keating 7a32965
 	.gamma_get = intel_crtc_fb_gamma_get,
Jesse Keating 7a32965
@@ -256,7 +262,7 @@ int intel_fbdev_init(struct drm_device *dev)
Jesse Keating 7a32965
 
Jesse Keating 7a32965
 	ret = drm_fb_helper_init(dev, &ifbdev->helper,
Jesse Keating 7a32965
 				 dev_priv->num_pipe,
Jesse Keating 7a32965
-				 INTELFB_CONN_LIMIT);
Jesse Keating 7a32965
+				 INTELFB_CONN_LIMIT, false);
Jesse Keating 7a32965
 	if (ret) {
Jesse Keating 7a32965
 		kfree(ifbdev);
Jesse Keating 7a32965
 		return ret;
Jesse Keating 7a32965
@@ -278,9 +284,3 @@ void intel_fbdev_fini(struct drm_device *dev)
Jesse Keating 7a32965
 	dev_priv->fbdev = NULL;
Jesse Keating 7a32965
 }
Jesse Keating 7a32965
 MODULE_LICENSE("GPL and additional rights");
Jesse Keating 7a32965
-
Jesse Keating 7a32965
-void intel_fb_output_poll_changed(struct drm_device *dev)
Jesse Keating 7a32965
-{
Jesse Keating 7a32965
-	drm_i915_private_t *dev_priv = dev->dev_private;
Jesse Keating 7a32965
-	drm_fb_helper_hotplug_event(&dev_priv->fbdev->helper);
Jesse Keating 7a32965
-}
Jesse Keating 7a32965
diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
Jesse Keating 7a32965
index 83bd764..acaca07 100644
Jesse Keating 7a32965
--- a/drivers/gpu/drm/i915/intel_hdmi.c
Jesse Keating 7a32965
+++ b/drivers/gpu/drm/i915/intel_hdmi.c
Jesse Keating 7a32965
@@ -240,7 +240,6 @@ void intel_hdmi_init(struct drm_device *dev, int sdvox_reg)
Jesse Keating 7a32965
 
Jesse Keating 7a32965
 	intel_encoder->type = INTEL_OUTPUT_HDMI;
Jesse Keating 7a32965
 
Jesse Keating 7a32965
-	connector->polled = DRM_CONNECTOR_POLL_HPD;
Jesse Keating 7a32965
 	connector->interlace_allowed = 0;
Jesse Keating 7a32965
 	connector->doublescan_allowed = 0;
Jesse Keating 7a32965
 	intel_encoder->crtc_mask = (1 << 0) | (1 << 1);
Jesse Keating 7a32965
diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c
Jesse Keating 7a32965
index 76993ac..1c716b5 100644
Jesse Keating 7a32965
--- a/drivers/gpu/drm/i915/intel_sdvo.c
Jesse Keating 7a32965
+++ b/drivers/gpu/drm/i915/intel_sdvo.c
Jesse Keating 7a32965
@@ -2218,7 +2218,6 @@ intel_sdvo_dvi_init(struct intel_encoder *intel_encoder, int device)
Jesse Keating 7a32965
 	}
Jesse Keating 7a32965
 
Jesse Keating 7a32965
 	connector = &intel_connector->base;
Jesse Keating 7a32965
-	connector->polled = DRM_CONNECTOR_POLL_CONNECT | DRM_CONNECTOR_POLL_DISCONNECT;
Jesse Keating 7a32965
 	encoder->encoder_type = DRM_MODE_ENCODER_TMDS;
Jesse Keating 7a32965
 	connector->connector_type = DRM_MODE_CONNECTOR_DVID;
Jesse Keating 7a32965
 
Jesse Keating 7a32965
@@ -2285,7 +2284,6 @@ intel_sdvo_analog_init(struct intel_encoder *intel_encoder, int device)
Jesse Keating 7a32965
                 return false;
Jesse Keating 7a32965
 
Jesse Keating 7a32965
         connector = &intel_connector->base;
Jesse Keating 7a32965
-	connector->polled = DRM_CONNECTOR_POLL_CONNECT;
Jesse Keating 7a32965
         encoder->encoder_type = DRM_MODE_ENCODER_DAC;
Jesse Keating 7a32965
         connector->connector_type = DRM_MODE_CONNECTOR_VGA;
Jesse Keating 7a32965
         sdvo_connector = intel_connector->dev_priv;
Jesse Keating 7a32965
diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.c b/drivers/gpu/drm/nouveau/nouveau_connector.c
Jesse Keating 7a32965
index 149ed22..9a61f3c 100644
Jesse Keating 7a32965
--- a/drivers/gpu/drm/nouveau/nouveau_connector.c
Jesse Keating 7a32965
+++ b/drivers/gpu/drm/nouveau/nouveau_connector.c
Jesse Keating 7a32965
@@ -846,7 +846,6 @@ nouveau_connector_create(struct drm_device *dev,
Jesse Keating 7a32965
 
Jesse Keating 7a32965
 	switch (dcb->type) {
Jesse Keating 7a32965
 	case DCB_CONNECTOR_VGA:
Jesse Keating 7a32965
-		connector->polled = DRM_CONNECTOR_POLL_CONNECT;
Jesse Keating 7a32965
 		if (dev_priv->card_type >= NV_50) {
Jesse Keating 7a32965
 			drm_connector_attach_property(connector,
Jesse Keating 7a32965
 					dev->mode_config.scaling_mode_property,
Jesse Keating 7a32965
@@ -858,17 +857,6 @@ nouveau_connector_create(struct drm_device *dev,
Jesse Keating 7a32965
 	case DCB_CONNECTOR_TV_3:
Jesse Keating 7a32965
 		nv_connector->scaling_mode = DRM_MODE_SCALE_NONE;
Jesse Keating 7a32965
 		break;
Jesse Keating 7a32965
-	case DCB_CONNECTOR_DP:
Jesse Keating 7a32965
-	case DCB_CONNECTOR_eDP:
Jesse Keating 7a32965
-	case DCB_CONNECTOR_HDMI_0:
Jesse Keating 7a32965
-	case DCB_CONNECTOR_HDMI_1:
Jesse Keating 7a32965
-	case DCB_CONNECTOR_DVI_I:
Jesse Keating 7a32965
-	case DCB_CONNECTOR_DVI_D:
Jesse Keating 7a32965
-		if (dev_priv->card_type >= NV_50)
Jesse Keating 7a32965
-			connector->polled = DRM_CONNECTOR_POLL_HPD;
Jesse Keating 7a32965
-		else
Jesse Keating 7a32965
-			connector->polled = DRM_CONNECTOR_POLL_CONNECT;
Jesse Keating 7a32965
-		/* fall-through */
Jesse Keating 7a32965
 	default:
Jesse Keating 7a32965
 		nv_connector->scaling_mode = DRM_MODE_SCALE_FULLSCREEN;
Jesse Keating 7a32965
 
Jesse Keating 7a32965
diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c
Jesse Keating 7a32965
index 74e6b4e..9d7928f 100644
Jesse Keating 7a32965
--- a/drivers/gpu/drm/nouveau/nouveau_display.c
Jesse Keating 7a32965
+++ b/drivers/gpu/drm/nouveau/nouveau_display.c
Jesse Keating 7a32965
@@ -101,6 +101,5 @@ nouveau_user_framebuffer_create(struct drm_device *dev,
Jesse Keating 7a32965
 
Jesse Keating 7a32965
 const struct drm_mode_config_funcs nouveau_mode_config_funcs = {
Jesse Keating 7a32965
 	.fb_create = nouveau_user_framebuffer_create,
Jesse Keating 7a32965
-	.output_poll_changed = nouveau_fbcon_output_poll_changed,
Jesse Keating 7a32965
 };
Jesse Keating 7a32965
 
Jesse Keating 7a32965
diff --git a/drivers/gpu/drm/nouveau/nouveau_fbcon.c b/drivers/gpu/drm/nouveau/nouveau_fbcon.c
Jesse Keating 7a32965
index c9a4a0d..0a59f96 100644
Jesse Keating 7a32965
--- a/drivers/gpu/drm/nouveau/nouveau_fbcon.c
Jesse Keating 7a32965
+++ b/drivers/gpu/drm/nouveau/nouveau_fbcon.c
Jesse Keating 7a32965
@@ -326,11 +326,15 @@ nouveau_fbcon_find_or_create_single(struct drm_fb_helper *helper,
Jesse Keating 7a32965
 	return new_fb;
Jesse Keating 7a32965
 }
Jesse Keating 7a32965
 
Jesse Keating 7a32965
-void
Jesse Keating 7a32965
-nouveau_fbcon_output_poll_changed(struct drm_device *dev)
Jesse Keating 7a32965
+void nouveau_fbcon_hotplug(struct drm_device *dev)
Jesse Keating 7a32965
 {
Jesse Keating 7a32965
 	struct drm_nouveau_private *dev_priv = dev->dev_private;
Jesse Keating 7a32965
-	drm_fb_helper_hotplug_event(&dev_priv->nfbdev->helper);
Jesse Keating 7a32965
+	drm_helper_fb_hpd_irq_event(&dev_priv->nfbdev->helper);
Jesse Keating 7a32965
+}
Jesse Keating 7a32965
+
Jesse Keating 7a32965
+static void nouveau_fbcon_output_status_changed(struct drm_fb_helper *fb_helper)
Jesse Keating 7a32965
+{
Jesse Keating 7a32965
+	drm_helper_fb_hotplug_event(fb_helper, true);
Jesse Keating 7a32965
 }
Jesse Keating 7a32965
 
Jesse Keating 7a32965
 int
Jesse Keating 7a32965
@@ -370,6 +374,7 @@ static struct drm_fb_helper_funcs nouveau_fbcon_helper_funcs = {
Jesse Keating 7a32965
 	.gamma_set = nouveau_fbcon_gamma_set,
Jesse Keating 7a32965
 	.gamma_get = nouveau_fbcon_gamma_get,
Jesse Keating 7a32965
 	.fb_probe = nouveau_fbcon_find_or_create_single,
Jesse Keating 7a32965
+	.fb_output_status_changed = nouveau_fbcon_output_status_changed,
Jesse Keating 7a32965
 };
Jesse Keating 7a32965
 
Jesse Keating 7a32965
 
Jesse Keating 7a32965
@@ -387,7 +392,7 @@ int nouveau_fbcon_init(struct drm_device *dev)
Jesse Keating 7a32965
 	dev_priv->nfbdev = nfbdev;
Jesse Keating 7a32965
 	nfbdev->helper.funcs = &nouveau_fbcon_helper_funcs;
Jesse Keating 7a32965
 
Jesse Keating 7a32965
-	ret = drm_fb_helper_init(dev, &nfbdev->helper, 2, 4);
Jesse Keating 7a32965
+	ret = drm_fb_helper_init(dev, &nfbdev->helper, 2, 4, true);
Jesse Keating 7a32965
 	if (ret) {
Jesse Keating 7a32965
 		kfree(nfbdev);
Jesse Keating 7a32965
 		return ret;
Jesse Keating 7a32965
diff --git a/drivers/gpu/drm/nouveau/nouveau_fbcon.h b/drivers/gpu/drm/nouveau/nouveau_fbcon.h
Jesse Keating 7a32965
index e7e1268..bf8e00d 100644
Jesse Keating 7a32965
--- a/drivers/gpu/drm/nouveau/nouveau_fbcon.h
Jesse Keating 7a32965
+++ b/drivers/gpu/drm/nouveau/nouveau_fbcon.h
Jesse Keating 7a32965
@@ -58,6 +58,6 @@ void nouveau_fbcon_zfill_all(struct drm_device *dev);
Jesse Keating 7a32965
 void nouveau_fbcon_save_disable_accel(struct drm_device *dev);
Jesse Keating 7a32965
 void nouveau_fbcon_restore_accel(struct drm_device *dev);
Jesse Keating 7a32965
 
Jesse Keating 7a32965
-void nouveau_fbcon_output_poll_changed(struct drm_device *dev);
Jesse Keating 7a32965
+void nouveau_fbcon_hotplug(struct drm_device *dev);
Jesse Keating 7a32965
 #endif /* __NV50_FBCON_H__ */
Jesse Keating 7a32965
 
Jesse Keating 7a32965
diff --git a/drivers/gpu/drm/nouveau/nouveau_state.c b/drivers/gpu/drm/nouveau/nouveau_state.c
Jesse Keating 7a32965
index b02a231..4dcb976 100644
Jesse Keating 7a32965
--- a/drivers/gpu/drm/nouveau/nouveau_state.c
Jesse Keating 7a32965
+++ b/drivers/gpu/drm/nouveau/nouveau_state.c
Jesse Keating 7a32965
@@ -519,10 +519,8 @@ nouveau_card_init(struct drm_device *dev)
Jesse Keating 7a32965
 
Jesse Keating 7a32965
 	dev_priv->init_state = NOUVEAU_CARD_INIT_DONE;
Jesse Keating 7a32965
 
Jesse Keating 7a32965
-	if (drm_core_check_feature(dev, DRIVER_MODESET)) {
Jesse Keating 7a32965
+	if (drm_core_check_feature(dev, DRIVER_MODESET))
Jesse Keating 7a32965
 		nouveau_fbcon_init(dev);
Jesse Keating 7a32965
-		drm_kms_helper_poll_init(dev);
Jesse Keating 7a32965
-	}
Jesse Keating 7a32965
 
Jesse Keating 7a32965
 	return 0;
Jesse Keating 7a32965
 
Jesse Keating 7a32965
@@ -844,7 +842,6 @@ int nouveau_unload(struct drm_device *dev)
Jesse Keating 7a32965
 	struct drm_nouveau_private *dev_priv = dev->dev_private;
Jesse Keating 7a32965
 
Jesse Keating 7a32965
 	if (drm_core_check_feature(dev, DRIVER_MODESET)) {
Jesse Keating 7a32965
-		drm_kms_helper_poll_fini(dev);
Jesse Keating 7a32965
 		nouveau_fbcon_fini(dev);
Jesse Keating 7a32965
 		if (dev_priv->card_type >= NV_50)
Jesse Keating 7a32965
 			nv50_display_destroy(dev);
Jesse Keating 7a32965
diff --git a/drivers/gpu/drm/nouveau/nv50_display.c b/drivers/gpu/drm/nouveau/nv50_display.c
Jesse Keating 7a32965
index 580a5d1..e6a44af 100644
Jesse Keating 7a32965
--- a/drivers/gpu/drm/nouveau/nv50_display.c
Jesse Keating 7a32965
+++ b/drivers/gpu/drm/nouveau/nv50_display.c
Jesse Keating 7a32965
@@ -980,7 +980,7 @@ nv50_display_irq_hotplug_bh(struct work_struct *work)
Jesse Keating 7a32965
 	if (dev_priv->chipset >= 0x90)
Jesse Keating 7a32965
 		nv_wr32(dev, 0xe074, nv_rd32(dev, 0xe074));
Jesse Keating 7a32965
 
Jesse Keating 7a32965
-	drm_helper_hpd_irq_event(dev);
Jesse Keating 7a32965
+	nouveau_fbcon_hotplug(dev);
Jesse Keating 7a32965
 }
Jesse Keating 7a32965
 
Jesse Keating 7a32965
 void
Jesse Keating 7a32965
diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm/radeon/radeon_connectors.c
Jesse Keating 7a32965
index 0c7ccc6..40a24c9 100644
Jesse Keating 7a32965
--- a/drivers/gpu/drm/radeon/radeon_connectors.c
Jesse Keating 7a32965
+++ b/drivers/gpu/drm/radeon/radeon_connectors.c
Jesse Keating 7a32965
@@ -1085,7 +1085,6 @@ radeon_add_atom_connector(struct drm_device *dev,
Jesse Keating 7a32965
 		drm_connector_attach_property(&radeon_connector->base,
Jesse Keating 7a32965
 					      rdev->mode_info.load_detect_property,
Jesse Keating 7a32965
 					      1);
Jesse Keating 7a32965
-		connector->polled = DRM_CONNECTOR_POLL_CONNECT;
Jesse Keating 7a32965
 		break;
Jesse Keating 7a32965
 	case DRM_MODE_CONNECTOR_DVIA:
Jesse Keating 7a32965
 		drm_connector_init(dev, &radeon_connector->base, &radeon_vga_connector_funcs, connector_type);
Jesse Keating 7a32965
@@ -1212,12 +1211,6 @@ radeon_add_atom_connector(struct drm_device *dev,
Jesse Keating 7a32965
 		break;
Jesse Keating 7a32965
 	}
Jesse Keating 7a32965
 
Jesse Keating 7a32965
-	if (hpd->hpd == RADEON_HPD_NONE) {
Jesse Keating 7a32965
-		if (i2c_bus->valid)
Jesse Keating 7a32965
-			connector->polled = DRM_CONNECTOR_POLL_CONNECT;
Jesse Keating 7a32965
-	} else
Jesse Keating 7a32965
-		connector->polled = DRM_CONNECTOR_POLL_HPD;
Jesse Keating 7a32965
-
Jesse Keating 7a32965
 	connector->display_info.subpixel_order = subpixel_order;
Jesse Keating 7a32965
 	drm_sysfs_connector_add(connector);
Jesse Keating 7a32965
 	return;
Jesse Keating 7a32965
@@ -1279,7 +1272,6 @@ radeon_add_legacy_connector(struct drm_device *dev,
Jesse Keating 7a32965
 		drm_connector_attach_property(&radeon_connector->base,
Jesse Keating 7a32965
 					      rdev->mode_info.load_detect_property,
Jesse Keating 7a32965
 					      1);
Jesse Keating 7a32965
-		connector->polled = DRM_CONNECTOR_POLL_CONNECT;
Jesse Keating 7a32965
 		break;
Jesse Keating 7a32965
 	case DRM_MODE_CONNECTOR_DVIA:
Jesse Keating 7a32965
 		drm_connector_init(dev, &radeon_connector->base, &radeon_vga_connector_funcs, connector_type);
Jesse Keating 7a32965
@@ -1348,11 +1340,6 @@ radeon_add_legacy_connector(struct drm_device *dev,
Jesse Keating 7a32965
 		break;
Jesse Keating 7a32965
 	}
Jesse Keating 7a32965
 
Jesse Keating 7a32965
-	if (hpd->hpd == RADEON_HPD_NONE) {
Jesse Keating 7a32965
-		if (i2c_bus->valid)
Jesse Keating 7a32965
-			connector->polled = DRM_CONNECTOR_POLL_CONNECT;
Jesse Keating 7a32965
-	} else
Jesse Keating 7a32965
-		connector->polled = DRM_CONNECTOR_POLL_HPD;
Jesse Keating 7a32965
 	connector->display_info.subpixel_order = subpixel_order;
Jesse Keating 7a32965
 	drm_sysfs_connector_add(connector);
Jesse Keating 7a32965
 	return;
Jesse Keating 7a32965
diff --git a/drivers/gpu/drm/radeon/radeon_display.c b/drivers/gpu/drm/radeon/radeon_display.c
Jesse Keating 7a32965
index c73444a..ed756be 100644
Jesse Keating 7a32965
--- a/drivers/gpu/drm/radeon/radeon_display.c
Jesse Keating 7a32965
+++ b/drivers/gpu/drm/radeon/radeon_display.c
Jesse Keating 7a32965
@@ -887,15 +887,8 @@ radeon_user_framebuffer_create(struct drm_device *dev,
Jesse Keating 7a32965
 	return &radeon_fb->base;
Jesse Keating 7a32965
 }
Jesse Keating 7a32965
 
Jesse Keating 7a32965
-static void radeon_output_poll_changed(struct drm_device *dev)
Jesse Keating 7a32965
-{
Jesse Keating 7a32965
-	struct radeon_device *rdev = dev->dev_private;
Jesse Keating 7a32965
-	radeon_fb_output_poll_changed(rdev);
Jesse Keating 7a32965
-}
Jesse Keating 7a32965
-
Jesse Keating 7a32965
 static const struct drm_mode_config_funcs radeon_mode_funcs = {
Jesse Keating 7a32965
 	.fb_create = radeon_user_framebuffer_create,
Jesse Keating 7a32965
-	.output_poll_changed = radeon_output_poll_changed
Jesse Keating 7a32965
 };
Jesse Keating 7a32965
 
Jesse Keating 7a32965
 struct drm_prop_enum_list {
Jesse Keating 7a32965
@@ -1044,8 +1037,6 @@ int radeon_modeset_init(struct radeon_device *rdev)
Jesse Keating 7a32965
 		radeon_pm_init(rdev);
Jesse Keating 7a32965
 
Jesse Keating 7a32965
 	radeon_fbdev_init(rdev);
Jesse Keating 7a32965
-	drm_kms_helper_poll_init(rdev->ddev);
Jesse Keating 7a32965
-
Jesse Keating 7a32965
 	return 0;
Jesse Keating 7a32965
 }
Jesse Keating 7a32965
 
Jesse Keating 7a32965
@@ -1058,7 +1049,6 @@ void radeon_modeset_fini(struct radeon_device *rdev)
Jesse Keating 7a32965
 		radeon_pm_fini(rdev);
Jesse Keating 7a32965
 
Jesse Keating 7a32965
 	if (rdev->mode_info.mode_config_initialized) {
Jesse Keating 7a32965
-		drm_kms_helper_poll_fini(rdev->ddev);
Jesse Keating 7a32965
 		radeon_hpd_fini(rdev);
Jesse Keating 7a32965
 		drm_mode_config_cleanup(rdev->ddev);
Jesse Keating 7a32965
 		rdev->mode_info.mode_config_initialized = false;
Jesse Keating 7a32965
diff --git a/drivers/gpu/drm/radeon/radeon_fb.c b/drivers/gpu/drm/radeon/radeon_fb.c
Jesse Keating 7a32965
index dc1634b..7dc38f6 100644
Jesse Keating 7a32965
--- a/drivers/gpu/drm/radeon/radeon_fb.c
Jesse Keating 7a32965
+++ b/drivers/gpu/drm/radeon/radeon_fb.c
Jesse Keating 7a32965
@@ -316,9 +316,16 @@ int radeon_parse_options(char *options)
Jesse Keating 7a32965
 	return 0;
Jesse Keating 7a32965
 }
Jesse Keating 7a32965
 
Jesse Keating 7a32965
-void radeon_fb_output_poll_changed(struct radeon_device *rdev)
Jesse Keating 7a32965
+void radeonfb_hotplug(struct drm_device *dev, bool polled)
Jesse Keating 7a32965
 {
Jesse Keating 7a32965
-	drm_fb_helper_hotplug_event(&rdev->mode_info.rfbdev->helper);
Jesse Keating 7a32965
+	struct radeon_device *rdev = dev->dev_private;
Jesse Keating 7a32965
+
Jesse Keating 7a32965
+	drm_helper_fb_hpd_irq_event(&rdev->mode_info.rfbdev->helper);
Jesse Keating 7a32965
+}
Jesse Keating 7a32965
+
Jesse Keating 7a32965
+static void radeon_fb_output_status_changed(struct drm_fb_helper *fb_helper)
Jesse Keating 7a32965
+{
Jesse Keating 7a32965
+	drm_helper_fb_hotplug_event(fb_helper, true);
Jesse Keating 7a32965
 }
Jesse Keating 7a32965
 
Jesse Keating 7a32965
 static int radeon_fbdev_destroy(struct drm_device *dev, struct radeon_fbdev *rfbdev)
Jesse Keating 7a32965
@@ -357,6 +364,7 @@ static struct drm_fb_helper_funcs radeon_fb_helper_funcs = {
Jesse Keating 7a32965
 	.gamma_set = radeon_crtc_fb_gamma_set,
Jesse Keating 7a32965
 	.gamma_get = radeon_crtc_fb_gamma_get,
Jesse Keating 7a32965
 	.fb_probe = radeon_fb_find_or_create_single,
Jesse Keating 7a32965
+	.fb_output_status_changed = radeon_fb_output_status_changed,
Jesse Keating 7a32965
 };
Jesse Keating 7a32965
 
Jesse Keating 7a32965
 int radeon_fbdev_init(struct radeon_device *rdev)
Jesse Keating 7a32965
@@ -379,7 +387,7 @@ int radeon_fbdev_init(struct radeon_device *rdev)
Jesse Keating 7a32965
 
Jesse Keating 7a32965
 	ret = drm_fb_helper_init(rdev->ddev, &rfbdev->helper,
Jesse Keating 7a32965
 				 rdev->num_crtc,
Jesse Keating 7a32965
-				 RADEONFB_CONN_LIMIT);
Jesse Keating 7a32965
+				 RADEONFB_CONN_LIMIT, true);
Jesse Keating 7a32965
 	if (ret) {
Jesse Keating 7a32965
 		kfree(rfbdev);
Jesse Keating 7a32965
 		return ret;
Jesse Keating 7a32965
@@ -388,6 +396,7 @@ int radeon_fbdev_init(struct radeon_device *rdev)
Jesse Keating 7a32965
 	drm_fb_helper_single_add_all_connectors(&rfbdev->helper);
Jesse Keating 7a32965
 	drm_fb_helper_initial_config(&rfbdev->helper, bpp_sel);
Jesse Keating 7a32965
 	return 0;
Jesse Keating 7a32965
+
Jesse Keating 7a32965
 }
Jesse Keating 7a32965
 
Jesse Keating 7a32965
 void radeon_fbdev_fini(struct radeon_device *rdev)
Jesse Keating 7a32965
diff --git a/drivers/gpu/drm/radeon/radeon_irq_kms.c b/drivers/gpu/drm/radeon/radeon_irq_kms.c
Jesse Keating 7a32965
index 059bfa4..b0178de 100644
Jesse Keating 7a32965
--- a/drivers/gpu/drm/radeon/radeon_irq_kms.c
Jesse Keating 7a32965
+++ b/drivers/gpu/drm/radeon/radeon_irq_kms.c
Jesse Keating 7a32965
@@ -26,7 +26,6 @@
Jesse Keating 7a32965
  *          Jerome Glisse
Jesse Keating 7a32965
  */
Jesse Keating 7a32965
 #include "drmP.h"
Jesse Keating 7a32965
-#include "drm_crtc_helper.h"
Jesse Keating 7a32965
 #include "radeon_drm.h"
Jesse Keating 7a32965
 #include "radeon_reg.h"
Jesse Keating 7a32965
 #include "radeon.h"
Jesse Keating 7a32965
@@ -56,7 +55,9 @@ static void radeon_hotplug_work_func(struct work_struct *work)
Jesse Keating 7a32965
 			radeon_connector_hotplug(connector);
Jesse Keating 7a32965
 	}
Jesse Keating 7a32965
 	/* Just fire off a uevent and let userspace tell us what to do */
Jesse Keating 7a32965
-	drm_helper_hpd_irq_event(dev);
Jesse Keating 7a32965
+	radeonfb_hotplug(dev, false);
Jesse Keating 7a32965
+
Jesse Keating 7a32965
+	drm_sysfs_hotplug_event(dev);
Jesse Keating 7a32965
 }
Jesse Keating 7a32965
 
Jesse Keating 7a32965
 void radeon_driver_irq_preinstall_kms(struct drm_device *dev)
Jesse Keating 7a32965
diff --git a/drivers/gpu/drm/radeon/radeon_mode.h b/drivers/gpu/drm/radeon/radeon_mode.h
Jesse Keating 7a32965
index 67358ba..fdd1611 100644
Jesse Keating 7a32965
--- a/drivers/gpu/drm/radeon/radeon_mode.h
Jesse Keating 7a32965
+++ b/drivers/gpu/drm/radeon/radeon_mode.h
Jesse Keating 7a32965
@@ -588,6 +588,5 @@ void radeon_fbdev_fini(struct radeon_device *rdev);
Jesse Keating 7a32965
 void radeon_fbdev_set_suspend(struct radeon_device *rdev, int state);
Jesse Keating 7a32965
 int radeon_fbdev_total_size(struct radeon_device *rdev);
Jesse Keating 7a32965
 bool radeon_fbdev_robj_is_fb(struct radeon_device *rdev, struct radeon_bo *robj);
Jesse Keating 7a32965
-
Jesse Keating 7a32965
-void radeon_fb_output_poll_changed(struct radeon_device *rdev);
Jesse Keating 7a32965
+void radeonfb_hotplug(struct drm_device *dev, bool polled);
Jesse Keating 7a32965
 #endif
Jesse Keating 7a32965
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
Jesse Keating 7a32965
index 93a1a31..a7148d2 100644
Jesse Keating 7a32965
--- a/include/drm/drm_crtc.h
Jesse Keating 7a32965
+++ b/include/drm/drm_crtc.h
Jesse Keating 7a32965
@@ -31,7 +31,6 @@
Jesse Keating 7a32965
 #include <linux/idr.h>
Jesse Keating 7a32965
 
Jesse Keating 7a32965
 #include <linux/fb.h>
Jesse Keating 7a32965
-#include <linux/slow-work.h>
Jesse Keating 7a32965
 
Jesse Keating 7a32965
 struct drm_device;
Jesse Keating 7a32965
 struct drm_mode_set;
Jesse Keating 7a32965
@@ -461,15 +460,6 @@ enum drm_connector_force {
Jesse Keating 7a32965
 	DRM_FORCE_ON_DIGITAL, /* for DVI-I use digital connector */
Jesse Keating 7a32965
 };
Jesse Keating 7a32965
 
Jesse Keating 7a32965
-/* should we poll this connector for connects and disconnects */
Jesse Keating 7a32965
-/* hot plug detectable */
Jesse Keating 7a32965
-#define DRM_CONNECTOR_POLL_HPD (1 << 0)
Jesse Keating 7a32965
-/* poll for connections */
Jesse Keating 7a32965
-#define DRM_CONNECTOR_POLL_CONNECT (1 << 1)
Jesse Keating 7a32965
-/* can cleanly poll for disconnections without flickering the screen */
Jesse Keating 7a32965
-/* DACs should rarely do this without a lot of testing */
Jesse Keating 7a32965
-#define DRM_CONNECTOR_POLL_DISCONNECT (1 << 2)
Jesse Keating 7a32965
-
Jesse Keating 7a32965
 /**
Jesse Keating 7a32965
  * drm_connector - central DRM connector control structure
Jesse Keating 7a32965
  * @crtc: CRTC this connector is currently connected to, NULL if none
Jesse Keating 7a32965
@@ -514,8 +504,6 @@ struct drm_connector {
Jesse Keating 7a32965
 	u32 property_ids[DRM_CONNECTOR_MAX_PROPERTY];
Jesse Keating 7a32965
 	uint64_t property_values[DRM_CONNECTOR_MAX_PROPERTY];
Jesse Keating 7a32965
 
Jesse Keating 7a32965
-	uint8_t polled; /* DRM_CONNECTOR_POLL_* */
Jesse Keating 7a32965
-
Jesse Keating 7a32965
 	/* requested DPMS state */
Jesse Keating 7a32965
 	int dpms;
Jesse Keating 7a32965
 
Jesse Keating 7a32965
@@ -555,7 +543,6 @@ struct drm_mode_set {
Jesse Keating 7a32965
  */
Jesse Keating 7a32965
 struct drm_mode_config_funcs {
Jesse Keating 7a32965
 	struct drm_framebuffer *(*fb_create)(struct drm_device *dev, struct drm_file *file_priv, struct drm_mode_fb_cmd *mode_cmd);
Jesse Keating 7a32965
-	void (*output_poll_changed)(struct drm_device *dev);
Jesse Keating 7a32965
 };
Jesse Keating 7a32965
 
Jesse Keating 7a32965
 struct drm_mode_group {
Jesse Keating 7a32965
@@ -593,10 +580,6 @@ struct drm_mode_config {
Jesse Keating 7a32965
 	struct drm_mode_config_funcs *funcs;
Jesse Keating 7a32965
 	resource_size_t fb_base;
Jesse Keating 7a32965
 
Jesse Keating 7a32965
-	/* output poll support */
Jesse Keating 7a32965
-	bool poll_enabled;
Jesse Keating 7a32965
-	struct delayed_slow_work output_poll_slow_work;
Jesse Keating 7a32965
-
Jesse Keating 7a32965
 	/* pointers to standard properties */
Jesse Keating 7a32965
 	struct list_head property_blob_list;
Jesse Keating 7a32965
 	struct drm_property *edid_property;
Jesse Keating 7a32965
diff --git a/include/drm/drm_crtc_helper.h b/include/drm/drm_crtc_helper.h
Jesse Keating 7a32965
index 1121f77..b1fa0f8 100644
Jesse Keating 7a32965
--- a/include/drm/drm_crtc_helper.h
Jesse Keating 7a32965
+++ b/include/drm/drm_crtc_helper.h
Jesse Keating 7a32965
@@ -127,10 +127,4 @@ static inline void drm_connector_helper_add(struct drm_connector *connector,
Jesse Keating 7a32965
 }
Jesse Keating 7a32965
 
Jesse Keating 7a32965
 extern int drm_helper_resume_force_mode(struct drm_device *dev);
Jesse Keating 7a32965
-extern void drm_kms_helper_poll_init(struct drm_device *dev);
Jesse Keating 7a32965
-extern void drm_kms_helper_poll_fini(struct drm_device *dev);
Jesse Keating 7a32965
-extern void drm_helper_hpd_irq_event(struct drm_device *dev);
Jesse Keating 7a32965
-
Jesse Keating 7a32965
-extern void drm_kms_helper_poll_disable(struct drm_device *dev);
Jesse Keating 7a32965
-extern void drm_kms_helper_poll_enable(struct drm_device *dev);
Jesse Keating 7a32965
 #endif
Jesse Keating 7a32965
diff --git a/include/drm/drm_fb_helper.h b/include/drm/drm_fb_helper.h
Jesse Keating 7a32965
index f0a6afc..9b55a94 100644
Jesse Keating 7a32965
--- a/include/drm/drm_fb_helper.h
Jesse Keating 7a32965
+++ b/include/drm/drm_fb_helper.h
Jesse Keating 7a32965
@@ -30,6 +30,8 @@
Jesse Keating 7a32965
 #ifndef DRM_FB_HELPER_H
Jesse Keating 7a32965
 #define DRM_FB_HELPER_H
Jesse Keating 7a32965
 
Jesse Keating 7a32965
+#include <linux/slow-work.h>
Jesse Keating 7a32965
+
Jesse Keating 7a32965
 struct drm_fb_helper;
Jesse Keating 7a32965
 
Jesse Keating 7a32965
 struct drm_fb_helper_crtc {
Jesse Keating 7a32965
@@ -69,6 +71,9 @@ struct drm_fb_helper_funcs {
Jesse Keating 7a32965
 
Jesse Keating 7a32965
 	int (*fb_probe)(struct drm_fb_helper *helper,
Jesse Keating 7a32965
 			struct drm_fb_helper_surface_size *sizes);
Jesse Keating 7a32965
+
Jesse Keating 7a32965
+	void (*fb_output_status_changed)(struct drm_fb_helper *helper);
Jesse Keating 7a32965
+
Jesse Keating 7a32965
 };
Jesse Keating 7a32965
 
Jesse Keating 7a32965
 struct drm_fb_helper_connector {
Jesse Keating 7a32965
@@ -90,6 +95,8 @@ struct drm_fb_helper {
Jesse Keating 7a32965
 	u32 pseudo_palette[17];
Jesse Keating 7a32965
 	struct list_head kernel_fb_list;
Jesse Keating 7a32965
 
Jesse Keating 7a32965
+	struct delayed_slow_work output_status_change_slow_work;
Jesse Keating 7a32965
+	bool poll_enabled;
Jesse Keating 7a32965
 	/* we got a hotplug but fbdev wasn't running the console
Jesse Keating 7a32965
 	   delay until next set_par */
Jesse Keating 7a32965
 	bool delayed_hotplug;
Jesse Keating 7a32965
@@ -100,7 +107,7 @@ int drm_fb_helper_single_fb_probe(struct drm_fb_helper *helper,
Jesse Keating 7a32965
 
Jesse Keating 7a32965
 int drm_fb_helper_init(struct drm_device *dev,
Jesse Keating 7a32965
 		       struct drm_fb_helper *helper, int crtc_count,
Jesse Keating 7a32965
-		       int max_conn);
Jesse Keating 7a32965
+		       int max_conn, bool polled);
Jesse Keating 7a32965
 void drm_fb_helper_fini(struct drm_fb_helper *helper);
Jesse Keating 7a32965
 int drm_fb_helper_blank(int blank, struct fb_info *info);
Jesse Keating 7a32965
 int drm_fb_helper_pan_display(struct fb_var_screeninfo *var,
Jesse Keating 7a32965
@@ -123,8 +130,10 @@ void drm_fb_helper_fill_fix(struct fb_info *info, uint32_t pitch,
Jesse Keating 7a32965
 
Jesse Keating 7a32965
 int drm_fb_helper_setcmap(struct fb_cmap *cmap, struct fb_info *info);
Jesse Keating 7a32965
 
Jesse Keating 7a32965
-bool drm_fb_helper_hotplug_event(struct drm_fb_helper *fb_helper);
Jesse Keating 7a32965
+bool drm_helper_fb_hotplug_event(struct drm_fb_helper *fb_helper,
Jesse Keating 7a32965
+				 bool polled);
Jesse Keating 7a32965
 bool drm_fb_helper_initial_config(struct drm_fb_helper *fb_helper, int bpp_sel);
Jesse Keating 7a32965
 int drm_fb_helper_single_add_all_connectors(struct drm_fb_helper *fb_helper);
Jesse Keating 7a32965
 
Jesse Keating 7a32965
+void drm_helper_fb_hpd_irq_event(struct drm_fb_helper *fb_helper);
Jesse Keating 7a32965
 #endif
Jesse Keating 7a32965
-- 
Jesse Keating 7a32965
1.7.0.1
Jesse Keating 7a32965