John Hubbard
2025-Nov-19 07:07 UTC
[PATCH 3/6] gpu: nova-core: Blackwell: basic GPU identification
On 11/18/25 7:15 PM, Dave Airlie wrote:> On Wed, 19 Nov 2025 at 12:46, Alexandre Courbot <acourbot at nvidia.com> wrote:...>>> Maybe let's just do the long lists of chipsets for now...? >> >> Yeah, I've hit this issue as well. The compiler might remove that >> limitation in the future, or maybe we can craft a `chipset_range!()` >> macro that hides the messy casting, but this exhaustive listing also has >> the benefit of forcing us to consider every critical site whenever we >> support a new chipset so I'm actually not too bothered by it. > > I wrote some macros in my nova-core-experiments, had > chipset_before/after/range I think >aha, I was afraid someone was going to say "macros" out loud, at some point. And now you've gone and done it. :) Well, I think we probably want: a) The ability to clearly specify a chipset range, and b) For extra credit, maybe: also be able to specify entire GPU architectures, and architecture ranges. ...again, without too much extraneous noise at the call sites: the goal is to read it easily: GA102..=GA104 | Architecture::Blackwell for example. Macros are going to require that to be less clean, but let me poke around and see. thanks, -- John Hubbard
Dave Airlie
2025-Nov-19 07:15 UTC
[PATCH 3/6] gpu: nova-core: Blackwell: basic GPU identification
On Wed, 19 Nov 2025 at 17:08, John Hubbard <jhubbard at nvidia.com> wrote:> > On 11/18/25 7:15 PM, Dave Airlie wrote: > > On Wed, 19 Nov 2025 at 12:46, Alexandre Courbot <acourbot at nvidia.com> wrote: > ... > >>> Maybe let's just do the long lists of chipsets for now...? > >> > >> Yeah, I've hit this issue as well. The compiler might remove that > >> limitation in the future, or maybe we can craft a `chipset_range!()` > >> macro that hides the messy casting, but this exhaustive listing also has > >> the benefit of forcing us to consider every critical site whenever we > >> support a new chipset so I'm actually not too bothered by it. > > > > I wrote some macros in my nova-core-experiments, had > > chipset_before/after/range I think > > > > aha, I was afraid someone was going to say "macros" out loud, at some > point. And now you've gone and done it. :) > > Well, I think we probably want: > > a) The ability to clearly specify a chipset range, and > > b) For extra credit, maybe: also be able to specify entire GPU > architectures, and architecture ranges. > > ...again, without too much extraneous noise at the call sites: the goal is > to read it easily: > > GA102..=GA104 | Architecture::Blackwell > > > for example. Macros are going to require that to be less clean, but > let me poke around and see.https://gitlab.freedesktop.org/nouvelles/kernel/-/blob/nova-core-experiments-fsp-boot/drivers/gpu/nova-core/gpu.rs?ref_type=heads#L96 is what I did, but yeah probably not going to get nice ranges like that. Dave.