From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 25F27421220 for ; Thu, 6 Aug 2026 08:52:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786006359; cv=none; b=g0A+1aCEM4o/XdpNbkhFOrWDUgX7d8QJrYnKnPsRdkMlsSWi4fOOuPMlneWlp/eT+MUni7bSptGsnjAUZ7b/3o78VCSN7mLA7Nkz21IDdCbqJ2iwHtwrUfQmosGk3x1N5GqNtFFfT10FHV1CpsS8mq0oahQ1LcuBYdhDtIpp+mk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786006359; c=relaxed/simple; bh=tuZdamJvRz33WaeY9ad3Zb1en0F8NCkpcVpFyRn25+Q=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=u83Ze+AlNeUlHd94bhAzpMNWqXj2YL9AyG5CaUOtfNgPFXN+9RMLG866f8CjVNXrTZ2KrkTRtBzP07yEKwfwArgZsz/fLOJmzDOz1gpHf3eWdoMKfO9T34JJEeryPOVt2SPHwZeUDwjx5P7AyBclNJF+HnPr2AqTAkBocoFV1jc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=p23bJUKa; arc=none smtp.client-ip=209.85.128.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="p23bJUKa" Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-4957739c22fso411105e9.3 for ; Thu, 06 Aug 2026 01:52:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1786006353; x=1786611153; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=gH1ZijC9dBMRwcIQPOFxOSOLg1MiHZNn8LjvIG16PSY=; b=p23bJUKaDTbr39h/7hcdAeKUlvyfZeuQ4TYRLDRzjEdZYnUoQLYL00DcQL1HFS3PyV SPfvWuXzdCySr8NSXpmPi7Y0S1TmCkn+RsSOIjF3jDeR9a1Ij4xcO0+JLytUfQRBzG1+ khMNdBtLype6WbDD/kg9tW9xnIQnwJvIb2thsOd6boF9ZKsU+Mx8kvqeY6R27n93GnRA WFJGK/qWf0regkwW/DYD5hU9kA2l7quF2AqOI4gn1PvtLC8mSG+/uX0GZ1Xdvyc7a5+5 bKzu+PfHmlUrPc8LIJUVc8cjljeYCp6DHJkO5CuStMhy3JpHOYBi+VM69F4k6yKO8/w1 U75w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786006353; x=1786611153; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=gH1ZijC9dBMRwcIQPOFxOSOLg1MiHZNn8LjvIG16PSY=; b=S6HwCEmVp9QT+E3ITLNVEBiqS2kfOU3p612/Q1YV0c3RvHGn5ilcgwoMs7j/9wcI37 mZ+ZadfuYHSCu780GN1BRZVdblJ8YN7yI4KmJIHXntEVNl5TVH3WVzFLQX/3765ev62v 7bi2afpe+2TJ8yoEEya3pvRZ50n6DiNC+gqYDKHjkTGDG/KOet6LfNg8MzjKlVy6H9Hw 1wJTPadAh3U0zwfB4FOJOwQNYdgAeZBDFocswVJIPquFMbhyMgeSBh/RT4aFxRHxnpx7 YLt+OQU1vIVOTzkdFZgqxNv5cZ0dM1pa7PCHwNhOJUUxbLAIOPhsOLiGlpb9ooCGiv4K cKCQ== X-Forwarded-Encrypted: i=1; AHgh+RrtvielzAeKeYaXYXVHC+qn5WeytSKTZ0+gnndwAwpJ1sWq0Z9Hy/1gdB3sepUbKvC+8kVILVP8JEp5d3U=@vger.kernel.org X-Gm-Message-State: AOJu0YwxCJnjRUELpSWbMldn+UjLMJ9uM/tznzBBVEFU6ylkK8DB+Du5 6SJymWRweKxZnMyCCLNLMkMrHT8lEbdCFiLTxuh6k4SpXFahE30LQPOy X-Gm-Gg: AR+sD11B+WC1X8e8NJoQvaaNK01sjU/bMOJtT4NUkMJY9nwYLMSDZc6EABzQzrW82Al Nn7eFQwopMcdPTqDdK9TxkERCS6yQwhJ0oM3wExyEesx4GdORpaGidQ02h5we8kv8TTA6/T8JeN 4M4gUUI0Efvsn5deFBMGlFEuAkfAJBOPjBtCMa01kQ+ZxeIQcZcUuEYnBJS75efurjiatCwnaKg W32t1NmVVMBr/4XqRR3jmmhn2ZOpGUuDFpwPY0NZhf8Y9bpKokU2VmDp2dgcZknKhNZPhJtj6pf eJA9Tmwzqn6wb6jqwGp02oPkLah9i0NGaWe/HI/CH1QNHknUmXXgJjq5CtmPLBwY7Q2wcn+79B2 lGGlTIcxnKNf/TQwBggyC0K8YtnbLhWmf2641X6r0C1tQWcbOV0nNMt1r1D9+xWkJxt0Kr63fz+ Muzydrq1VncnVEVR1TSLAL0WuYKrq3brToeZV5UhyYPrO9rWqVZ94HN9Fqf9HVa4zBhwP2KnxzS KCss0ITu52fAPSGbT9rMfqbg2Mt2Mb21FuiY8V3zHjnQJae1VAvd/o= X-Received: by 2002:a05:600c:1549:b0:498:1371:660c with SMTP id 5b1f17b1804b1-4994e704bd5mr85555625e9.0.1786006352729; Thu, 06 Aug 2026 01:52:32 -0700 (PDT) Received: from Neo.taile6b6ba.ts.net (ip-109-193-028-127.um39.pools.vodafone-ip.de. [109.193.28.127]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4995420cb4esm45985355e9.2.2026.08.06.01.52.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Aug 2026 01:52:32 -0700 (PDT) From: Marek Czernohous To: nouveau@lists.freedesktop.org Cc: Lyude Paul , Danilo Krummrich , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 2/3] drm/nouveau: subscribe to channel-kill events on NV50 and newer Date: Thu, 6 Aug 2026 10:52:27 +0200 Message-ID: <20260806085228.1848994-3-mczernohous@gmail.com> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260806085228.1848994-1-mczernohous@gmail.com> References: <20260806085228.1848994-1-mczernohous@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Marek Czernohous nouveau_channel_init() only subscribes to the channel-killed event for FERMI_CHANNEL_GPFIFO and newer. On NV50/Tesla the subscription therefore never happens, and nvkm_chan_error()'s NVKM_CHAN_EVENT_ERRORED is delivered into an empty notifier list. Today that is harmless, because nothing kills a channel on Tesla: the only nvkm_chan_error() callers are the Fermi and newer recovery paths. The next patch adds such a caller for Tesla, and without a subscriber the consequences are severe. nouveau_channel_killed() never runs, so nouveau_fence_context_kill() never runs either, and the pending fences of the killed channel are never signalled. Everything waiting on them waits forever: drm_atomic_helper_wait_for_fences() in the display commit tail waits uninterruptibly and without a timeout, and the TTM delayed delete workers wait in TASK_UNINTERRUPTIBLE. The user sees a frozen desktop on a machine that is otherwise alive; it stays that way for minutes until the fences time out, and a reboot clears it immediately. That is also a dma-fence contract violation: a fence must always be signalled, with an error if necessary. Lower the class gate to NV50_CHANNEL_GPFIFO. The nvkm side is already class neutral: the KILLED case hangs the notifier on runl->chid->event, which every fifo owns since the runlist rework, and nvkm_uchan_uevent() does not discriminate by class. Pre-NV50 chips keep the old behaviour, so NV04 to NV40 are unaffected. Assisted-by: Claude:claude-opus-5 Signed-off-by: Marek Czernohous --- drivers/gpu/drm/nouveau/nouveau_chan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_chan.c b/drivers/gpu/drm/nouveau/nouveau_chan.c index 598513f60449..1db9fbd81f5c 100644 --- a/drivers/gpu/drm/nouveau/nouveau_chan.c +++ b/drivers/gpu/drm/nouveau/nouveau_chan.c @@ -363,7 +363,7 @@ nouveau_channel_init(struct nouveau_channel *chan, u32 vram, u32 gart) if (ret) return ret; - if (chan->user.oclass >= FERMI_CHANNEL_GPFIFO) { + if (chan->user.oclass >= NV50_CHANNEL_GPFIFO) { DEFINE_RAW_FLEX(struct nvif_event_v0, args, data, sizeof(struct nvif_chan_event_v0)); struct nvif_chan_event_v0 *host = -- 2.54.0