[Intel-gfx] [PATCH 23/25] drm/i915: Move the get/put irq locking into the caller

Chris Wilson chris at chris-wilson.co.uk
Tue Jun 28 08:42:01 UTC 2016


On Mon, Jun 27, 2016 at 01:11:38PM +0100, Tvrtko Ursulin wrote:
> >  static void irq_disable(struct intel_engine_cs *engine)
> >  {
> >-	engine->irq_put(engine);
> >+	spin_lock_irq(&engine->i915->irq_lock);
> >+	engine->irq_disable(engine);
> >+	spin_unlock_irq(&engine->i915->irq_lock);
> >+
> >  	engine->irq_posted = false;
> >  }
> 
> Wouldn't it be better if locks stayed in the vfuncs? I can't figure
> out why would you want to pull that out like this.

Because removing the recfounting and locking to the single place where
it is required is simpler.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list