* [PATCH v2 0/3] nova/nouveau: add configs/module options to control binding behaviour (v2)
@ 2026-11-23 2:50 Dave Airlie via B4 Relay
2026-11-23 2:50 ` [PATCH v2 1/3] drm/nouveau/nvkm: fix device leak on ctor failure Dave Airlie via B4 Relay
` (2 more replies)
0 siblings, 3 replies; 14+ messages in thread
From: Dave Airlie via B4 Relay @ 2026-11-23 2:50 UTC (permalink / raw)
To: Lyude Paul, Danilo Krummrich, Alexandre Courbot
Cc: dri-devel, nouveau, nova-gpu, Dave Airlie
We want to be able to build both nova and nouveau and maintain the
status quo for now of nouveau binding to all GSP enabled GPUs.
In the future we may suggest switching the default to nova, but
for now the default is to let users use command line options for testing
and developers building their own kernel can set the kconfig.
This contains a precursor patch to fix the nouveau device cleanup paths.
Signed-off-by: Dave Airlie <airlied@redhat.com>
---
Changes in v2:
- nouveau dtor path is broken, so fix that before adding the new code. (Sashiko)
- Link to v1: https://lore.kernel.org/r/20261119-nova-nouveau-gsp-v1-0-4cde2bc41132@redhat.com
---
Dave Airlie (3):
drm/nouveau/nvkm: fix device leak on ctor failure
drm/nouveau: add option to leave GSP-capable GPUs to other drivers
nova-core: only bind to GPUs when explicitly requested
drivers/gpu/drm/nouveau/Kconfig | 17 +++++++++++++
drivers/gpu/drm/nouveau/include/nvkm/core/pci.h | 2 +-
drivers/gpu/drm/nouveau/nouveau_drm.c | 9 ++++++-
drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 29 +++++++++++++++++++---
drivers/gpu/drm/nouveau/nvkm/engine/device/pci.c | 8 +++---
drivers/gpu/drm/nouveau/nvkm/engine/device/priv.h | 2 +-
drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c | 18 ++++++++++----
drivers/gpu/nova-core/Kconfig | 21 ++++++++++++++++
drivers/gpu/nova-core/driver.rs | 13 ++++++++++
drivers/gpu/nova-core/nova_core.rs | 4 +++
10 files changed, 108 insertions(+), 15 deletions(-)
---
base-commit: e55a991e09e3b44f0b0d8206bb523dc57c086341
change-id: 20261119-nova-nouveau-gsp-10f8782498e4
Best regards,
--
Dave Airlie <airlied@redhat.com>
^ permalink raw reply [flat|nested] 14+ messages in thread* [PATCH v2 1/3] drm/nouveau/nvkm: fix device leak on ctor failure 2026-11-23 2:50 [PATCH v2 0/3] nova/nouveau: add configs/module options to control binding behaviour (v2) Dave Airlie via B4 Relay @ 2026-11-23 2:50 ` Dave Airlie via B4 Relay 2026-11-23 3:14 ` sashiko-bot 2026-11-23 2:50 ` [PATCH v2 2/3] drm/nouveau: add option to leave GSP-capable GPUs to other drivers Dave Airlie via B4 Relay 2026-11-23 2:50 ` [PATCH v2 3/3] nova-core: only bind to GPUs when explicitly requested Dave Airlie via B4 Relay 2 siblings, 1 reply; 14+ messages in thread From: Dave Airlie via B4 Relay @ 2026-11-23 2:50 UTC (permalink / raw) To: Lyude Paul, Danilo Krummrich, Alexandre Courbot Cc: dri-devel, nouveau, nova-gpu, Dave Airlie From: Dave Airlie <airlied@redhat.com> When adding a new failure path from device_ctor, the missing clean up paths in the current code were uncovered. The device_del path doesn't work because it relies on initialisation that hadn't been done yet. This patch cleans up the failure paths and initialises the things needed for the nvkm_device_del path to work. Fixes: 0d5dd3f301bb ("drm/nouveau/lib: various tweaks") --- drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 13 ++++++++++--- drivers/gpu/drm/nouveau/nvkm/engine/device/pci.c | 4 +++- drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c | 13 +++++++++---- 3 files changed, 22 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c index a2ed8c4fe52a..625bb019736a 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c @@ -3152,10 +3152,19 @@ nvkm_device_ctor(const struct nvkm_device_func *func, unsigned chipset; mutex_lock(&nv_devices_mutex); + + /* Set up the state that nvkm_device_del() relies on before anything + * that can fail, so that a device whose construction failed can be + * cleaned up by the caller with nvkm_device_del(). + */ + device->func = func; + INIT_LIST_HEAD(&device->head); + INIT_LIST_HEAD(&device->subdev); + nvkm_intr_ctor(device); + if (nvkm_device_find_locked(handle)) goto done; - device->func = func; device->quirk = quirk; device->dev = dev; device->type = type; @@ -3165,7 +3174,6 @@ nvkm_device_ctor(const struct nvkm_device_func *func, device->name = name; list_add_tail(&device->head, &nv_devices); device->debug = nvkm_dbgopt(device->dbgopt, "device"); - INIT_LIST_HEAD(&device->subdev); mmio_base = device->func->resource_addr(device, NVKM_BAR0_PRI); mmio_size = device->func->resource_size(device, NVKM_BAR0_PRI); @@ -3402,7 +3410,6 @@ nvkm_device_ctor(const struct nvkm_device_func *func, device->name = device->chip->name; mutex_init(&device->mutex); - nvkm_intr_ctor(device); #define NVKM_LAYOUT_ONCE(type,data,ptr) \ if (device->chip->ptr.inst) { \ diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/pci.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/pci.c index 248623b91e29..269ccd4b482e 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/device/pci.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/pci.c @@ -1705,8 +1705,10 @@ nvkm_device_pci_new(struct pci_dev *pci_dev, const char *cfg, const char *dbg, PCI_FUNC(pci_dev->devfn), name, cfg, dbg, &pdev->device); - if (ret) + if (ret) { + nvkm_device_del(pdevice); return ret; + } /* Set DMA mask based on capabilities reported by the MMU subdev. */ if (pdev->device.mmu && !pdev->device.pci->agp.bridge) diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c index 3c8d0878891a..eb4f43287796 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c @@ -332,15 +332,20 @@ nvkm_device_tegra_new(const struct nvkm_device_tegra_func *func, ret = nvkm_device_ctor(&nvkm_device_tegra_func, NULL, &pdev->dev, NVKM_DEVICE_TEGRA, pdev->id, NULL, cfg, dbg, &tdev->device); - if (ret) - goto powerdown; + if (ret) { + struct nvkm_device *device = &tdev->device; + + /* Cleans up the partially constructed device, including + * powering it down and freeing tdev. + */ + nvkm_device_del(&device); + return ret; + } *pdevice = &tdev->device; return 0; -powerdown: - nvkm_device_tegra_power_down(tdev); remove: nvkm_device_tegra_remove_iommu(tdev); free: -- 2.56.1 ^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH v2 1/3] drm/nouveau/nvkm: fix device leak on ctor failure 2026-11-23 2:50 ` [PATCH v2 1/3] drm/nouveau/nvkm: fix device leak on ctor failure Dave Airlie via B4 Relay @ 2026-11-23 3:14 ` sashiko-bot 2026-11-23 13:47 ` Danilo Krummrich 0 siblings, 1 reply; 14+ messages in thread From: sashiko-bot @ 2026-11-23 3:14 UTC (permalink / raw) To: Dave Airlie, Lyude Paul, Danilo Krummrich, Alexandre Courbot Cc: dri-devel, nova-gpu Thank you for your contribution! Sashiko AI review found 4 potential issues to consider: - [High] drm/nouveau/nvkm: missing Signed-off-by trailer in commit message - [Medium] drm/nouveau/nvkm: NULL deref in nvkm_devinit_dtor() after ctor iounmap() - [Medium] drm/nouveau/nvkm: NULL device->dev in nvkm_device_del() on ctor failure - [Low] drm/nouveau/nvkm: Fixes trailer cites unrelated commit 0d5dd3f301bb -- commit 9d8c7debf78767e0a5b65084a841f14aa7a58bd6 Author: Dave Airlie <airlied@redhat.com> > drm/nouveau/nvkm: fix device leak on ctor failure > > When adding a new failure path from device_ctor, the missing > clean up paths in the current code were uncovered. > > The device_del path doesn't work because it relies on initialisation > that hadn't been done yet. > > This patch cleans up the failure paths and initialises the > things needed for the nvkm_device_del path to work. > > Fixes: 0d5dd3f301bb ("drm/nouveau/lib: various tweaks") [Severity: High] The commit message is missing a Signed-off-by: trailer. [Severity: Low] Does the Fixes: tag point to the right commit? 0d5dd3f301bb ("drm/nouveau/lib: various tweaks") only changed list_add() to list_add_tail() in nvkm_device_create_(). The split into nvkm_device_ctor(), nvkm_device_pci_new(), and nvkm_device_tegra_new() where ctor failure paths skipped nvkm_device_del() was introduced in 7974dd1bdb43 ("drm/nouveau/device: separate construction of pci/tegra devices"). > diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c > index a2ed8c4fe52a0..625bb019736af 100644 > --- a/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c > +++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c > @@ -3152,10 +3152,19 @@ nvkm_device_ctor(const struct nvkm_device_func *func, > unsigned chipset; > > mutex_lock(&nv_devices_mutex); > + > + /* Set up the state that nvkm_device_del() relies on before anything > + * that can fail, so that a device whose construction failed can be > + * cleaned up by the caller with nvkm_device_del(). > + */ > + device->func = func; > + INIT_LIST_HEAD(&device->head); > + INIT_LIST_HEAD(&device->subdev); > + nvkm_intr_ctor(device); > + > if (nvkm_device_find_locked(handle)) > goto done; > > - device->func = func; > device->quirk = quirk; > device->dev = dev; [Severity: Medium] Should device->dev = dev also be set before nvkm_device_find_locked()? If nvkm_device_find_locked() returns an existing device on Tegra, nvkm_device_tegra_new() now calls nvkm_device_del(), which runs nvkm_device_tegra_dtor() -> nvkm_device_tegra_remove_iommu(): drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c:nvkm_device_tegra_remove_iommu() { if (tdev->iommu.domain) { nvkm_mm_fini(&tdev->iommu.mm); iommu_detach_device(tdev->iommu.domain, tdev->device.dev); iommu_domain_free(tdev->iommu.domain); } } Because nvkm_device_tegra_probe_iommu() has already attached tdev->iommu.domain before calling nvkm_device_ctor(), leaving tdev->device.dev as NULL causes a NULL pointer dereference inside iommu_detach_device(). [ ... ] > diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/pci.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/pci.c > index 248623b91e295..269ccd4b482e9 100644 > --- a/drivers/gpu/drm/nouveau/nvkm/engine/device/pci.c > +++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/pci.c > @@ -1705,8 +1705,10 @@ nvkm_device_pci_new(struct pci_dev *pci_dev, const char *cfg, const char *dbg, > PCI_FUNC(pci_dev->devfn), name, > cfg, dbg, &pdev->device); > > - if (ret) > + if (ret) { > + nvkm_device_del(pdevice); > return ret; > + } [Severity: Medium] Can calling nvkm_device_del() after nvkm_device_ctor() fails cause a NULL pointer dereference in subdevice destructors? When nvkm_device_ctor() fails after constructing early subdevices (for example, if a later subdevice constructor or nvkm_intr_install() fails), its error path unmaps and clears device->pri before returning: drivers/gpu/drm/nouveau/nvkm/engine/device/base.c:nvkm_device_ctor() { ... done: if (ret && device->pri) { iounmap(device->pri); device->pri = NULL; } mutex_unlock(&nv_devices_mutex); return ret; } nvkm_device_del() then destroys the already constructed subdevices on device->subdev. When it reaches nvkm_devinit_dtor(), nvkm_lockvgac() attempts MMIO accesses through the NULL device->pri pointer. Since nvkm_device_del() already unmaps device->pri after destroying subdevices, should nvkm_device_ctor() leave device->pri mapped for nvkm_device_del() to clean up? -- Sashiko AI review · https://sashiko.dev/#/patchset/20261123-nova-nouveau-gsp-v2-0-5e8c27aa8555@redhat.com?part=1 ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v2 1/3] drm/nouveau/nvkm: fix device leak on ctor failure 2026-11-23 3:14 ` sashiko-bot @ 2026-11-23 13:47 ` Danilo Krummrich 0 siblings, 0 replies; 14+ messages in thread From: Danilo Krummrich @ 2026-11-23 13:47 UTC (permalink / raw) To: sashiko-bot Cc: sashiko-reviews, Dave Airlie, Lyude Paul, Alexandre Courbot, dri-devel, nova-gpu On Mon Nov 23, 2026 at 4:14 AM CET, sashiko-bot wrote: >> diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c >> index a2ed8c4fe52a0..625bb019736af 100644 >> --- a/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c >> +++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c >> @@ -3152,10 +3152,19 @@ nvkm_device_ctor(const struct nvkm_device_func *func, >> unsigned chipset; >> >> mutex_lock(&nv_devices_mutex); >> + >> + /* Set up the state that nvkm_device_del() relies on before anything >> + * that can fail, so that a device whose construction failed can be >> + * cleaned up by the caller with nvkm_device_del(). >> + */ >> + device->func = func; >> + INIT_LIST_HEAD(&device->head); >> + INIT_LIST_HEAD(&device->subdev); >> + nvkm_intr_ctor(device); >> + >> if (nvkm_device_find_locked(handle)) >> goto done; >> >> - device->func = func; >> device->quirk = quirk; >> device->dev = dev; > > [Severity: Medium] > Should device->dev = dev also be set before nvkm_device_find_locked()? > > If nvkm_device_find_locked() returns an existing device on Tegra, > nvkm_device_tegra_new() now calls nvkm_device_del(), which runs > nvkm_device_tegra_dtor() -> nvkm_device_tegra_remove_iommu(): > > drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c:nvkm_device_tegra_remove_iommu() { > if (tdev->iommu.domain) { > nvkm_mm_fini(&tdev->iommu.mm); > iommu_detach_device(tdev->iommu.domain, tdev->device.dev); > iommu_domain_free(tdev->iommu.domain); > } > } > > Because nvkm_device_tegra_probe_iommu() has already attached > tdev->iommu.domain before calling nvkm_device_ctor(), leaving > tdev->device.dev as NULL causes a NULL pointer dereference inside > iommu_detach_device(). I think Sashiko is right about this, but having an API contract that relies on a struct being partially initialized on failure isn't great at all. I think nvkm_device_tegra_remove_iommu() should just not rely on struct nvkm_device being initialized. struct nvkm_device_tegra already stores struct platform_device, so I think we can just use &tdev->pdev.dev in nvkm_device_tegra_remove_iommu(). More generally, can't we keep the semantics of nvkm_device_ctor() to clean up after itself and not guarantee partial initialization to reuse nvkm_device_del()? ^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v2 2/3] drm/nouveau: add option to leave GSP-capable GPUs to other drivers 2026-11-23 2:50 [PATCH v2 0/3] nova/nouveau: add configs/module options to control binding behaviour (v2) Dave Airlie via B4 Relay 2026-11-23 2:50 ` [PATCH v2 1/3] drm/nouveau/nvkm: fix device leak on ctor failure Dave Airlie via B4 Relay @ 2026-11-23 2:50 ` Dave Airlie via B4 Relay 2026-11-23 2:58 ` sashiko-bot 2026-11-23 17:31 ` Timur Tabi 2026-11-23 2:50 ` [PATCH v2 3/3] nova-core: only bind to GPUs when explicitly requested Dave Airlie via B4 Relay 2 siblings, 2 replies; 14+ messages in thread From: Dave Airlie via B4 Relay @ 2026-11-23 2:50 UTC (permalink / raw) To: Lyude Paul, Danilo Krummrich, Alexandre Courbot Cc: dri-devel, nouveau, nova-gpu, Dave Airlie From: Dave Airlie <airlied@redhat.com> nouveau currently binds to every NVIDIA GPU it encounters. The nova-core driver is being written for GSP-capable (Turing and later) GPUs, so the two drivers compete for the same devices, with whichever registers first winning. Add the DRM_NOUVEAU_BIND_GSP Kconfig option (default y) and a bind_gsp module parameter, defaulting to the Kconfig value and able to override it in both directions, controlling whether nouveau claims GSP-capable GPUs. Distributions that want nova-core to be the default driver for GSP-capable GPUs can set CONFIG_DRM_NOUVEAU_BIND_GSP=n; the nouveau.bind_gsp=0 kernel command line parameter switches it at boot time. --- drivers/gpu/drm/nouveau/Kconfig | 17 +++++++++++++++++ drivers/gpu/drm/nouveau/include/nvkm/core/pci.h | 2 +- drivers/gpu/drm/nouveau/nouveau_drm.c | 9 ++++++++- drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 16 +++++++++++++++- drivers/gpu/drm/nouveau/nvkm/engine/device/pci.c | 4 ++-- drivers/gpu/drm/nouveau/nvkm/engine/device/priv.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c | 5 ++++- 7 files changed, 48 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/nouveau/Kconfig b/drivers/gpu/drm/nouveau/Kconfig index 3b5757aed9c8..863cc235838b 100644 --- a/drivers/gpu/drm/nouveau/Kconfig +++ b/drivers/gpu/drm/nouveau/Kconfig @@ -120,3 +120,20 @@ config DRM_NOUVEAU_SIL164 help Support for sil164 and similar single-link (or dual-link when used in pairs) TMDS transmitters. + +config DRM_NOUVEAU_BIND_GSP + bool "Make nouveau the default driver for GSP-capable GPUs" + depends on DRM_NOUVEAU + default y + help + Make nouveau bind to all NVIDIA GPUs by default, as it always + has. + + If another NVIDIA driver, such as nova-core, should claim the + GSP-capable (Turing and later) GPUs instead, say N here; nouveau + then leaves those GPUs to other drivers and continues to bind to + older GPUs itself. nouveau can also be prevented from binding to + GSP-capable GPUs at boot with nouveau.bind_gsp=0 on the kernel + command line. + + If unsure, say Y. diff --git a/drivers/gpu/drm/nouveau/include/nvkm/core/pci.h b/drivers/gpu/drm/nouveau/include/nvkm/core/pci.h index 7444c4d59e09..075fe192b26f 100644 --- a/drivers/gpu/drm/nouveau/include/nvkm/core/pci.h +++ b/drivers/gpu/drm/nouveau/include/nvkm/core/pci.h @@ -10,5 +10,5 @@ struct nvkm_device_pci { }; int nvkm_device_pci_new(struct pci_dev *, const char *cfg, const char *dbg, - struct nvkm_device **); + bool bind_gsp, struct nvkm_device **); #endif diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c index 5e1336615cf6..582eb0c91b10 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drm.c +++ b/drivers/gpu/drm/nouveau/nouveau_drm.c @@ -112,6 +112,11 @@ MODULE_PARM_DESC(runpm, "disable (0), force enable (1), optimus only default (-1 static int nouveau_runtime_pm = -1; module_param_named(runpm, nouveau_runtime_pm, int, 0400); +MODULE_PARM_DESC(bind_gsp, "bind to GSP-capable (Turing and later) GPUs " + "(0 = leave them to other drivers, e.g. nova)"); +static bool nouveau_bind_gsp = IS_ENABLED(CONFIG_DRM_NOUVEAU_BIND_GSP); +module_param_named(bind_gsp, nouveau_bind_gsp, bool, 0400); + static const struct drm_driver driver_legacy_kms; static const struct drm_driver driver_atomic_kms; @@ -881,7 +886,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 = nvkm_device_pci_new(pdev, nouveau_config, nouveau_debug, &device); + ret = nvkm_device_pci_new(pdev, nouveau_config, nouveau_debug, + nouveau_bind_gsp, &device); if (ret) return ret; @@ -1460,6 +1466,7 @@ static void nouveau_display_options(void) DRM_DEBUG_DRIVER("... runpm : %d\n", nouveau_runtime_pm); DRM_DEBUG_DRIVER("... vram_pushbuf : %d\n", nouveau_vram_pushbuf); DRM_DEBUG_DRIVER("... hdmimhz : %d\n", nouveau_hdmimhz); + DRM_DEBUG_DRIVER("... bind_gsp : %d\n", nouveau_bind_gsp); } static const struct dev_pm_ops nouveau_pm_ops = { diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c index 625bb019736a..2439f0022443 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c @@ -3143,7 +3143,7 @@ nvkm_device_ctor(const struct nvkm_device_func *func, const struct nvkm_device_quirk *quirk, struct device *dev, enum nvkm_device_type type, u64 handle, const char *name, const char *cfg, const char *dbg, - struct nvkm_device *device) + bool bind_gsp, struct nvkm_device *device) { struct nvkm_subdev *subdev; u64 mmio_base, mmio_size; @@ -3389,6 +3389,20 @@ nvkm_device_ctor(const struct nvkm_device_func *func, goto done; } + /* Unless nouveau is the default NVIDIA driver, leave GSP-capable + * (Turing and later) PCI GPUs to other drivers, such as nova-core. + * Older GPUs are always bound. + * + * Reject before subdevs are constructed, as that would already load + * GSP firmware for GPUs that are not going to be used. + */ + if (device->func->pci && device->card_type >= TU100 && !bind_gsp) { + nvdev_info(device, "leaving GSP-capable GPU to other drivers " + "(bind_gsp=0)\n"); + ret = -ENODEV; + goto done; + } + /* read strapping information */ strap = nvkm_rd32(device, 0x101000); diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/pci.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/pci.c index 269ccd4b482e..735f6537273b 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/device/pci.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/pci.c @@ -1650,7 +1650,7 @@ nvkm_device_pci_func = { int nvkm_device_pci_new(struct pci_dev *pci_dev, const char *cfg, const char *dbg, - struct nvkm_device **pdevice) + bool bind_gsp, struct nvkm_device **pdevice) { const struct nvkm_device_quirk *quirk = NULL; const struct nvkm_device_pci_device *pcid; @@ -1703,7 +1703,7 @@ nvkm_device_pci_new(struct pci_dev *pci_dev, const char *cfg, const char *dbg, pci_dev->bus->number << 16 | PCI_SLOT(pci_dev->devfn) << 8 | PCI_FUNC(pci_dev->devfn), name, - cfg, dbg, &pdev->device); + cfg, dbg, bind_gsp, &pdev->device); if (ret) { nvkm_device_del(pdevice); diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/priv.h b/drivers/gpu/drm/nouveau/nvkm/engine/device/priv.h index d0c40f034244..a462051d2977 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/device/priv.h +++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/priv.h @@ -54,7 +54,7 @@ int nvkm_device_ctor(const struct nvkm_device_func *, const struct nvkm_device_quirk *, struct device *, enum nvkm_device_type, u64 handle, const char *name, const char *cfg, const char *dbg, - struct nvkm_device *); + bool bind_gsp, struct nvkm_device *); int nvkm_device_init(struct nvkm_device *); int nvkm_device_fini(struct nvkm_device *, enum nvkm_suspend_state suspend); #endif diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c index eb4f43287796..6d82de5b4c8c 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c @@ -329,9 +329,12 @@ nvkm_device_tegra_new(const struct nvkm_device_tegra_func *func, tdev->gpu_speedo = tegra_sku_info.gpu_speedo_value; tdev->gpu_speedo_id = tegra_sku_info.gpu_speedo_id; + /* Platform devices are always bound, regardless of the bind_gsp + * policy for PCI devices. + */ ret = nvkm_device_ctor(&nvkm_device_tegra_func, NULL, &pdev->dev, NVKM_DEVICE_TEGRA, pdev->id, NULL, - cfg, dbg, &tdev->device); + cfg, dbg, true, &tdev->device); if (ret) { struct nvkm_device *device = &tdev->device; -- 2.56.1 ^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH v2 2/3] drm/nouveau: add option to leave GSP-capable GPUs to other drivers 2026-11-23 2:50 ` [PATCH v2 2/3] drm/nouveau: add option to leave GSP-capable GPUs to other drivers Dave Airlie via B4 Relay @ 2026-11-23 2:58 ` sashiko-bot 2026-11-23 17:31 ` Timur Tabi 1 sibling, 0 replies; 14+ messages in thread From: sashiko-bot @ 2026-11-23 2:58 UTC (permalink / raw) To: Dave Airlie, Lyude Paul, Danilo Krummrich, Alexandre Courbot Cc: dri-devel, nova-gpu Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [High] drm/nouveau: missing Signed-off-by trailer in commit message -- commit f8a48aaf87bee63f3410b9230037e0818c036931 Author: Dave Airlie <airlied@redhat.com> > drm/nouveau: add option to leave GSP-capable GPUs to other drivers > > nouveau currently binds to every NVIDIA GPU it encounters. The > nova-core driver is being written for GSP-capable (Turing and later) > GPUs, so the two drivers compete for the same devices, with whichever > registers first winning. > > Add the DRM_NOUVEAU_BIND_GSP Kconfig option (default y) and a bind_gsp > module parameter, defaulting to the Kconfig value and able to override > it in both directions, controlling whether nouveau claims GSP-capable > GPUs. > > Distributions that want nova-core to be the default driver for > GSP-capable GPUs can set CONFIG_DRM_NOUVEAU_BIND_GSP=n; the > nouveau.bind_gsp=0 kernel command line parameter switches it at boot > time. [Severity: High] This commit is missing a Signed-off-by: trailer in the commit message. -- Sashiko AI review · https://sashiko.dev/#/patchset/20261123-nova-nouveau-gsp-v2-0-5e8c27aa8555@redhat.com?part=2 ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v2 2/3] drm/nouveau: add option to leave GSP-capable GPUs to other drivers 2026-11-23 2:50 ` [PATCH v2 2/3] drm/nouveau: add option to leave GSP-capable GPUs to other drivers Dave Airlie via B4 Relay 2026-11-23 2:58 ` sashiko-bot @ 2026-11-23 17:31 ` Timur Tabi 2026-11-23 21:11 ` David Airlie 1 sibling, 1 reply; 14+ messages in thread From: Timur Tabi @ 2026-11-23 17:31 UTC (permalink / raw) To: airlied@redhat.com, Alexandre Courbot, lyude@redhat.com, dakr@kernel.org Cc: dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org, nova-gpu@lists.linux.dev On Mon, 2026-11-23 at 12:50 +1000, Dave Airlie via B4 Relay wrote: > Distributions that want nova-core to be the default driver for > GSP-capable GPUs can set CONFIG_DRM_NOUVEAU_BIND_GSP=n; the > nouveau.bind_gsp=0 kernel command line parameter switches it at boot > time. Just FYI, we've already had to scold two distros for blindly enabling "CONFIG_NOVA_CORE", despite all the warnings, because "that's just what we do". So personally, I'm not a fan of CONFIG_DRM_NOUVEAU_BIND_GSP. I would prefer just the command- line parameter. ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v2 2/3] drm/nouveau: add option to leave GSP-capable GPUs to other drivers 2026-11-23 17:31 ` Timur Tabi @ 2026-11-23 21:11 ` David Airlie 2026-11-23 21:14 ` Danilo Krummrich 2026-11-23 21:16 ` Timur Tabi 0 siblings, 2 replies; 14+ messages in thread From: David Airlie @ 2026-11-23 21:11 UTC (permalink / raw) To: Timur Tabi Cc: Alexandre Courbot, lyude@redhat.com, dakr@kernel.org, dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org, nova-gpu@lists.linux.dev On Tue, Nov 24, 2026 at 3:34 AM Timur Tabi <ttabi@nvidia.com> wrote: > > On Mon, 2026-11-23 at 12:50 +1000, Dave Airlie via B4 Relay wrote: > > Distributions that want nova-core to be the default driver for > > GSP-capable GPUs can set CONFIG_DRM_NOUVEAU_BIND_GSP=n; the > > nouveau.bind_gsp=0 kernel command line parameter switches it at boot > > time. > > Just FYI, we've already had to scold two distros for blindly enabling "CONFIG_NOVA_CORE", > despite all the warnings, because "that's just what we do". > > So personally, I'm not a fan of CONFIG_DRM_NOUVEAU_BIND_GSP. I would prefer just the command- > line parameter. At some point we need to give the option, but indeed we don't have to right now, if nova developers are fine with always providing the command line option then we could drop the bind options for now, but I know it can be annoying for devs. Also distro will enable new things with no warnings to not do so, but I wonder should we do a default y option of NOT binding nova for allyesconfig. Dave. ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v2 2/3] drm/nouveau: add option to leave GSP-capable GPUs to other drivers 2026-11-23 21:11 ` David Airlie @ 2026-11-23 21:14 ` Danilo Krummrich 2026-11-23 21:16 ` Timur Tabi 1 sibling, 0 replies; 14+ messages in thread From: Danilo Krummrich @ 2026-11-23 21:14 UTC (permalink / raw) To: David Airlie Cc: Timur Tabi, Alexandre Courbot, lyude@redhat.com, dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org, nova-gpu@lists.linux.dev On Mon Nov 23, 2026 at 10:11 PM CET, David Airlie wrote: > At some point we need to give the option, but indeed we don't have to > right now, if nova developers are fine with always providing the > command line option then we could drop the bind options for now, > but I know it can be annoying for devs. I'd prefer to go with a Kconfig option right away. ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v2 2/3] drm/nouveau: add option to leave GSP-capable GPUs to other drivers 2026-11-23 21:11 ` David Airlie 2026-11-23 21:14 ` Danilo Krummrich @ 2026-11-23 21:16 ` Timur Tabi 1 sibling, 0 replies; 14+ messages in thread From: Timur Tabi @ 2026-11-23 21:16 UTC (permalink / raw) To: airlied@redhat.com Cc: dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org, Alexandre Courbot, lyude@redhat.com, dakr@kernel.org, nova-gpu@lists.linux.dev On Tue, 2026-11-24 at 07:11 +1000, David Airlie wrote: > At some point we need to give the option, but indeed we don't have to > right now, if nova developers are fine with always providing the > command line option then we could drop the bind options for now, > > but I know it can be annoying for devs. I'm totally okay with a command-line parameter, because I always use a script to launch Nova. I can't speak for the others, though. > Also distro will enable new things with no warnings to not do so, but > I wonder should we do a default y option of NOT binding nova for > allyesconfig. Then some other distro will just do "default n" for no reason. I say we keep it simple and require a parameter. But that's just my two cents. ^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v2 3/3] nova-core: only bind to GPUs when explicitly requested 2026-11-23 2:50 [PATCH v2 0/3] nova/nouveau: add configs/module options to control binding behaviour (v2) Dave Airlie via B4 Relay 2026-11-23 2:50 ` [PATCH v2 1/3] drm/nouveau/nvkm: fix device leak on ctor failure Dave Airlie via B4 Relay 2026-11-23 2:50 ` [PATCH v2 2/3] drm/nouveau: add option to leave GSP-capable GPUs to other drivers Dave Airlie via B4 Relay @ 2026-11-23 2:50 ` Dave Airlie via B4 Relay 2026-11-23 2:55 ` sashiko-bot 2026-11-23 15:18 ` Danilo Krummrich 2 siblings, 2 replies; 14+ messages in thread From: Dave Airlie via B4 Relay @ 2026-11-23 2:50 UTC (permalink / raw) To: Lyude Paul, Danilo Krummrich, Alexandre Courbot Cc: dri-devel, nouveau, nova-gpu, Dave Airlie From: Dave Airlie <airlied@redhat.com> nova-core currently binds to every NVIDIA GPU it supports (GSP-capable, Turing and later GPUs), competing with nouveau for the same devices. Add the NOVA_CORE_BIND_GSP Kconfig option (default n) and a bind_gsp module parameter, defaulting to the Kconfig value and able to override it in both directions. Unless one of them requests binding, probe() rejects the GPU with -ENODEV and leaves the device to other drivers, such as nouveau. The PCI driver still registers, so module autoloading via modalias keeps working when binding is disabled. As nova-core is work in progress, the default is to not bind at all. Developers can enable binding with CONFIG_NOVA_CORE_BIND_GSP=y, or nova-core.bind_gsp=1 on the kernel command line, combined with nouveau.bind_gsp=0 (or CONFIG_DRM_NOUVEAU_BIND_GSP=n) so that nouveau yields the GSP-capable GPUs. --- drivers/gpu/nova-core/Kconfig | 21 +++++++++++++++++++++ drivers/gpu/nova-core/driver.rs | 13 +++++++++++++ drivers/gpu/nova-core/nova_core.rs | 4 ++++ 3 files changed, 38 insertions(+) diff --git a/drivers/gpu/nova-core/Kconfig b/drivers/gpu/nova-core/Kconfig index 2e11e46c99c7..058742d50692 100644 --- a/drivers/gpu/nova-core/Kconfig +++ b/drivers/gpu/nova-core/Kconfig @@ -30,3 +30,24 @@ config NOVA_CORE_SELFTESTS logs its failure and lets the probe continue. If unsure, say N. + +config NOVA_CORE_BIND_GSP + bool "Make nova-core the default driver for GSP-capable GPUs" + depends on NOVA_CORE + default n + help + Make nova-core bind to all NVIDIA GPUs it supports by default. + + By default nova-core does not bind to any GPU and leaves NVIDIA + GPUs to other drivers, such as nouveau. Say Y here, or boot with + nova-core.bind_gsp=1, to make nova-core claim NVIDIA GPUs + instead. + + nova-core is work in progress and may not be functional, so this + is intended for nova developers and testers only. When enabled, + nouveau must not bind to the same (GSP-capable) GPUs, i.e. + CONFIG_DRM_NOUVEAU_BIND_GSP=N or nouveau.bind_gsp=0 is required. + Otherwise both drivers compete for the same devices and + whichever is loaded first wins. + + If unsure, say N. diff --git a/drivers/gpu/nova-core/driver.rs b/drivers/gpu/nova-core/driver.rs index d6bc972d47c7..66208a244cab 100644 --- a/drivers/gpu/nova-core/driver.rs +++ b/drivers/gpu/nova-core/driver.rs @@ -105,6 +105,19 @@ fn probe<'bound>( dev_dbg!(pdev, "Probe Nova Core GPU driver.\n"); try_pin_init!(NovaCore { + // Only bind when explicitly requested through the corresponding + // Kconfig option or module parameter. By default, leave NVIDIA + // GPUs to other drivers, such as nouveau. + _: { + if !crate::module_parameters::bind_gsp.value() { + dev_info!( + pdev, + "Not binding to GPU; make nova-core the default NVIDIA driver with CONFIG_NOVA_CORE_BIND_GSP=y or nova-core.bind_gsp=1\n" + ); + Err(ENODEV)?; + } + }, + _: { pdev.enable_device_mem()?; pdev.set_master(); diff --git a/drivers/gpu/nova-core/nova_core.rs b/drivers/gpu/nova-core/nova_core.rs index 84f777844592..d18dacad98b6 100644 --- a/drivers/gpu/nova-core/nova_core.rs +++ b/drivers/gpu/nova-core/nova_core.rs @@ -97,6 +97,10 @@ fn init(module: &'static kernel::ThisModule) -> impl PinInit<Self, Error> { default: false, description: "Keep the GSP-RM log buffers in debugfs after their GPU is unbound", }, + bind_gsp: bool { + default: cfg!(CONFIG_NOVA_CORE_BIND_GSP), + description: "Bind to GSP-capable GPUs, making nova-core the default NVIDIA driver", + }, }, } -- 2.56.1 ^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH v2 3/3] nova-core: only bind to GPUs when explicitly requested 2026-11-23 2:50 ` [PATCH v2 3/3] nova-core: only bind to GPUs when explicitly requested Dave Airlie via B4 Relay @ 2026-11-23 2:55 ` sashiko-bot 2026-11-23 15:18 ` Danilo Krummrich 1 sibling, 0 replies; 14+ messages in thread From: sashiko-bot @ 2026-11-23 2:55 UTC (permalink / raw) To: Dave Airlie, Lyude Paul, Danilo Krummrich, Alexandre Courbot Cc: dri-devel, nova-gpu Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [High] nova-core: missing Signed-off-by trailer in commit message -- commit 5f7cc6c15454e28a85afc162fef5c8d7a26c0ba8 Author: Dave Airlie <airlied@redhat.com> > nova-core: only bind to GPUs when explicitly requested > > nova-core currently binds to every NVIDIA GPU it supports > (GSP-capable, Turing and later GPUs), competing with nouveau for the > same devices. > > Add the NOVA_CORE_BIND_GSP Kconfig option (default n) and a bind_gsp > module parameter, defaulting to the Kconfig value and able to override > it in both directions. Unless one of them requests binding, probe() > rejects the GPU with -ENODEV and leaves the device to other drivers, > such as nouveau. The PCI driver still registers, so module autoloading > via modalias keeps working when binding is disabled. > > As nova-core is work in progress, the default is to not bind at all. > Developers can enable binding with CONFIG_NOVA_CORE_BIND_GSP=y, or > nova-core.bind_gsp=1 on the kernel command line, combined with > nouveau.bind_gsp=0 (or CONFIG_DRM_NOUVEAU_BIND_GSP=n) so that nouveau > yields the GSP-capable GPUs. [Severity: High] The commit message is missing a Signed-off-by: trailer, which is required under the Developer Certificate of Origin (Documentation/process/submitting-patches.rst). -- Sashiko AI review · https://sashiko.dev/#/patchset/20261123-nova-nouveau-gsp-v2-0-5e8c27aa8555@redhat.com?part=3 ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v2 3/3] nova-core: only bind to GPUs when explicitly requested 2026-11-23 2:50 ` [PATCH v2 3/3] nova-core: only bind to GPUs when explicitly requested Dave Airlie via B4 Relay 2026-11-23 2:55 ` sashiko-bot @ 2026-11-23 15:18 ` Danilo Krummrich 2026-11-23 16:53 ` Danilo Krummrich 1 sibling, 1 reply; 14+ messages in thread From: Danilo Krummrich @ 2026-11-23 15:18 UTC (permalink / raw) To: Dave Airlie via B4 Relay Cc: airlied, Lyude Paul, Alexandre Courbot, dri-devel, nouveau, nova-gpu On Mon Nov 23, 2026 at 3:50 AM CET, Dave Airlie via B4 Relay wrote: > @@ -30,3 +30,24 @@ config NOVA_CORE_SELFTESTS > logs its failure and lets the probe continue. > > If unsure, say N. > + > +config NOVA_CORE_BIND_GSP > + bool "Make nova-core the default driver for GSP-capable GPUs" > + depends on NOVA_CORE > + default n > + help > + Make nova-core bind to all NVIDIA GPUs it supports by default. > + > + By default nova-core does not bind to any GPU and leaves NVIDIA > + GPUs to other drivers, such as nouveau. Say Y here, or boot with > + nova-core.bind_gsp=1, to make nova-core claim NVIDIA GPUs > + instead. > + > + nova-core is work in progress and may not be functional, so this > + is intended for nova developers and testers only. When enabled, > + nouveau must not bind to the same (GSP-capable) GPUs, i.e. > + CONFIG_DRM_NOUVEAU_BIND_GSP=N or nouveau.bind_gsp=0 is required. > + Otherwise both drivers compete for the same devices and > + whichever is loaded first wins. I think this is a bit unsatisfying, for the Kconfig at least it would be nice to avoid the possibility of being able to configure - NOVA_CORE_BIND_GSP=y && DRM_NOUVEAU_BIND_GSP=y - NOVA_CORE_BIND_GSP=n && DRM_NOUVEAU_BIND_GSP=n since I wouldn't consider them valid combinations of Kconfig options. Maybe something like this: config NVIDIA_GSP_DEFAULT_NOVA bool "Use Nova by default for GSP-capable NVIDIA GPUs" depends on DRM_NOUVEAU != n && NOVA_CORE != n default n help When both Nouveau and Nova are built, use Nova by default for GSP-capable (Turing and later) NVIDIA GPUs. When only one driver is built, that driver is used by default. Older GPUs use Nouveau. Override this default using the nouveau.bind_gsp and nova-core.bind_gsp module parameters. Nova is work in progress and may not be functional. This option is intended for developers and testers only. If unsure, say N. I think for the module parameters it is probably fine to not restrict this ambiguity. We've also discussed whether we can detect vGPU mode in order to pass GPUs with vGPU mode enabled to nova-core regardless. I think this requires an FSP request via EMEM (at least on Blackwell), so it should be possible to implement that with the existing infrastructure in nouveau as well, but I'm not convinced it's worth it. > + If unsure, say N. > diff --git a/drivers/gpu/nova-core/driver.rs b/drivers/gpu/nova-core/driver.rs > index d6bc972d47c7..66208a244cab 100644 > --- a/drivers/gpu/nova-core/driver.rs > +++ b/drivers/gpu/nova-core/driver.rs > @@ -105,6 +105,19 @@ fn probe<'bound>( > dev_dbg!(pdev, "Probe Nova Core GPU driver.\n"); > > try_pin_init!(NovaCore { > + // Only bind when explicitly requested through the corresponding > + // Kconfig option or module parameter. By default, leave NVIDIA > + // GPUs to other drivers, such as nouveau. > + _: { > + if !crate::module_parameters::bind_gsp.value() { > + dev_info!( > + pdev, > + "Not binding to GPU; make nova-core the default NVIDIA driver with CONFIG_NOVA_CORE_BIND_GSP=y or nova-core.bind_gsp=1\n" > + ); > + Err(ENODEV)?; I'd prefer this to be wrapped in an associated function of NovaCoreModule, e.g. NovaCoreModule::check_bind_allowed(). I'd also move it before try_pin_init!(). ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v2 3/3] nova-core: only bind to GPUs when explicitly requested 2026-11-23 15:18 ` Danilo Krummrich @ 2026-11-23 16:53 ` Danilo Krummrich 0 siblings, 0 replies; 14+ messages in thread From: Danilo Krummrich @ 2026-11-23 16:53 UTC (permalink / raw) To: Dave Airlie via B4 Relay Cc: airlied, Lyude Paul, Alexandre Courbot, dri-devel, nouveau, nova-gpu On Mon Nov 23, 2026 at 4:18 PM CET, Danilo Krummrich wrote: > On Mon Nov 23, 2026 at 3:50 AM CET, Dave Airlie via B4 Relay wrote: >> @@ -30,3 +30,24 @@ config NOVA_CORE_SELFTESTS >> logs its failure and lets the probe continue. >> >> If unsure, say N. >> + >> +config NOVA_CORE_BIND_GSP >> + bool "Make nova-core the default driver for GSP-capable GPUs" >> + depends on NOVA_CORE >> + default n >> + help >> + Make nova-core bind to all NVIDIA GPUs it supports by default. >> + >> + By default nova-core does not bind to any GPU and leaves NVIDIA >> + GPUs to other drivers, such as nouveau. Say Y here, or boot with >> + nova-core.bind_gsp=1, to make nova-core claim NVIDIA GPUs >> + instead. >> + >> + nova-core is work in progress and may not be functional, so this >> + is intended for nova developers and testers only. When enabled, >> + nouveau must not bind to the same (GSP-capable) GPUs, i.e. >> + CONFIG_DRM_NOUVEAU_BIND_GSP=N or nouveau.bind_gsp=0 is required. >> + Otherwise both drivers compete for the same devices and >> + whichever is loaded first wins. > > I think this is a bit unsatisfying, for the Kconfig at least it would be nice to > avoid the possibility of being able to configure > > - NOVA_CORE_BIND_GSP=y && DRM_NOUVEAU_BIND_GSP=y > > - NOVA_CORE_BIND_GSP=n && DRM_NOUVEAU_BIND_GSP=n > > since I wouldn't consider them valid combinations of Kconfig options. > > Maybe something like this: > > config NVIDIA_GSP_DEFAULT_NOVA > bool "Use Nova by default for GSP-capable NVIDIA GPUs" > depends on DRM_NOUVEAU != n && NOVA_CORE != n > default n > help > When both Nouveau and Nova are built, use Nova by default > for GSP-capable (Turing and later) NVIDIA GPUs. > When only one driver is built, that driver is used by > default. Older GPUs use Nouveau. > > Override this default using the nouveau.bind_gsp and > nova-core.bind_gsp module parameters. > > Nova is work in progress and may not be functional. > This option is intended for developers and testers only. > > If unsure, say N. > > I think for the module parameters it is probably fine to not restrict this > ambiguity. > > We've also discussed whether we can detect vGPU mode in order to pass GPUs with > vGPU mode enabled to nova-core regardless. I think this requires an FSP request > via EMEM (at least on Blackwell), so it should be possible to implement that > with the existing infrastructure in nouveau as well, but I'm not convinced it's > worth it. > >> + If unsure, say N. >> diff --git a/drivers/gpu/nova-core/driver.rs b/drivers/gpu/nova-core/driver.rs >> index d6bc972d47c7..66208a244cab 100644 >> --- a/drivers/gpu/nova-core/driver.rs >> +++ b/drivers/gpu/nova-core/driver.rs >> @@ -105,6 +105,19 @@ fn probe<'bound>( >> dev_dbg!(pdev, "Probe Nova Core GPU driver.\n"); >> >> try_pin_init!(NovaCore { >> + // Only bind when explicitly requested through the corresponding >> + // Kconfig option or module parameter. By default, leave NVIDIA >> + // GPUs to other drivers, such as nouveau. >> + _: { >> + if !crate::module_parameters::bind_gsp.value() { >> + dev_info!( >> + pdev, >> + "Not binding to GPU; make nova-core the default NVIDIA driver with CONFIG_NOVA_CORE_BIND_GSP=y or nova-core.bind_gsp=1\n" >> + ); >> + Err(ENODEV)?; > > I'd prefer this to be wrapped in an associated function of NovaCoreModule, e.g. > NovaCoreModule::check_bind_allowed(). I'd also move it before try_pin_init!(). Actually, please disregard the latter, I want to avoid the need for pin_init_scope(). ^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2026-11-23 21:16 UTC | newest] Thread overview: 14+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-11-23 2:50 [PATCH v2 0/3] nova/nouveau: add configs/module options to control binding behaviour (v2) Dave Airlie via B4 Relay 2026-11-23 2:50 ` [PATCH v2 1/3] drm/nouveau/nvkm: fix device leak on ctor failure Dave Airlie via B4 Relay 2026-11-23 3:14 ` sashiko-bot 2026-11-23 13:47 ` Danilo Krummrich 2026-11-23 2:50 ` [PATCH v2 2/3] drm/nouveau: add option to leave GSP-capable GPUs to other drivers Dave Airlie via B4 Relay 2026-11-23 2:58 ` sashiko-bot 2026-11-23 17:31 ` Timur Tabi 2026-11-23 21:11 ` David Airlie 2026-11-23 21:14 ` Danilo Krummrich 2026-11-23 21:16 ` Timur Tabi 2026-11-23 2:50 ` [PATCH v2 3/3] nova-core: only bind to GPUs when explicitly requested Dave Airlie via B4 Relay 2026-11-23 2:55 ` sashiko-bot 2026-11-23 15:18 ` Danilo Krummrich 2026-11-23 16:53 ` Danilo Krummrich
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox