[PATCH] drm/xe: Make irq enabled flag atomic

Rodrigo Vivi rodrigo.vivi at intel.com
Wed Dec 11 23:29:02 UTC 2024


On Wed, Dec 11, 2024 at 01:58:08PM -0600, Lucas De Marchi wrote:
> On Wed, Dec 11, 2024 at 01:13:49PM -0500, Rodrigo Vivi wrote:
> > On Tue, Dec 10, 2024 at 07:35:06PM +0200, Ilia Levi wrote:
> > > The irq.enabled flag was protected by a spin lock (irq.lock).
> > > By making it atomic we no longer need to wait for the spin lock in
> > > irq handlers. This will become especially useful for MSI-X irq
> > > handlers to prevent lock contention between different interrupts.
> > > 
> > > Signed-off-by: Ilia Levi <ilia.levi at intel.com>
> > 
> > Reviewed-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
> > 
> > pushing soon to drm-xe-next. Thanks for the patch
> > 
> 
> I just saw the commit in the tree and was wondering... why exactly do we
> need that flag checked in the irq handlers?  why can't we simply do
> a) turn off irq
> b) synchronize_irq()
> 
> kind of like xe_irq_suspend() is doing, but in the opposite order. It
> seems this was just copy-pasted over and over or am I missing a
> synchronization here?

A very good question. We likely don't need that check there.
Ilia, perhaps you could give it a try along with your upcoming MSX IRQ
series?

> 
> Lucas De Marchi


More information about the Intel-xe mailing list