Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Maarten Lankhorst <dev@lankhorst.se>
To: intel-xe@lists.freedesktop.org
Subject: [FOR CI 7/8] With disabled irqs instead
Date: Thu, 30 Oct 2025 19:47:09 +0100	[thread overview]
Message-ID: <20251030184710.359870-8-dev@lankhorst.se> (raw)
In-Reply-To: <20251030184710.359870-1-dev@lankhorst.se>

Signed-off-by: Maarten Lankhorst <dev@lankhorst.se>
---
 drivers/gpu/drm/i915/display/intel_crtc.c   | 14 +++++---------
 drivers/gpu/drm/i915/display/intel_cursor.c | 18 ++++++------------
 drivers/gpu/drm/i915/display/intel_vblank.c |  8 ++++++--
 3 files changed, 17 insertions(+), 23 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_crtc.c b/drivers/gpu/drm/i915/display/intel_crtc.c
index 678264c9b82f2..832287b2f95a7 100644
--- a/drivers/gpu/drm/i915/display/intel_crtc.c
+++ b/drivers/gpu/drm/i915/display/intel_crtc.c
@@ -570,12 +570,10 @@ void intel_pipe_update_start(struct intel_atomic_state *state,
 	 */
 	intel_psr_wait_for_idle_locked(new_crtc_state);
 
+#ifdef I915
 	if (!IS_ENABLED(CONFIG_PREEMPT_RT))
-		local_irq_disable();
-#ifndef I915
-	else
-		preempt_disable();
 #endif
+		local_irq_disable();
 
 	crtc->debug.min_vbl = evade.min;
 	crtc->debug.max_vbl = evade.max;
@@ -593,12 +591,10 @@ void intel_pipe_update_start(struct intel_atomic_state *state,
 	return;
 
 irq_disable:
+#ifdef I915
 	if (!IS_ENABLED(CONFIG_PREEMPT_RT))
-		local_irq_disable();
-#ifndef I915
-	else
-		preempt_disable();
 #endif
+		local_irq_disable();
 
 }
 
@@ -699,7 +695,7 @@ void intel_pipe_update_end(struct intel_atomic_state *state,
 		icl_dsi_frame_update(new_crtc_state);
 
 #if !defined(I915) && IS_ENABLED(CONFIG_PREEMPT_RT)
-	preempt_enable();
+	local_irq_enable();
 #endif
 
 	/* We're still in the vblank-evade critical section, this can't race.
diff --git a/drivers/gpu/drm/i915/display/intel_cursor.c b/drivers/gpu/drm/i915/display/intel_cursor.c
index 50ca39eb09145..6dbaeeb6084b2 100644
--- a/drivers/gpu/drm/i915/display/intel_cursor.c
+++ b/drivers/gpu/drm/i915/display/intel_cursor.c
@@ -920,23 +920,19 @@ intel_legacy_cursor_update(struct drm_plane *_plane,
 		 */
 		intel_psr_wait_for_idle_locked(crtc_state);
 
+#ifdef I915
 		if (!IS_ENABLED(CONFIG_PREEMPT_RT))
-			local_irq_disable();
-#ifndef I915
-		else
-			preempt_disable();
 #endif
+			local_irq_disable();
 
 		intel_vblank_evade(&evade);
 
 		vblanked = true;
 	} else {
+#ifdef I915
 		if (!IS_ENABLED(CONFIG_PREEMPT_RT))
-			local_irq_disable();
-#ifndef I915
-		else
-			preempt_disable();
 #endif
+			local_irq_disable();
 	}
 
 	if (new_plane_state->uapi.visible) {
@@ -946,12 +942,10 @@ intel_legacy_cursor_update(struct drm_plane *_plane,
 		intel_plane_disable_arm(NULL, plane, crtc_state);
 	}
 
+#ifdef I915
 	if (!IS_ENABLED(CONFIG_PREEMPT_RT))
-		local_irq_enable();
-#ifndef I915
-	else
-		preempt_enable();
 #endif
+		local_irq_enable();
 
 	intel_psr_unlock(crtc_state);
 
diff --git a/drivers/gpu/drm/i915/display/intel_vblank.c b/drivers/gpu/drm/i915/display/intel_vblank.c
index 5fcf5c08187f7..e7450d4d99d25 100644
--- a/drivers/gpu/drm/i915/display/intel_vblank.c
+++ b/drivers/gpu/drm/i915/display/intel_vblank.c
@@ -386,7 +386,9 @@ static bool i915_get_crtc_scanoutpos(struct drm_crtc *_crtc,
 	 */
 	intel_vblank_section_enter_irqf(display, &irqflags);
 
-	if (IS_ENABLED(CONFIG_PREEMPT_RT))
+#ifdef I915
+	if (!IS_ENABLED(CONFIG_PREEMPT_RT))
+#endif
 		preempt_disable();
 
 	/* Get optional system timestamp before query. */
@@ -451,7 +453,9 @@ static bool i915_get_crtc_scanoutpos(struct drm_crtc *_crtc,
 	if (etime)
 		*etime = ktime_get();
 
-	if (IS_ENABLED(CONFIG_PREEMPT_RT))
+#ifdef I915
+	if (!IS_ENABLED(CONFIG_PREEMPT_RT))
+#endif
 		preempt_enable();
 
 	intel_vblank_section_exit_irqf(display, irqflags);
-- 
2.51.0


  parent reply	other threads:[~2025-10-30 18:47 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-30 18:47 [FOR CI 0/8] Testing PREEMPT_RT with disabling irqs in the most critical section Maarten Lankhorst
2025-10-30 18:47 ` [FOR CI 1/8] drm/xe: Bump xe_device_l2_flush even higher Maarten Lankhorst
2025-10-30 18:47 ` [FOR CI 2/8] drm/i915/display: Make get_vblank_counter use intel_de_read_fw() Maarten Lankhorst
2025-10-30 18:47 ` [FOR CI 3/8] drm/i915: Use preempt_disable/enable_rt() where recommended Maarten Lankhorst
2025-10-30 18:47 ` [FOR CI 4/8] drm/i915: Don't disable interrupts on PREEMPT_RT during atomic updates Maarten Lankhorst
2025-10-30 18:47 ` [FOR CI 5/8] drm/xe/display: Disable preemption in the most critical section Maarten Lankhorst
2025-10-30 18:47 ` [FOR CI 6/8] PREEMPT_RT injection Maarten Lankhorst
2025-10-30 18:47 ` Maarten Lankhorst [this message]
2025-10-31  8:40   ` [FOR CI FIXED] With disabled irqs instead Maarten Lankhorst
2025-10-30 18:47 ` [FOR CI 8/8] drm/i915/display: Use intel_de_write_fw in intel_pipe_fastset Maarten Lankhorst
2025-10-30 18:54   ` Gustavo Sousa
2025-10-30 20:00     ` Maarten Lankhorst
2025-10-30 20:25       ` Gustavo Sousa
2025-10-31 12:49         ` Rodrigo Vivi
2025-10-31 15:43           ` Jani Nikula
2025-10-31 16:46             ` Maarten Lankhorst
2025-10-30 19:14 ` ✗ CI.checkpatch: warning for Testing PREEMPT_RT with disabling irqs in the most critical section Patchwork
2025-10-30 19:15 ` ✓ CI.KUnit: success " Patchwork
2025-10-30 19:29 ` ✗ CI.checksparse: warning " Patchwork
2025-10-30 20:18 ` ✗ Xe.CI.BAT: failure " Patchwork
2025-10-31  1:59 ` ✗ Xe.CI.Full: " Patchwork
2025-10-31  9:35 ` ✗ CI.checkpatch: warning for Testing PREEMPT_RT with disabling irqs in the most critical section. (rev2) Patchwork
2025-10-31  9:36 ` ✓ CI.KUnit: success " Patchwork
2025-10-31  9:51 ` ✗ CI.checksparse: warning " Patchwork
2025-10-31 11:09 ` ✓ Xe.CI.BAT: success " Patchwork
2025-10-31 22:04 ` ✗ Xe.CI.Full: failure " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251030184710.359870-8-dev@lankhorst.se \
    --to=dev@lankhorst.se \
    --cc=intel-xe@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox