From nobody Sat Feb 7 11:31:15 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 579D134BA3A for ; Thu, 9 Oct 2025 13:00:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760014820; cv=none; b=n8jI07Q+Hzi416u6h5dlAV4io+AMNEn9FJxd9AFIl/kEx3WIAmKPVg7GDq7uceNw25kQKuUrVRkXzb+PcMMhuS5uJ5AmHiyyVTfzZJUBOe8Z7BAvWjFJVlcToz98fwg64V/2mWraA5FSNIbaPGT47x3IwSna44rGoeTMMg/ooUc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760014820; c=relaxed/simple; bh=RYuJ6aT2S9Kz/9NlGFnc04Gk8G7jOeT+9XyFBA7w33Q=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=C9NpkYBaxCrDfx4CNUGejdSLCQLfAIX6hA5cYA4LtSlajz+9/41tjFI93lBv4cEk4TPA1cRSTjxTSxp4jP3gtO4jrfsGUt+9PjPO35K2jkJxKIrgAOCrFsnbz33vFvTbBilx1rSutwDYL1DY2NaQ9K8BalIkrDdMxwfYNs4SRKI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=N3rEP6Fz; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="N3rEP6Fz" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 46C2CC4CEE7; Thu, 9 Oct 2025 13:00:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1760014820; bh=RYuJ6aT2S9Kz/9NlGFnc04Gk8G7jOeT+9XyFBA7w33Q=; h=From:To:Cc:Subject:Date:From; b=N3rEP6FzSfAMn4cxbh4kmoxpybZljYLmUfs6c4JGmsIEZx29Kfr3GVswnQHfSEwuz aR/wWZaw13+n0CdKmyiRNOijEtwfiS43YwE8ksL5ZW3sWPPZ0pN/RSHlNcWOM04DjN 2f9us5pTYyP/fSo14xrZCzBu0C2sIwj3bvPsaW+fQGcSI7Bk1gkn7nYk5EPKo+QO60 PlIvqwOlheO7EQNtWsCoYWpJpF6eFNwuCP7MkQLtnvfSxz9ctLS4msadLjdkV4TysV Z7imwc+jmOgw2lT3pRopjWUG6jrKY086FOPCbhjFDEZtTve8xircFe135Jf+7mj5Rg wOteb/OtmLo9w== From: Philipp Stanner To: Matthew Brost , Danilo Krummrich , Philipp Stanner , =?UTF-8?q?Christian=20K=C3=B6nig?= , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH] drm/sched: Add warning for removing hack in drm_sched_fini() Date: Thu, 9 Oct 2025 14:59:29 +0200 Message-ID: <20251009125928.250652-2-phasta@kernel.org> X-Mailer: git-send-email 2.49.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The assembled developers agreed at the X.Org Developers Conference that the hack added for amdgpu in drm_sched_fini() shall be removed. It shouldn't be needed by amdgpu anymore. As it's unclear whether all drivers really follow the life time rule of entities having to be torn down before their scheduler, it is reasonable to warn for a while before removing the hack. Add a warning in drm_sched_fini() that fires if an entity is still active. Signed-off-by: Philipp Stanner --- drivers/gpu/drm/scheduler/sched_main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/scheduler/sched_main.c b/drivers/gpu/drm/sched= uler/sched_main.c index 46119aacb809..e69917120870 100644 --- a/drivers/gpu/drm/scheduler/sched_main.c +++ b/drivers/gpu/drm/scheduler/sched_main.c @@ -1441,6 +1441,8 @@ void drm_sched_fini(struct drm_gpu_scheduler *sched) * drivers that keep entities alive for longer than * the scheduler. */ + if (!s_entity->stopped) + dev_warn(sched->dev, "Tearing down scheduler with active entities!\n"); s_entity->stopped =3D true; spin_unlock(&rq->lock); kfree(sched->sched_rq[i]); --=20 2.49.0