From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4EFA0606A322 for ; Thu, 3 Dec 2026 04:42:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=FZSsnACJ Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A63AE10E396; Thu, 3 Dec 2026 04:42:05 +0000 (UTC) Received: from sea.source.kernel.org (sea.source.kernel.org [172.234.252.31]) by gabe.freedesktop.org (Postfix) with ESMTPS id AB5B410E3D6 for ; Thu, 3 Dec 2026 04:41:59 +0000 (UTC) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id 855B343263; Thu, 3 Dec 2026 04:41:59 +0000 (UTC) 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 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-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: sashiko-reviews@lists.linux.dev Sender: "dri-devel" X-Spam-Status: No, score=-10.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 X-Archived-By: 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