[Intel-gfx] [PATCH 2/2] drm/i915: Fix irq checks in ring->irq_get/put functions

Chris Wilson chris at chris-wilson.co.uk
Mon Sep 15 11:56:34 CEST 2014


On Mon, Sep 15, 2014 at 11:51:42AM +0200, Daniel Vetter wrote:
> On Mon, Sep 15, 2014 at 11:48 AM, Chris Wilson <chris at chris-wilson.co.uk> wrote:
> > intel_engine_cs *ring)
> >>       struct drm_i915_private *dev_priv = dev->dev_private;
> >>       unsigned long flags;
> >>
> >> +     WARN_ON(!intel_irqs_enabled(dev_priv));
> >
> > Please no. This would be a BUG().
> 
> No BUG if not doing it means the driver will survive for a bit longer.
> And doing a few bogus register writes usually means it'll surive.

I mean that this offers no additional benefit over the first WARN. Which
is already redundant as we WARN in the caller. There are more meaningful
places where that WARN would be appropriate, but after the event of
something else screwing up is usually close to useless.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre



More information about the Intel-gfx mailing list