summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/xe/display/ext
diff options
context:
space:
mode:
authorIlia Levi <ilia.levi@intel.com>2024-12-10 19:35:06 +0200
committerRodrigo Vivi <rodrigo.vivi@intel.com>2024-12-11 13:20:53 -0500
commit4d79a1266d4cc3c967bc8823502466cad1ac8514 (patch)
treefa2018bbfb6bd349935fdb13eff67e7e764b7841 /drivers/gpu/drm/xe/display/ext
parent3fcf68d7393fd622b96cd45124ccb1eddf77684c (diff)
drm/xe: Make irq enabled flag atomic
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@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241210173506.202150-1-ilia.levi@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'drivers/gpu/drm/xe/display/ext')
-rw-r--r--drivers/gpu/drm/xe/display/ext/i915_irq.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/gpu/drm/xe/display/ext/i915_irq.c b/drivers/gpu/drm/xe/display/ext/i915_irq.c
index a7dbc6554d69..ac4cda2d81c7 100644
--- a/drivers/gpu/drm/xe/display/ext/i915_irq.c
+++ b/drivers/gpu/drm/xe/display/ext/i915_irq.c
@@ -53,18 +53,7 @@ void gen2_irq_init(struct intel_uncore *uncore, struct i915_irq_regs regs,
bool intel_irqs_enabled(struct xe_device *xe)
{
- /*
- * XXX: i915 has a racy handling of the irq.enabled, since it doesn't
- * lock its transitions. Because of that, the irq.enabled sometimes
- * is not read with the irq.lock in place.
- * However, the most critical cases like vblank and page flips are
- * properly using the locks.
- * We cannot take the lock in here or run any kind of assert because
- * of i915 inconsistency.
- * But at this point the xe irq is better protected against races,
- * although the full solution would be protecting the i915 side.
- */
- return xe->irq.enabled;
+ return atomic_read(&xe->irq.enabled);
}
void intel_synchronize_irq(struct xe_device *xe)