From patchwork Fri Jun 28 12:58:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Andrzej Siewior X-Patchwork-Id: 13716098 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 BD605C3064D for ; Fri, 28 Jun 2024 13:06:14 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2CBDE10EC42; Fri, 28 Jun 2024 13:06:11 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; secure) header.d=linutronix.de header.i=@linutronix.de header.b="w5ihT7tO"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="f3yuEQJl"; dkim-atps=neutral Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by gabe.freedesktop.org (Postfix) with ESMTPS id 954CE10EC3E; Fri, 28 Jun 2024 13:06:09 +0000 (UTC) From: Sebastian Andrzej Siewior DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1719579967; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=aSXJB0QPwx57XIMNHUpDO7fz+i0r/BRxLazBwWVlZsk=; b=w5ihT7tOwTESJmHDskat99KpK+Ty63wmiluJkQ9oli5YmGvRmoDkQf/QG9DoFTY5QYpPeV pWmsLldcLYmzAIStm6AOewc+UVYzzdMqeqRMF+ND7OHzdrw2CfltXO8qxRaGDlfk6M5GUP fYIMnN7G0Ve7WEIfjb9ALfHlB7Rbb62zN5QgPCe31dYRMSQMAuB06mdRSasgusUQCbvp/b fKRtTR1AelGNUQdKGcm4mXU/+eI9u5fHndWdowBvJMtK8EDYPSgAcfWBHITWVxZ/lpF8qW ZIYrUZOr3oGx8P9J+mm0VcUd3iw+X3/IFiiRFF09sKcpPjFnm6GZgBheNPXkvQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1719579967; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=aSXJB0QPwx57XIMNHUpDO7fz+i0r/BRxLazBwWVlZsk=; b=f3yuEQJlm/bnETjj9Rra+/y7WZhs5G91o9OlmfOiWLWWU0o97KICsagi/o7mOOWHeNjxyl gtQ01IFazwKymGDA== To: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org Cc: Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Thomas Gleixner , Tvrtko Ursulin , Sebastian Andrzej Siewior , Maarten Lankhorst , Tvrtko Ursulin Subject: [PATCH v3 6/8] drm/i915: Drop the irqs_disabled() check Date: Fri, 28 Jun 2024 14:58:05 +0200 Message-ID: <20240628130601.1772849-7-bigeasy@linutronix.de> In-Reply-To: <20240628130601.1772849-1-bigeasy@linutronix.de> References: <20240628130601.1772849-1-bigeasy@linutronix.de> MIME-Version: 1.0 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 !irqs_disabled() check triggers on PREEMPT_RT even with i915_sched_engine::lock acquired. The reason is the lock is transformed into a sleeping lock on PREEMPT_RT and does not disable interrupts. There is no need to check for disabled interrupts. The lockdep annotation below already check if the lock has been acquired by the caller and will yell if the interrupts are not disabled. Remove the !irqs_disabled() check. Reported-by: Maarten Lankhorst Acked-by: Tvrtko Ursulin Signed-off-by: Sebastian Andrzej Siewior --- drivers/gpu/drm/i915/i915_request.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_request.c b/drivers/gpu/drm/i915/i915_request.c index 519e096c607cd..466b5ee8ed6d2 100644 --- a/drivers/gpu/drm/i915/i915_request.c +++ b/drivers/gpu/drm/i915/i915_request.c @@ -608,7 +608,6 @@ bool __i915_request_submit(struct i915_request *request) RQ_TRACE(request, "\n"); - GEM_BUG_ON(!irqs_disabled()); lockdep_assert_held(&engine->sched_engine->lock); /* @@ -717,7 +716,6 @@ void __i915_request_unsubmit(struct i915_request *request) */ RQ_TRACE(request, "\n"); - GEM_BUG_ON(!irqs_disabled()); lockdep_assert_held(&engine->sched_engine->lock); /*