[Intel-gfx] [PATCH] drm/i915: use wake_up instead of drm wrapper.

Dave Airlie airlied at gmail.com
Fri May 28 05:02:08 CEST 2010


From: Dave Airlie <airlied at redhat.com>

Since
b9241ea31fae4887104e5d1b3b18f4009c25a0c4 drm/i915: Don't wait interruptible for possible plane buffer flush
and previous to that
48764bf43f746113fc77877d7e80f2df23ca4cbb drm/i915: add i915_lp_ring_sync helper

The irq wait queue has uninterruptible waiters, however the DRM_WAKEUP macro wraps wake_up_interruptible which isn't going to do what you want in this case, just use the normal wake_up variant which does both types fine.

This fixes a regression in the copy fb code we use to get seamless startup on Fedora/RHEL, without this fix, we block forever in the wait when starting X.

cc: stable at kernel.org
Signed-off-by: Dave Airlie <airlied at redhat.com>
---
 drivers/gpu/drm/i915/i915_debugfs.c |    2 +-
 drivers/gpu/drm/i915/i915_irq.c     |    6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 322070c..1cfd158 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -673,7 +673,7 @@ i915_wedged_write(struct file *filp,
 
 	atomic_set(&dev_priv->mm.wedged, val);
 	if (val) {
-		DRM_WAKEUP(&dev_priv->irq_queue);
+		wake_up(&dev_priv->irq_queue);
 		queue_work(dev_priv->wq, &dev_priv->error_work);
 	}
 
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index 8c3f080..f680af1 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -357,7 +357,7 @@ irqreturn_t ironlake_irq_handler(struct drm_device *dev)
 		u32 seqno = i915_get_gem_seqno(dev);
 		dev_priv->mm.irq_gem_seqno = seqno;
 		trace_i915_gem_request_complete(dev, seqno);
-		DRM_WAKEUP(&dev_priv->irq_queue);
+		wake_up(&dev_priv->irq_queue);
 		dev_priv->hangcheck_count = 0;
 		mod_timer(&dev_priv->hangcheck_timer, jiffies + DRM_I915_HANGCHECK_PERIOD);
 	}
@@ -829,7 +829,7 @@ static void i915_handle_error(struct drm_device *dev, bool wedged)
 		/*
 		 * Wakeup waiting processes so they don't hang
 		 */
-		DRM_WAKEUP(&dev_priv->irq_queue);
+		wake_up(&dev_priv->irq_queue);
 	}
 
 	queue_work(dev_priv->wq, &dev_priv->error_work);
@@ -931,7 +931,7 @@ irqreturn_t i915_driver_irq_handler(DRM_IRQ_ARGS)
 			u32 seqno = i915_get_gem_seqno(dev);
 			dev_priv->mm.irq_gem_seqno = seqno;
 			trace_i915_gem_request_complete(dev, seqno);
-			DRM_WAKEUP(&dev_priv->irq_queue);
+			wake_up(&dev_priv->irq_queue);
 			dev_priv->hangcheck_count = 0;
 			mod_timer(&dev_priv->hangcheck_timer, jiffies + DRM_I915_HANGCHECK_PERIOD);
 		}
-- 
1.6.5.2




More information about the Intel-gfx mailing list