diff options
author | Dani Liberman <dliberman@habana.ai> | 2023-09-18 14:48:46 +0300 |
---|---|---|
committer | Rodrigo Vivi <rodrigo.vivi@intel.com> | 2023-12-21 11:41:15 -0500 |
commit | dbac286d8529d6debc0f56fa9a3ea26f78826997 (patch) | |
tree | 0f24391a4123777a795718fd3c6353ff97c4e6d3 | |
parent | 0845233388f8a26d00acf9bf230cfd4f36aa4c30 (diff) | |
download | linux-stable-dbac286d8529d6debc0f56fa9a3ea26f78826997.tar.gz linux-stable-dbac286d8529d6debc0f56fa9a3ea26f78826997.tar.bz2 linux-stable-dbac286d8529d6debc0f56fa9a3ea26f78826997.zip |
drm/xe: proper setting of irq enabled flag
IRQ enabled flag should be set only after request irq succeeds.
Reviewed-by: Ohad Sharabi <osharabi@habana.ai>
Signed-off-by: Dani Liberman <dliberman@habana.ai>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
-rw-r--r-- | drivers/gpu/drm/xe/xe_irq.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/gpu/drm/xe/xe_irq.c b/drivers/gpu/drm/xe/xe_irq.c index dec3d518b3fc..e1126eccb50e 100644 --- a/drivers/gpu/drm/xe/xe_irq.c +++ b/drivers/gpu/drm/xe/xe_irq.c @@ -579,16 +579,14 @@ int xe_irq_install(struct xe_device *xe) return -EINVAL; } - xe->irq.enabled = true; - xe_irq_reset(xe); err = request_irq(irq, irq_handler, IRQF_SHARED, DRIVER_NAME, xe); - if (err < 0) { - xe->irq.enabled = false; + if (err < 0) return err; - } + + xe->irq.enabled = true; xe_irq_postinstall(xe); |