]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: close PM interrupt masking races in the irq handler
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 8 Sep 2011 12:00:20 +0000 (14:00 +0200)
committerKeith Packard <keithp@keithp.com>
Thu, 20 Oct 2011 21:11:16 +0000 (14:11 -0700)
commit5f8e720e7d34aef2278ab5c329e58740a1ed110f
tree28e9224114cdaf240c5302d53ea3ca11a98a71a4
parenta98d0b9039cf9c778da768ec6f9a851de351e1d3
drm/i915: close PM interrupt masking races in the irq handler

Quoting Chris Wilson's more concise description:

"Ah I think I see the problem. As you point out we only mask the current
interrupt received, so that if we have a task pending (and so IMR != 0) we
actually unmask the pending interrupt and so could receive it again before the
tasklet is finally kicked off by the grumpy scheduler."

We need the hw to issue PM interrupts A, B, A while the scheduler is hating us
and refuses to run the rps work item. On receiving PM interrupt A we hit the
WARN because

dev_priv->pm_iir == PM_A | PM_B

Also add a posting read as suggested by Chris to ensure proper ordering of the
writes to PMIMR and PMIIR. Just in case somebody weakens write ordering.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Keith Packard <keithp@keithp.com>
drivers/gpu/drm/i915/i915_irq.c