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

Lucas De Marchi lucas.demarchi at intel.com
Wed Dec 11 19:58:08 UTC 2024


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?

Lucas De Marchi


More information about the Intel-xe mailing list