On Tue Nov 24, 2026 at 2:53 AM CET, Dave Airlie wrote: > On Tue, 24 Nov 2026 at 02:54, Danilo Krummrich <[email protected]> wrote: >> >> 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. > > While I like the idea, expressing this sort of thing in Kconfig seems > to never end well, I'd prefer to just keep them separate until we can > figure out scenarios where it's screwed up.
Kconfig can be tricky in some (or actually many) cases, but this one seems simple and correct to me. Is there a specific concern? > I'll think about it a bit more, but I'd rather not encode too much > complexity here for fear of one or two people screwing it up and not > reading dmesg. Honestly, I think that the proposed approach is even simpler, because it constrains the Kconfig to exactly the case we want it to exist for in the first place. In addition to the two odd cases I mentioned above, each driver exposes its binding-default option even when the other driver isn't configured, although there is no choice between them. Consequently, we also force that nova-core defaults to not binding even if it is the only driver configured. This is not the end of the world, but it's another inconvenience and also becomes a bit odd once vGPU works. I think the proposed option is sound; it is only available when both competing drivers are configured (either m or y) and defaults to nouveau.
