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 03537D5CC99 for ; Tue, 16 Dec 2025 09:22:40 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C7BD910E823; Tue, 16 Dec 2025 09:22:38 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=lankhorst.se header.i=@lankhorst.se header.b="BvEyCfeY"; dkim-atps=neutral Received: from lankhorst.se (lankhorst.se [141.105.120.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id 78E8E10E77B; Tue, 16 Dec 2025 09:22:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lankhorst.se; s=default; t=1765876956; bh=ohJAyXokG1DXJlCLrQJRh/QxThVSMLY/wxocRwSmqYU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BvEyCfeYryA/9FPTI4yvcFDZhkejCKGCtvEEXLnorDixZxXSnmQLpbnQ8FY0Pz5aw Bn1++K5SaNYZKt1tYq0NDHtCvanfbFgLFWPXFtxuXK4wOJf4UP67+QIwCt8Wyb+UbA iZCW+AkMB6GoqmNHMBv4FLGjonCW1wSAG7UipSKQjJcErXQRK5v1shNS5mmDFGiflp +a2Rd3TDIWKLC7fdy5pkEwvqAymdqW00zOyl6lDjwjn6VrDH3CFxRPEoz+HznWfslF sg/Wt9LX1Jzd0HB+OLi9NKoUFS83J0uquHCrn58eWzGysM1S1Bro97kn1efk/sA1iT HuOixUoBq/pzQ== From: Maarten Lankhorst To: intel-xe@lists.freedesktop.org Cc: intel-gfx@lists.freedesktop.org Subject: [i915-rt v2 09/16] drm/i915/display: Enable interrupts earlier on PREEMPT_RT Date: Tue, 16 Dec 2025 10:22:36 +0100 Message-ID: <20251216092226.1777909-27-dev@lankhorst.se> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251216092226.1777909-18-dev@lankhorst.se> References: <20251216092226.1777909-18-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