Re: [PATCH 2/2] drm/i915: Simplify the IVB interrupt handler

Chris Wilson
2012-05-06T15:45:14Z

On Sun, 6 May 2012 17:37:50 +0200, Daniel Vetter <daniel@ffwll.ch> wrote:
> On Wed, May 02, 2012 at 09:52:13AM +0100, Chris Wilson wrote:
> > Reduce the number of reads and writes required for handling a single
> > interrupt.
> >
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
>
> Ok, I've looked at this again and imo it does too much. On a quick look we
> have adding the pch_iir argument to pch_irq_handler and restructuring the
> register read/write sequence in the actual handler. The latter seems to
> require that we unconditionally return IRQ_HANDLED.

This being an MS| directed, and never shared, interrupt, this handler
should not be called unless we have something to do. A IRQ_NONE return
here is a serious bug. Another bug is that we read the PCH IIR twice and
only write back the original value, opening the possiblity of handling
the same interrupt twice. All of which is sumised by reducing the number
of reads and writes required for handing a single interrupt.
-Chris

--
Chris Wilson, Intel Open Source Technology Centre