From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796272919; b=jj1qUdw9AdP2C5MWs3MHnYD/N1w5DVOozq2PppOhucWxm/w7kXjVbxL4dvKSvgLNN8Ts wmBEE7KQ+uHt/tCFKS/xZfMN7HjOxBAH653wsK5NCcDXDZMYX7YcNSeqB2fV39eptdKx1 9xhJyuBj6yzqLG40j11zTTJXyROL/v8aXRk48VxBgY7b6co/LpMws+xfUi35FUEqBO4h4 aOXQIgv/B+zgZPoDKzQTqLzym+59IF3c+x254UT6Uw7GPtg3V5h+TPFkvBys2QyLiqJTo JHv14YmL+rbkTRxCIsMbwFunZBWPLLryO7EF/Iy+xg2PTg2TkZCigVR97sRkaFYRkLw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796272919; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=Dj8w2T0hCC9Xp3p0gnZJg4wmWAHhrogQFL1Zo9KhWZs=; b=EqkA3yKXYT9DNjAS7IEAV9KdSBM+A7FNFLd/ChXurE6OPwHp8nLed9Alj9n52KmLTt3K n9qTYyMk+ok1CWlEPWNy3NwTP+jj9VzZFlHC1sG7FIac6Vi4ipKpSRE6KmOLsSR0ORJ7P qe0ae/OKuUMk31AGbMsthKFIL7dGvgQhMdy7NK52d4BPAychPO1eBbxiJJisRMNCO+EZ9 SU0N0BuHXreGzfjY5+/9mAwpef8jQeY/M6Gj3GztF9CCnoZJ+Ye+bfOmyL4fW0xpqaaxg gi+6iAAwnCzw9GE1V2omAjSM/TPPcQr2J4aYLoyAgD00m0YjQrZJqwlbUezvC+7C4Tg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=FZSsnACJ; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D1BF1606A322 for ; Thu, 3 Dec 2026 04:41:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=FZSsnACJ Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2C0C71F000C1; Thu, 3 Dec 2026 04:41:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796272919; bh=Dj8w2T0hCC9Xp3p0gnZJg4wmWAHhrogQFL1Zo9KhWZs=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=FZSsnACJ8WyY2oF3Zh5eBjNJ2Jd5RLA1tXCb5olKO6GN2GVxovCqb1JM5HnkRSa5r Ff/hsltokcVG0TdlHSVPyF2TRvb4f4RZaby5IfrL9MvYBcRhw7TaPN1SEn76iAzyln STG0r9CODQ+LBMQpWza50dq5rtr8X0jsz2xbNjWtmzU39jQx11duJfH3RyBApmi9Xc uXC6YkLVGsSUgSmofRUPviQV4cMWZDHBHE3XzHzGJHzCldT7+wGaqWBMqUxf8JwhJY Mor0EI7k2u3b7KuIZ4CSRtvb0JZqa37UZ+TN2zeLFfUwNdJDPGKkrESEiAApOTjFaV mhE/4C3mbLPbQ== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v4 1/2] drm/nouveau: leave GSP-capable GPUs to nova-core when requested Reply-To: sashiko-reviews@lists.linux.dev To: "Dave Airlie" , "Lyude Paul" , "Danilo Krummrich" , "Alexandre Courbot" Cc: dri-devel@lists.freedesktop.org, nova-gpu@lists.linux.dev In-Reply-To: <20261203-nova-nouveau-gsp-v4-1-eb3e5e111968@redhat.com> References: <20261203-nova-nouveau-gsp-v4-0-eb3e5e111968@redhat.com> <20261203-nova-nouveau-gsp-v4-1-eb3e5e111968@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Thu, 03 Dec 2026 04:41:58 +0000 X-Mailing-List: nova-gpu@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Medium] drm/nouveau: nouveau_register_dsm_handler() mutates rejected GSP GPUs -- commit 9ca41183c261ddad149f42829e0a7497b70fd715 Author: Dave Airlie drm/nouveau: leave GSP-capable GPUs to nova-core when requested This commit adds a bind_gsp module parameter (defaulting to the inverse of CONFIG_NOVA_CORE_BIND_GSP) so nouveau rejects Turing and later PCI GPUs in nvkm_device_ctor() before subdev construction, and adds nvkm_device_dtor() to unwind partially constructed devices on failure. > diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouv= eau/nouveau_drm.c > index 5e1336615cf6d..6f279d78066c2 100644 > --- a/drivers/gpu/drm/nouveau/nouveau_drm.c > +++ b/drivers/gpu/drm/nouveau/nouveau_drm.c [ ... ] > @@ -881,7 +887,8 @@ static int nouveau_drm_probe(struct pci_dev *pdev, > /* We need to check that the chipset is supported before booting > * fbdev off the hardware, as there's no way to put it back. > */ > - ret =3D nvkm_device_pci_new(pdev, nouveau_config, nouveau_debug, &devic= e); > + ret =3D nvkm_device_pci_new(pdev, nouveau_config, nouveau_debug, > + nouveau_bind_gsp, &device); > if (ret) > return ret; > =20 [Severity: Medium] Does nouveau_register_dsm_handler() still mutate PCI PM state and claim the global vga_switcheroo handler slot for GSP-capable GPUs rejected here? nouveau_drm_init() calls nouveau_register_dsm_handler() before pci_register_driver(), so it runs before nouveau_drm_probe() rejects a GPU under bind_gsp=3D0. In nouveau_dsm_detect() -> nouveau_dsm_pci_probe(), any NVIDIA display device whose upstream bridge has !bridge_d3 gets pci_d3cold_disable(pdev). Since nouveau never calls pci_d3cold_enable() and pdev->no_d3cold cannot be cleared from sysfs, the handed-off GPU stays capped at D3hot. On Optimus laptops, nouveau_register_dsm_handler() also claims the exclusive vgasr_priv.handler slot via vga_switcheroo_register_handler(). After nouveau_drm_probe() returns -ENODEV, nouveau remains loaded with zero bound devices while occupying that slot, making later registrations return -EINVA= L. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261203-nova-nouve= au-gsp-v4-0-eb3e5e111968@redhat.com?part=3D1