2024-06-17 07:26:12 +00:00
|
|
|
From c5176b905ef79943e4b17211bb08ce6dba12024b Mon Sep 17 00:00:00 2001
|
2024-01-04 12:38:55 +00:00
|
|
|
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
|
|
|
Date: Mon, 25 Oct 2021 15:05:18 +0200
|
2024-06-17 07:26:12 +00:00
|
|
|
Subject: [PATCH 160/196] drm/i915: Don't check for atomic context on
|
2024-02-05 16:41:40 +00:00
|
|
|
PREEMPT_RT
|
2024-01-04 12:38:55 +00:00
|
|
|
|
|
|
|
The !in_atomic() check in _wait_for_atomic() triggers on PREEMPT_RT
|
|
|
|
because the uncore::lock is a spinlock_t and does not disable
|
|
|
|
preemption or interrupts.
|
|
|
|
|
|
|
|
Changing the uncore:lock to a raw_spinlock_t doubles the worst case
|
|
|
|
latency on an otherwise idle testbox during testing. Therefore I'm
|
|
|
|
currently unsure about changing this.
|
|
|
|
|
|
|
|
Link: https://lore.kernel.org/all/20211006164628.s2mtsdd2jdbfyf7g@linutronix.de/
|
|
|
|
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
|
|
|
---
|
|
|
|
drivers/gpu/drm/i915/i915_utils.h | 2 +-
|
|
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
|
|
|
|
diff --git a/drivers/gpu/drm/i915/i915_utils.h b/drivers/gpu/drm/i915/i915_utils.h
|
2024-02-05 16:41:40 +00:00
|
|
|
index c61066498bf2..48e19e55d6b0 100644
|
2024-01-04 12:38:55 +00:00
|
|
|
--- a/drivers/gpu/drm/i915/i915_utils.h
|
|
|
|
+++ b/drivers/gpu/drm/i915/i915_utils.h
|
2024-02-05 16:41:40 +00:00
|
|
|
@@ -288,7 +288,7 @@ wait_remaining_ms_from_jiffies(unsigned long timestamp_jiffies, int to_wait_ms)
|
2024-01-04 12:38:55 +00:00
|
|
|
#define wait_for(COND, MS) _wait_for((COND), (MS) * 1000, 10, 1000)
|
|
|
|
|
|
|
|
/* If CONFIG_PREEMPT_COUNT is disabled, in_atomic() always reports false. */
|
|
|
|
-#if defined(CONFIG_DRM_I915_DEBUG) && defined(CONFIG_PREEMPT_COUNT)
|
|
|
|
+#if defined(CONFIG_DRM_I915_DEBUG) && defined(CONFIG_PREEMPT_COUNT) && !defined(CONFIG_PREEMPT_RT)
|
|
|
|
# define _WAIT_FOR_ATOMIC_CHECK(ATOMIC) WARN_ON_ONCE((ATOMIC) && !in_atomic())
|
|
|
|
#else
|
|
|
|
# define _WAIT_FOR_ATOMIC_CHECK(ATOMIC) do { } while (0)
|
|
|
|
--
|
2024-06-17 07:26:12 +00:00
|
|
|
2.45.1
|
2024-01-04 12:38:55 +00:00
|
|
|
|