From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E2EACD6ACDD for ; Thu, 18 Dec 2025 16:33:50 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6136D10EA6F; Thu, 18 Dec 2025 16:33:50 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=lankhorst.se header.i=@lankhorst.se header.b="QagVagx0"; dkim-atps=neutral Received: from lankhorst.se (lankhorst.se [141.105.120.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1012010EA67; Thu, 18 Dec 2025 16:33:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lankhorst.se; s=default; t=1766075624; bh=ohJAyXokG1DXJlCLrQJRh/QxThVSMLY/wxocRwSmqYU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=QagVagx0UKO7Szc+b9OmJ+Nj9sSPJLonHfQU+HZkLaGpKi5ksBwrPbVYwGwNLhVv9 LYIIbzV0rwlswDM9GsfPUWDID1FfX7ZOEkw4whQfJ1gkP5JIVqnYxph1cabxRTpaVv WPYrmvnHQB3AZ+a6fbAEz6k5Ty+vNoF9Q3O3KThLKVfXJYB0LiUD/T4Lp7zYlOxPDr MDjQ6xfZzKwDwB0YnIvxP8imUlvvRVniTHo8mp9TmHByrqYS3+hBOPdZLuj/HpjehT WtwLDB1E/8ZJ82hbEOLxd0iU6U4wv5TrOqOdVx/UWD0v5WhegfFX2TvlfeJTdTCyhT IkrEhyS6oxkbQ== From: Maarten Lankhorst To: intel-xe@lists.freedesktop.org, intel-gfx@lists.freedesktop.org Subject: [i915-rt v4 09/20] drm/i915/display: Enable interrupts earlier on PREEMPT_RT Date: Thu, 18 Dec 2025 17:33:57 +0100 Message-ID: <20251218163408.97508-10-dev@lankhorst.se> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251218163408.97508-1-dev@lankhorst.se> References: <20251218163408.97508-1-dev@lankhorst.se> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" The last part of the vblank evasion is about updating bookkeeping, not programming hardware registers. The interrupts cannot stay disabled here on PREEMPT_RT since the spinlocks get converted to mutexes. There's still a small race in VRR that needs to be addressed, and in the other worst case there is a delay of a vblank completion if the vblank is fired and we schedule on the next vblank, this needs to be addressed separately. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/display/intel_crtc.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_crtc.c b/drivers/gpu/drm/i915/display/intel_crtc.c index cb31c9c1c2525..84ab737c50918 100644 --- a/drivers/gpu/drm/i915/display/intel_crtc.c +++ b/drivers/gpu/drm/i915/display/intel_crtc.c @@ -703,6 +703,14 @@ void intel_pipe_update_end(struct intel_atomic_state *state, intel_crtc_has_type(new_crtc_state, INTEL_OUTPUT_DSI)) icl_dsi_frame_update(new_crtc_state); +#if IS_ENABLED(CONFIG_PREEMPT_RT) + /* + * Timing sensitive register writing completed, non-deterministic + * locking from here on out. + */ + local_irq_enable(); +#endif + /* We're still in the vblank-evade critical section, this can't race. * Would be slightly nice to just grab the vblank count and arm the * event outside of the critical section - the spinlock might spin for a @@ -750,7 +758,9 @@ void intel_pipe_update_end(struct intel_atomic_state *state, if (!state->base.legacy_cursor_update) intel_vrr_send_push(NULL, new_crtc_state); +#if !IS_ENABLED(CONFIG_PREEMPT_RT) local_irq_enable(); +#endif if (intel_parent_vgpu_active(display)) goto out; -- 2.51.0