dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Danilo Krummrich" <dakr@kernel.org>
To: "Dave Airlie" <airlied@gmail.com>
Cc: "Dave Airlie via B4 Relay"
	<devnull+airlied.redhat.com@kernel.org>, <airlied@redhat.com>,
	"Alexandre Courbot" <acourbot@nvidia.com>,
	<dri-devel@lists.freedesktop.org>,
	<nouveau@lists.freedesktop.org>, <nova-gpu@lists.linux.dev>
Subject: Re: [PATCH v2 3/3] nova-core: only bind to GPUs when explicitly requested
Date: Tue, 24 Nov 2026 12:55:50 +0100	[thread overview]
Message-ID: <DN3F7521O232.LXJ8JBRTSTPQ@kernel.org> (raw)
In-Reply-To: <CAPM=9tw4_Kn2+q0JTZ5Y6+m6PFORJSgq4qSrqtutwWJniusgvQ@mail.gmail.com>

On Tue Nov 24, 2026 at 2:53 AM CET, Dave Airlie wrote:
> On Tue, 24 Nov 2026 at 02:54, Danilo Krummrich <dakr@kernel.org> 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.

      reply	other threads:[~2026-11-24 11:56 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 22:47         ` John Hubbard
2026-11-23 21:16       ` Timur Tabi
2026-11-23 22:58   ` John Hubbard
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
2026-11-24  1:53       ` Dave Airlie
2026-11-24 11:55         ` Danilo Krummrich [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DN3F7521O232.LXJ8JBRTSTPQ@kernel.org \
    --to=dakr@kernel.org \
    --cc=acourbot@nvidia.com \
    --cc=airlied@gmail.com \
    --cc=airlied@redhat.com \
    --cc=devnull+airlied.redhat.com@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=nouveau@lists.freedesktop.org \
    --cc=nova-gpu@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox