]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: fix up ilk drps/ips locking
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 9 Aug 2012 14:46:01 +0000 (16:46 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 9 Aug 2012 19:53:52 +0000 (21:53 +0200)
commit187fc9b0d31925056c114e38d1462d89b9d20550
tree10286bc3872461b729bd817c995190970aafcdb4
parentce16f28b2d52b0ac3d46b88d835e22278e7f0534
drm/i915: fix up ilk drps/ips locking

We change the drps/ips sw/hw state from different callers: Our own irq
handler, the external intel-ips module and from process context. Most
of these callers don't take any lock at all.

Protect everything by making the mchdev_lock irqsave and grabbing it in
all relevant callsites. Note that we have to convert a few sleeps in the
drps enable/disable code to delays, but alas, I'm not volunteering to
restructure the code around a few work items.

For paranoia add a spin_locked assert to ironlake_set_drps, too.

v2: Move one access inside the lock protection. Caught by the
dev_priv->ips mass-rename ...

v3: Resolve rebase conflict.

Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_irq.c
drivers/gpu/drm/i915/intel_pm.c