summaryrefslogtreecommitdiffstats
path: root/debian/patches-rt/0254-drm-i915-gt-Only-disable-interrupts-for-the-timeline.patch
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 10:06:00 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 10:06:00 +0000
commitb15a952c52a6825376d3e7f6c1bf5c886c6d8b74 (patch)
tree1500f2f8f276908a36d8126cb632c0d6b1276764 /debian/patches-rt/0254-drm-i915-gt-Only-disable-interrupts-for-the-timeline.patch
parentAdding upstream version 5.10.209. (diff)
downloadlinux-b15a952c52a6825376d3e7f6c1bf5c886c6d8b74.tar.xz
linux-b15a952c52a6825376d3e7f6c1bf5c886c6d8b74.zip
Adding debian version 5.10.209-2.debian/5.10.209-2debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches-rt/0254-drm-i915-gt-Only-disable-interrupts-for-the-timeline.patch')
-rw-r--r--debian/patches-rt/0254-drm-i915-gt-Only-disable-interrupts-for-the-timeline.patch52
1 files changed, 52 insertions, 0 deletions
diff --git a/debian/patches-rt/0254-drm-i915-gt-Only-disable-interrupts-for-the-timeline.patch b/debian/patches-rt/0254-drm-i915-gt-Only-disable-interrupts-for-the-timeline.patch
new file mode 100644
index 000000000..722c5567e
--- /dev/null
+++ b/debian/patches-rt/0254-drm-i915-gt-Only-disable-interrupts-for-the-timeline.patch
@@ -0,0 +1,52 @@
+From 63884dc87002ed5187007558a7356e7a4f570e75 Mon Sep 17 00:00:00 2001
+From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+Date: Tue, 7 Jul 2020 12:25:11 +0200
+Subject: [PATCH 254/323] drm/i915/gt: Only disable interrupts for the timeline
+ lock on !force-threaded
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.204-rt100.tar.xz
+
+According to commit
+ d67739268cf0e ("drm/i915/gt: Mark up the nested engine-pm timeline lock as irqsafe")
+
+the intrrupts are disabled the code may be called from an interrupt
+handler and from preemptible context.
+With `force_irqthreads' set the timeline mutex is never observed in IRQ
+context so it is not neede to disable interrupts.
+
+Disable only interrupts if not in `force_irqthreads' mode.
+
+Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+---
+ drivers/gpu/drm/i915/gt/intel_engine_pm.c | 8 +++++---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/drivers/gpu/drm/i915/gt/intel_engine_pm.c b/drivers/gpu/drm/i915/gt/intel_engine_pm.c
+index f7b2e07e2229..313d8a28e776 100644
+--- a/drivers/gpu/drm/i915/gt/intel_engine_pm.c
++++ b/drivers/gpu/drm/i915/gt/intel_engine_pm.c
+@@ -60,9 +60,10 @@ static int __engine_unpark(struct intel_wakeref *wf)
+
+ static inline unsigned long __timeline_mark_lock(struct intel_context *ce)
+ {
+- unsigned long flags;
++ unsigned long flags = 0;
+
+- local_irq_save(flags);
++ if (!force_irqthreads)
++ local_irq_save(flags);
+ mutex_acquire(&ce->timeline->mutex.dep_map, 2, 0, _THIS_IP_);
+
+ return flags;
+@@ -72,7 +73,8 @@ static inline void __timeline_mark_unlock(struct intel_context *ce,
+ unsigned long flags)
+ {
+ mutex_release(&ce->timeline->mutex.dep_map, _THIS_IP_);
+- local_irq_restore(flags);
++ if (!force_irqthreads)
++ local_irq_restore(flags);
+ }
+
+ #else
+--
+2.43.0
+