[PATCH 4/5] drm/i915: Delay 250ms before running the hotplug code

2011-07-26 Thread Daniel Vetter
queue_delayed_work? Plays nicer with other workqueue-items.

-Daniel

PS: Scrap my other mail, just noticed that the merged patched r-b'ed
by Jesse uses the mode_config mutex.
-- 
Daniel Vetter
daniel.vetter at ffwll.ch - +41 (0) 79 364 57 48 - http://blog.ffwll.ch


[PATCH 4/5] drm/i915: Delay 250ms before running the hotplug code

2011-07-26 Thread Keith Packard
On Tue, 26 Jul 2011 09:44:32 +0200, Daniel Vetter  wrote:

> queue_delayed_work? Plays nicer with other workqueue-items.

Yeah, I'll change this.

-- 
keith.packard at intel.com
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: 



[PATCH 4/5] drm/i915: Delay 250ms before running the hotplug code

2011-07-26 Thread Keith Packard
If the connector is inserted or removed slowly, the hotplug line may
well change state before the data lines do. So, assume the user isn't
trying to fool us and give them 250ms to get the connector plugged or
unplugged.

Signed-off-by: Keith Packard 
---
 drivers/gpu/drm/i915/i915_irq.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index 9da2a2c..e3ce1c3 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -306,6 +306,8 @@ static void i915_hotplug_work_func(struct work_struct *work)
struct drm_mode_config *mode_config = >mode_config;
struct intel_encoder *encoder;

+   /* Wait a bit so that the connector change can be completed */
+   msleep(250);
mutex_lock(_config->mutex);
DRM_DEBUG_KMS("running encoder hotplug functions\n");

-- 
1.7.5.4



[PATCH 4/5] drm/i915: Delay 250ms before running the hotplug code

2011-07-26 Thread Keith Packard
If the connector is inserted or removed slowly, the hotplug line may
well change state before the data lines do. So, assume the user isn't
trying to fool us and give them 250ms to get the connector plugged or
unplugged.

Signed-off-by: Keith Packard kei...@keithp.com
---
 drivers/gpu/drm/i915/i915_irq.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index 9da2a2c..e3ce1c3 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -306,6 +306,8 @@ static void i915_hotplug_work_func(struct work_struct *work)
struct drm_mode_config *mode_config = dev-mode_config;
struct intel_encoder *encoder;
 
+   /* Wait a bit so that the connector change can be completed */
+   msleep(250);
mutex_lock(mode_config-mutex);
DRM_DEBUG_KMS(running encoder hotplug functions\n);
 
-- 
1.7.5.4

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH 4/5] drm/i915: Delay 250ms before running the hotplug code

2011-07-26 Thread Keith Packard
On Tue, 26 Jul 2011 09:44:32 +0200, Daniel Vetter dan...@ffwll.ch wrote:

 queue_delayed_work? Plays nicer with other workqueue-items.

Yeah, I'll change this.

-- 
keith.pack...@intel.com


pgpifulG3hqfz.pgp
Description: PGP signature
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel