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 CB97DD12D55 for ; Wed, 3 Dec 2025 12:18:06 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C383110E786; Wed, 3 Dec 2025 12:18:03 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=collabora.com header.i=@collabora.com header.b="KuSPMjZT"; dkim-atps=neutral Received: from bali.collaboradmins.com (bali.collaboradmins.com [148.251.105.195]) by gabe.freedesktop.org (Postfix) with ESMTPS id 317F110E12F for ; Wed, 3 Dec 2025 12:18:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1764764280; bh=F49nkMnBOo9d1L9Ch+w/k3nDy/9oGFebzJMlGFRS3l4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KuSPMjZTGkip7mQd4SdlIXhbrv6XqK/0MFIAXqsGNvnZLkIP9Jeax/ZJLk3f1izdK 9NPgpeVNkSypWlq//6M6z+5wcM80vpwPdqN2ZvTtIjKFojA5m2crKBL7ok8RVRS9Bt sfG+JoYUj3ivjxneq48qvXz8Rhs5DfXLciiPUzyANW0ilAj7eNLoE4VoTs13MSyWUW Nx4O7tXvOBpjNonnXr1JluO07wlcgydzmBwRm7wmU25+5chHgZcN3uPmKmWRWgvga7 brNpTQR+ODkRqV4malgK5iMAc3yYDX478uWHGVNfhYn8wLKGif4wNPFK09sBS+nqKq Z0OtCyB2wMs8g== 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 6D6C817E10F6; Wed, 3 Dec 2025 13:18:00 +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 v3 1/3] drm/panthor: Drop a WARN_ON() in group_free_queue() Date: Wed, 3 Dec 2025 13:17:48 +0100 Message-ID: <20251203121750.404340-2-boris.brezillon@collabora.com> X-Mailer: git-send-email 2.51.1 In-Reply-To: <20251203121750.404340-1-boris.brezillon@collabora.com> References: <20251203121750.404340-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