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 6DA4AD116F6 for ; Tue, 2 Dec 2025 14:20:40 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CAE4910E661; Tue, 2 Dec 2025 14:20:39 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by gabe.freedesktop.org (Postfix) with ESMTP id 1E24C10E661 for ; Tue, 2 Dec 2025 14:20:39 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 45EDD1477 for ; Tue, 2 Dec 2025 06:20:31 -0800 (PST) Received: from [10.2.10.34] (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 69DDE3F73B for ; Tue, 2 Dec 2025 06:20:38 -0800 (PST) Date: Tue, 2 Dec 2025 14:20:14 +0000 From: Liviu Dudau To: Boris Brezillon Cc: Steven Price , =?utf-8?Q?Adri=C3=A1n?= Larumbe , dri-devel@lists.freedesktop.org, Akash Goel , kernel@collabora.com Subject: Re: [PATCH v1 1/3] drm/panthor: Drop a WARN_ON() in group_free_queue() Message-ID: References: <20251202133538.83078-1-boris.brezillon@collabora.com> <20251202133538.83078-2-boris.brezillon@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20251202133538.83078-2-boris.brezillon@collabora.com> 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" On Tue, Dec 02, 2025 at 02:35:36PM +0100, Boris Brezillon wrote: > 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(). > > Signed-off-by: Boris Brezillon Reviewed-by: Liviu Dudau Best regards, Liviu > --- > 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 >