blob: 485e05045e51019f4ac15ec7bf90779b9a4823bb [file] [log] [blame]
From 4e8341154892efef0fa6558245694a3f8ffd619a Mon Sep 17 00:00:00 2001
From: Daniel Vetter <>
Date: Thu, 4 Jul 2013 23:35:27 +0200
Subject: drm/i915: queue work outside spinlock in hsw_pm_irq_handler
And kill the comment about it. Queueing work is a barrier type event,
no amount of locking will help in ordering things (as long as we queue
the work after having updated all relevant data structures). Also, the
queue_work works itself as a sufficient memory barrier.
Again on the surface this is just a tiny micro-optimization to reduce
the hold-time of dev_priv->irq_lock. But the better reason is that it
reduces superficial locking and so makes it clearer what we actually
need for correctness.
Reviewed-by: Ben Widawsky <>
Signed-off-by: Daniel Vetter <>
(cherry picked from commit 2adbee62e00d869a30cb93ea2269e5ea26a9bbc4)
Signed-off-by: Darren Hart <>
drivers/gpu/drm/i915/i915_irq.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index b6a53950099d..b08ce0b9f0bb 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -969,9 +969,9 @@ static void hsw_pm_irq_handler(struct drm_i915_private *dev_priv,
I915_WRITE(GEN6_PMIMR, dev_priv->rps.pm_iir);
/* never want to mask useful interrupts. (also posting read) */
- /* TODO: if queue_work is slow, move it out of the spinlock */
- queue_work(dev_priv->wq, &dev_priv->;
+ queue_work(dev_priv->wq, &dev_priv->;