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 5A519D12694 for ; Wed, 3 Dec 2025 11:05:43 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3F5CE10E78C; Wed, 3 Dec 2025 11:05:42 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=collabora.com header.i=@collabora.com header.b="RIXuAKtg"; dkim-atps=neutral Received: from bali.collaboradmins.com (bali.collaboradmins.com [148.251.105.195]) by gabe.freedesktop.org (Postfix) with ESMTPS id DFF3D10E765 for ; Wed, 3 Dec 2025 11:05:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1764759938; bh=F49nkMnBOo9d1L9Ch+w/k3nDy/9oGFebzJMlGFRS3l4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RIXuAKtgXb4LSxUrYkGHdYbmt+wihT/Tpxxs28RWq/yIVnm5vkp3NDhLbTBUWArZI yHlKxnd3LaDzsORmS6knFfEPr4M0m5ie2ORb83fTJxWTToKFn9gj9ET0OZF66OeV+S 6h2N6CFXZ+0M2BGk/JbOd2GDo0d2oH2FTM/JIC+kV3ZLzPQVadLUxDTH6IOF3uCC0P l64yeZl5LISbH2RwE0/wjccqG6YHAhRvRg3N1gPvVHKBEPh2tjEAnlQxiVSH8PhpN3 AmThh0fh8LWySrU+l+jAvq/x4DS3Tabnu0QzDsUPOfHpPnA61Oj7fnSQq7a3z7/4BZ GwxE9dIkY/21A== Received: from fedora (unknown [IPv6:2a01:e0a:2c:6930:a2a7:f53:ebb0:945e]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: bbrezillon) by bali.collaboradmins.com (Postfix) with ESMTPSA id 2D56817E0360; Wed, 3 Dec 2025 12:05:38 +0100 (CET) From: Boris Brezillon To: Boris Brezillon , Steven Price , Liviu Dudau , =?UTF-8?q?Adri=C3=A1n=20Larumbe?= Cc: dri-devel@lists.freedesktop.org, Akash Goel , Chia-I Wu , kernel@collabora.com Subject: [PATCH v2 1/3] drm/panthor: Drop a WARN_ON() in group_free_queue() Date: Wed, 3 Dec 2025 12:05:25 +0100 Message-ID: <20251203110527.367089-2-boris.brezillon@collabora.com> X-Mailer: git-send-email 2.51.1 In-Reply-To: <20251203110527.367089-1-boris.brezillon@collabora.com> References: <20251203110527.367089-1-boris.brezillon@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" It appears the timeout can still be enabled when we reach that point, because of the asynchronous progress check done on queues that resets the timer when jobs are still in-flight, but progress was made. We could add more checks to make sure the timer is not re-enabled when a group can't run anymore, but we don't have a group to pass to queue_check_job_completion() in some context. It's just as safe (we just want to be sure the timer is stopped before we destroy the queue) and simpler to drop the WARN_ON() in group_free_queue(). v2: - Collect R-bs Signed-off-by: Boris Brezillon Reviewed-by: Liviu Dudau Reviewed-by: Chia-I Wu --- drivers/gpu/drm/panthor/panthor_sched.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/panthor/panthor_sched.c b/drivers/gpu/drm/panthor/panthor_sched.c index 389d508b3848..203f6a0a6b9a 100644 --- a/drivers/gpu/drm/panthor/panthor_sched.c +++ b/drivers/gpu/drm/panthor/panthor_sched.c @@ -893,9 +893,8 @@ static void group_free_queue(struct panthor_group *group, struct panthor_queue * if (IS_ERR_OR_NULL(queue)) return; - /* This should have been disabled before that point. */ - drm_WARN_ON(&group->ptdev->base, - disable_delayed_work_sync(&queue->timeout.work)); + /* Disable the timeout before tearing down drm_sched components. */ + disable_delayed_work_sync(&queue->timeout.work); if (queue->entity.fence_context) drm_sched_entity_destroy(&queue->entity); -- 2.51.1