]> git.karo-electronics.de Git - linux-beck.git/commit
drm/i915: queue work outside spinlock in hsw_pm_irq_handler
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 4 Jul 2013 21:35:27 +0000 (23:35 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 11 Jul 2013 12:36:34 +0000 (14:36 +0200)
commit2adbee62e00d869a30cb93ea2269e5ea26a9bbc4
treea58ecc9d6d040bb8e29b2cbc7fea1e7ae757347c
parent41a05a3a5cdc5d731014588b9a24759af1804d48
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 <ben@bwidawsk.net>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_irq.c