lkml.org 
[lkml]   [2019]   [Aug]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] i915: reduce scope of irq disable when signaling breadcrumbs
Date
From: Clark Williams <williams@redhat.com>

Rather than disable irqs around the call to intel_engine_breadcrumbs_irq()
use raw_spin_lock_irq() around the signalers loop inside
intel_engine_breadcrumbs_irq().

It's entirely possible that we only need local_irq_{disable, enable} around
the call to __intel_breadcrumbs_disarm_irq() but for now just use the
raw_spin_lock_irq() call to disable irqs (and preemption).

This prevents a debug splat on PREEMPT_RT where the request lock is taken
in atomic context.

Signed-off-by: Clark Williams <williams@redhat.com>
---
drivers/gpu/drm/i915/intel_breadcrumbs.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_breadcrumbs.c b/drivers/gpu/drm/i915/intel_breadcrumbs.c
index 32ebbe887e61..b393421ddf06 100644
--- a/drivers/gpu/drm/i915/intel_breadcrumbs.c
+++ b/drivers/gpu/drm/i915/intel_breadcrumbs.c
@@ -119,7 +119,7 @@ void intel_engine_breadcrumbs_irq(struct intel_engine_cs *engine)
struct list_head *pos, *next;
LIST_HEAD(signal);

- raw_spin_lock(&b->irq_lock);
+ raw_spin_lock_irq(&b->irq_lock);

if (b->irq_armed && list_empty(&b->signalers))
__intel_breadcrumbs_disarm_irq(b);
@@ -163,7 +163,7 @@ void intel_engine_breadcrumbs_irq(struct intel_engine_cs *engine)
}
}

- raw_spin_unlock(&b->irq_lock);
+ raw_spin_unlock_irq(&b->irq_lock);

list_for_each_safe(pos, next, &signal) {
struct i915_request *rq =
@@ -181,9 +181,7 @@ void intel_engine_breadcrumbs_irq(struct intel_engine_cs *engine)

void intel_engine_signal_breadcrumbs(struct intel_engine_cs *engine)
{
- local_irq_disable();
intel_engine_breadcrumbs_irq(engine);
- local_irq_enable();
}

static void signal_irq_work(struct irq_work *work)
--
2.21.0
\
 
 \ /
  Last update: 2019-08-21 18:34    [W:0.025 / U:2.656 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site